tor-browser

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

dynamicBindings.js (576B)


      1 function testEval(x, y) {
      2  x = 5;
      3  eval("arguments[0] += 10");
      4  assertEq(x, 15);
      5 }
      6 for (var i = 0; i < 5; i++)
      7  testEval(3);
      8 
      9 function testEvalWithArguments(x, y) {
     10  eval("arguments[0] += 10");
     11  assertEq(arguments[y], 13);
     12 }
     13 for (var i = 0; i < 5; i++)
     14  testEvalWithArguments(3, 0);
     15 
     16 function testNestedEval(x, y) {
     17  x = 5;
     18  eval("eval('arguments[0] += 10')");
     19  assertEq(x, 15);
     20 }
     21 for (var i = 0; i < 5; i++)
     22  testNestedEval(3);
     23 
     24 function testWith(x, y) {
     25  with ({}) {
     26    arguments[0] += 10;
     27    assertEq(x, 13);
     28  }
     29 }
     30 for (var i = 0; i < 5; i++)
     31  testWith(3);