Title: [212483] trunk/Source/_javascript_Core
Revision
212483
Author
keith_mil...@apple.com
Date
2017-02-16 16:08:38 -0800 (Thu, 16 Feb 2017)

Log Message

ASSERTION FAILED: vm.heap.mutatorState() == MutatorState::Running || vm.apiLock().ownerThread() != std::this_thread::get_id()
https://bugs.webkit.org/show_bug.cgi?id=168354

Reviewed by Geoffrey Garen.

Instead of adding a custom vmEntryGlobalObject for the debugger
we can just have it use vmEntryScope instead.

* debugger/Debugger.cpp:
(JSC::Debugger::detach):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::vmEntryGlobalObjectForDebuggerDetach): Deleted.
* interpreter/CallFrame.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (212482 => 212483)


--- trunk/Source/_javascript_Core/ChangeLog	2017-02-16 23:58:34 UTC (rev 212482)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-02-17 00:08:38 UTC (rev 212483)
@@ -1,3 +1,19 @@
+2017-02-16  Keith Miller  <keith_mil...@apple.com>
+
+        ASSERTION FAILED: vm.heap.mutatorState() == MutatorState::Running || vm.apiLock().ownerThread() != std::this_thread::get_id()
+        https://bugs.webkit.org/show_bug.cgi?id=168354
+
+        Reviewed by Geoffrey Garen.
+
+        Instead of adding a custom vmEntryGlobalObject for the debugger
+        we can just have it use vmEntryScope instead.
+
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::detach):
+        * interpreter/CallFrame.cpp:
+        (JSC::CallFrame::vmEntryGlobalObjectForDebuggerDetach): Deleted.
+        * interpreter/CallFrame.h:
+
 2017-02-16  Filip Pizlo  <fpi...@apple.com>
 
         Unreviewed, fix cloop build.

Modified: trunk/Source/_javascript_Core/debugger/Debugger.cpp (212482 => 212483)


--- trunk/Source/_javascript_Core/debugger/Debugger.cpp	2017-02-16 23:58:34 UTC (rev 212482)
+++ trunk/Source/_javascript_Core/debugger/Debugger.cpp	2017-02-17 00:08:38 UTC (rev 212483)
@@ -34,6 +34,7 @@
 #include "MarkedSpaceInlines.h"
 #include "Parser.h"
 #include "Protect.h"
+#include "VMEntryScope.h"
 
 namespace {
 
@@ -171,7 +172,8 @@
     // If we're detaching from the currently executing global object, manually tear down our
     // stack, since we won't get further debugger callbacks to do so. Also, resume execution,
     // since there's no point in staying paused once a window closes.
-    if (m_isPaused && m_currentCallFrame && m_currentCallFrame->vmEntryGlobalObjectForDebuggerDetach() == globalObject) {
+    // We know there is an entry scope, otherwise, m_currentCallFrame would be null.
+    if (m_isPaused && m_currentCallFrame && globalObject->vm().entryScope->globalObject() == globalObject) {
         m_currentCallFrame = nullptr;
         m_pauseOnCallFrame = nullptr;
         continueProgram();

Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.cpp (212482 => 212483)


--- trunk/Source/_javascript_Core/interpreter/CallFrame.cpp	2017-02-16 23:58:34 UTC (rev 212482)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.cpp	2017-02-17 00:08:38 UTC (rev 212483)
@@ -197,21 +197,6 @@
     return vm().entryScope->globalObject();
 }
 
-JSGlobalObject* CallFrame::vmEntryGlobalObjectForDebuggerDetach()
-{
-    if (callee()->isObject()) {
-        JSGlobalObject* global = static_cast<JSObject*>(callee())->globalObject();
-        if (this == global->globalExec())
-            return global;
-    }
-    // If we're not an object, we're wasm, and therefore we're executing code and the below is safe.
-
-    // For any ExecState that's not a globalExec, the
-    // dynamic global object must be set since code is running
-    ASSERT(vm().entryScope);
-    return vm().entryScope->globalObject();
-}
-
 CallFrame* CallFrame::callerFrame(VMEntryFrame*& currVMEntryFrame)
 {
     if (callerFrameOrVMEntryFrame() == currVMEntryFrame) {

Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (212482 => 212483)


--- trunk/Source/_javascript_Core/interpreter/CallFrame.h	2017-02-16 23:58:34 UTC (rev 212482)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h	2017-02-17 00:08:38 UTC (rev 212483)
@@ -102,10 +102,6 @@
         // Global object in which execution began.
         JS_EXPORT_PRIVATE JSGlobalObject* vmEntryGlobalObject();
 
-        // We need a special version of vmEntryGlobalObject for detaching the debugger since
-        // could be called by a finalizer.
-        JSGlobalObject* vmEntryGlobalObjectForDebuggerDetach();
-
         // Global object in which the currently executing code was defined.
         // Differs from vmEntryGlobalObject() during function calls across web browser frames.
         JSGlobalObject* lexicalGlobalObject() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to