diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Frame-onStep-generators-05.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Frame-onStep-generators-05.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js b/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js new file mode 100644 index 0000000000..b4996ab217 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-onStep-generators-05.js @@ -0,0 +1,14 @@ +// GC'ing a Debugger.Frame and its AbstractGeneratorObject adjusts the script's +// stepper count. + +let g = newGlobal({newCompartment: true}); +g.eval(`function* f() {}`); +for (let i = 0; i < 2; i++) { + let dbg = new Debugger(g); + dbg.onEnterFrame = frame => { + frame.onStep = () => {}; + }; + g.f(); + dbg.onEnterFrame = undefined; + gc(); +} |