Fixes the bug where stepping out of a function would show the wrong
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 20:59:44 +0000 (20:59 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 20:59:44 +0000 (20:59 +0000)
call stack (would look like it stepped out twice.)

Reviewed by Adam Roben.

* page/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::returnEvent):
Call pauseIfNeeded before setting m_currentCallFrame to the caller.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33453 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/JavaScriptDebugServer.cpp

index ab4e4ec..5228bd0 100644 (file)
@@ -1,3 +1,14 @@
+2008-05-14  Timothy Hatcher  <timothy@apple.com>
+
+        Fixes the bug where stepping out of a function would show the wrong
+        call stack (would look like it stepped out twice.)
+
+        Reviewed by Adam Roben.
+
+        * page/JavaScriptDebugServer.cpp:
+        (WebCore::JavaScriptDebugServer::returnEvent):
+        Call pauseIfNeeded before setting m_currentCallFrame to the caller.
+
 2008-05-14  Stephanie Lewis  <slewis@apple.com>
    
         Fix 64bit build
index c340d12..b158bf5 100644 (file)
@@ -457,9 +457,9 @@ bool JavaScriptDebugServer::returnEvent(ExecState* exec, int sourceID, int lineN
 {
     if (m_paused)
         return true;
+    pauseIfNeeded(exec, sourceID, lineNumber);
     m_currentCallFrame->invalidate();
     m_currentCallFrame = m_currentCallFrame->caller();
-    pauseIfNeeded(exec, sourceID, lineNumber);
     return true;
 }