Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: test/mjsunit/debug-step-end-of-script.js

Issue 1521953003: [debugger] correctly find source position of implicit return statement. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reland Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/debug-sourceinfo.js ('k') | test/mjsunit/mirror-script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-step-end-of-script.js
diff --git a/test/mjsunit/regress/regress-4309-2.js b/test/mjsunit/debug-step-end-of-script.js
similarity index 59%
copy from test/mjsunit/regress/regress-4309-2.js
copy to test/mjsunit/debug-step-end-of-script.js
index 984b0071c135fd5037d252128d290d7bcc8669cc..5152353cfa9f853b621f3bb51cfb5f5f9726f7b3 100644
--- a/test/mjsunit/regress/regress-4309-2.js
+++ b/test/mjsunit/debug-step-end-of-script.js
@@ -5,30 +5,17 @@
// Flags: --expose-debug-as debug --allow-natives-syntax
var Debug = debug.Debug;
-
-var exception = null;
+var expected = ["debugger;", "", "debugger;"];
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
try {
- var scope = exec_state.frame().scope(0);
- assertEquals(5, scope.scopeObject().property("i").value().value());
+ assertEquals(expected.shift(), exec_state.frame(0).sourceLineText());
+ exec_state.prepareStep(Debug.StepAction.StepNext, 1);
} catch (e) {
- exception = e;
+ %AbortJS(e + "\n" + e.stack);
}
}
-function f() {
- eval('var i = 5');
- debugger;
-}
-
-f();
-f();
-
-%OptimizeFunctionOnNextCall(f);
Debug.setListener(listener);
-
-f();
-
-assertNull(exception);
+debugger;
« no previous file with comments | « test/mjsunit/debug-sourceinfo.js ('k') | test/mjsunit/mirror-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698