Title: [173896] trunk/Source/_javascript_Core
Revision
173896
Author
[email protected]
Date
2014-09-23 15:29:35 -0700 (Tue, 23 Sep 2014)

Log Message

DebuggerCallFrame::invalidate() should invalidate all DebuggerScope chains.
<https://webkit.org/b/137045>

Reviewed by Geoffrey Garen.

DebuggerCallFrame::invalidate() currently invalidates all DebuggerCallFrames
in the debugger stack, but only invalidates the DebuggerScope chain of the
top most frame.  We should also invalidate all the DebuggerScope chains of
the other frames in the debugger stack.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::invalidate):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::invalidateChain):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (173895 => 173896)


--- trunk/Source/_javascript_Core/ChangeLog	2014-09-23 22:27:38 UTC (rev 173895)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-09-23 22:29:35 UTC (rev 173896)
@@ -1,5 +1,22 @@
 2014-09-23  Mark Lam  <[email protected]>
 
+        DebuggerCallFrame::invalidate() should invalidate all DebuggerScope chains.
+        <https://webkit.org/b/137045>
+
+        Reviewed by Geoffrey Garen.
+
+        DebuggerCallFrame::invalidate() currently invalidates all DebuggerCallFrames
+        in the debugger stack, but only invalidates the DebuggerScope chain of the
+        top most frame.  We should also invalidate all the DebuggerScope chains of
+        the other frames in the debugger stack.
+
+        * debugger/DebuggerCallFrame.cpp:
+        (JSC::DebuggerCallFrame::invalidate):
+        * debugger/DebuggerScope.cpp:
+        (JSC::DebuggerScope::invalidateChain):
+
+2014-09-23  Mark Lam  <[email protected]>
+
         Renamed DebuggerCallFrameScope to DebuggerPausedScope.
         <https://webkit.org/b/137042>
 

Modified: trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.cpp (173895 => 173896)


--- trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.cpp	2014-09-23 22:27:38 UTC (rev 173895)
+++ trunk/Source/_javascript_Core/debugger/DebuggerCallFrame.cpp	2014-09-23 22:29:35 UTC (rev 173896)
@@ -208,14 +208,13 @@
 
 void DebuggerCallFrame::invalidate()
 {
-    m_callFrame = nullptr;
-    if (m_scope) {
-        m_scope->invalidateChain();
-        m_scope.clear();
-    }
-    RefPtr<DebuggerCallFrame> frame = m_caller.release();
+    RefPtr<DebuggerCallFrame> frame = this;
     while (frame) {
         frame->m_callFrame = nullptr;
+        if (frame->m_scope) {
+            frame->m_scope->invalidateChain();
+            frame->m_scope.clear();
+        }
         frame = frame->m_caller.release();
     }
 }

Modified: trunk/Source/_javascript_Core/debugger/DebuggerScope.cpp (173895 => 173896)


--- trunk/Source/_javascript_Core/debugger/DebuggerScope.cpp	2014-09-23 22:27:38 UTC (rev 173895)
+++ trunk/Source/_javascript_Core/debugger/DebuggerScope.cpp	2014-09-23 22:29:35 UTC (rev 173896)
@@ -142,12 +142,14 @@
 
 void DebuggerScope::invalidateChain()
 {
+    if (!isValid())
+        return;
+
     DebuggerScope* scope = this;
     while (scope) {
-        ASSERT(scope->isValid());
         DebuggerScope* nextScope = scope->m_next.get();
         scope->m_next.clear();
-        scope->m_scope.clear();
+        scope->m_scope.clear(); // This also marks this scope as invalid.
         scope = nextScope;
     }
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to