summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1647309.js
blob: 520e505b5c5392017fe26ff151f3756e4fc4b1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const g = newGlobal({ newCompartment: true });
const dbg = new Debugger(g);

// Define async generator in debuggee compartment.
g.eval("async function* f() { }");

// Use onEnterFrame hook to create generatorFrames entry.
dbg.onEnterFrame = () => {};

// Trigger failure in AsyncGeneratorNext.
ignoreUnhandledRejections();
oomTest(function() { g.f().next(); });

// Trigger DebugAPI::onSingleStep to check generatorFrames.
dbg.onDebuggerStatement = frame => { frame.onStep = () => {}; }
g.eval("debugger");