tor-browser

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

try-catch-unwind.js (332B)


      1 let throwing = false;
      2 
      3 function bar() {
      4  with ({}) {}
      5  if (throwing) throw 3;
      6 }
      7 
      8 function foo() {
      9  let y = 3;
     10  try {
     11    let x = 3;
     12    () => { return x + y; }
     13    bar();
     14  } catch (e) {
     15    assertEq(y, 3);
     16    throw e;
     17  }
     18 }
     19 
     20 with ({}) {}
     21 
     22 for (var i = 0; i < 1000; i++) {
     23  foo()
     24 }
     25 
     26 throwing = true;
     27 try {
     28  foo();
     29 } catch {}