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

Unified Diff: test/mjsunit/debug-generator-break-on-stack.js

Issue 1996943002: [esnext] Fix various callsites to use is_resumable, not is_generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: don't pass unneeded zero Created 4 years, 7 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
« no previous file with comments | « test/mjsunit/debug-generator-break.js ('k') | test/mjsunit/harmony/async-await-basic.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/mjsunit/debug-generator-break.js ('k') | test/mjsunit/harmony/async-await-basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698