Changeset 155736 in webkit
- Timestamp:
- Sep 13, 2013 6:30:06 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 83 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155731 r155736 1 2013-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 1 90 2013-09-13 Sam Weinig <sam@webkit.org> 2 91 -
trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h
r147029 r155736 69 69 IDBAny* source() const; 70 70 71 PassRefPtr<IDBRequest> update( ScriptState*, ScriptValue&, ExceptionCode&);71 PassRefPtr<IDBRequest> update(JSC::ExecState*, ScriptValue&, ExceptionCode&); 72 72 void advance(unsigned long, ExceptionCode&); 73 73 // FIXME: Try to modify the code generator so this overload is unneeded. -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h
r141013 r155736 66 66 bool autoIncrement() const { return m_metadata.autoIncrement; } 67 67 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&); 70 70 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, static_cast<IDBKeyRange*>(0), ec); } 71 71 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); } … … 77 77 PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&); 78 78 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&); 81 81 PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&); 82 82 PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&); … … 95 95 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&); 96 96 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&); 99 99 void markDeleted() { m_deleted = true; } 100 100 void transactionFinished(); -
trunk/Source/WebCore/bindings/js/DOMRequestState.h
r152080 r155736 50 50 if (m_scriptExecutionContext->isDocument()) { 51 51 Document* document = toDocument(m_scriptExecutionContext); 52 m_exec = scriptStateFromPage(mainThreadNormalWorld(), document->page());52 m_exec = execStateFromPage(mainThreadNormalWorld(), document->page()); 53 53 } else { 54 54 #if ENABLE(WORKERS) 55 55 WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(m_scriptExecutionContext); 56 m_exec = scriptStateFromWorkerGlobalScope(workerGlobalScope);56 m_exec = execStateFromWorkerGlobalScope(workerGlobalScope); 57 57 #endif 58 58 } -
trunk/Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
r155589 r155736 77 77 } 78 78 79 ScriptValue InjectedScriptHost::nodeAsScriptValue( ScriptState* state, Node* node)79 ScriptValue InjectedScriptHost::nodeAsScriptValue(JSC::ExecState* state, Node* node) 80 80 { 81 81 if (!shouldAllowAccessToNode(state, node)) -
trunk/Source/WebCore/bindings/js/JSInjectedScriptManager.cpp
r129476 r155736 51 51 namespace WebCore { 52 52 53 ScriptObject InjectedScriptManager::createInjectedScript(const String& source, ScriptState* scriptState, int id)53 ScriptObject InjectedScriptManager::createInjectedScript(const String& source, JSC::ExecState* scriptState, int id) 54 54 { 55 55 JSLockHolder lock(scriptState); … … 87 87 } 88 88 89 bool InjectedScriptManager::canAccessInspectedWindow( ScriptState* scriptState)89 bool InjectedScriptManager::canAccessInspectedWindow(JSC::ExecState* scriptState) 90 90 { 91 91 JSLockHolder lock(scriptState); -
trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp
r154877 r155736 277 277 void willCreatePossiblyOrphanedTreeByRemovalSlowCase(Node* root) 278 278 { 279 ScriptState* scriptState = mainWorldScriptState(root->document().frame());279 JSC::ExecState* scriptState = mainWorldExecState(root->document().frame()); 280 280 if (!scriptState) 281 281 return; -
trunk/Source/WebCore/bindings/js/JSNodeFilterCondition.h
r148696 r155736 43 43 JSNodeFilterCondition(JSC::VM&, NodeFilter* owner, JSC::JSValue filter); 44 44 45 virtual short acceptNode( ScriptState*, Node*) const;45 virtual short acceptNode(JSC::ExecState*, Node*) const; 46 46 47 47 class WeakOwner : public JSC::WeakHandleOwner { -
trunk/Source/WebCore/bindings/js/ScriptController.cpp
r155417 r155736 339 339 JSC::ExecState* exec = iter->value->window()->globalExec(); 340 340 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)); 342 342 } 343 343 } -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp
r155622 r155736 305 305 ASSERT(m_paused); 306 306 JSGlobalObject* globalObject = m_currentCallFrame->scopeChain()->globalObject(); 307 ScriptState* state = globalObject->globalExec();307 JSC::ExecState* state = globalObject->globalExec(); 308 308 JSValue jsCallFrame; 309 309 { … … 575 575 } 576 576 577 void ScriptDebugServer::compileScript( ScriptState*, const String&, const String&, String*, String*)577 void ScriptDebugServer::compileScript(JSC::ExecState*, const String&, const String&, String*, String*) 578 578 { 579 579 // FIXME(89652): implement this. … … 585 585 } 586 586 587 void ScriptDebugServer::runScript( ScriptState*, const String&, ScriptValue*, bool*, String*)587 void ScriptDebugServer::runScript(JSC::ExecState*, const String&, ScriptValue*, bool*, String*) 588 588 { 589 589 // FIXME(89652): implement this. -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.h
r155622 r155736 99 99 bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; } 100 100 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); 102 102 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); 104 104 105 105 class Task { -
trunk/Source/WebCore/bindings/js/ScriptEventListener.cpp
r154877 r155736 104 104 if (!jsFunction) 105 105 return ""; 106 ScriptState* scriptState = scriptStateFromNode(jsListener->isolatedWorld(), document);106 JSC::ExecState* scriptState = execStateFromNode(jsListener->isolatedWorld(), document); 107 107 return jsFunction->toString(scriptState)->value(scriptState); 108 108 } … … 121 121 } 122 122 123 ScriptState* eventListenerHandlerScriptState(Frame* frame, EventListener* eventListener)123 JSC::ExecState* eventListenerHandlerScriptState(Frame* frame, EventListener* eventListener) 124 124 { 125 125 const JSEventListener* jsListener = JSEventListener::cast(eventListener); -
trunk/Source/WebCore/bindings/js/ScriptEventListener.h
r155229 r155736 50 50 String eventListenerHandlerBody(Document*, EventListener*); 51 51 ScriptValue eventListenerHandler(Document*, EventListener*); 52 ScriptState* eventListenerHandlerScriptState(Frame*, EventListener*);52 JSC::ExecState* eventListenerHandlerScriptState(Frame*, EventListener*); 53 53 bool eventListenerHandlerLocation(Document*, EventListener*, String& sourceName, String& scriptId, int& lineNumber); 54 54 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/ScriptFunctionCall.cpp
r148696 r155736 191 191 } 192 192 193 ScriptCallback::ScriptCallback( ScriptState* state, const ScriptValue& function)193 ScriptCallback::ScriptCallback(JSC::ExecState* state, const ScriptValue& function) 194 194 : ScriptCallArgumentHandler(state) 195 195 , m_function(function) -
trunk/Source/WebCore/bindings/js/ScriptFunctionCall.h
r138003 r155736 47 47 class ScriptCallArgumentHandler { 48 48 public: 49 ScriptCallArgumentHandler( ScriptState* state) : m_exec(state) { }49 ScriptCallArgumentHandler(JSC::ExecState* state) : m_exec(state) { } 50 50 51 51 void appendArgument(const ScriptObject&); … … 63 63 protected: 64 64 JSC::MarkedArgumentBuffer m_arguments; 65 ScriptState* m_exec;65 JSC::ExecState* m_exec; 66 66 67 67 private: … … 86 86 class ScriptCallback : public ScriptCallArgumentHandler { 87 87 public: 88 ScriptCallback( ScriptState*, const ScriptValue&);88 ScriptCallback(JSC::ExecState*, const ScriptValue&); 89 89 90 90 ScriptValue call(); -
trunk/Source/WebCore/bindings/js/ScriptObject.cpp
r148696 r155736 45 45 namespace WebCore { 46 46 47 ScriptObject::ScriptObject( ScriptState* scriptState, JSObject* object)47 ScriptObject::ScriptObject(JSC::ExecState* scriptState, JSObject* object) 48 48 : ScriptValue(scriptState->vm(), object) 49 49 , m_scriptState(scriptState) … … 51 51 } 52 52 53 ScriptObject::ScriptObject( ScriptState* scriptState, const ScriptValue& scriptValue)53 ScriptObject::ScriptObject(JSC::ExecState* scriptState, const ScriptValue& scriptValue) 54 54 : ScriptValue(scriptState->vm(), scriptValue.jsValue()) 55 55 , m_scriptState(scriptState) … … 57 57 } 58 58 59 static bool handleException( ScriptState* scriptState)59 static bool handleException(JSC::ExecState* scriptState) 60 60 { 61 61 if (!scriptState->hadException()) … … 66 66 } 67 67 68 bool ScriptGlobalObject::set( ScriptState* scriptState, const char* name, const ScriptObject& value)68 bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, const ScriptObject& value) 69 69 { 70 70 JSLockHolder lock(scriptState); … … 74 74 75 75 #if ENABLE(INSPECTOR) 76 bool ScriptGlobalObject::set( ScriptState* scriptState, const char* name, InspectorFrontendHost* value)76 bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, InspectorFrontendHost* value) 77 77 { 78 78 JSLockHolder lock(scriptState); … … 82 82 } 83 83 84 bool ScriptGlobalObject::set( ScriptState* scriptState, const char* name, InjectedScriptHost* value)84 bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, InjectedScriptHost* value) 85 85 { 86 86 JSLockHolder lock(scriptState); … … 91 91 #endif // ENABLE(INSPECTOR) 92 92 93 bool ScriptGlobalObject::get( ScriptState* scriptState, const char* name, ScriptObject& value)93 bool ScriptGlobalObject::get(JSC::ExecState* scriptState, const char* name, ScriptObject& value) 94 94 { 95 95 JSLockHolder lock(scriptState); … … 105 105 } 106 106 107 bool ScriptGlobalObject::remove( ScriptState* scriptState, const char* name)107 bool ScriptGlobalObject::remove(JSC::ExecState* scriptState, const char* name) 108 108 { 109 109 JSLockHolder lock(scriptState); -
trunk/Source/WebCore/bindings/js/ScriptObject.h
r144950 r155736 44 44 class ScriptObject : public ScriptValue { 45 45 public: 46 ScriptObject( ScriptState*, JSC::JSObject*);47 ScriptObject( ScriptState*, const ScriptValue&);46 ScriptObject(JSC::ExecState*, JSC::JSObject*); 47 ScriptObject(JSC::ExecState*, const ScriptValue&); 48 48 ScriptObject() : m_scriptState(0) { } 49 49 JSC::JSObject* jsObject() const { return asObject(jsValue()); } 50 ScriptState* scriptState() const { return m_scriptState; }50 JSC::ExecState* scriptState() const { return m_scriptState; } 51 51 52 52 protected: 53 ScriptState* m_scriptState;53 JSC::ExecState* m_scriptState; 54 54 }; 55 55 56 56 class ScriptGlobalObject { 57 57 public: 58 static bool set( ScriptState*, const char* name, const ScriptObject&);58 static bool set(JSC::ExecState*, const char* name, const ScriptObject&); 59 59 #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*); 62 62 #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); 65 65 private: 66 66 ScriptGlobalObject() { } -
trunk/Source/WebCore/bindings/js/ScriptProfiler.cpp
r154658 r155736 58 58 } 59 59 60 void ScriptProfiler::start( ScriptState* state, const String& title)60 void ScriptProfiler::start(JSC::ExecState* state, const String& title) 61 61 { 62 62 JSC::LegacyProfiler::profiler()->startProfiling(state, title); … … 72 72 void ScriptProfiler::startForWorkerGlobalScope(WorkerGlobalScope* context, const String& title) 73 73 { 74 start( scriptStateFromWorkerGlobalScope(context), title);74 start(execStateFromWorkerGlobalScope(context), title); 75 75 } 76 76 #endif 77 77 78 PassRefPtr<ScriptProfile> ScriptProfiler::stop( ScriptState* state, const String& title)78 PassRefPtr<ScriptProfile> ScriptProfiler::stop(JSC::ExecState* state, const String& title) 79 79 { 80 80 RefPtr<JSC::Profile> profile = JSC::LegacyProfiler::profiler()->stopProfiling(state, title); … … 91 91 PassRefPtr<ScriptProfile> ScriptProfiler::stopForWorkerGlobalScope(WorkerGlobalScope* context, const String& title) 92 92 { 93 return stop( scriptStateFromWorkerGlobalScope(context), title);93 return stop(execStateFromWorkerGlobalScope(context), title); 94 94 } 95 95 #endif -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r154033 r155736 60 60 static ScriptObject objectByHeapObjectId(unsigned id); 61 61 static unsigned getHeapObjectId(const ScriptValue&); 62 static void start( ScriptState* state, const String& title);62 static void start(JSC::ExecState*, const String& title); 63 63 static void startForPage(Page*, const String& title); 64 64 #if ENABLE(WORKERS) 65 65 static void startForWorkerGlobalScope(WorkerGlobalScope*, const String& title); 66 66 #endif 67 static PassRefPtr<ScriptProfile> stop( ScriptState* state, const String& title);67 static PassRefPtr<ScriptProfile> stop(JSC::ExecState*, const String& title); 68 68 static PassRefPtr<ScriptProfile> stopForPage(Page*, const String& title); 69 69 #if ENABLE(WORKERS) -
trunk/Source/WebCore/bindings/js/ScriptState.cpp
r155229 r155736 50 50 namespace WebCore { 51 51 52 DOMWindow* domWindowFrom ScriptState(ScriptState* scriptState)52 DOMWindow* domWindowFromExecState(JSC::ExecState* scriptState) 53 53 { 54 54 JSC::JSGlobalObject* globalObject = scriptState->lexicalGlobalObject(); … … 58 58 } 59 59 60 ScriptExecutionContext* scriptExecutionContextFrom ScriptState(ScriptState* scriptState)60 ScriptExecutionContext* scriptExecutionContextFromExecState(JSC::ExecState* scriptState) 61 61 { 62 62 JSC::JSGlobalObject* globalObject = scriptState->lexicalGlobalObject(); … … 66 66 } 67 67 68 ScriptState* mainWorldScriptState(Frame* frame)68 JSC::ExecState* mainWorldExecState(Frame* frame) 69 69 { 70 70 if (!frame) … … 74 74 } 75 75 76 ScriptState* scriptStateFromNode(DOMWrapperWorld* world, Node* node)76 JSC::ExecState* execStateFromNode(DOMWrapperWorld* world, Node* node) 77 77 { 78 78 if (!node) … … 86 86 } 87 87 88 ScriptState* scriptStateFromPage(DOMWrapperWorld* world, Page* page)88 JSC::ExecState* execStateFromPage(DOMWrapperWorld* world, Page* page) 89 89 { 90 90 return page->mainFrame().script().globalObject(world)->globalExec(); … … 92 92 93 93 #if ENABLE(WORKERS) 94 ScriptState* scriptStateFromWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)94 JSC::ExecState* execStateFromWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope) 95 95 { 96 96 return workerGlobalScope->script()->workerGlobalScopeWrapper()->globalExec(); -
trunk/Source/WebCore/bindings/js/ScriptState.h
r152080 r155736 53 53 typedef JSC::ExecState ScriptState; 54 54 55 DOMWindow* domWindowFrom ScriptState(ScriptState*);56 ScriptExecutionContext* scriptExecutionContextFrom ScriptState(ScriptState*);55 DOMWindow* domWindowFromExecState(ScriptState*); 56 ScriptExecutionContext* scriptExecutionContextFromExecState(JSC::ExecState*); 57 57 58 ScriptState* mainWorldScriptState(Frame*);58 JSC::ExecState* mainWorldExecState(Frame*); 59 59 60 ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);61 ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);60 JSC::ExecState* execStateFromNode(DOMWrapperWorld*, Node*); 61 JSC::ExecState* execStateFromPage(DOMWrapperWorld*, Page*); 62 62 63 63 #if ENABLE(WORKERS) 64 ScriptState* scriptStateFromWorkerGlobalScope(WorkerGlobalScope*);64 JSC::ExecState* execStateFromWorkerGlobalScope(WorkerGlobalScope*); 65 65 #endif 66 66 -
trunk/Source/WebCore/bindings/js/ScriptValue.cpp
r148696 r155736 45 45 namespace WebCore { 46 46 47 bool ScriptValue::getString( ScriptState* scriptState, String& result) const47 bool ScriptValue::getString(JSC::ExecState* scriptState, String& result) const 48 48 { 49 49 if (!m_value) … … 55 55 } 56 56 57 String ScriptValue::toString( ScriptState* scriptState) const57 String ScriptValue::toString(JSC::ExecState* scriptState) const 58 58 { 59 59 String result = m_value.get().toString(scriptState)->value(scriptState); … … 64 64 } 65 65 66 bool ScriptValue::isEqual( ScriptState* scriptState, const ScriptValue& anotherValue) const66 bool ScriptValue::isEqual(JSC::ExecState* scriptState, const ScriptValue& anotherValue) const 67 67 { 68 68 if (hasNoValue()) … … 99 99 } 100 100 101 PassRefPtr<SerializedScriptValue> ScriptValue::serialize( ScriptState* scriptState, SerializationErrorMode throwExceptions)101 PassRefPtr<SerializedScriptValue> ScriptValue::serialize(JSC::ExecState* scriptState, SerializationErrorMode throwExceptions) 102 102 { 103 103 return SerializedScriptValue::create(scriptState, jsValue(), 0, 0, throwExceptions); 104 104 } 105 105 106 PassRefPtr<SerializedScriptValue> ScriptValue::serialize( ScriptState* scriptState, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, bool& didThrow)106 PassRefPtr<SerializedScriptValue> ScriptValue::serialize(JSC::ExecState* scriptState, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, bool& didThrow) 107 107 { 108 108 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(scriptState, jsValue(), messagePorts, arrayBuffers); … … 111 111 } 112 112 113 ScriptValue ScriptValue::deserialize( ScriptState* scriptState, SerializedScriptValue* value, SerializationErrorMode throwExceptions)113 ScriptValue ScriptValue::deserialize(JSC::ExecState* scriptState, SerializedScriptValue* value, SerializationErrorMode throwExceptions) 114 114 { 115 115 return ScriptValue(scriptState->vm(), value->deserialize(scriptState, scriptState->lexicalGlobalObject(), 0, throwExceptions)); … … 117 117 118 118 #if ENABLE(INSPECTOR) 119 static PassRefPtr<InspectorValue> jsToInspectorValue( ScriptState* scriptState, JSValue value, int maxDepth)119 static PassRefPtr<InspectorValue> jsToInspectorValue(JSC::ExecState* scriptState, JSValue value, int maxDepth) 120 120 { 121 121 if (!value) { … … 170 170 } 171 171 172 PassRefPtr<InspectorValue> ScriptValue::toInspectorValue( ScriptState* scriptState) const172 PassRefPtr<InspectorValue> ScriptValue::toInspectorValue(JSC::ExecState* scriptState) const 173 173 { 174 174 JSC::JSLockHolder holder(scriptState); -
trunk/Source/WebCore/bindings/js/ScriptValue.h
r148696 r155736 53 53 54 54 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; 58 58 bool isNull() const; 59 59 bool isUndefined() const; … … 66 66 bool operator==(const ScriptValue& other) const { return m_value == other.m_value; } 67 67 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); 71 71 72 72 #if ENABLE(INSPECTOR) 73 PassRefPtr<InspectorValue> toInspectorValue( ScriptState*) const;73 PassRefPtr<InspectorValue> toInspectorValue(JSC::ExecState*) const; 74 74 #endif 75 75 -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r155008 r155736 2006 2006 2007 2007 #if ENABLE(INSPECTOR) 2008 ScriptValue SerializedScriptValue::deserializeForInspector( ScriptState* scriptState)2008 ScriptValue SerializedScriptValue::deserializeForInspector(JSC::ExecState* scriptState) 2009 2009 { 2010 2010 JSValue value = deserialize(scriptState, scriptState->lexicalGlobalObject(), 0); -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.h
r153728 r155736 93 93 94 94 #if ENABLE(INSPECTOR) 95 ScriptValue deserializeForInspector( ScriptState*);95 ScriptValue deserializeForInspector(JSC::ExecState*); 96 96 #endif 97 97 -
trunk/Source/WebCore/dom/Document.cpp
r155729 r155736 860 860 } 861 861 862 PassRefPtr<CustomElementConstructor> Document::registerElement( WebCore::ScriptState* state, const AtomicString& name, ExceptionCode& ec)862 PassRefPtr<CustomElementConstructor> Document::registerElement(JSC::ExecState* state, const AtomicString& name, ExceptionCode& ec) 863 863 { 864 864 return registerElement(state, name, Dictionary(), ec); 865 865 } 866 866 867 PassRefPtr<CustomElementConstructor> Document::registerElement( WebCore::ScriptState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec)867 PassRefPtr<CustomElementConstructor> Document::registerElement(JSC::ExecState* state, const AtomicString& name, const Dictionary& options, ExceptionCode& ec) 868 868 { 869 869 if (!isHTMLDocument() && !isXHTMLDocument()) { … … 4816 4816 } 4817 4817 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)4818 void 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) 4819 4819 { 4820 4820 if (!isContextThread()) { -
trunk/Source/WebCore/dom/Document.h
r155496 r155736 1139 1139 PassRefPtr<Element> createElement(const AtomicString& localName, const AtomicString& typeExtension, ExceptionCode&); 1140 1140 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&); 1143 1143 CustomElementRegistry* registry() const { return m_registry.get(); } 1144 1144 void didCreateCustomElement(Element*, CustomElementConstructor*); … … 1221 1221 virtual void derefScriptExecutionContext() { deref(); } 1222 1222 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); 1224 1224 1225 1225 virtual double minimumTimerInterval() const; -
trunk/Source/WebCore/dom/NodeFilter.cpp
r39003 r155736 30 30 namespace WebCore { 31 31 32 short NodeFilter::acceptNode( ScriptState* state, Node* node) const32 short NodeFilter::acceptNode(JSC::ExecState* state, Node* node) const 33 33 { 34 34 // cast to short silences "enumeral and non-enumeral types in return" warning -
trunk/Source/WebCore/dom/NodeFilter.h
r137190 r155736 76 76 } 77 77 78 short acceptNode( ScriptState*, Node*) const;78 short acceptNode(JSC::ExecState*, Node*) const; 79 79 80 80 // Do not call these functions. They are just scaffolding to support the Objective-C bindings. 81 81 // 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); } 83 83 84 84 void setCondition(PassRefPtr<NodeFilterCondition> condition) { ASSERT(!m_condition); m_condition = condition; } -
trunk/Source/WebCore/dom/NodeFilterCondition.cpp
r39003 r155736 30 30 namespace WebCore { 31 31 32 short NodeFilterCondition::acceptNode( ScriptState*, Node*) const32 short NodeFilterCondition::acceptNode(JSC::ExecState*, Node*) const 33 33 { 34 34 return NodeFilter::FILTER_ACCEPT; -
trunk/Source/WebCore/dom/NodeFilterCondition.h
r89069 r155736 42 42 public: 43 43 virtual ~NodeFilterCondition() { } 44 virtual short acceptNode( ScriptState*, Node*) const = 0;44 virtual short acceptNode(JSC::ExecState*, Node*) const = 0; 45 45 virtual void visitAggregate(JSC::SlotVisitor&) { } 46 46 }; -
trunk/Source/WebCore/dom/NodeIterator.cpp
r154877 r155736 86 86 } 87 87 88 PassRefPtr<Node> NodeIterator::nextNode( ScriptState* state, ExceptionCode& ec)88 PassRefPtr<Node> NodeIterator::nextNode(JSC::ExecState* state, ExceptionCode& ec) 89 89 { 90 90 if (m_detached) { … … 115 115 } 116 116 117 PassRefPtr<Node> NodeIterator::previousNode( ScriptState* state, ExceptionCode& ec)117 PassRefPtr<Node> NodeIterator::previousNode(JSC::ExecState* state, ExceptionCode& ec) 118 118 { 119 119 if (m_detached) { -
trunk/Source/WebCore/dom/NodeIterator.h
r154481 r155736 44 44 ~NodeIterator(); 45 45 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&); 48 48 void detach(); 49 49 … … 56 56 // Do not call these functions. They are just scaffolding to support the Objective-C bindings. 57 57 // 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); } 60 60 61 61 private: -
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
r154962 r155736 314 314 } 315 315 316 void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, ScriptState* state, unsigned long requestIdentifier)316 void ScriptExecutionContext::addConsoleMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier) 317 317 { 318 318 addMessage(source, level, message, sourceURL, lineNumber, columnNumber, 0, state, requestIdentifier); -
trunk/Source/WebCore/dom/ScriptExecutionContext.h
r155356 r155736 52 52 class ScriptCallStack; 53 53 54 typedef JSC::ExecState ScriptState;55 56 54 #if ENABLE(BLOB) 57 55 class PublicURLManager; … … 80 78 void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>, CachedScript* = 0); 81 79 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); 83 81 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0; 84 82 … … 180 178 181 179 private: 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; 183 181 virtual EventTarget* errorEventTarget() = 0; 184 182 virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0; -
trunk/Source/WebCore/dom/Traversal.cpp
r154481 r155736 39 39 } 40 40 41 short NodeIteratorBase::acceptNode( ScriptState* state, Node* node) const41 short NodeIteratorBase::acceptNode(JSC::ExecState* state, Node* node) const 42 42 { 43 43 // FIXME: To handle XML properly we would have to check m_expandEntityReferences. -
trunk/Source/WebCore/dom/Traversal.h
r154481 r155736 43 43 protected: 44 44 NodeIteratorBase(PassRefPtr<Node>, unsigned whatToShow, PassRefPtr<NodeFilter>, bool expandEntityReferences); 45 short acceptNode( ScriptState*, Node*) const;45 short acceptNode(JSC::ExecState*, Node*) const; 46 46 47 47 private: -
trunk/Source/WebCore/dom/TreeWalker.cpp
r154481 r155736 56 56 } 57 57 58 Node* TreeWalker::parentNode( ScriptState* state)58 Node* TreeWalker::parentNode(JSC::ExecState* state) 59 59 { 60 60 RefPtr<Node> node = m_current; … … 72 72 } 73 73 74 Node* TreeWalker::firstChild( ScriptState* state)74 Node* TreeWalker::firstChild(JSC::ExecState* state) 75 75 { 76 76 for (RefPtr<Node> node = m_current->firstChild(); node; ) { … … 105 105 } 106 106 107 Node* TreeWalker::lastChild( ScriptState* state)107 Node* TreeWalker::lastChild(JSC::ExecState* state) 108 108 { 109 109 for (RefPtr<Node> node = m_current->lastChild(); node; ) { … … 138 138 } 139 139 140 Node* TreeWalker::previousSibling( ScriptState* state)140 Node* TreeWalker::previousSibling(JSC::ExecState* state) 141 141 { 142 142 RefPtr<Node> node = m_current; … … 175 175 } 176 176 177 Node* TreeWalker::nextSibling( ScriptState* state)177 Node* TreeWalker::nextSibling(JSC::ExecState* state) 178 178 { 179 179 RefPtr<Node> node = m_current; … … 212 212 } 213 213 214 Node* TreeWalker::previousNode( ScriptState* state)214 Node* TreeWalker::previousNode(JSC::ExecState* state) 215 215 { 216 216 RefPtr<Node> node = m_current; … … 251 251 } 252 252 253 Node* TreeWalker::nextNode( ScriptState* state)253 Node* TreeWalker::nextNode(JSC::ExecState* state) 254 254 { 255 255 RefPtr<Node> node = m_current; -
trunk/Source/WebCore/dom/TreeWalker.h
r154481 r155736 46 46 void setCurrentNode(PassRefPtr<Node>, ExceptionCode&); 47 47 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*); 55 55 56 56 // Do not call these functions. They are just scaffolding to support the Objective-C bindings. 57 57 // 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())); } 65 65 66 66 private: -
trunk/Source/WebCore/inspector/ConsoleMessage.cpp
r149125 r155736 64 64 } 65 65 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)66 ConsoleMessage::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) 67 67 : m_source(source) 68 68 , m_type(type) … … 98 98 } 99 99 100 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, ScriptState* state, unsigned long requestIdentifier)100 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptArguments> arguments, JSC::ExecState* state, unsigned long requestIdentifier) 101 101 : m_source(source) 102 102 , m_type(type) … … 117 117 } 118 118 119 void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, ScriptState* state)119 void ConsoleMessage::autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* state) 120 120 { 121 121 if (m_type == EndGroupMessageType) … … 272 272 if (!m_arguments) 273 273 return; 274 if (domWindowFrom ScriptState(m_arguments->globalState()) != window)274 if (domWindowFromExecState(m_arguments->globalState()) != window) 275 275 return; 276 276 if (!m_message) -
trunk/Source/WebCore/inspector/ConsoleMessage.h
r149125 r155736 54 54 public: 55 55 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); 57 57 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); 59 59 ~ConsoleMessage(); 60 60 … … 73 73 74 74 private: 75 void autogenerateMetadata(bool canGenerateCallStack, ScriptState* = 0);75 void autogenerateMetadata(bool canGenerateCallStack, JSC::ExecState* = 0); 76 76 77 77 MessageSource m_source; -
trunk/Source/WebCore/inspector/InjectedScript.h
r155589 r155736 101 101 private: 102 102 friend class InjectedScriptModule; 103 friend InjectedScript InjectedScriptManager::injectedScriptFor( ScriptState*);103 friend InjectedScript InjectedScriptManager::injectedScriptFor(JSC::ExecState*); 104 104 InjectedScript(ScriptObject, InspectedStateAccessCheck); 105 105 -
trunk/Source/WebCore/inspector/InjectedScriptBase.cpp
r148537 r155736 76 76 ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall& function, bool& hadException) const 77 77 { 78 ScriptExecutionContext* scriptExecutionContext = scriptExecutionContextFrom ScriptState(m_injectedScriptObject.scriptState());78 ScriptExecutionContext* scriptExecutionContext = scriptExecutionContextFromExecState(m_injectedScriptObject.scriptState()); 79 79 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFunction(scriptExecutionContext, name(), 1); 80 80 81 ScriptState* scriptState = m_injectedScriptObject.scriptState();81 JSC::ExecState* scriptState = m_injectedScriptObject.scriptState(); 82 82 bool evalIsDisabled = false; 83 83 if (scriptState) { -
trunk/Source/WebCore/inspector/InjectedScriptBase.h
r120842 r155736 52 52 const String& name() const { return m_name; } 53 53 bool hasNoValue() const { return m_injectedScriptObject.hasNoValue(); } 54 ScriptState* scriptState() const { return m_injectedScriptObject.scriptState(); }54 JSC::ExecState* scriptState() const { return m_injectedScriptObject.scriptState(); } 55 55 56 56 protected: 57 typedef bool (*InspectedStateAccessCheck)( ScriptState*);57 typedef bool (*InspectedStateAccessCheck)(JSC::ExecState*); 58 58 InjectedScriptBase(const String& name); 59 59 InjectedScriptBase(const String& name, ScriptObject, InspectedStateAccessCheck); -
trunk/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp
r143328 r155736 55 55 } 56 56 57 InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedScriptManager* injectedScriptManager, ScriptState* scriptState)57 InjectedScriptCanvasModule InjectedScriptCanvasModule::moduleForState(InjectedScriptManager* injectedScriptManager, JSC::ExecState* scriptState) 58 58 { 59 59 InjectedScriptCanvasModule result; -
trunk/Source/WebCore/inspector/InjectedScriptCanvasModule.h
r143328 r155736 49 49 virtual String source() const; 50 50 51 static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, ScriptState*);51 static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, JSC::ExecState*); 52 52 53 53 ScriptObject wrapCanvas2DContext(const ScriptObject&); -
trunk/Source/WebCore/inspector/InjectedScriptHost.cpp
r154750 r155736 124 124 } 125 125 126 ScriptValue InjectedScriptHost::InspectableObject::get( ScriptState*)126 ScriptValue InjectedScriptHost::InspectableObject::get(JSC::ExecState*) 127 127 { 128 128 return ScriptValue(); -
trunk/Source/WebCore/inspector/InjectedScriptHost.h
r147861 r155736 88 88 89 89 static Node* scriptValueAsNode(ScriptValue); 90 static ScriptValue nodeAsScriptValue( ScriptState*, Node*);90 static ScriptValue nodeAsScriptValue(JSC::ExecState*, Node*); 91 91 92 92 void disconnect(); … … 95 95 WTF_MAKE_FAST_ALLOCATED; 96 96 public: 97 virtual ScriptValue get( ScriptState*);97 virtual ScriptValue get(JSC::ExecState*); 98 98 virtual ~InspectableObject() { } 99 99 }; -
trunk/Source/WebCore/inspector/InjectedScriptManager.cpp
r152080 r155736 81 81 if (it != m_idToInjectedScript.end()) 82 82 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) { 84 84 if (it->value == id) 85 85 return injectedScriptFor(it->key); … … 88 88 } 89 89 90 int InjectedScriptManager::injectedScriptIdFor( ScriptState* scriptState)90 int InjectedScriptManager::injectedScriptIdFor(JSC::ExecState* scriptState) 91 91 { 92 ScriptStateToId::iterator it = m_scriptStateToId.find(scriptState);92 ExecStateToId::iterator it = m_scriptStateToId.find(scriptState); 93 93 if (it != m_scriptStateToId.end()) 94 94 return it->value; … … 124 124 IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end(); 125 125 for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it != end; ++it) { 126 ScriptState* scriptState = it->value.scriptState();127 if (window != domWindowFrom ScriptState(scriptState))126 JSC::ExecState* scriptState = it->value.scriptState(); 127 if (window != domWindowFromExecState(scriptState)) 128 128 continue; 129 129 m_scriptStateToId.remove(scriptState); … … 135 135 136 136 // 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 == domWindowFrom ScriptState(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)) 141 141 scriptStatesToRemove.append(scriptState); 142 142 } … … 145 145 } 146 146 147 bool InjectedScriptManager::canAccessInspectedWorkerGlobalScope( ScriptState*)147 bool InjectedScriptManager::canAccessInspectedWorkerGlobalScope(JSC::ExecState*) 148 148 { 149 149 return true; … … 161 161 } 162 162 163 InjectedScript InjectedScriptManager::injectedScriptFor( ScriptState* inspectedScriptState)163 InjectedScript InjectedScriptManager::injectedScriptFor(JSC::ExecState* inspectedExecState) 164 164 { 165 ScriptStateToId::iterator it = m_scriptStateToId.find(inspectedScriptState);165 ExecStateToId::iterator it = m_scriptStateToId.find(inspectedExecState); 166 166 if (it != m_scriptStateToId.end()) { 167 167 IdToInjectedScriptMap::iterator it1 = m_idToInjectedScript.find(it->value); … … 170 170 } 171 171 172 if (!m_inspectedStateAccessCheck(inspected ScriptState))172 if (!m_inspectedStateAccessCheck(inspectedExecState)) 173 173 return InjectedScript(); 174 174 175 int id = injectedScriptIdFor(inspected ScriptState);176 ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspected ScriptState, id);175 int id = injectedScriptIdFor(inspectedExecState); 176 ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspectedExecState, id); 177 177 InjectedScript result(injectedScriptObject, m_inspectedStateAccessCheck); 178 178 m_idToInjectedScript.set(id, result); -
trunk/Source/WebCore/inspector/InjectedScriptManager.h
r152080 r155736 55 55 InjectedScriptHost* injectedScriptHost(); 56 56 57 InjectedScript injectedScriptFor( ScriptState*);57 InjectedScript injectedScriptFor(JSC::ExecState*); 58 58 InjectedScript injectedScriptForId(int); 59 int injectedScriptIdFor( ScriptState*);59 int injectedScriptIdFor(JSC::ExecState*); 60 60 InjectedScript injectedScriptForObjectId(const String& objectId); 61 61 void discardInjectedScripts(); … … 63 63 void releaseObjectGroup(const String& objectGroup); 64 64 65 typedef bool (*InspectedStateAccessCheck)( ScriptState*);65 typedef bool (*InspectedStateAccessCheck)(JSC::ExecState*); 66 66 InspectedStateAccessCheck inspectedStateAccessCheck() const { return m_inspectedStateAccessCheck; } 67 67 … … 70 70 71 71 String injectedScriptSource(); 72 ScriptObject createInjectedScript(const String& source, ScriptState*, int id);72 ScriptObject createInjectedScript(const String& source, JSC::ExecState*, int id); 73 73 74 static bool canAccessInspectedWindow( ScriptState*);75 static bool canAccessInspectedWorkerGlobalScope( ScriptState*);74 static bool canAccessInspectedWindow(JSC::ExecState*); 75 static bool canAccessInspectedWorkerGlobalScope(JSC::ExecState*); 76 76 77 77 int m_nextInjectedScriptId; … … 80 80 RefPtr<InjectedScriptHost> m_injectedScriptHost; 81 81 InspectedStateAccessCheck m_inspectedStateAccessCheck; 82 typedef HashMap< ScriptState*, int> ScriptStateToId;83 ScriptStateToId m_scriptStateToId;82 typedef HashMap<JSC::ExecState*, int> ExecStateToId; 83 ExecStateToId m_scriptStateToId; 84 84 }; 85 85 -
trunk/Source/WebCore/inspector/InjectedScriptModule.cpp
r120929 r155736 47 47 } 48 48 49 void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, ScriptState* scriptState)49 void InjectedScriptModule::ensureInjected(InjectedScriptManager* injectedScriptManager, JSC::ExecState* scriptState) 50 50 { 51 51 InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(scriptState); -
trunk/Source/WebCore/inspector/InjectedScriptModule.h
r127757 r155736 51 51 // and call its ensureInjected() method immediately. 52 52 InjectedScriptModule(const String& name); 53 void ensureInjected(InjectedScriptManager*, ScriptState*);53 void ensureInjected(InjectedScriptManager*, JSC::ExecState*); 54 54 }; 55 55 -
trunk/Source/WebCore/inspector/InspectorAgent.cpp
r154715 r155736 90 90 if (script.isEmpty()) 91 91 return; 92 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorld ScriptState(frame));92 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorldExecState(frame)); 93 93 StringBuilder scriptSource; 94 94 scriptSource.append(script); -
trunk/Source/WebCore/inspector/InspectorCanvasAgent.cpp
r154658 r155736 143 143 if (!frame) 144 144 return; 145 InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorld ScriptState(frame));145 InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame)); 146 146 if (!module.hasNoValue()) 147 147 module.captureFrame(errorString, traceLogId); … … 153 153 if (!frame) 154 154 return; 155 InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorld ScriptState(frame));155 InjectedScriptCanvasModule module = injectedScriptCanvasModule(errorString, mainWorldExecState(frame)); 156 156 if (!module.hasNoValue()) 157 157 module.startCapturing(errorString, traceLogId); … … 216 216 { 217 217 ASSERT(m_frontend); 218 ScriptState* scriptState = wrappedContext.scriptState();219 DOMWindow* domWindow = scriptState ? domWindowFrom ScriptState(scriptState) : 0;218 JSC::ExecState* scriptState = wrappedContext.scriptState(); 219 DOMWindow* domWindow = scriptState ? domWindowFromExecState(scriptState) : 0; 220 220 Frame* frame = domWindow ? domWindow->frame() : 0; 221 221 if (frame && !m_framesWithUninstrumentedCanvases.contains(frame)) … … 227 227 } 228 228 229 InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, ScriptState* scriptState)229 InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, JSC::ExecState* scriptState) 230 230 { 231 231 if (!checkIsEnabled(errorString)) … … 331 331 ErrorString error; 332 332 for (FramesWithUninstrumentedCanvases::iterator it = m_framesWithUninstrumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it) { 333 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, mainWorld ScriptState(it->key));333 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, mainWorldExecState(it->key)); 334 334 if (!module.hasNoValue()) 335 335 module.markFrameEnd(); -
trunk/Source/WebCore/inspector/InspectorCanvasAgent.h
r143328 r155736 93 93 InspectorCanvasAgent(InstrumentingAgents*, InspectorCompositeState*, InspectorPageAgent*, InjectedScriptManager*); 94 94 95 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, ScriptState*);95 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, JSC::ExecState*); 96 96 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const ScriptObject&); 97 97 InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const String&); -
trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp
r150215 r155736 166 166 } 167 167 168 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)168 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier) 169 169 { 170 170 if (!developerExtrasEnabled()) … … 179 179 } 180 180 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)181 void InspectorConsoleAgent::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber, JSC::ExecState* state, unsigned long requestIdentifier) 182 182 { 183 183 if (!developerExtrasEnabled()) … … 230 230 } 231 231 232 void InspectorConsoleAgent::count( ScriptState* state, PassRefPtr<ScriptArguments> arguments)232 void InspectorConsoleAgent::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 233 233 { 234 234 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state)); … … 337 337 public: 338 338 explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObjectId) { } 339 virtual ScriptValue get( ScriptState*)339 virtual ScriptValue get(JSC::ExecState*) 340 340 { 341 341 return ScriptProfiler::objectByHeapObjectId(m_heapObjectId); -
trunk/Source/WebCore/inspector/InspectorConsoleAgent.h
r149125 r155736 71 71 virtual void restore(); 72 72 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); 75 75 76 76 // FIXME: Remove once we no longer generate stacks outside of Inspector. … … 81 81 void startTiming(const String& title); 82 82 void stopTiming(const String& title, PassRefPtr<ScriptCallStack>); 83 void count( ScriptState*, PassRefPtr<ScriptArguments>);83 void count(JSC::ExecState*, PassRefPtr<ScriptArguments>); 84 84 85 85 void frameWindowDiscarded(DOMWindow*); -
trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h
r152080 r155736 56 56 } 57 57 58 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)58 inline void InspectorInstrumentation::addMessageToConsole(Page* page, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier) 59 59 { 60 60 #if ENABLE(INSPECTOR) … … 73 73 } 74 74 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)75 inline 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) 76 76 { 77 77 #if ENABLE(INSPECTOR) … … 108 108 } 109 109 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)110 inline 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) 111 111 { 112 112 #if ENABLE(INSPECTOR) … … 128 128 #endif 129 129 130 inline void InspectorInstrumentation::consoleCount(Page* page, ScriptState* state, PassRefPtr<ScriptArguments> arguments)130 inline void InspectorInstrumentation::consoleCount(Page* page, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 131 131 { 132 132 #if ENABLE(INSPECTOR) -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r154877 r155736 1091 1091 return; 1092 1092 1093 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorld ScriptState(frame));1093 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame)); 1094 1094 if (injectedScript.hasNoValue()) 1095 1095 return; … … 1492 1492 if (!functionValue.hasNoValue()) { 1493 1493 if (Frame* frame = node->document().frame()) { 1494 ScriptState* scriptState = eventListenerHandlerScriptState(frame, eventListener.get());1494 JSC::ExecState* scriptState = eventListenerHandlerScriptState(frame, eventListener.get()); 1495 1495 if (scriptState) { 1496 1496 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState); … … 1816 1816 return 0; 1817 1817 1818 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorld ScriptState(frame));1818 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame)); 1819 1819 if (injectedScript.hasNoValue()) 1820 1820 return 0; -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r155589 r155736 753 753 } 754 754 755 void InspectorDebuggerAgent::didPause( ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception)755 void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception) 756 756 { 757 757 ASSERT(scriptState && !m_pausedScriptState); -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r155589 r155736 143 143 virtual void enable(); 144 144 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); 146 146 virtual void didContinue(); 147 147 void reset(); … … 169 169 InjectedScriptManager* m_injectedScriptManager; 170 170 InspectorFrontend::Debugger* m_frontend; 171 ScriptState* m_pausedScriptState;171 JSC::ExecState* m_pausedScriptState; 172 172 ScriptValue m_currentCallStack; 173 173 ScriptsMap m_scripts; -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
r154658 r155736 139 139 m_frontendHost->disconnectClient(); 140 140 141 ScriptState* frontendScriptState = scriptStateFromPage(debuggerWorld(), m_frontendPage);141 JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage); 142 142 m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); 143 ScriptGlobalObject::set(frontend ScriptState, "InspectorFrontendHost", m_frontendHost.get());143 ScriptGlobalObject::set(frontendExecState, "InspectorFrontendHost", m_frontendHost.get()); 144 144 } 145 145 … … 346 346 { 347 347 ScriptValue value = m_frontendPage->mainFrame().script().executeScript(expression); 348 return value.toString(mainWorld ScriptState(&m_frontendPage->mainFrame())) == "true";348 return value.toString(mainWorldExecState(&m_frontendPage->mainFrame())) == "true"; 349 349 } 350 350 -
trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp
r154828 r155736 270 270 271 271 ASSERT(m_frontendPage); 272 ScriptState* frontendScriptState = scriptStateFromPage(debuggerWorld(), m_frontendPage);272 JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage); 273 273 ScriptObject frontendApiObject; 274 if (!ScriptGlobalObject::get(frontend ScriptState, "InspectorFrontendAPI", frontendApiObject)) {274 if (!ScriptGlobalObject::get(frontendExecState, "InspectorFrontendAPI", frontendApiObject)) { 275 275 ASSERT_NOT_REACHED(); 276 276 return; -
trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
r147857 r155736 658 658 return; 659 659 660 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorld ScriptState(frame));660 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(mainWorldExecState(frame)); 661 661 662 662 RefPtr<IDBKeyRange> idbKeyRange = keyRange ? idbKeyRangeFromKeyRange(keyRange->get()) : 0; -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r155549 r155736 464 464 } 465 465 466 void InspectorInstrumentation::didCreateIsolatedContextImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)466 void InspectorInstrumentation::didCreateIsolatedContextImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin) 467 467 { 468 468 if (PageRuntimeAgent* runtimeAgent = instrumentingAgents->pageRuntimeAgent()) … … 1027 1027 } 1028 1028 1029 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, ScriptState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier)1029 void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String& message, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, unsigned long requestIdentifier) 1030 1030 { 1031 1031 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent()) … … 1037 1037 } 1038 1038 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)1039 void 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) 1040 1040 { 1041 1041 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent()) … … 1043 1043 } 1044 1044 1045 void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, ScriptState* state, PassRefPtr<ScriptArguments> arguments)1045 void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 1046 1046 { 1047 1047 if (InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleAgent()) -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r155549 r155736 159 159 static void didEvaluateScript(const InspectorInstrumentationCookie&); 160 160 static void scriptsEnabled(Page*, bool isEnabled); 161 static void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);161 static void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*); 162 162 static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext*, int timerId); 163 163 static void didFireTimer(const InspectorInstrumentationCookie&); … … 231 231 // FIXME: Remove once we no longer generate stacks outside of Inspector. 232 232 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); 235 235 #if ENABLE(WORKERS) 236 236 // FIXME: Convert to ScriptArguments to match non-worker context. 237 237 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>); 241 241 static void startConsoleTiming(Frame*, const String& title); 242 242 static void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallStack>); … … 364 364 static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&); 365 365 static void scriptsEnabledImpl(InstrumentingAgents*, bool isEnabled); 366 static void didCreateIsolatedContextImpl(InstrumentingAgents*, Frame*, ScriptState*, SecurityOrigin*);366 static void didCreateIsolatedContextImpl(InstrumentingAgents*, Frame*, JSC::ExecState*, SecurityOrigin*); 367 367 static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents*, int timerId, ScriptExecutionContext*); 368 368 static void didFireTimerImpl(const InspectorInstrumentationCookie&); … … 433 433 static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine); 434 434 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); 437 437 438 438 // FIXME: Remove once we no longer generate stacks outside of Inspector. 439 439 static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier); 440 440 441 static void consoleCountImpl(InstrumentingAgents*, ScriptState*, PassRefPtr<ScriptArguments>);441 static void consoleCountImpl(InstrumentingAgents*, JSC::ExecState*, PassRefPtr<ScriptArguments>); 442 442 static void startConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title); 443 443 static void stopConsoleTimingImpl(InstrumentingAgents*, Frame*, const String& title, PassRefPtr<ScriptCallStack>); … … 997 997 } 998 998 999 inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)999 inline void InspectorInstrumentation::didCreateIsolatedContext(Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin) 1000 1000 { 1001 1001 #if ENABLE(INSPECTOR) -
trunk/Source/WebCore/inspector/PageConsoleAgent.cpp
r138457 r155736 67 67 public: 68 68 explicit InspectableNode(Node* node) : m_node(node) { } 69 virtual ScriptValue get( ScriptState* state)69 virtual ScriptValue get(JSC::ExecState* state) 70 70 { 71 71 return InjectedScriptHost::nodeAsScriptValue(state, m_node); -
trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp
r146208 r155736 100 100 { 101 101 if (!executionContextId) { 102 ScriptState* scriptState = mainWorldScriptState(m_pageAgent->mainFrame());102 JSC::ExecState* scriptState = mainWorldExecState(m_pageAgent->mainFrame()); 103 103 return injectedScriptManager()->injectedScriptFor(scriptState); 104 104 } -
trunk/Source/WebCore/inspector/PageRuntimeAgent.cpp
r155217 r155736 121 121 ASSERT(m_frontend); 122 122 String frameId = m_pageAgent->frameId(frame); 123 ScriptState* scriptState = mainWorldScriptState(frame);123 JSC::ExecState* scriptState = mainWorldExecState(frame); 124 124 notifyContextCreated(frameId, scriptState, 0, true); 125 125 } 126 126 127 void PageRuntimeAgent::didCreateIsolatedContext(Frame* frame, ScriptState* scriptState, SecurityOrigin* origin)127 void PageRuntimeAgent::didCreateIsolatedContext(Frame* frame, JSC::ExecState* scriptState, SecurityOrigin* origin) 128 128 { 129 129 if (!m_enabled) … … 137 137 { 138 138 if (!executionContextId) { 139 ScriptState* scriptState = mainWorldScriptState(&m_inspectedPage->mainFrame());139 JSC::ExecState* scriptState = mainWorldExecState(&m_inspectedPage->mainFrame()); 140 140 InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState); 141 141 if (result.hasNoValue()) … … 161 161 void PageRuntimeAgent::reportExecutionContextCreation() 162 162 { 163 Vector<std::pair< ScriptState*, SecurityOrigin*> > isolatedContexts;163 Vector<std::pair<JSC::ExecState*, SecurityOrigin*> > isolatedContexts; 164 164 for (Frame* frame = &m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) { 165 165 if (!frame->script().canExecuteScripts(NotAboutToExecuteScript)) … … 167 167 String frameId = m_pageAgent->frameId(frame); 168 168 169 ScriptState* scriptState = mainWorldScriptState(frame);169 JSC::ExecState* scriptState = mainWorldExecState(frame); 170 170 notifyContextCreated(frameId, scriptState, 0, true); 171 171 frame->script().collectIsolatedContexts(isolatedContexts); … … 178 178 } 179 179 180 void PageRuntimeAgent::notifyContextCreated(const String& frameId, ScriptState* scriptState, SecurityOrigin* securityOrigin, bool isPageContext)180 void PageRuntimeAgent::notifyContextCreated(const String& frameId, JSC::ExecState* scriptState, SecurityOrigin* securityOrigin, bool isPageContext) 181 181 { 182 182 ASSERT(securityOrigin || isPageContext); -
trunk/Source/WebCore/inspector/PageRuntimeAgent.h
r138457 r155736 59 59 60 60 void didCreateMainWorldContext(Frame*); 61 void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);61 void didCreateIsolatedContext(Frame*, JSC::ExecState*, SecurityOrigin*); 62 62 63 63 private: … … 68 68 virtual void unmuteConsole(); 69 69 void reportExecutionContextCreation(); 70 void notifyContextCreated(const String& frameId, ScriptState*, SecurityOrigin*, bool isPageContext);70 void notifyContextCreated(const String& frameId, JSC::ExecState*, SecurityOrigin*, bool isPageContext); 71 71 72 72 Page* m_inspectedPage; -
trunk/Source/WebCore/inspector/ScriptArguments.cpp
r148696 r155736 36 36 namespace WebCore { 37 37 38 PassRefPtr<ScriptArguments> ScriptArguments::create( ScriptState* scriptState, Vector<ScriptValue>& arguments)38 PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments) 39 39 { 40 40 return adoptRef(new ScriptArguments(scriptState, arguments)); 41 41 } 42 42 43 ScriptArguments::ScriptArguments( ScriptState* scriptState, Vector<ScriptValue>& arguments)43 ScriptArguments::ScriptArguments(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments) 44 44 : m_globalObject(scriptState->vm(), scriptState->lexicalGlobalObject()) 45 45 { … … 57 57 } 58 58 59 ScriptState* ScriptArguments::globalState() const59 JSC::ExecState* ScriptArguments::globalState() const 60 60 { 61 61 if (m_globalObject) -
trunk/Source/WebCore/inspector/ScriptArguments.h
r148537 r155736 45 45 namespace WebCore { 46 46 47 typedef JSC::ExecState ScriptState;48 47 class ScriptValue; 49 48 50 49 class ScriptArguments : public RefCounted<ScriptArguments> { 51 50 public: 52 static PassRefPtr<ScriptArguments> create( ScriptState*, Vector<ScriptValue>& arguments);51 static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<ScriptValue>& arguments); 53 52 54 53 ~ScriptArguments(); … … 57 56 size_t argumentCount() const { return m_arguments.size(); } 58 57 59 ScriptState* globalState() const;58 JSC::ExecState* globalState() const; 60 59 61 60 bool getFirstArgumentAsString(WTF::String& result, bool checkForNullOrUndefined = false); … … 63 62 64 63 private: 65 ScriptArguments( ScriptState*, Vector<ScriptValue>& arguments);64 ScriptArguments(JSC::ExecState*, Vector<ScriptValue>& arguments); 66 65 67 66 JSC::Strong<JSC::JSGlobalObject> m_globalObject; -
trunk/Source/WebCore/inspector/ScriptDebugListener.h
r148921 r155736 67 67 virtual void didParseSource(const String& scriptId, const Script&) = 0; 68 68 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; 70 70 virtual void didContinue() = 0; 71 71 }; -
trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
r152080 r155736 131 131 return InjectedScript(); 132 132 } 133 ScriptState* scriptState = scriptStateFromWorkerGlobalScope(m_inspectedWorkerGlobalScope);133 JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_inspectedWorkerGlobalScope); 134 134 return injectedScriptManager()->injectedScriptFor(scriptState); 135 135 } -
trunk/Source/WebCore/inspector/WorkerRuntimeAgent.cpp
r152080 r155736 64 64 return InjectedScript(); 65 65 } 66 ScriptState* scriptState = scriptStateFromWorkerGlobalScope(m_workerGlobalScope);66 JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_workerGlobalScope); 67 67 return injectedScriptManager()->injectedScriptFor(scriptState); 68 68 } -
trunk/Source/WebCore/page/Console.cpp
r154272 r155736 66 66 } 67 67 68 static void internalAddMessage(Page* page, MessageType type, MessageLevel level, ScriptState* state, PassRefPtr<ScriptArguments> prpArguments, bool acceptNoArguments = false, bool printTrace = false)68 static void internalAddMessage(Page* page, MessageType type, MessageLevel level, JSC::ExecState* state, PassRefPtr<ScriptArguments> prpArguments, bool acceptNoArguments = false, bool printTrace = false) 69 69 { 70 70 RefPtr<ScriptArguments> arguments = prpArguments; … … 112 112 } 113 113 114 void Console::debug( ScriptState* state, PassRefPtr<ScriptArguments> arguments)114 void Console::debug(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 115 115 { 116 116 internalAddMessage(page(), LogMessageType, DebugMessageLevel, state, arguments); 117 117 } 118 118 119 void Console::error( ScriptState* state, PassRefPtr<ScriptArguments> arguments)119 void Console::error(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 120 120 { 121 121 internalAddMessage(page(), LogMessageType, ErrorMessageLevel, state, arguments); 122 122 } 123 123 124 void Console::info( ScriptState* state, PassRefPtr<ScriptArguments> arguments)124 void Console::info(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 125 125 { 126 126 log(state, arguments); 127 127 } 128 128 129 void Console::log( ScriptState* state, PassRefPtr<ScriptArguments> arguments)129 void Console::log(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 130 130 { 131 131 internalAddMessage(page(), LogMessageType, LogMessageLevel, state, arguments); 132 132 } 133 133 134 void Console::warn( ScriptState* state, PassRefPtr<ScriptArguments> arguments)134 void Console::warn(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 135 135 { 136 136 internalAddMessage(page(), LogMessageType, WarningMessageLevel, state, arguments); 137 137 } 138 138 139 void Console::dir( ScriptState* state, PassRefPtr<ScriptArguments> arguments)139 void Console::dir(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 140 140 { 141 141 internalAddMessage(page(), DirMessageType, LogMessageLevel, state, arguments); 142 142 } 143 143 144 void Console::dirxml( ScriptState* state, PassRefPtr<ScriptArguments> arguments)144 void Console::dirxml(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 145 145 { 146 146 internalAddMessage(page(), DirXMLMessageType, LogMessageLevel, state, arguments); 147 147 } 148 148 149 void Console::table( ScriptState* state, PassRefPtr<ScriptArguments> arguments)149 void Console::table(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 150 150 { 151 151 internalAddMessage(page(), TableMessageType, LogMessageLevel, state, arguments); 152 152 } 153 153 154 void Console::clear( ScriptState* state, PassRefPtr<ScriptArguments> arguments)154 void Console::clear(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 155 155 { 156 156 internalAddMessage(page(), ClearMessageType, LogMessageLevel, state, arguments, true); 157 157 } 158 158 159 void Console::trace( ScriptState* state, PassRefPtr<ScriptArguments> arguments)159 void Console::trace(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 160 160 { 161 161 internalAddMessage(page(), TraceMessageType, LogMessageLevel, state, arguments, true, true); 162 162 } 163 163 164 void Console::assertCondition( ScriptState* state, PassRefPtr<ScriptArguments> arguments, bool condition)164 void Console::assertCondition(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments, bool condition) 165 165 { 166 166 if (condition) … … 170 170 } 171 171 172 void Console::count( ScriptState* state, PassRefPtr<ScriptArguments> arguments)172 void Console::count(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 173 173 { 174 174 InspectorInstrumentation::consoleCount(page(), state, arguments); … … 177 177 #if ENABLE(JAVASCRIPT_DEBUGGER) 178 178 179 void Console::profile(const String& title, ScriptState* state)179 void Console::profile(const String& title, JSC::ExecState* state) 180 180 { 181 181 Page* page = this->page(); … … 198 198 } 199 199 200 void Console::profileEnd(const String& title, ScriptState* state)200 void Console::profileEnd(const String& title, JSC::ExecState* state) 201 201 { 202 202 Page* page = this->page(); … … 223 223 } 224 224 225 void Console::timeEnd( ScriptState* state, const String& title)225 void Console::timeEnd(JSC::ExecState* state, const String& title) 226 226 { 227 227 RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state)); … … 234 234 } 235 235 236 void Console::group( ScriptState* state, PassRefPtr<ScriptArguments> arguments)236 void Console::group(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 237 237 { 238 238 InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupMessageType, LogMessageLevel, String(), state, arguments); 239 239 } 240 240 241 void Console::groupCollapsed( ScriptState* state, PassRefPtr<ScriptArguments> arguments)241 void Console::groupCollapsed(JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments) 242 242 { 243 243 InspectorInstrumentation::addMessageToConsole(page(), ConsoleAPIMessageSource, StartGroupCollapsedMessageType, LogMessageLevel, String(), state, arguments); -
trunk/Source/WebCore/page/Console.h
r151774 r155736 53 53 virtual ~Console(); 54 54 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>); 67 67 #if ENABLE(JAVASCRIPT_DEBUGGER) 68 68 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*); 71 71 #endif 72 72 void time(const String&); 73 void timeEnd( ScriptState*, const String&);73 void timeEnd(JSC::ExecState*, const String&); 74 74 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>); 77 77 void groupEnd(); 78 78 -
trunk/Source/WebCore/page/ContentSecurityPolicy.cpp
r151415 r155736 838 838 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const; 839 839 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; 841 841 bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL&) const; 842 842 bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ContentSecurityPolicy::ReportingStatus) const; … … 876 876 877 877 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; 879 879 880 880 bool checkEval(SourceListDirective*) const; … … 886 886 void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisabledErrorMessage = errorMessage; } 887 887 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; 889 889 bool checkInlineAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool isScript) const; 890 890 bool checkNonceAndReportViolation(NonceDirective*, const String& nonce, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine) const; … … 949 949 } 950 950 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) const951 void 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 952 952 { 953 953 String message = m_reportOnly ? "[Report Only] " + consoleMessage : consoleMessage; … … 989 989 } 990 990 991 bool CSPDirectiveList::checkEvalAndReportViolation(SourceListDirective* directive, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const991 bool CSPDirectiveList::checkEvalAndReportViolation(SourceListDirective* directive, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const 992 992 { 993 993 if (checkEval(directive)) … … 1121 1121 } 1122 1122 1123 bool CSPDirectiveList::allowEval( ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const1123 bool CSPDirectiveList::allowEval(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const 1124 1124 { 1125 1125 DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to evaluate script because it violates the following Content Security Policy directive: "))); … … 1517 1517 } 1518 1518 1519 template<bool (CSPDirectiveList::*allowed)( ScriptState* state, ContentSecurityPolicy::ReportingStatus) const>1520 bool isAllowedByAllWithState(const CSPDirectiveListVector& policies, ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus)1519 template<bool (CSPDirectiveList::*allowed)(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus) const> 1520 bool isAllowedByAllWithState(const CSPDirectiveListVector& policies, JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) 1521 1521 { 1522 1522 for (size_t i = 0; i < policies.size(); ++i) { … … 1582 1582 } 1583 1583 1584 bool ContentSecurityPolicy::allowEval( ScriptState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const1584 bool ContentSecurityPolicy::allowEval(JSC::ExecState* state, ContentSecurityPolicy::ReportingStatus reportingStatus) const 1585 1585 { 1586 1586 return isAllowedByAllWithState<&CSPDirectiveList::allowEval>(m_policies, state, reportingStatus); … … 1736 1736 #endif 1737 1737 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) const1738 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, JSC::ExecState* state) const 1739 1739 { 1740 1740 logToConsole(consoleMessage, contextURL, contextLine, state); … … 1892 1892 } 1893 1893 1894 void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, ScriptState* state) const1894 void ContentSecurityPolicy::logToConsole(const String& message, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const 1895 1895 { 1896 1896 // FIXME: <http://webkit.org/b/114317> ContentSecurityPolicy::logToConsole should include a column number -
trunk/Source/WebCore/page/ContentSecurityPolicy.h
r146886 r155736 92 92 bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const; 93 93 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; 95 95 bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& = KURL()) const; 96 96 bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ReportingStatus = SendReport) const; … … 125 125 void reportMissingReportURI(const String&) const; 126 126 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; 128 128 129 129 void reportBlockedScriptExecutionToInspector(const String& directiveText) const; … … 140 140 explicit ContentSecurityPolicy(ScriptExecutionContext*); 141 141 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; 143 143 144 144 ScriptExecutionContext* m_scriptExecutionContext; -
trunk/Source/WebCore/page/PageConsole.cpp
r154272 r155736 152 152 } 153 153 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)154 void 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) 155 155 { 156 156 if (muteCount && source != ConsoleAPIMessageSource) -
trunk/Source/WebCore/page/PageConsole.h
r149125 r155736 49 49 static void printMessageSourceAndLevelPrefix(MessageSource, MessageLevel); 50 50 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); 52 52 void addMessage(MessageSource, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>); 53 53 void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = 0); -
trunk/Source/WebCore/workers/WorkerGlobalScope.cpp
r155356 r155736 279 279 } 280 280 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)281 void 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) 282 282 { 283 283 if (!isContextThread()) { … … 290 290 } 291 291 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)292 void 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) 293 293 { 294 294 ASSERT(isContextThread()); -
trunk/Source/WebCore/workers/WorkerGlobalScope.h
r155356 r155736 144 144 145 145 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); 147 147 148 148 private: … … 155 155 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 156 156 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; 158 158 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE; 159 159
Note: See TracChangeset
for help on using the changeset viewer.