summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/save-queue-resets-draining.js
blob: 3d63c09bf826d753682502618ef9b3b72dd3491d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// The draining state is reset when saving the job queue.

let g = newGlobal({newCompartment: true});

let dbg = new Debugger();
let gw = dbg.addDebuggee(g);

dbg.onDebuggerStatement = frame => {
  // Enqueue a new job from within the debugger while executing another job
  // from outside of the debugger.
  enqueueJob(function() {});
};

g.eval(`
  enqueueJob(function() {
    debugger;
  });
`);