jobqueue-interrupt-02.js (371B)
1 // quit() while draining job queue leaves the remaining jobs untouched. 2 3 const global = newGlobal({ newCompartment:true }); 4 const dbg = Debugger(global); 5 dbg.onDebuggerStatement = function() { 6 Promise.resolve().then(() => { 7 quit(); 8 }); 9 Promise.resolve().then(() => { 10 // This shouldn't be called. 11 assertEq(true, false); 12 }); 13 }; 14 global.eval("debugger");