Index: test/mjsunit/debug-generator-break-on-stack.js |
diff --git a/test/mjsunit/ignition/debug-break-on-stack.js b/test/mjsunit/debug-generator-break-on-stack.js |
similarity index 83% |
copy from test/mjsunit/ignition/debug-break-on-stack.js |
copy to test/mjsunit/debug-generator-break-on-stack.js |
index d2577b38de85f4cc10a74afc3973bdb9d7fee79f..5a1a9c56c163e27457f6b221fa3871c91cc27f19 100644 |
--- a/test/mjsunit/ignition/debug-break-on-stack.js |
+++ b/test/mjsunit/debug-generator-break-on-stack.js |
@@ -22,25 +22,23 @@ function listener(event, exec_state, event_data, data) { |
} |
-function g() { |
+function* g() { |
setbreaks(); |
- throw 1; // B1 |
+ yield 1; // B1 |
} |
-function f() { |
- try { |
- g(); |
- } catch (e) {} |
+function* f() { |
+ yield* g(); |
return 2; // B2 |
} |
function setbreaks() { |
Debug.setListener(listener); |
- Debug.setBreakPoint(g, 2, 0); |
- Debug.setBreakPoint(f, 4, 0); |
+ Debug.setBreakPoint(g, 2); |
+ Debug.setBreakPoint(f, 2); |
} |
-f(); |
+for (let _ of f()) { } |
assertEquals(2, break_count); |
assertNull(exception); |