Changeset 155736 in webkit


Ignore:
Timestamp:
Sep 13, 2013 6:30:06 PM (11 years ago)
Author:
weinig@apple.com
Message:

Replace ScriptState with JSC::ExecState
https://bugs.webkit.org/show_bug.cgi?id=121336

Reviewed by Darin Adler.

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBObjectStore.h:
  • bindings/js/JSInjectedScriptHostCustom.cpp:
  • bindings/js/JSInjectedScriptManager.cpp:
  • bindings/js/JSNodeCustom.cpp:
  • bindings/js/JSNodeFilterCondition.h:
  • bindings/js/ScriptController.cpp:
  • bindings/js/ScriptDebugServer.cpp:
  • bindings/js/ScriptDebugServer.h:
  • bindings/js/ScriptEventListener.cpp:
  • bindings/js/ScriptEventListener.h:
  • bindings/js/ScriptFunctionCall.cpp:
  • bindings/js/ScriptFunctionCall.h:
  • bindings/js/ScriptObject.cpp:
  • bindings/js/ScriptObject.h:
  • bindings/js/ScriptProfiler.cpp:
  • bindings/js/ScriptProfiler.h:
  • bindings/js/ScriptState.cpp:
  • bindings/js/ScriptState.h:
  • bindings/js/ScriptValue.cpp:
  • bindings/js/ScriptValue.h:
  • bindings/js/SerializedScriptValue.cpp:
  • bindings/js/SerializedScriptValue.h:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/NodeFilter.cpp:
  • dom/NodeFilter.h:
  • dom/NodeFilterCondition.cpp:
  • dom/NodeFilterCondition.h:
  • dom/NodeIterator.cpp:
  • dom/NodeIterator.h:
  • dom/ScriptExecutionContext.cpp:
  • dom/ScriptExecutionContext.h:
  • dom/Traversal.cpp:
  • dom/Traversal.h:
  • dom/TreeWalker.cpp:
  • dom/TreeWalker.h:
  • inspector/ConsoleMessage.cpp:
  • inspector/ConsoleMessage.h:
  • inspector/InjectedScript.h:
  • inspector/InjectedScriptBase.cpp:
  • inspector/InjectedScriptBase.h:
  • inspector/InjectedScriptCanvasModule.cpp:
  • inspector/InjectedScriptCanvasModule.h:
  • inspector/InjectedScriptHost.cpp:
  • inspector/InjectedScriptHost.h:
  • inspector/InjectedScriptManager.cpp:
  • inspector/InjectedScriptManager.h:
  • inspector/InjectedScriptModule.cpp:
  • inspector/InjectedScriptModule.h:
  • inspector/InspectorAgent.cpp:
  • inspector/InspectorCanvasAgent.cpp:
  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorConsoleAgent.cpp:
  • inspector/InspectorConsoleAgent.h:
  • inspector/InspectorConsoleInstrumentation.h:
  • inspector/InspectorDOMAgent.cpp:
  • inspector/InspectorDebuggerAgent.cpp:
  • inspector/InspectorDebuggerAgent.h:
  • inspector/InspectorFrontendClientLocal.cpp:
  • inspector/InspectorFrontendHost.cpp:
  • inspector/InspectorIndexedDBAgent.cpp:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/InspectorInstrumentation.h:
  • inspector/PageConsoleAgent.cpp:
  • inspector/PageDebuggerAgent.cpp:
  • inspector/PageRuntimeAgent.cpp:
  • inspector/PageRuntimeAgent.h:
  • inspector/ScriptArguments.cpp:
  • inspector/ScriptArguments.h:
  • inspector/ScriptDebugListener.h:
  • inspector/WorkerDebuggerAgent.cpp:
  • inspector/WorkerRuntimeAgent.cpp:
  • page/Console.cpp:
  • page/Console.h:
  • page/ContentSecurityPolicy.cpp:
  • page/ContentSecurityPolicy.h:
  • page/PageConsole.cpp:
  • page/PageConsole.h:
  • workers/WorkerGlobalScope.cpp:
  • workers/WorkerGlobalScope.h:
