tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bug1647309.js (507B)


      1 const g = newGlobal({ newCompartment: true });
      2 const dbg = new Debugger(g);
      3 
      4 // Define async generator in debuggee compartment.
      5 g.eval("async function* f() { }");
      6 
      7 // Use onEnterFrame hook to create generatorFrames entry.
      8 dbg.onEnterFrame = () => {};
      9 
     10 // Trigger failure in AsyncGeneratorNext.
     11 ignoreUnhandledRejections();
     12 oomTest(function() { g.f().next(); });
     13 
     14 // Trigger DebugAPI::onSingleStep to check generatorFrames.
     15 dbg.onDebuggerStatement = frame => { frame.onStep = () => {}; }
     16 g.eval("debugger");