tor-browser

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

try-finally-unwind.js (317B)


      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  } finally {
     15    assertEq(y, 3);
     16  }
     17 }
     18 
     19 with ({}) {}
     20 
     21 for (var i = 0; i < 1000; i++) {
     22  foo()
     23 }
     24 
     25 throwing = true;
     26 try {
     27  foo();
     28 } catch {}