Changeset 166943 in webkit
- Timestamp:
- Apr 8, 2014 12:12:37 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166939 r166943 1 2014-04-08 Mark Lam <mark.lam@apple.com> 2 3 Refactor to make JSMainThreadExecState's constructor and destructor private. 4 <https://webkit.org/b/131372> 5 6 Reviewed by Mark Hahnenberg. 7 8 This is in preparation for subsequent patches to ensure that we don't 9 exit the VM with an exception still pending. 10 11 No new tests required. This is only a refactor of existing behavior. 12 13 * bindings/js/JSDOMGlobalObjectTask.cpp: 14 * bindings/js/JSMainThreadExecState.h: 15 (WebCore::JSMainThreadExecState::runTask): 16 1 17 2014-04-07 Jer Noble <jer.noble@apple.com> 2 18 -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObjectTask.cpp
r162158 r166943 61 61 // When on the main thread (e.g. the document's thread), we need to make sure to 62 62 // push the current ExecState on to the JSMainThreadExecState stack. 63 if (context->isDocument()) { 64 JSMainThreadExecState currentState(exec); 65 m_task->run(exec); 66 } else 63 if (context->isDocument()) 64 JSMainThreadExecState::runTask(exec, *m_task.get()); 65 else 67 66 m_task->run(exec); 68 67 } -
trunk/Source/WebCore/bindings/js/JSMainThreadExecState.h
r161638 r166943 29 29 #include "JSDOMBinding.h" 30 30 #include <runtime/Completion.h> 31 #include <runtime/Microtask.h> 31 32 #include <wtf/MainThread.h> 32 33 … … 63 64 }; 64 65 66 static void runTask(JSC::ExecState* exec, JSC::Microtask& task) 67 { 68 JSMainThreadExecState currentState(exec); 69 task.run(exec); 70 } 71 65 72 static InspectorInstrumentationCookie instrumentFunctionCall(ScriptExecutionContext*, JSC::CallType, const JSC::CallData&); 66 73 74 private: 67 75 explicit JSMainThreadExecState(JSC::ExecState* exec) 68 76 : m_previousState(s_mainThreadState) … … 84 92 } 85 93 86 private:87 94 static JSC::ExecState* s_mainThreadState; 88 95 JSC::ExecState* m_previousState;
Note: See TracChangeset
for help on using the changeset viewer.