tor-browser

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

bug-1576862-2.js (770B)


      1 // Failure to rewrap an exception in Completion::fromJSResult should be propagated.
      2 
      3 var dbgGlobal = newGlobal({ newCompartment: true });
      4 var dbg = new dbgGlobal.Debugger();
      5 dbg.addDebuggee(this);
      6 
      7 function test() {
      8  // Make this call's stack frame a debuggee, to ensure that
      9  // slowPathOnLeaveFrame runs when this frame exits. That calls
     10  // Completion::fromJSResult to capture this frame's completion value.
     11  dbg.getNewestFrame();
     12 
     13  // Throw from the non-debuggee compartment, to force Completion::fromJSResult
     14  // to rewrap the exception.
     15  dbgGlobal.assertEq(1,2);
     16 }
     17 
     18 stackTest(test, {
     19  // When the bug is fixed, the failure to rewrap the exception turns the throw
     20  // into a termination, so we won't get an exception.
     21  expectExceptionOnFailure: false
     22 });