Location:
trunk/Source/WebCore
Files:
83 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r155731 r155736  
     12013-09-13  Sam Weinig  <sam@webkit.org>
     2
     3        Replace ScriptState with JSC::ExecState
     4        https://bugs.webkit.org/show_bug.cgi?id=121336
     5
     6        Reviewed by Darin Adler.
     7
     8        * Modules/indexeddb/IDBCursor.h:
     9        * Modules/indexeddb/IDBObjectStore.h:
     10        * bindings/js/JSInjectedScriptHostCustom.cpp:
     11        * bindings/js/JSInjectedScriptManager.cpp:
     12        * bindings/js/JSNodeCustom.cpp:
     13        * bindings/js/JSNodeFilterCondition.h:
     14        * bindings/js/ScriptController.cpp:
     15        * bindings/js/ScriptDebugServer.cpp:
     16        * bindings/js/ScriptDebugServer.h:
     17        * bindings/js/ScriptEventListener.cpp:
     18        * bindings/js/ScriptEventListener.h:
     19        * bindings/js/ScriptFunctionCall.cpp:
     20        * bindings/js/ScriptFunctionCall.h:
     21        * bindings/js/ScriptObject.cpp:
     22        * bindings/js/ScriptObject.h:
     23        * bindings/js/ScriptProfiler.cpp:
     24        * bindings/js/ScriptProfiler.h:
     25        * bindings/js/ScriptState.cpp:
     26        * bindings/js/ScriptState.h:
     27        * bindings/js/ScriptValue.cpp:
     28        * bindings/js/ScriptValue.h:
     29        * bindings/js/SerializedScriptValue.cpp:
     30        * bindings/js/SerializedScriptValue.h:
     31        * dom/Document.cpp:
     32        * dom/Document.h:
     33        * dom/NodeFilter.cpp:
     34        * dom/NodeFilter.h:
     35        * dom/NodeFilterCondition.cpp:
     36        * dom/NodeFilterCondition.h:
     37        * dom/NodeIterator.cpp:
     38        * dom/NodeIterator.h:
     39        * dom/ScriptExecutionContext.cpp:
     40        * dom/ScriptExecutionContext.h:
     41        * dom/Traversal.cpp:
     42        * dom/Traversal.h:
     43        * dom/TreeWalker.cpp:
     44        * dom/TreeWalker.h:
     45        * inspector/ConsoleMessage.cpp:
     46        * inspector/ConsoleMessage.h:
     47        * inspector/InjectedScript.h:
     48        * inspector/InjectedScriptBase.cpp:
     49        * inspector/InjectedScriptBase.h:
     50        * inspector/InjectedScriptCanvasModule.cpp:
     51        * inspector/InjectedScriptCanvasModule.h:
     52        * inspector/InjectedScriptHost.cpp:
     53        * inspector/InjectedScriptHost.h:
     54        * inspector/InjectedScriptManager.cpp:
     55        * inspector/InjectedScriptManager.h:
     56        * inspector/InjectedScriptModule.cpp:
     57        * inspector/InjectedScriptModule.h:
     58        * inspector/InspectorAgent.cpp:
     59        * inspector/InspectorCanvasAgent.cpp:
     60        * inspector/InspectorCanvasAgent.h:
     61        * inspector/InspectorConsoleAgent.cpp:
     62        * inspector/InspectorConsoleAgent.h:
     63        * inspector/InspectorConsoleInstrumentation.h:
     64        * inspector/InspectorDOMAgent.cpp:
     65        * inspector/InspectorDebuggerAgent.cpp:
     66        * inspector/InspectorDebuggerAgent.h:
     67        * inspector/InspectorFrontendClientLocal.cpp:
     68        * inspector/InspectorFrontendHost.cpp:
     69        * inspector/InspectorIndexedDBAgent.cpp:
     70        * inspector/InspectorInstrumentation.cpp:
     71        * inspector/InspectorInstrumentation.h:
     72        * inspector/PageConsoleAgent.cpp:
     73        * inspector/PageDebuggerAgent.cpp:
     74        * inspector/PageRuntimeAgent.cpp:
     75        * inspector/PageRuntimeAgent.h:
     76        * inspector/ScriptArguments.cpp:
     77        * inspector/ScriptArguments.h:
     78        * inspector/ScriptDebugListener.h:
     79        * inspector/WorkerDebuggerAgent.cpp:
     80        * inspector/WorkerRuntimeAgent.cpp:
     81        * page/Console.cpp:
     82        * page/Console.h:
     83        * page/ContentSecurityPolicy.cpp:
     84        * page/ContentSecurityPolicy.h:
     85        * page/PageConsole.cpp:
     86        * page/PageConsole.h:
     87        * workers/WorkerGlobalScope.cpp:
     88        * workers/WorkerGlobalScope.h:
     89
    1902013-09-13  Sam Weinig  <sam@webkit.org>
    291
  • trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h

    r147029 r155736  
    6969    IDBAny* source() const;
    7070
    71     PassRefPtr<IDBRequest> update(ScriptState*, ScriptValue&, ExceptionCode&);
     71    PassRefPtr<IDBRequest> update(JSC::ExecState*, ScriptValue&, ExceptionCode&);
    7272    void advance(unsigned long, ExceptionCode&);
    7373    // FIXME: Try to modify the code generator so this overload is unneeded.
  • trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h

    r141013 r155736  
    6666    bool autoIncrement() const { return m_metadata.autoIncrement; }
    6767
    68     PassRefPtr<IDBRequest> add(ScriptState*, ScriptValue&, ExceptionCode&);
    69     PassRefPtr<IDBRequest> put(ScriptState*, ScriptValue&, ExceptionCode&);
     68    PassRefPtr<IDBRequest> add(JSC::ExecState*, ScriptValue&, ExceptionCode&);
     69    PassRefPtr<IDBRequest> put(JSC::ExecState*, ScriptValue&, ExceptionCode&);
    7070    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, static_cast<IDBKeyRange*>(0), ec); }
    7171    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
     
    7777    PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
    7878    PassRefPtr<IDBRequest> get(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
    79     PassRefPtr<IDBRequest> add(ScriptState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
    80     PassRefPtr<IDBRequest> put(ScriptState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
     79    PassRefPtr<IDBRequest> add(JSC::ExecState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
     80    PassRefPtr<IDBRequest> put(JSC::ExecState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
    8181    PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
    8282    PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
     
    9595    PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
    9696
    97     PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, ScriptState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
    98     PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, ScriptState*, ScriptValue&, PassRefPtr<IDBKey>, ExceptionCode&);
     97    PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
     98    PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, PassRefPtr<IDBKey>, ExceptionCode&);
    9999    void markDeleted() { m_deleted = true; }
    100100    void transactionFinished();
  • trunk/Source/WebCore/bindings/js/DOMRequestState.h

    r152080 r155736  
    5050        if (m_scriptExecutionContext->isDocument()) {
    5151            Document* document = toDocument(m_scriptExecutionContext);
    52             m_exec = scriptStateFromPage(mainThreadNormalWorld(), document->page());
     52            m_exec = execStateFromPage(mainThreadNormalWorld(), document->page());
    5353        } else {
    5454#if ENABLE(WORKERS)
    5555            WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(m_scriptExecutionContext);
    56             m_exec = scriptStateFromWorkerGlobalScope(workerGlobalScope);
     56            m_exec = execStateFromWorkerGlobalScope(workerGlobalScope);
    5757#endif
    5858        }
  • trunk/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp

    r155589 r155736  
    7777}
    7878
    79 ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node)
     79ScriptValue InjectedScriptHost::nodeAsScriptValue(JSC::ExecState* state, Node* node)
    8080{
    8181    if (!shouldAllowAccessToNode(state, node))
  • trunk/Source/WebCore/bindings/js/JSInjectedScriptManager.cpp

    r129476 r155736  
    5151namespace WebCore {
    5252
    53 ScriptObject InjectedScriptManager::createInjectedScript(const String& source, ScriptState* scriptState, int id)
     53ScriptObject InjectedScriptManager::createInjectedScript(const String& source, JSC::ExecState* scriptState, int id)
    5454{
    5555    JSLockHolder lock(scriptState);
     
    8787}
    8888
    89 bool InjectedScriptManager::canAccessInspectedWindow(ScriptState* scriptState)
     89bool InjectedScriptManager::canAccessInspectedWindow(JSC::ExecState* scriptState)
    9090{
    9191    JSLockHolder lock(scriptState);
  • trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp

    r154877 r155736  
    277277void willCreatePossiblyOrphanedTreeByRemovalSlowCase(Node* root)
    278278{
    279     ScriptState* scriptState = mainWorldScriptState(root->document().frame());
     279    JSC::ExecState* scriptState = mainWorldExecState(root->document().frame());
    280280    if (!scriptState)
    281281        return;
  • trunk/Source/WebCore/bindings/js/JSNodeFilterCondition.h

    r148696 r155736  
    4343        JSNodeFilterCondition(JSC::VM&, NodeFilter* owner, JSC::JSValue filter);
    4444
    45         virtual short acceptNode(ScriptState*, Node*) const;
     45        virtual short acceptNode(JSC::ExecState*, Node*) const;
    4646
    4747        class WeakOwner : public JSC::WeakHandleOwner {
  • trunk/Source/WebCore/bindings/js/ScriptController.cpp

    r155417 r155736  
    339339        JSC::ExecState* exec = iter->value->window()->globalExec();
    340340        SecurityOrigin* origin = iter->value->window()->impl()->document()->securityOrigin();
    341         result.append(std::pair<ScriptState*, SecurityOrigin*>(exec, origin));
     341        result.append(std::pair<JSC::ExecState*, SecurityOrigin*>(exec, origin));
    342342    }
    343343}
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp

    r155622 r155736  
    305305    ASSERT(m_paused);
    306306    JSGlobalObject* globalObject = m_currentCallFrame->scopeChain()->globalObject();
    307     ScriptState* state = globalObject->globalExec();
     307    JSC::ExecState* state = globalObject->globalExec();
    308308    JSValue jsCallFrame;
    309309    {
     
    575575}
    576576
    577 void ScriptDebugServer::compileScript(ScriptState*, const String&, const String&, String*, String*)
     577void ScriptDebugServer::compileScript(JSC::ExecState*, const String&, const String&, String*, String*)
    578578{
    579579    // FIXME(89652): implement this.
     
    585585}
    586586
    587 void ScriptDebugServer::runScript(ScriptState*, const String&, ScriptValue*, bool*, String*)
     587void ScriptDebugServer::runScript(JSC::ExecState*, const String&, ScriptValue*, bool*, String*)
    588588{
    589589    // FIXME(89652): implement this.
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.h

    r155622 r155736  
    9999    bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; }
    100100
    101     void compileScript(ScriptState*, const String& expression, const String& sourceURL, String* scriptId, String* exceptionMessage);
     101    void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptId, String* exceptionMessage);
    102102    void clearCompiledScripts();
    103     void runScript(ScriptState*, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage);
     103    void runScript(JSC::ExecState*, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage);
    104104
    105105    class Task {
  • trunk/Source/WebCore/bindings/js/ScriptEventListener.cpp

    r154877 r155736  
    104104    if (!jsFunction)
    105105        return "";
    106     ScriptState* scriptState = scriptStateFromNode(jsListener->isolatedWorld(), document);
     106    JSC::ExecState* scriptState = execStateFromNode(jsListener->isolatedWorld(), document);
    107107    return jsFunction->toString(scriptState)->value(scriptState);
    108108}
     
    121121}
    122122
    123 ScriptState* eventListenerHandlerScriptState(Frame* frame, EventListener* eventListener)
     123JSC::ExecState* eventListenerHandlerScriptState(Frame* frame, EventListener* eventListener)
    124124{
    125125    const JSEventListener* jsListener = JSEventListener::cast(eventListener);
  • trunk/Source/WebCore/bindings/js/ScriptEventListener.h

    r155229 r155736  
    5050    String eventListenerHandlerBody(Document*, EventListener*);
    5151    ScriptValue eventListenerHandler(Document*, EventListener*);
    52     ScriptState* eventListenerHandlerScriptState(Frame*, EventListener*);
     52    JSC::ExecState* eventListenerHandlerScriptState(Frame*, EventListener*);
    5353    bool eventListenerHandlerLocation(Document*, EventListener*, String& sourceName, String& scriptId, int& lineNumber);
    5454} // namespace WebCore
  • trunk/Source/WebCore/bindings/js/ScriptFunctionCall.cpp

    r148696 r155736  
    191191}
    192192
    193 ScriptCallback::ScriptCallback(ScriptState* state, const ScriptValue& function)
     193ScriptCallback::ScriptCallback(JSC::ExecState* state, const ScriptValue& function)
    194194    : ScriptCallArgumentHandler(state)
    195195    , m_function(function)
  • trunk/Source/WebCore/bindings/js/ScriptFunctionCall.h

    r138003 r155736  
    4747    class ScriptCallArgumentHandler {
    4848    public:
    49         ScriptCallArgumentHandler(ScriptState* state) : m_exec(state) { }
     49        ScriptCallArgumentHandler(JSC::ExecState* state) : m_exec(state) { }
    5050
    5151        void appendArgument(const ScriptObject&);
     
    6363    protected:
    6464        JSC::MarkedArgumentBuffer m_arguments;
    65         ScriptState* m_exec;
     65        JSC::ExecState* m_exec;
    6666
    6767    private:
     
    8686    class ScriptCallback : public ScriptCallArgumentHandler {
    8787    public:
    88         ScriptCallback(ScriptState*, const ScriptValue&);
     88        ScriptCallback(JSC::ExecState*, const ScriptValue&);
    8989
    9090        ScriptValue call();
  • trunk/Source/WebCore/bindings/js/ScriptObject.cpp

    r148696 r155736  
    4545namespace WebCore {
    4646
    47 ScriptObject::ScriptObject(ScriptState* scriptState, JSObject* object)
     47ScriptObject::ScriptObject(JSC::ExecState* scriptState, JSObject* object)
    4848    : ScriptValue(scriptState->vm(), object)
    4949    , m_scriptState(scriptState)
     
    5151}
    5252
    53 ScriptObject::ScriptObject(ScriptState* scriptState, const ScriptValue& scriptValue)
     53ScriptObject::ScriptObject(JSC::ExecState* scriptState, const ScriptValue& scriptValue)
    5454    : ScriptValue(scriptState->vm(), scriptValue.jsValue())
    5555    , m_scriptState(scriptState)
     
    5757}
    5858
    59 static bool handleException(ScriptState* scriptState)
     59static bool handleException(JSC::ExecState* scriptState)
    6060{
    6161    if (!scriptState->hadException())
     
    6666}
    6767
    68 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const ScriptObject& value)
     68bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, const ScriptObject& value)
    6969{
    7070    JSLockHolder lock(scriptState);
     
    7474
    7575#if ENABLE(INSPECTOR)
    76 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
     76bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, InspectorFrontendHost* value)
    7777{
    7878    JSLockHolder lock(scriptState);
     
    8282}
    8383
    84 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value)
     84bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, InjectedScriptHost* value)
    8585{
    8686    JSLockHolder lock(scriptState);
     
    9191#endif // ENABLE(INSPECTOR)
    9292
    93 bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value)
     93bool ScriptGlobalObject::get(JSC::ExecState* scriptState, const char* name, ScriptObject& value)
    9494{
    9595    JSLockHolder lock(scriptState);
     
    105105}
    106106
    107 bool ScriptGlobalObject::remove(ScriptState* scriptState, const char* name)
     107bool ScriptGlobalObject::remove(JSC::ExecState* scriptState, const char* name)
    108108{
    109109    JSLockHolder lock(scriptState);
  • trunk/Source/WebCore/bindings/js/ScriptObject.h

    r144950 r155736  
    4444    class ScriptObject : public ScriptValue {
    4545    public:
    46         ScriptObject(ScriptState*, JSC::JSObject*);
    47         ScriptObject(ScriptState*, const ScriptValue&);
     46        ScriptObject(JSC::ExecState*, JSC::JSObject*);
     47        ScriptObject(JSC::ExecState*, const ScriptValue&);
    4848        ScriptObject() : m_scriptState(0) { }
    4949        JSC::JSObject* jsObject() const { return asObject(jsValue()); }
    50         ScriptState* scriptState() const { return m_scriptState; }
     50        JSC::ExecState* scriptState() const { return m_scriptState; }
    5151
    5252    protected:
    53         ScriptState* m_scriptState;
     53        JSC::ExecState* m_scriptState;
    5454    };
    5555
    5656    class ScriptGlobalObject {
    5757    public:
    58         static bool set(ScriptState*, const char* name, const ScriptObject&);
     58        static bool set(JSC::ExecState*, const char* name, const ScriptObject&);
    5959#if ENABLE(INSPECTOR)
    60         static bool set(ScriptState*, const char* name, InspectorFrontendHost*);
    61         static bool set(ScriptState*, const char* name, InjectedScriptHost*);
     60        static bool set(JSC::ExecState*, const char* name, InspectorFrontendHost*);
     61        static bool set(JSC::ExecState*, const char* name, InjectedScriptHost*);
    6262#endif
    63         static bool get(ScriptState*, const char* name, ScriptObject&);
    64         static bool remove(ScriptState*, const char* name);
     63        static bool get(JSC::ExecState*, const char* name, ScriptObject&);
     64        static bool remove(JSC::ExecState*, const char* name);
    6565    private:
    6666        ScriptGlobalObject() { }
  • trunk/Source/WebCore/bindings/js/ScriptProfiler.cpp

    r154658 r155736  
    5858}
    5959
    60 void ScriptProfiler::start(ScriptState* state, const String& title)
     60void ScriptProfiler::start(JSC::ExecState* state, const String& title)
    6161{
    6262    JSC::LegacyProfiler::profiler()->startProfiling(state, title);
     
    7272void ScriptProfiler::startForWorkerGlobalScope(WorkerGlobalScope* context, const String& title)
    7373{
    74     start(scriptStateFromWorkerGlobalScope(context), title);
     74    start(execStateFromWorkerGlobalScope(context), title);
    7575}
    7676#endif
    7777
    78 PassRefPtr<ScriptProfile> ScriptProfiler::stop(ScriptState* state, const String& title)
     78PassRefPtr<ScriptProfile> ScriptProfiler::stop(JSC::ExecState* state, const String& title)
    7979{
    8080    RefPtr<JSC::Profile> profile = JSC::LegacyProfiler::profiler()->stopProfiling(state, title);
     
    9191PassRefPtr<ScriptProfile> ScriptProfiler::stopForWorkerGlobalScope(WorkerGlobalScope* context, const String& title)
    9292{
    93     return stop(scriptStateFromWorkerGlobalScope(context), title);
     93    return stop(execStateFromWorkerGlobalScope(context), title);
    9494}
    9595#endif
  • trunk/Source/WebCore/bindings/js/ScriptProfiler.h

    r154033 r155736  
    6060    static ScriptObject objectByHeapObjectId(unsigned id);
    6161    static unsigned getHeapObjectId(const ScriptValue&);
    62     static void start(ScriptState* state, const String& title);
     62    static void start(JSC::ExecState*, const String& title);
    6363    static void startForPage(Page*, const String& title);
    6464#if ENABLE(WORKERS)
    6565    static void startForWorkerGlobalScope(WorkerGlobalScope*, const String& title);
    6666#endif
    67     static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
     67    static PassRefPtr<ScriptProfile> stop(JSC::ExecState*, const String& title);
    6868    static PassRefPtr<ScriptProfile> stopForPage(Page*, const String& title);
    6969#if ENABLE(WORKERS)
  • trunk/Source/WebCore/bindings/js/ScriptState.cpp

    r155229 r155736  
    5050namespace WebCore {
    5151
    52 DOMWindow* domWindowFromScriptState(ScriptState* scriptState)
     52DOMWindow* domWindowFromExecState(JSC::ExecState* scriptState)
    5353{
    5454    JSC::JSGlobalObject* globalObject = scriptState->lexicalGlobalObject();
     
    5858}
    5959
    60 ScriptExecutionContext* scriptExecutionContextFromScriptState(ScriptState* scriptState)
     60ScriptExecutionContext* scriptExecutionContextFromExecState(JSC::ExecState* scriptState)
    6161{
    6262    JSC::JSGlobalObject* globalObject = scriptState->lexicalGlobalObject();
     
    6666}
    6767
    68 ScriptState* mainWorldScriptState(Frame* frame)
     68JSC::ExecState* mainWorldExecState(Frame* frame)
    6969{
    7070    if (!frame)
     
    7474}
    7575
    76 ScriptState* scriptStateFromNode(DOMWrapperWorld* world, Node* node)
     76JSC::ExecState* execStateFromNode(DOMWrapperWorld* world, Node* node)
    7777{
    7878    if (!node)
     
    8686}
    8787
    88 ScriptState* scriptStateFromPage(DOMWrapperWorld* world, Page* page)
     88JSC::ExecState* execStateFromPage(DOMWrapperWorld* world, Page* page)
    8989{
    9090    return page->mainFrame().script().globalObject(world)->globalExec();
     
    9292
    9393#if ENABLE(WORKERS)
    94 ScriptState* scriptStateFromWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
     94JSC::ExecState* execStateFromWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
    9595{
    9696    return workerGlobalScope->script()->workerGlobalScopeWrapper()->globalExec();
  • trunk/Source/WebCore/bindings/js/ScriptState.h

    r152080 r155736  
    5353typedef JSC::ExecState ScriptState;
    5454
    55 DOMWindow* domWindowFromScriptState(ScriptState*);
    56 ScriptExecutionContext* scriptExecutionContextFromScriptState(ScriptState*);
     55DOMWindow* domWindowFromExecState(ScriptState*);
     56ScriptExecutionContext* scriptExecutionContextFromExecState(JSC::ExecState*);
    5757
    58 ScriptState* mainWorldScriptState(Frame*);
     58JSC::ExecState* mainWorldExecState(Frame*);
    5959
    60 ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
    61 ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
     60JSC::ExecState* execStateFromNode(DOMWrapperWorld*, Node*);
     61JSC::ExecState* execStateFromPage(DOMWrapperWorld*, Page*);
    6262
    6363#if ENABLE(WORKERS)
    64 ScriptState* scriptStateFromWorkerGlobalScope(WorkerGlobalScope*);
     64JSC::ExecState* execStateFromWorkerGlobalScope(WorkerGlobalScope*);
    6565#endif
    6666
  • trunk/Source/WebCore/bindings/js/ScriptValue.cpp

    r148696 r155736  
    4545namespace WebCore {
    4646
    47 bool ScriptValue::getString(ScriptState* scriptState, String& result) const
     47bool ScriptValue::getString(JSC::ExecState* scriptState, String& result) const
    4848{
    4949    if (!m_value)
     
    5555}
    5656
    57 String ScriptValue::toString(ScriptState* scriptState) const
     57String ScriptValue::toString(JSC::ExecState* scriptState) const
    5858{
    5959    String result = m_value.get().toString(scriptState)->value(scriptState);
     
    6464}
    6565
    66 bool ScriptValue::isEqual(ScriptState* scriptState, const ScriptValue& anotherValue) const
     66bool ScriptValue::isEqual(JSC::ExecState* scriptState, const ScriptValue& anotherValue) const
    6767{
    6868    if (hasNoValue())
     
    9999}
    100100
    101 PassRefPtr<SerializedScriptValue> ScriptValue::serialize(ScriptState* scriptState, SerializationErrorMode throwExceptions)
     101PassRefPtr<SerializedScriptValue> ScriptValue::serialize(JSC::ExecState* scriptState, SerializationErrorMode throwExceptions)
    102102{
    103103    return SerializedScriptValue::create(scriptState, jsValue(), 0, 0, throwExceptions);
    104104}
    105105
    106 PassRefPtr<SerializedScriptValue> ScriptValue::serialize(ScriptState* scriptState, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, bool& didThrow)
     106PassRefPtr<SerializedScriptValue> ScriptValue::serialize(JSC::ExecState* scriptState, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, bool& didThrow)
    107107{
    108108    RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(scriptState, jsValue(), messagePorts, arrayBuffers);
     
    111111}
    112112
    113 ScriptValue ScriptValue::deserialize(ScriptState* scriptState, SerializedScriptValue* value, SerializationErrorMode throwExceptions)
     113ScriptValue ScriptValue::deserialize(JSC::ExecState* scriptState, SerializedScriptValue* value, SerializationErrorMode throwExceptions)
    114114{
    115115    return ScriptValue(scriptState->vm(), value->deserialize(scriptState, scriptState->lexicalGlobalObject(), 0, throwExceptions));
     
    117117
    118118#if ENABLE(INSPECTOR)
    119 static PassRefPtr<InspectorValue> jsToInspectorValue(ScriptState* scriptState, JSValue value, int maxDepth)
     119static PassRefPtr<InspectorValue> jsToInspectorValue(JSC::ExecState* scriptState, JSValue value, int maxDepth)
    120120{
    121121    if (!value) {
     
    170170}
    171171
    172 PassRefPtr<InspectorValue> ScriptValue::toInspectorValue(ScriptState* scriptState) const
     172PassRefPtr<InspectorValue> ScriptValue::toInspectorValue(JSC::ExecState* scriptState) const
    173173{
    174174    JSC::JSLockHolder holder(scriptState);
  • trunk/Source/WebCore/bindings/js/ScriptValue.h

    r148696 r155736  
    5353
    5454    JSC::JSValue jsValue() const { return m_value.get(); }
    55     bool getString(ScriptState*, String& result) const;
    56     String toString(ScriptState*) const;
    57     bool isEqual(ScriptState*, const ScriptValue&) const;
     55    bool getString(JSC::ExecState*, String& result) const;
     56    String toString(JSC::ExecState*) const;
     57    bool isEqual(JSC::ExecState*, const ScriptValue&) const;
    5858    bool isNull() const;
    5959    bool isUndefined() const;
     
    6666    bool operator==(const ScriptValue& other) const { return m_value == other.m_value; }
    6767
    68     PassRefPtr<SerializedScriptValue> serialize(ScriptState*, SerializationErrorMode = Throwing);
    69     PassRefPtr<SerializedScriptValue> serialize(ScriptState*, MessagePortArray*, ArrayBufferArray*, bool&);
    70     static ScriptValue deserialize(ScriptState*, SerializedScriptValue*, SerializationErrorMode = Throwing);
     68    PassRefPtr<SerializedScriptValue> serialize(JSC::ExecState*, SerializationErrorMode = Throwing);
     69    PassRefPtr<SerializedScriptValue> serialize(JSC::ExecState*, MessagePortArray*, ArrayBufferArray*, bool&);
     70    static ScriptValue deserialize(JSC::ExecState*, SerializedScriptValue*, SerializationErrorMode = Throwing);
    7171
    7272#if ENABLE(INSPECTOR)
    73     PassRefPtr<InspectorValue> toInspectorValue(ScriptState*) const;
     73    PassRefPtr<InspectorValue> toInspectorValue(JSC::ExecState*) const;
    7474#endif
    7575
  • trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp

    r155008 r155736  
    20062006
    20072007#if ENABLE(INSPECTOR)
    2008 ScriptValue SerializedScriptValue::deserializeForInspector(ScriptState* scriptState)
     2008ScriptValue SerializedScriptValue::deserializeForInspector(JSC::ExecState* scriptState)
    20092009{
    20102010    JSValue value = deserialize(scriptState, scriptState->lexicalGlobalObject(), 0);
  • trunk/Source/WebCore/bindings/js/SerializedScriptValue.h

    r153728 r155736  
    9393
    9494#if ENABLE(INSPECTOR)
    95     ScriptValue deserializeForInspector(ScriptState*);
     95    ScriptValue deserializeForInspector(JSC::ExecState*);
    9696#endif
    9797
  • trunk/Source/WebCore/dom/Document.cpp

    r155729 r155736  
    860860}
    861861
    862 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, ExceptionCode& ec)
     862PassRefPtr<CustomElementConstructor> Document::registerElement(JSC::ExecState* state, const AtomicString& name, ExceptionCode& ec)
    863863{
    864864    return registerElement(state, name, Dictionary(), ec);
    865865}
    866866
    867 PassRefPtr<CustomElementConstructor> Document::registerElement(WebCore::ScriptState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec)
     867PassRefPtr<CustomElementConstructor> Document::registerElement(JSC::ExecState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec)
    868868{
    869869    if (!isHTMLDocument() && !isXHTMLDocument()) {
     
    48164816}
    48174817
    4818 void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     4818void Document::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
    48194819{
    48204820    if (!isContextThread()) {
  • trunk/Source/WebCore/dom/Document.h

    r155496 r155736  
    11391139    PassRefPtr<Element> createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode&);
    11401140    PassRefPtr<Element> createElementNS(const AtomicString& namespaceURI, const String& qualifiedName, const AtomicString& typeExtension, ExceptionCode&);
    1141     PassRefPtr<CustomElementConstructor> registerElement(WebCore::ScriptState*, const AtomicString& name, ExceptionCode&);
    1142     PassRefPtr<CustomElementConstructor> registerElement(WebCore::ScriptState*, const AtomicString& name, const Dictionary& options, ExceptionCode&);
     1141    PassRefPtr<CustomElementConstructor> registerElement(WebCore::JSC::ExecState*, const AtomicString& name, ExceptionCode&);
     1142    PassRefPtr<CustomElementConstructor> registerElement(WebCore::JSC::ExecState*, const AtomicString& name, const Dictionary& options, ExceptionCode&);
    11431143    CustomElementRegistry* registry() const { return m_registry.get(); }
    11441144    void didCreateCustomElement(Element*, CustomElementConstructor*);
     
    12211221    virtual void derefScriptExecutionContext() { deref(); }
    12221222
    1223     virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
     1223    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    12241224
    12251225    virtual double minimumTimerInterval() const;
  • trunk/Source/WebCore/dom/NodeFilter.cpp

    r39003 r155736  
    3030namespace WebCore {
    3131
    32 short NodeFilter::acceptNode(ScriptState* state, Node* node) const
     32short NodeFilter::acceptNode(JSC::ExecState* state, Node* node) const
    3333{
    3434    // cast to short silences "enumeral and non-enumeral types in return" warning
  • trunk/Source/WebCore/dom/NodeFilter.h

    r137190 r155736  
    7676        }
    7777
    78         short acceptNode(ScriptState*, Node*) const;
     78        short acceptNode(JSC::ExecState*, Node*) const;
    7979
    8080        // Do not call these functions. They are just scaffolding to support the Objective-C bindings.
    8181        // They operate in the main thread normal world, and they swallow JS exceptions.
    82         short acceptNode(Node* node) const { return acceptNode(scriptStateFromNode(mainThreadNormalWorld(), node), node); }
     82        short acceptNode(Node* node) const { return acceptNode(execStateFromNode(mainThreadNormalWorld(), node), node); }
    8383       
    8484        void setCondition(PassRefPtr<NodeFilterCondition> condition) { ASSERT(!m_condition); m_condition = condition; }
  • trunk/Source/WebCore/dom/NodeFilterCondition.cpp

    r39003 r155736  
    3030namespace WebCore {
    3131
    32 short NodeFilterCondition::acceptNode(ScriptState*, Node*) const
     32short NodeFilterCondition::acceptNode(JSC::ExecState*, Node*) const
    3333{
    3434    return NodeFilter::FILTER_ACCEPT;
  • trunk/Source/WebCore/dom/NodeFilterCondition.h

    r89069 r155736  
    4242    public:
    4343        virtual ~NodeFilterCondition() { }
    44         virtual short acceptNode(ScriptState*, Node*) const = 0;
     44        virtual short acceptNode(JSC::ExecState*, Node*) const = 0;
    4545        virtual void visitAggregate(JSC::SlotVisitor&) { }
    4646    };
  • trunk/Source/WebCore/dom/NodeIterator.cpp

    r154877 r155736  
    8686}
    8787
    88 PassRefPtr<Node> NodeIterator::nextNode(ScriptState* state, ExceptionCode& ec)
     88PassRefPtr<Node> NodeIterator::nextNode(JSC::ExecState* state, ExceptionCode& ec)
    8989{
    9090    if (m_detached) {
     
    115115}
    116116
    117 PassRefPtr<Node> NodeIterator::previousNode(ScriptState* state, ExceptionCode& ec)
     117PassRefPtr<Node> NodeIterator::previousNode(JSC::ExecState* state, ExceptionCode& ec)
    118118{
    119119    if (m_detached) {
  • trunk/Source/WebCore/dom/NodeIterator.h

    r154481 r155736  
    4444        ~NodeIterator();
    4545
    46         PassRefPtr<Node> nextNode(ScriptState*, ExceptionCode&);
    47         PassRefPtr<Node> previousNode(ScriptState*, ExceptionCode&);
     46        PassRefPtr<Node> nextNode(JSC::ExecState*, ExceptionCode&);
     47        PassRefPtr<Node> previousNode(JSC::ExecState*, ExceptionCode&);
    4848        void detach();
    4949
     
    5656        // Do not call these functions. They are just scaffolding to support the Objective-C bindings.
    5757        // They operate in the main thread normal world, and they swallow JS exceptions.
    58         PassRefPtr<Node> nextNode(ExceptionCode& ec) { return nextNode(scriptStateFromNode(mainThreadNormalWorld(), referenceNode()), ec); }
    59         PassRefPtr<Node> previousNode(ExceptionCode& ec) { return previousNode(scriptStateFromNode(mainThreadNormalWorld(), referenceNode()), ec); }
     58        PassRefPtr<Node> nextNode(ExceptionCode& ec) { return nextNode(execStateFromNode(mainThreadNormalWorld(), referenceNode()), ec); }
     59        PassRefPtr<Node> previousNode(ExceptionCode& ec) { return previousNode(execStateFromNode(mainThreadNormalWorld(), referenceNode()), ec); }
    6060
    6161    private:
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r154962 r155736  
    314314}
    315315
    316 void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     316void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    317317{
    318318    addMessage(source, level, message, sourceURL, lineNumber, columnNumber, 0, state, requestIdentifier);
  • trunk/Source/WebCore/dom/ScriptExecutionContext.h

    r155356 r155736  
    5252class ScriptCallStack;
    5353
    54 typedef JSC::ExecState ScriptState;
    55 
    5654#if ENABLE(BLOB)
    5755class PublicURLManager;
     
    8078    void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0);
    8179
    82     void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     80    void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    8381    virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0;
    8482
     
    180178
    181179private:
    182     virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
     180    virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) = 0;
    183181    virtual EventTarget* errorEventTarget() = 0;
    184182    virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0;
  • trunk/Source/WebCore/dom/Traversal.cpp

    r154481 r155736  
    3939}
    4040
    41 short NodeIteratorBase::acceptNode(ScriptState* state, Node* node) const
     41short NodeIteratorBase::acceptNode(JSC::ExecState* state, Node* node) const
    4242{
    4343    // FIXME: To handle XML properly we would have to check m_expandEntityReferences.
  • trunk/Source/WebCore/dom/Traversal.h

    r154481 r155736  
    4343    protected:
    4444        NodeIteratorBase(PassRefPtr<Node>, unsigned whatToShow, PassRefPtr<NodeFilter>, bool expandEntityReferences);
    45         short acceptNode(ScriptState*, Node*) const;
     45        short acceptNode(JSC::ExecState*, Node*) const;
    4646
    4747    private:
  • trunk/Source/WebCore/dom/TreeWalker.cpp

    r154481 r155736  
    5656}
    5757
    58 Node* TreeWalker::parentNode(ScriptState* state)
     58Node* TreeWalker::parentNode(JSC::ExecState* state)
    5959{
    6060    RefPtr<Node> node = m_current;
     
    7272}
    7373
    74 Node* TreeWalker::firstChild(ScriptState* state)
     74Node* TreeWalker::firstChild(JSC::ExecState* state)
    7575{
    7676    for (RefPtr<Node> node = m_current->firstChild(); node; ) {
     
    105105}
    106106
    107 Node* TreeWalker::lastChild(ScriptState* state)
     107Node* TreeWalker::lastChild(JSC::ExecState* state)
    108108{
    109109    for (RefPtr<Node> node = m_current->lastChild(); node; ) {
     
    138138}
    139139
    140 Node* TreeWalker::previousSibling(ScriptState* state)
     140Node* TreeWalker::previousSibling(JSC::ExecState* state)
    141141{
    142142    RefPtr<Node> node = m_current;
     
    175175}
    176176
    177 Node* TreeWalker::nextSibling(ScriptState* state)
     177Node* TreeWalker::nextSibling(JSC::ExecState* state)
    178178{
    179179    RefPtr<Node> node = m_current;
     
    212212}
    213213
    214 Node* TreeWalker::previousNode(ScriptState* state)
     214Node* TreeWalker::previousNode(JSC::ExecState* state)
    215215{
    216216    RefPtr<Node> node = m_current;
     
    251251}
    252252
    253 Node* TreeWalker::nextNode(ScriptState* state)
     253Node* TreeWalker::nextNode(JSC::ExecState* state)
    254254{
    255255    RefPtr<Node> node = m_current;
  • trunk/Source/WebCore/dom/TreeWalker.h

    r154481 r155736  
    4646        void setCurrentNode(PassRefPtr<Node>, ExceptionCode&);
    4747
    48         Node* parentNode(ScriptState*);
    49         Node* firstChild(ScriptState*);
    50         Node* lastChild(ScriptState*);
    51         Node* previousSibling(ScriptState*);
    52         Node* nextSibling(ScriptState*);
    53         Node* previousNode(ScriptState*);
    54         Node* nextNode(ScriptState*);
     48        Node* parentNode(JSC::ExecState*);
     49        Node* firstChild(JSC::ExecState*);
     50        Node* lastChild(JSC::ExecState*);
     51        Node* previousSibling(JSC::ExecState*);
     52        Node* nextSibling(JSC::ExecState*);
     53        Node* previousNode(JSC::ExecState*);
     54        Node* nextNode(JSC::ExecState*);
    5555
    5656        // Do not call these functions. They are just scaffolding to support the Objective-C bindings.
    5757        // They operate in the main thread normal world, and they swallow JS exceptions.
    58         Node* parentNode() { return parentNode(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    59         Node* firstChild() { return firstChild(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    60         Node* lastChild() { return lastChild(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    61         Node* previousSibling() { return previousSibling(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    62         Node* nextSibling() { return nextSibling(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    63         Node* previousNode() { return previousNode(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    64         Node* nextNode() { return nextNode(scriptStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     58        Node* parentNode() { return parentNode(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     59        Node* firstChild() { return firstChild(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     60        Node* lastChild() { return lastChild(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     61        Node* previousSibling() { return previousSibling(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     62        Node* nextSibling() { return nextSibling(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     63        Node* previousNode() { return previousNode(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
     64        Node* nextNode() { return nextNode(execStateFromNode(mainThreadNormalWorld(), m_current.get())); }
    6565
    6666    private:
  • trunk/Source/WebCore/inspector/ConsoleMessage.cpp

    r149125 r155736  
    6464}
    6565
    66 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, unsigned column, ScriptState* state, unsigned long requestIdentifier)
     66ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& url, unsigned line, unsigned column, JSC::ExecState* state, unsigned long requestIdentifier)
    6767    : m_source(source)
    6868    , m_type(type)
     
    9898}
    9999
    100 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, ScriptState* state, unsigned long requestIdentifier)
     100ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, JSC::ExecState* state, unsigned long requestIdentifier)
    101101    : m_source(source)
    102102    , m_type(type)
     
    117117}
    118118
    119 void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, ScriptState* state)
     119void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* state)
    120120{
    121121    if (m_type == EndGroupMessageType)
     
    272272    if (!m_arguments)
    273273        return;
    274     if (domWindowFromScriptState(m_arguments->globalState()) != window)
     274    if (domWindowFromExecState(m_arguments->globalState()) != window)
    275275        return;
    276276    if (!m_message)
  • trunk/Source/WebCore/inspector/ConsoleMessage.h

    r149125 r155736  
    5454public:
    5555    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, unsigned long requestIdentifier = 0);
    56     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, unsigned column, ScriptState* = 0, unsigned long requestIdentifier = 0);
     56    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned line, unsigned column, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    5757    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    58     ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, ScriptState*, unsigned long requestIdentifier = 0);
     58    ConsoleMessage(bool canGenerateCallStack, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptArguments>, JSC::ExecState*, unsigned long requestIdentifier = 0);
    5959    ~ConsoleMessage();
    6060
     
    7373
    7474private:
    75     void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0);
     75    void autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* = 0);
    7676
    7777    MessageSource m_source;
  • trunk/Source/WebCore/inspector/InjectedScript.h

    r155589 r155736  
    101101private:
    102102    friend class InjectedScriptModule;
    103     friend InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState*);
     103    friend InjectedScript InjectedScriptManager::injectedScriptFor(JSC::ExecState*);
    104104    InjectedScript(ScriptObject, InspectedStateAccessCheck);
    105105
  • trunk/Source/WebCore/inspector/InjectedScriptBase.cpp

    r148537 r155736  
    7676ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall& function, bool& hadException) const
    7777{
    78     ScriptExecutionContext* scriptExecutionContext = scriptExecutionContextFromScriptState(m_injectedScriptObject.scriptState());
     78    ScriptExecutionContext* scriptExecutionContext = scriptExecutionContextFromExecState(m_injectedScriptObject.scriptState());
    7979    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFunction(scriptExecutionContext, name(), 1);
    8080
    81     ScriptState* scriptState = m_injectedScriptObject.scriptState();
     81    JSC::ExecState* scriptState = m_injectedScriptObject.scriptState();
    8282    bool evalIsDisabled = false;
    8383    if (scriptState) {
  • trunk/Source/WebCore/inspector/InjectedScriptBase.h

    r120842 r155736  
    5252    const String& name() const { return m_name; }
    5353    bool hasNoValue() const { return m_injectedScriptObject.hasNoValue(); }
    54     ScriptState* scriptState() const { return m_injectedScriptObject.scriptState(); }
     54    JSC::ExecState* scriptState() const { return m_injectedScriptObject.scriptState(); }
    5555
    5656protected:
    57     typedef bool (*InspectedStateAccessCheck)(ScriptState*);
     57    typedef bool (*InspectedStateAccessCheck)(JSC::ExecState*);
    5858    InjectedScriptBase(const String& name);
    5959    InjectedScriptBase(const String& name, ScriptObject, InspectedStateAccessCheck);
  • trunk/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp

    r143328 r155736  
    5555}
    5656
    57 InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedScriptManager* injectedScriptManager, ScriptState* scriptState)
     57InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedScriptManager* injectedScriptManager, JSC::ExecState* scriptState)
    5858{
    5959    InjectedScriptCanvasModule result;
  • trunk/Source/WebCore/inspector/InjectedScriptCanvasModule.h

    r143328 r155736  
    4949    virtual String source() const;
    5050
    51     static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, ScriptState*);
     51    static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, JSC::ExecState*);
    5252
    5353    ScriptObject wrapCanvas2DContext(const ScriptObject&);
  • trunk/Source/WebCore/inspector/InjectedScriptHost.cpp

    r154750 r155736  
    124124}
    125125
    126 ScriptValue InjectedScriptHost::InspectableObject::get(ScriptState*)
     126ScriptValue InjectedScriptHost::InspectableObject::get(JSC::ExecState*)
    127127{
    128128    return ScriptValue();
  • trunk/Source/WebCore/inspector/InjectedScriptHost.h

    r147861 r155736  
    8888
    8989    static Node* scriptValueAsNode(ScriptValue);
    90     static ScriptValue nodeAsScriptValue(ScriptState*, Node*);
     90    static ScriptValue nodeAsScriptValue(JSC::ExecState*, Node*);
    9191
    9292    void disconnect();
     
    9595        WTF_MAKE_FAST_ALLOCATED;
    9696    public:
    97         virtual ScriptValue get(ScriptState*);
     97        virtual ScriptValue get(JSC::ExecState*);
    9898        virtual ~InspectableObject() { }
    9999    };
  • trunk/Source/WebCore/inspector/InjectedScriptManager.cpp

    r152080 r155736  
    8181    if (it != m_idToInjectedScript.end())
    8282        return it->value;
    83     for (ScriptStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) {
     83    for (ExecStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) {
    8484        if (it->value == id)
    8585            return injectedScriptFor(it->key);
     
    8888}
    8989
    90 int InjectedScriptManager::injectedScriptIdFor(ScriptState* scriptState)
     90int InjectedScriptManager::injectedScriptIdFor(JSC::ExecState* scriptState)
    9191{
    92     ScriptStateToId::iterator it = m_scriptStateToId.find(scriptState);
     92    ExecStateToId::iterator it = m_scriptStateToId.find(scriptState);
    9393    if (it != m_scriptStateToId.end())
    9494        return it->value;
     
    124124    IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end();
    125125    for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it != end; ++it) {
    126         ScriptState* scriptState = it->value.scriptState();
    127         if (window != domWindowFromScriptState(scriptState))
     126        JSC::ExecState* scriptState = it->value.scriptState();
     127        if (window != domWindowFromExecState(scriptState))
    128128            continue;
    129129        m_scriptStateToId.remove(scriptState);
     
    135135
    136136    // Now remove script states that have id but no injected script.
    137     Vector<ScriptState*> scriptStatesToRemove;
    138     for (ScriptStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) {
    139         ScriptState* scriptState = it->key;
    140         if (window == domWindowFromScriptState(scriptState))
     137    Vector<JSC::ExecState*> scriptStatesToRemove;
     138    for (ExecStateToId::iterator it = m_scriptStateToId.begin(); it != m_scriptStateToId.end(); ++it) {
     139        JSC::ExecState* scriptState = it->key;
     140        if (window == domWindowFromExecState(scriptState))
    141141            scriptStatesToRemove.append(scriptState);
    142142    }
     
    145145}
    146146
    147 bool InjectedScriptManager::canAccessInspectedWorkerGlobalScope(ScriptState*)
     147bool InjectedScriptManager::canAccessInspectedWorkerGlobalScope(JSC::ExecState*)
    148148{
    149149    return true;
     
    161161}
    162162
    163 InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState* inspectedScriptState)
     163InjectedScript InjectedScriptManager::injectedScriptFor(JSC::ExecState* inspectedExecState)
    164164{
    165     ScriptStateToId::iterator it = m_scriptStateToId.find(inspectedScriptState);
     165    ExecStateToId::iterator it = m_scriptStateToId.find(inspectedExecState);
    166166    if (it != m_scriptStateToId.end()) {
    167167        IdToInjectedScriptMap::iterator it1 = m_idToInjectedScript.find(it->value);
     
    170170    }
    171171
    172     if (!m_inspectedStateAccessCheck(inspectedScriptState))
     172    if (!m_inspectedStateAccessCheck(inspectedExecState))
    173173        return InjectedScript();
    174174
    175     int id = injectedScriptIdFor(inspectedScriptState);
    176     ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspectedScriptState, id);
     175    int id = injectedScriptIdFor(inspectedExecState);
     176    ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspectedExecState, id);
    177177    InjectedScript result(injectedScriptObject, m_inspectedStateAccessCheck);
    178178    m_idToInjectedScript.set(id, result);
  • trunk/Source/WebCore/inspector/InjectedScriptManager.h

    r152080 r155736  
    5555    InjectedScriptHost* injectedScriptHost();
    5656
    57     InjectedScript injectedScriptFor(ScriptState*);
     57    InjectedScript injectedScriptFor(JSC::ExecState*);
    5858    InjectedScript injectedScriptForId(int);
    59     int injectedScriptIdFor(ScriptState*);
     59    int injectedScriptIdFor(JSC::ExecState*);
    6060    InjectedScript injectedScriptForObjectId(const String& objectId);
    6161    void discardInjectedScripts();
     
    6363    void releaseObjectGroup(const String& objectGroup);
    6464
    65     typedef bool (*InspectedStateAccessCheck)(ScriptState*);
     65    typedef bool (*InspectedStateAccessCheck)(JSC::ExecState*);
    6666    InspectedStateAccessCheck inspectedStateAccessCheck() const { return m_inspectedStateAccessCheck; }
    6767
     
    7070
    7171    String injectedScriptSource();
    72     ScriptObject createInjectedScript(const String& source, ScriptState*, int id);
     72    ScriptObject createInjectedScript(const String& source, JSC::ExecState*, int id);
    7373
    74     static bool canAccessInspectedWindow(ScriptState*);
    75     static bool canAccessInspectedWorkerGlobalScope(ScriptState*);
     74    static bool canAccessInspectedWindow(JSC::ExecState*);
     75    static bool canAccessInspectedWorkerGlobalScope(JSC::ExecState*);
    7676
    7777    int m_nextInjectedScriptId;
     
    8080    RefPtr<InjectedScriptHost> m_injectedScriptHost;
    8181    InspectedStateAccessCheck m_inspectedStateAccessCheck;
    82     typedef HashMap<ScriptState*, int> ScriptStateToId;
    83     ScriptStateToId m_scriptStateToId;
     82    typedef HashMap<JSC::ExecState*, int> ExecStateToId;
     83    ExecStateToId m_scriptStateToId;
    8484};
    8585
  • trunk/Source/WebCore/inspector/InjectedScriptModule.cpp

    r120929 r155736  
    4747}
    4848
    49 void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, ScriptState* scriptState)
     49void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, JSC::ExecState* scriptState)
    5050{
    5151    InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(scriptState);
  • trunk/Source/WebCore/inspector/InjectedScriptModule.h

    r127757 r155736  
    5151    // and call its ensureInjected() method immediately.
    5252    InjectedScriptModule(const String& name);
    53     void ensureInjected(InjectedScriptManager*, ScriptState*);
     53    void ensureInjected(InjectedScriptManager*, JSC::ExecState*);
    5454};
    5555
  • trunk/Source/WebCore/inspector/InspectorAgent.cpp

    r154715 r155736  
    9090    if (script.isEmpty())
    9191        return;
    92     int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorldScriptState(frame));
     92    int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorldExecState(frame));
    9393    StringBuilder scriptSource;
    9494    scriptSource.append(script);
  • trunk/Source/WebCore/inspector/InspectorCanvasAgent.cpp

    r154658 r155736  
    143143    if (!frame)
    144144        return;
    145     InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldScriptState(frame));
     145    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame));
    146146    if (!module.hasNoValue())
    147147        module.captureFrame(errorString, traceLogId);
     
    153153    if (!frame)
    154154        return;
    155     InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldScriptState(frame));
     155    InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame));
    156156    if (!module.hasNoValue())
    157157        module.startCapturing(errorString, traceLogId);
     
    216216{
    217217    ASSERT(m_frontend);
    218     ScriptState* scriptState = wrappedContext.scriptState();
    219     DOMWindow* domWindow = scriptState ? domWindowFromScriptState(scriptState) : 0;
     218    JSC::ExecState* scriptState = wrappedContext.scriptState();
     219    DOMWindow* domWindow = scriptState ? domWindowFromExecState(scriptState) : 0;
    220220    Frame* frame = domWindow ? domWindow->frame() : 0;
    221221    if (frame && !m_framesWithUninstrumentedCanvases.contains(frame))
     
    227227}
    228228
    229 InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, ScriptState* scriptState)
     229InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, JSC::ExecState* scriptState)
    230230{
    231231    if (!checkIsEnabled(errorString))
     
    331331    ErrorString error;
    332332    for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) {
    333         InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, mainWorldScriptState(it->key));
     333        InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, mainWorldExecState(it->key));
    334334        if (!module.hasNoValue())
    335335            module.markFrameEnd();
  • trunk/Source/WebCore/inspector/InspectorCanvasAgent.h

    r143328 r155736  
    9393    InspectorCanvasAgent(InstrumentingAgents*, InspectorCompositeState*, InspectorPageAgent*, InjectedScriptManager*);
    9494
    95     InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, ScriptState*);
     95    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, JSC::ExecState*);
    9696    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const ScriptObject&);
    9797    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const String&);
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp

    r150215 r155736  
    166166}
    167167
    168 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
     168void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
    169169{
    170170    if (!developerExtrasEnabled())
     
    179179}
    180180
    181 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     181void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    182182{
    183183    if (!developerExtrasEnabled())
     
    230230}
    231231
    232 void InspectorConsoleAgent::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     232void InspectorConsoleAgent::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    233233{
    234234    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
     
    337337public:
    338338    explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObjectId) { }
    339     virtual ScriptValue get(ScriptState*)
     339    virtual ScriptValue get(JSC::ExecState*)
    340340    {
    341341        return ScriptProfiler::objectByHeapObjectId(m_heapObjectId);
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.h

    r149125 r155736  
    7171    virtual void restore();
    7272
    73     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    74     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     73    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
     74    void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    7575
    7676    // FIXME: Remove once we no longer generate stacks outside of Inspector.
     
    8181    void startTiming(const String& title);
    8282    void stopTiming(const String& title, PassRefPtr<ScriptCallStack>);
    83     void count(ScriptState*, PassRefPtr<ScriptArguments>);
     83    void count(JSC::ExecState*, PassRefPtr<ScriptArguments>);
    8484
    8585    void frameWindowDiscarded(DOMWindow*);
  • trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h

    r152080 r155736  
    5656}
    5757
    58 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
     58inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
    5959{
    6060#if ENABLE(INSPECTOR)
     
    7373}
    7474
    75 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     75inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    7676{
    7777#if ENABLE(INSPECTOR)
     
    108108}
    109109
    110 inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     110inline void InspectorInstrumentation::addMessageToConsole(WorkerGlobalScope* workerGlobalScope, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    111111{
    112112#if ENABLE(INSPECTOR)
     
    128128#endif
    129129
    130 inline void InspectorInstrumentation::consoleCount(Page* page, ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     130inline void InspectorInstrumentation::consoleCount(Page* page, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    131131{
    132132#if ENABLE(INSPECTOR)
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r154877 r155736  
    10911091        return;
    10921092
    1093     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldScriptState(frame));
     1093    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame));
    10941094    if (injectedScript.hasNoValue())
    10951095        return;
     
    14921492        if (!functionValue.hasNoValue()) {
    14931493            if (Frame* frame = node->document().frame()) {
    1494                 ScriptState* scriptState = eventListenerHandlerScriptState(frame, eventListener.get());
     1494                JSC::ExecState* scriptState = eventListenerHandlerScriptState(frame, eventListener.get());
    14951495                if (scriptState) {
    14961496                    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
     
    18161816        return 0;
    18171817
    1818     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldScriptState(frame));
     1818    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame));
    18191819    if (injectedScript.hasNoValue())
    18201820        return 0;
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r155589 r155736  
    753753}
    754754
    755 void InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception)
     755void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception)
    756756{
    757757    ASSERT(scriptState && !m_pausedScriptState);
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r155589 r155736  
    143143    virtual void enable();
    144144    virtual void disable();
    145     virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception);
     145    virtual void didPause(JSC::ExecState*, const ScriptValue& callFrames, const ScriptValue& exception);
    146146    virtual void didContinue();
    147147    void reset();
     
    169169    InjectedScriptManager* m_injectedScriptManager;
    170170    InspectorFrontend::Debugger* m_frontend;
    171     ScriptState* m_pausedScriptState;
     171    JSC::ExecState* m_pausedScriptState;
    172172    ScriptValue m_currentCallStack;
    173173    ScriptsMap m_scripts;
  • trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp

    r154658 r155736  
    139139        m_frontendHost->disconnectClient();
    140140   
    141     ScriptState* frontendScriptState = scriptStateFromPage(debuggerWorld(), m_frontendPage);
     141    JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage);
    142142    m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage);
    143     ScriptGlobalObject::set(frontendScriptState, "InspectorFrontendHost", m_frontendHost.get());
     143    ScriptGlobalObject::set(frontendExecState, "InspectorFrontendHost", m_frontendHost.get());
    144144}
    145145
     
    346346{
    347347    ScriptValue value = m_frontendPage->mainFrame().script().executeScript(expression);
    348     return value.toString(mainWorldScriptState(&m_frontendPage->mainFrame())) == "true";
     348    return value.toString(mainWorldExecState(&m_frontendPage->mainFrame())) == "true";
    349349}
    350350
  • trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp

    r154828 r155736  
    270270
    271271    ASSERT(m_frontendPage);
    272     ScriptState* frontendScriptState = scriptStateFromPage(debuggerWorld(), m_frontendPage);
     272    JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage);
    273273    ScriptObject frontendApiObject;
    274     if (!ScriptGlobalObject::get(frontendScriptState, "InspectorFrontendAPI", frontendApiObject)) {
     274    if (!ScriptGlobalObject::get(frontendExecState, "InspectorFrontendAPI", frontendApiObject)) {
    275275        ASSERT_NOT_REACHED();
    276276        return;
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

    r147857 r155736  
    658658        return;
    659659
    660     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldScriptState(frame));
     660    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame));
    661661
    662662    RefPtr<IDBKeyRange> idbKeyRange = keyRange ? idbKeyRangeFromKeyRange(keyRange->get()) : 0;
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r155549 r155736  
    464464}
    465465
    466 void InspectorInstrumentation::didCreateIsolatedContextImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)
     466void InspectorInstrumentation::didCreateIsolatedContextImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin)
    467467{
    468468    if (PageRuntimeAgent* runtimeAgent = instrumentingAgents->pageRuntimeAgent())
     
    10271027}
    10281028
    1029 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
     1029void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)
    10301030{
    10311031    if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
     
    10371037}
    10381038
    1039 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)
     1039void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier)
    10401040{
    10411041    if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
     
    10431043}
    10441044
    1045 void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     1045void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    10461046{
    10471047    if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent())
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r155549 r155736  
    159159    static void didEvaluateScript(const InspectorInstrumentationCookie&);
    160160    static void scriptsEnabled(Page*, bool isEnabled);
    161     static void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);
     161    static void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*);
    162162    static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext*, int timerId);
    163163    static void didFireTimer(const InspectorInstrumentationCookie&);
     
    231231    // FIXME: Remove once we no longer generate stacks outside of Inspector.
    232232    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    233     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
    234     static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     233    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
     234    static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    235235#if ENABLE(WORKERS)
    236236    // FIXME: Convert to ScriptArguments to match non-worker context.
    237237    static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
    238     static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
    239 #endif
    240     static void consoleCount(Page*, ScriptState*, PassRefPtr<ScriptArguments>);
     238    static void addMessageToConsole(WorkerGlobalScope*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
     239#endif
     240    static void consoleCount(Page*, JSC::ExecState*, PassRefPtr<ScriptArguments>);
    241241    static void startConsoleTiming(Frame*, const String& title);
    242242    static void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallStack>);
     
    364364    static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&);
    365365    static void scriptsEnabledImpl(InstrumentingAgents*, bool isEnabled);
    366     static void didCreateIsolatedContextImpl(InstrumentingAgents*, Frame*, ScriptState*, SecurityOrigin*);
     366    static void didCreateIsolatedContextImpl(InstrumentingAgents*, Frame*, JSC::ExecState*, SecurityOrigin*);
    367367    static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents*, int timerId, ScriptExecutionContext*);
    368368    static void didFireTimerImpl(const InspectorInstrumentationCookie&);
     
    433433    static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine);
    434434
    435     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
    436     static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, ScriptState*, unsigned long requestIdentifier);
     435    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
     436    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState*, unsigned long requestIdentifier);
    437437
    438438    // FIXME: Remove once we no longer generate stacks outside of Inspector.
    439439    static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier);
    440440
    441     static void consoleCountImpl(InstrumentingAgents*, ScriptState*, PassRefPtr<ScriptArguments>);
     441    static void consoleCountImpl(InstrumentingAgents*, JSC::ExecState*, PassRefPtr<ScriptArguments>);
    442442    static void startConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title);
    443443    static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title, PassRefPtr<ScriptCallStack>);
     
    997997}
    998998
    999 inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)
     999inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin)
    10001000{
    10011001#if ENABLE(INSPECTOR)
  • trunk/Source/WebCore/inspector/PageConsoleAgent.cpp

    r138457 r155736  
    6767public:
    6868    explicit InspectableNode(Node* node) : m_node(node) { }
    69     virtual ScriptValue get(ScriptState* state)
     69    virtual ScriptValue get(JSC::ExecState* state)
    7070    {
    7171        return InjectedScriptHost::nodeAsScriptValue(state, m_node);
  • trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp

    r146208 r155736  
    100100{
    101101    if (!executionContextId) {
    102         ScriptState* scriptState = mainWorldScriptState(m_pageAgent->mainFrame());
     102        JSC::ExecState* scriptState = mainWorldExecState(m_pageAgent->mainFrame());
    103103        return injectedScriptManager()->injectedScriptFor(scriptState);
    104104    }
  • trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp

    r155217 r155736  
    121121    ASSERT(m_frontend);
    122122    String frameId = m_pageAgent->frameId(frame);
    123     ScriptState* scriptState = mainWorldScriptState(frame);
     123    JSC::ExecState* scriptState = mainWorldExecState(frame);
    124124    notifyContextCreated(frameId, scriptState, 0, true);
    125125}
    126126
    127 void PageRuntimeAgent::didCreateIsolatedContext(Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)
     127void PageRuntimeAgent::didCreateIsolatedContext(Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin)
    128128{
    129129    if (!m_enabled)
     
    137137{
    138138    if (!executionContextId) {
    139         ScriptState* scriptState = mainWorldScriptState(&m_inspectedPage->mainFrame());
     139        JSC::ExecState* scriptState = mainWorldExecState(&m_inspectedPage->mainFrame());
    140140        InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
    141141        if (result.hasNoValue())
     
    161161void PageRuntimeAgent::reportExecutionContextCreation()
    162162{
    163     Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
     163    Vector<std::pair<JSC::ExecState*, SecurityOrigin*> > isolatedContexts;
    164164    for (Frame* frame = &m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) {
    165165        if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
     
    167167        String frameId = m_pageAgent->frameId(frame);
    168168
    169         ScriptState* scriptState = mainWorldScriptState(frame);
     169        JSC::ExecState* scriptState = mainWorldExecState(frame);
    170170        notifyContextCreated(frameId, scriptState, 0, true);
    171171        frame->script().collectIsolatedContexts(isolatedContexts);
     
    178178}
    179179
    180 void PageRuntimeAgent::notifyContextCreated(const String& frameId, ScriptState* scriptState, SecurityOrigin* securityOrigin, bool isPageContext)
     180void PageRuntimeAgent::notifyContextCreated(const String& frameId, JSC::ExecState* scriptState, SecurityOrigin* securityOrigin, bool isPageContext)
    181181{
    182182    ASSERT(securityOrigin || isPageContext);
  • trunk/Source/WebCore/inspector/PageRuntimeAgent.h

    r138457 r155736  
    5959
    6060    void didCreateMainWorldContext(Frame*);
    61     void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);
     61    void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*);
    6262
    6363private:
     
    6868    virtual void unmuteConsole();
    6969    void reportExecutionContextCreation();
    70     void notifyContextCreated(const String& frameId, ScriptState*, SecurityOrigin*, bool isPageContext);
     70    void notifyContextCreated(const String& frameId, JSC::ExecState*, SecurityOrigin*, bool isPageContext);
    7171
    7272    Page* m_inspectedPage;
  • trunk/Source/WebCore/inspector/ScriptArguments.cpp

    r148696 r155736  
    3636namespace WebCore {
    3737
    38 PassRefPtr<ScriptArguments> ScriptArguments::create(ScriptState* scriptState, Vector<ScriptValue>& arguments)
     38PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments)
    3939{
    4040    return adoptRef(new ScriptArguments(scriptState, arguments));
    4141}
    4242
    43 ScriptArguments::ScriptArguments(ScriptState* scriptState, Vector<ScriptValue>& arguments)
     43ScriptArguments::ScriptArguments(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments)
    4444    : m_globalObject(scriptState->vm(), scriptState->lexicalGlobalObject())
    4545{
     
    5757}
    5858
    59 ScriptState* ScriptArguments::globalState() const
     59JSC::ExecState* ScriptArguments::globalState() const
    6060{
    6161    if (m_globalObject)
  • trunk/Source/WebCore/inspector/ScriptArguments.h

    r148537 r155736  
    4545namespace WebCore {
    4646
    47 typedef JSC::ExecState ScriptState;
    4847class ScriptValue;
    4948
    5049class ScriptArguments : public RefCounted<ScriptArguments> {
    5150public:
    52     static PassRefPtr<ScriptArguments> create(ScriptState*, Vector<ScriptValue>& arguments);
     51    static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<ScriptValue>& arguments);
    5352
    5453    ~ScriptArguments();
     
    5756    size_t argumentCount() const { return m_arguments.size(); }
    5857
    59     ScriptState* globalState() const;
     58    JSC::ExecState* globalState() const;
    6059
    6160    bool getFirstArgumentAsString(WTF::String& result, bool checkForNullOrUndefined = false);
     
    6362
    6463private:
    65     ScriptArguments(ScriptState*, Vector<ScriptValue>& arguments);
     64    ScriptArguments(JSC::ExecState*, Vector<ScriptValue>& arguments);
    6665
    6766    JSC::Strong<JSC::JSGlobalObject> m_globalObject;
  • trunk/Source/WebCore/inspector/ScriptDebugListener.h

    r148921 r155736  
    6767    virtual void didParseSource(const String& scriptId, const Script&) = 0;
    6868    virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) = 0;
    69     virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception) = 0;
     69    virtual void didPause(JSC::ExecState*, const ScriptValue& callFrames, const ScriptValue& exception) = 0;
    7070    virtual void didContinue() = 0;
    7171};
  • trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp

    r152080 r155736  
    131131        return InjectedScript();
    132132    }
    133     ScriptState* scriptState = scriptStateFromWorkerGlobalScope(m_inspectedWorkerGlobalScope);
     133    JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_inspectedWorkerGlobalScope);
    134134    return injectedScriptManager()->injectedScriptFor(scriptState);
    135135}
  • trunk/Source/WebCore/inspector/WorkerRuntimeAgent.cpp

    r152080 r155736  
    6464        return InjectedScript();
    6565    }
    66     ScriptState* scriptState = scriptStateFromWorkerGlobalScope(m_workerGlobalScope);
     66    JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_workerGlobalScope);
    6767    return injectedScriptManager()->injectedScriptFor(scriptState);
    6868}
  • trunk/Source/WebCore/page/Console.cpp

    r154272 r155736  
    6666}
    6767
    68 static void internalAddMessage(Page* page, MessageType type, MessageLevel level, ScriptState* state, PassRefPtr<ScriptArguments> prpArguments, bool acceptNoArguments = false, bool printTrace = false)
     68static void internalAddMessage(Page* page, MessageType type, MessageLevel level, JSC::ExecState* state, PassRefPtr<ScriptArguments> prpArguments, bool acceptNoArguments = false, bool printTrace = false)
    6969{
    7070    RefPtr<ScriptArguments> arguments = prpArguments;
     
    112112}
    113113
    114 void Console::debug(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     114void Console::debug(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    115115{
    116116    internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, arguments);
    117117}
    118118
    119 void Console::error(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     119void Console::error(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    120120{
    121121    internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, arguments);
    122122}
    123123
    124 void Console::info(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     124void Console::info(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    125125{
    126126    log(state, arguments);
    127127}
    128128
    129 void Console::log(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     129void Console::log(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    130130{
    131131    internalAddMessage(page(), LogMessageType, LogMessageLevel, state, arguments);
    132132}
    133133
    134 void Console::warn(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     134void Console::warn(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    135135{
    136136    internalAddMessage(page(), LogMessageType, WarningMessageLevel, state, arguments);
    137137}
    138138
    139 void Console::dir(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     139void Console::dir(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    140140{
    141141    internalAddMessage(page(), DirMessageType, LogMessageLevel, state, arguments);
    142142}
    143143
    144 void Console::dirxml(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     144void Console::dirxml(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    145145{
    146146    internalAddMessage(page(), DirXMLMessageType, LogMessageLevel, state, arguments);
    147147}
    148148
    149 void Console::table(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     149void Console::table(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    150150{
    151151    internalAddMessage(page(), TableMessageType, LogMessageLevel, state, arguments);
    152152}
    153153
    154 void Console::clear(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     154void Console::clear(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    155155{
    156156    internalAddMessage(page(), ClearMessageType, LogMessageLevel, state, arguments, true);
    157157}
    158158
    159 void Console::trace(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     159void Console::trace(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    160160{
    161161    internalAddMessage(page(), TraceMessageType, LogMessageLevel, state, arguments, true, true);
    162162}
    163163
    164 void Console::assertCondition(ScriptState* state, PassRefPtr<ScriptArguments> arguments, bool condition)
     164void Console::assertCondition(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, bool condition)
    165165{
    166166    if (condition)
     
    170170}
    171171
    172 void Console::count(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     172void Console::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    173173{
    174174    InspectorInstrumentation::consoleCount(page(), state, arguments);
     
    177177#if ENABLE(JAVASCRIPT_DEBUGGER)
    178178
    179 void Console::profile(const String& title, ScriptState* state)
     179void Console::profile(const String& title, JSC::ExecState* state)
    180180{
    181181    Page* page = this->page();
     
    198198}
    199199
    200 void Console::profileEnd(const String& title, ScriptState* state)
     200void Console::profileEnd(const String& title, JSC::ExecState* state)
    201201{
    202202    Page* page = this->page();
     
    223223}
    224224
    225 void Console::timeEnd(ScriptState* state, const String& title)
     225void Console::timeEnd(JSC::ExecState* state, const String& title)
    226226{
    227227    RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
     
    234234}
    235235
    236 void Console::group(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     236void Console::group(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    237237{
    238238    InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupMessageType, LogMessageLevel, String(), state, arguments);
    239239}
    240240
    241 void Console::groupCollapsed(ScriptState* state, PassRefPtr<ScriptArguments> arguments)
     241void Console::groupCollapsed(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
    242242{
    243243    InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupCollapsedMessageType, LogMessageLevel, String(), state, arguments);
  • trunk/Source/WebCore/page/Console.h

    r151774 r155736  
    5353    virtual ~Console();
    5454
    55     void debug(ScriptState*, PassRefPtr<ScriptArguments>);
    56     void error(ScriptState*, PassRefPtr<ScriptArguments>);
    57     void info(ScriptState*, PassRefPtr<ScriptArguments>);
    58     void log(ScriptState*, PassRefPtr<ScriptArguments>);
    59     void clear(ScriptState*, PassRefPtr<ScriptArguments>);
    60     void warn(ScriptState*, PassRefPtr<ScriptArguments>);
    61     void dir(ScriptState*, PassRefPtr<ScriptArguments>);
    62     void dirxml(ScriptState*, PassRefPtr<ScriptArguments>);
    63     void table(ScriptState*, PassRefPtr<ScriptArguments>);
    64     void trace(ScriptState*, PassRefPtr<ScriptArguments>);
    65     void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool condition);
    66     void count(ScriptState*, PassRefPtr<ScriptArguments>);
     55    void debug(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     56    void error(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     57    void info(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     58    void log(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     59    void clear(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     60    void warn(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     61    void dir(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     62    void dirxml(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     63    void table(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     64    void trace(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     65    void assertCondition(JSC::ExecState*, PassRefPtr<ScriptArguments>, bool condition);
     66    void count(JSC::ExecState*, PassRefPtr<ScriptArguments>);
    6767#if ENABLE(JAVASCRIPT_DEBUGGER)
    6868    const ProfilesArray& profiles() const { return m_profiles; }
    69     void profile(const String&, ScriptState*);
    70     void profileEnd(const String&, ScriptState*);
     69    void profile(const String&, JSC::ExecState*);
     70    void profileEnd(const String&, JSC::ExecState*);
    7171#endif
    7272    void time(const String&);
    73     void timeEnd(ScriptState*, const String&);
     73    void timeEnd(JSC::ExecState*, const String&);
    7474    void timeStamp(PassRefPtr<ScriptArguments>);
    75     void group(ScriptState*, PassRefPtr<ScriptArguments>);
    76     void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>);
     75    void group(JSC::ExecState*, PassRefPtr<ScriptArguments>);
     76    void groupCollapsed(JSC::ExecState*, PassRefPtr<ScriptArguments>);
    7777    void groupEnd();
    7878
  • trunk/Source/WebCore/page/ContentSecurityPolicy.cpp

    r151415 r155736  
    838838    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
    839839    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
    840     bool allowEval(ScriptState*, ContentSecurityPolicy::ReportingStatus) const;
     840    bool allowEval(JSC::ExecState*, ContentSecurityPolicy::ReportingStatus) const;
    841841    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL&) const;
    842842    bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ContentSecurityPolicy::ReportingStatus) const;
     
    876876
    877877    SourceListDirective* operativeDirective(SourceListDirective*) const;
    878     void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL = KURL(), const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const;
     878    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL = KURL(), const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
    879879
    880880    bool checkEval(SourceListDirective*) const;
     
    886886    void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisabledErrorMessage = errorMessage; }
    887887
    888     bool checkEvalAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const;
     888    bool checkEvalAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
    889889    bool checkInlineAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool isScript) const;
    890890    bool checkNonceAndReportViolation(NonceDirective*, const String& nonce, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine) const;
     
    949949}
    950950
    951 void CSPDirectiveList::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
     951void CSPDirectiveList::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
    952952{
    953953    String message = m_reportOnly ? "[Report Only] " + consoleMessage : consoleMessage;
     
    989989}
    990990
    991 bool CSPDirectiveList::checkEvalAndReportViolation(SourceListDirective* directive, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
     991bool CSPDirectiveList::checkEvalAndReportViolation(SourceListDirective* directive, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
    992992{
    993993    if (checkEval(directive))
     
    11211121}
    11221122
    1123 bool CSPDirectiveList::allowEval(ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const
     1123bool CSPDirectiveList::allowEval(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const
    11241124{
    11251125    DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to evaluate script because it violates the following Content Security Policy directive: ")));
     
    15171517}
    15181518
    1519 template<bool (CSPDirectiveList::*allowed)(ScriptState* state, ContentSecurityPolicy::ReportingStatus) const>
    1520 bool isAllowedByAllWithState(const CSPDirectiveListVector& policies, ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus)
     1519template<bool (CSPDirectiveList::*allowed)(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus) const>
     1520bool isAllowedByAllWithState(const CSPDirectiveListVector& policies, JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus)
    15211521{
    15221522    for (size_t i = 0; i < policies.size(); ++i) {
     
    15821582}
    15831583
    1584 bool ContentSecurityPolicy::allowEval(ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const
     1584bool ContentSecurityPolicy::allowEval(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const
    15851585{
    15861586    return isAllowedByAllWithState<&CSPDirectiveList::allowEval>(m_policies, state, reportingStatus);
     
    17361736#endif
    17371737
    1738 void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
     1738void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
    17391739{
    17401740    logToConsole(consoleMessage, contextURL, contextLine, state);
     
    18921892}
    18931893
    1894 void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const
     1894void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
    18951895{
    18961896    // FIXME: <http://webkit.org/b/114317> ContentSecurityPolicy::logToConsole should include a column number
  • trunk/Source/WebCore/page/ContentSecurityPolicy.h

    r146886 r155736  
    9292    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
    9393    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
    94     bool allowEval(ScriptState* = 0, ReportingStatus = SendReport) const;
     94    bool allowEval(JSC::ExecState* = 0, ReportingStatus = SendReport) const;
    9595    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& = KURL()) const;
    9696    bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ReportingStatus = SendReport) const;
     
    125125    void reportMissingReportURI(const String&) const;
    126126    void reportUnsupportedDirective(const String&) const;
    127     void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const;
     127    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
    128128
    129129    void reportBlockedScriptExecutionToInspector(const String& directiveText) const;
     
    140140    explicit ContentSecurityPolicy(ScriptExecutionContext*);
    141141
    142     void logToConsole(const String& message, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const;
     142    void logToConsole(const String& message, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
    143143
    144144    ScriptExecutionContext* m_scriptExecutionContext;
  • trunk/Source/WebCore/page/PageConsole.cpp

    r154272 r155736  
    152152}
    153153
    154 void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     154void PageConsole::addMessage(MessageSource source, MessageLevel level, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
    155155{
    156156    if (muteCount && source != ConsoleAPIMessageSource)
  • trunk/Source/WebCore/page/PageConsole.h

    r149125 r155736  
    4949    static void printMessageSourceAndLevelPrefix(MessageSource, MessageLevel);
    5050
    51     void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> = 0, ScriptState* = 0, unsigned long requestIdentifier = 0);
     51    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> = 0, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    5252    void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>);
    5353    void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = 0);
  • trunk/Source/WebCore/workers/WorkerGlobalScope.cpp

    r155356 r155736  
    279279}
    280280
    281 void WorkerGlobalScope::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     281void WorkerGlobalScope::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
    282282{
    283283    if (!isContextThread()) {
     
    290290}
    291291
    292 void WorkerGlobalScope::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, ScriptState* state, unsigned long requestIdentifier)
     292void WorkerGlobalScope::addMessageToWorkerConsole(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack> callStack, JSC::ExecState* state, unsigned long requestIdentifier)
    293293{
    294294    ASSERT(isContextThread());
  • trunk/Source/WebCore/workers/WorkerGlobalScope.h

    r155356 r155736  
    144144
    145145        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
    146         void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
     146        void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
    147147
    148148    private:
     
    155155        virtual EventTargetData& ensureEventTargetData() OVERRIDE;
    156156
    157         virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
     157        virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, PassRefPtr<ScriptCallStack>, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
    158158        virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE;
    159159
Note: See TracChangeset for help on using the changeset viewer.