tor-browser

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

onExceptionUnwind-06.js (372B)


      1 // onExceptionUnwind assigning to argv[1] does not affect the thrown exception.
      2 
      3 var g = newGlobal({newCompartment: true});
      4 g.parent = this;
      5 g.eval("function f(frame, exc) { f2 = function () { return exc; }; exc = 123; }");
      6 g.eval("new Debugger(parent).onExceptionUnwind = f;");
      7 
      8 var obj = new Error("oops");
      9 try {
     10    throw obj;
     11 } catch (exc) {
     12    assertEq(exc, obj);
     13 }