tor-browser

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

directEval.js (282B)


      1 // test scope iteration when throwing from within an eval.
      2 function testEvalThrow(x, y) {
      3  x = 5;
      4  for (var i in [1,2,3])
      5    eval("x += 5; if (i == 2) throw 0");
      6  assertEq(x, 10);
      7 }
      8 for (var i = 0; i < 5; i++)
      9  try { testEvalThrow.call({}, 3); } catch (e) { assertEq(e, 0); }