Changeset 212458 in webkit
- Timestamp:
- Feb 16, 2017 1:04:25 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r212453 r212458 1 2017-02-16 Keith Miller <keith_miller@apple.com> 2 3 ASSERTION FAILED: vm.heap.mutatorState() == MutatorState::Running || vm.apiLock().ownerThread() != std::this_thread::get_id() 4 https://bugs.webkit.org/show_bug.cgi?id=168354 5 6 Reviewed by Filip Pizlo. 7 8 Add a new vmEntryGlobalObject method for the debugger so that 9 the debugger does not crash in debug builds when trying to 10 detach itself from a global object. 11 12 * debugger/Debugger.cpp: 13 (JSC::Debugger::detach): 14 * interpreter/CallFrame.cpp: 15 (JSC::CallFrame::vmEntryGlobalObjectForDebuggerDetach): 16 * interpreter/CallFrame.h: 17 1 18 2017-02-16 Keith Miller <keith_miller@apple.com> 2 19 -
trunk/Source/JavaScriptCore/debugger/Debugger.cpp
r212448 r212458 172 172 // stack, since we won't get further debugger callbacks to do so. Also, resume execution, 173 173 // since there's no point in staying paused once a window closes. 174 if (m_isPaused && m_currentCallFrame && m_currentCallFrame->vmEntryGlobalObject () == globalObject) {174 if (m_isPaused && m_currentCallFrame && m_currentCallFrame->vmEntryGlobalObjectForDebuggerDetach() == globalObject) { 175 175 m_currentCallFrame = nullptr; 176 176 m_pauseOnCallFrame = nullptr; -
trunk/Source/JavaScriptCore/interpreter/CallFrame.cpp
r210149 r212458 198 198 } 199 199 200 JSGlobalObject* CallFrame::vmEntryGlobalObjectForDebuggerDetach() 201 { 202 if (callee()->isObject()) { 203 JSGlobalObject* global = static_cast<JSObject*>(callee())->globalObject(); 204 if (this == global->globalExec()) 205 return global; 206 } 207 // If we're not an object, we're wasm, and therefore we're executing code and the below is safe. 208 209 // For any ExecState that's not a globalExec, the 210 // dynamic global object must be set since code is running 211 ASSERT(vm().entryScope); 212 return vm().entryScope->globalObject(); 213 } 214 200 215 CallFrame* CallFrame::callerFrame(VMEntryFrame*& currVMEntryFrame) 201 216 { -
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r210149 r212458 103 103 JS_EXPORT_PRIVATE JSGlobalObject* vmEntryGlobalObject(); 104 104 105 // We need a special version of vmEntryGlobalObject for detaching the debugger since 106 // could be called by a finalizer. 107 JSGlobalObject* vmEntryGlobalObjectForDebuggerDetach(); 108 105 109 // Global object in which the currently executing code was defined. 106 110 // Differs from vmEntryGlobalObject() during function calls across web browser frames.
Note: See TracChangeset
for help on using the changeset viewer.