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); |