From: thatcher Date: Thu, 13 Jul 2006 07:11:23 +0000 (+0000) Subject: Reviewed by Timothy. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=005fa8ecf307b3f373d65762796bb71f328095f5;ds=sidebyside Reviewed by Timothy. Bug 9889: [Drosera] Stepping out when paused after last statement in function skips a frame http://bugzilla.opendarwin.org/show_bug.cgi?id=9889 * Drosera/debugger.js: Track whether we paused during the execution of willLeaveFrame. If so, have stepOut pause on the next call to willExecuteStatement rather than second. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15403 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index bd560a49428e..5ee8dce1271a 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,13 @@ +2006-07-13 Mark Rowe + + Reviewed by Timothy. + + Bug 9889: [Drosera] Stepping out when paused after last statement in function skips a frame + http://bugzilla.opendarwin.org/show_bug.cgi?id=9889 + + * Drosera/debugger.js: Track whether we paused during the execution of willLeaveFrame. If + so, have stepOut pause on the next call to willExecuteStatement rather than second. + 2006-07-12 David Kilzer Reviewed by Darin. diff --git a/WebKitTools/Drosera/debugger.js b/WebKitTools/Drosera/debugger.js index 88ab43652d8a..18f0d91fe2f7 100644 --- a/WebKitTools/Drosera/debugger.js +++ b/WebKitTools/Drosera/debugger.js @@ -41,6 +41,7 @@ var steppingOut = false; var steppingOver = false; var steppingStack = 0; var pauseOnNextStatement = false; +var pausedWhileLeavingFrame = false; var consoleWindow = null; ScriptCallFrame = function (functionName, index, row) @@ -249,6 +250,7 @@ function resume() currentCallFrame = null; pauseOnNextStatement = false; + pausedWhileLeavingFrame = false; steppingOut = false; steppingOver = false; steppingStack = 0; @@ -275,7 +277,7 @@ function stepOver() function stepOut() { - pauseOnNextStatement = false; + pauseOnNextStatement = pausedWhileLeavingFrame; steppingOver = false; steppingStack = 0; steppingOut = true; @@ -783,7 +785,7 @@ function didParseScript(source, fileSource, url, sourceId, baseLineNumber) loadFile(fileIndex, true); } -function willExecuteStatement(sourceId, line) +function willExecuteStatement(sourceId, line, fromLeavingFrame) { var script = scripts[sourceId]; if (line <= 0 || !script) @@ -796,6 +798,7 @@ function willExecuteStatement(sourceId, line) if (pauseOnNextStatement || file.breakpoints[line] == 1 || (steppingOver && !steppingStack)) { pause(); pauseOnNextStatement = false; + pausedWhileLeavingFrame = fromLeavingFrame || false; } if (isPaused()) { @@ -836,7 +839,7 @@ function willLeaveCallFrame(sourceId, line) { if (line <= 0) resume(); - willExecuteStatement(sourceId, line); + willExecuteStatement(sourceId, line, true); if (!steppingStack) steppingOver = false; if (steppingOut && !steppingStack) {