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

Unified Diff: test/mjsunit/debug-stack-check-position.js

Issue 1925063002: [debugger,interpreter] add source position to stack checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 8 months 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
Index: test/mjsunit/debug-stack-check-position.js
diff --git a/test/mjsunit/regress/regress-crbug-605581.js b/test/mjsunit/debug-stack-check-position.js
similarity index 63%
copy from test/mjsunit/regress/regress-crbug-605581.js
copy to test/mjsunit/debug-stack-check-position.js
index 0f1daabead95a6357503f418c5b46c710ba6b99b..a5570ce904f41ea0d26ae6280d87f6b9e1544bab 100644
--- a/test/mjsunit/regress/regress-crbug-605581.js
+++ b/test/mjsunit/debug-stack-check-position.js
@@ -2,27 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-debug-as debug
+// Flags: --expose-debug-as debug --allow-natives-syntax
var Debug = debug.Debug;
var exception = null;
+var loop = true;
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
try {
- assertThrows(() => exec_state.frame(0).evaluate("bar.baz"), ReferenceError);
+ assertTrue(exec_state.frame(0).sourceLineText().indexOf("BREAK") > 0);
} catch (e) {
exception = e;
}
}
+function f() { // BREAK
+ return 1;
+}
+
Debug.setListener(listener);
-(function() {
- debugger; // bar is still in TDZ at this point.
- let bar = 1;
- (x => bar); // force bar to be context-allocated.
-})();
+%ScheduleBreak(); // Break on function entry.
+f();
Debug.setListener(null);
assertNull(exception);
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/unittests/interpreter/bytecode-array-builder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698