Changeset 109568 in webkit
- Timestamp:
- Mar 2, 2012 5:48:58 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109565 r109568 1 2012-03-02 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: assertion failure in JSMainThreadExecState::instrumentedCall 4 https://bugs.webkit.org/show_bug.cgi?id=80152 5 6 Extracted common code of JS call instrumentation into instrumentFunctionCall method 7 and call it directly where the instrumentation is needed instead of calling 8 JSMainThreadExecState::instrumentedCall which works on the main thread only. 9 10 Reviewed by Pavel Feldman. 11 12 * bindings/js/JSCallbackData.cpp: 13 (WebCore::JSCallbackData::invokeCallback): 14 * bindings/js/JSEventListener.cpp: 15 (WebCore::JSEventListener::handleEvent): 16 * bindings/js/JSMainThreadExecState.h: 17 (WebCore::JSMainThreadExecState::instrumentFunctionCall): 18 1 19 2012-03-02 Yoshifumi Inoue <yosin@chromium.org> 2 20 -
trunk/Source/WebCore/bindings/js/JSCallbackData.cpp
r109540 r109568 66 66 67 67 globalObject()->globalData().timeoutChecker.start(); 68 InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(context, callType, callData); 68 69 69 JSValue result = JSMainThreadExecState::instrumentedCall(context, exec, function, callType, callData, callback(), args); 70 bool contextIsDocument = context->isDocument(); 71 JSValue result = contextIsDocument 72 ? JSMainThreadExecState::call(exec, function, callType, callData, callback(), args) 73 : JSC::call(exec, function, callType, callData, callback(), args); 70 74 75 InspectorInstrumentation::didCallFunction(cookie); 71 76 globalObject()->globalData().timeoutChecker.stop(); 72 77 73 if (context ->isDocument())78 if (contextIsDocument) 74 79 Document::updateStyleForAllDocuments(); 75 80 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r109540 r109568 122 122 123 123 globalData.timeoutChecker.start(); 124 InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(scriptExecutionContext, callType, callData); 125 124 126 JSValue thisValue = handleEventFunction == jsFunction ? toJS(exec, globalObject, event->currentTarget()) : jsFunction; 125 JSValue retval = JSMainThreadExecState::instrumentedCall(scriptExecutionContext, exec, handleEventFunction, callType, callData, thisValue, args); 127 JSValue retval = scriptExecutionContext->isDocument() 128 ? JSMainThreadExecState::call(exec, handleEventFunction, callType, callData, thisValue, args) 129 : JSC::call(exec, handleEventFunction, callType, callData, thisValue, args); 130 131 InspectorInstrumentation::didCallFunction(cookie); 126 132 globalData.timeoutChecker.stop(); 127 133 -
trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h
r109540 r109568 57 57 }; 58 58 59 static JSC::JSValue instrumentedCall(ScriptExecutionContext* context, JSC::ExecState* exec, JSC::JSValue functionObject, JSC::CallType callType, const JSC::CallData& callData, JSC::JSValue thisValue, const JSC::ArgList& args)59 static inline InspectorInstrumentationCookie instrumentFunctionCall(ScriptExecutionContext* context, JSC::CallType callType, const JSC::CallData& callData) 60 60 { 61 InspectorInstrumentationCookie cookie; 62 if (InspectorInstrumentation::hasFrontends()) { 63 String resourceName; 64 int lineNumber = 1; 65 66 if (callType == JSC::CallTypeJS) { 67 resourceName = ustringToString(callData.js.functionExecutable->sourceURL()); 68 lineNumber = callData.js.functionExecutable->lineNo(); 69 } else 70 resourceName = "undefined"; 71 72 cookie = InspectorInstrumentation::willCallFunction(context, resourceName, lineNumber); 73 } 74 75 JSC::JSValue value = call(exec, functionObject, callType, callData, thisValue, args); 76 77 InspectorInstrumentation::didCallFunction(cookie); 78 79 return value; 80 }; 61 if (!InspectorInstrumentation::hasFrontends()) 62 return InspectorInstrumentationCookie(); 63 String resourceName; 64 int lineNumber = 1; 65 if (callType == JSC::CallTypeJS) { 66 resourceName = ustringToString(callData.js.functionExecutable->sourceURL()); 67 lineNumber = callData.js.functionExecutable->lineNo(); 68 } else 69 resourceName = "undefined"; 70 return InspectorInstrumentation::willCallFunction(context, resourceName, lineNumber); 71 } 81 72 82 73 static JSC::JSValue evaluate(JSC::ExecState* exec, JSC::ScopeChainNode* chain, const JSC::SourceCode& source, JSC::JSValue thisValue, JSC::JSValue* exception)
Note: See TracChangeset
for help on using the changeset viewer.