tor-browser

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

nativestack.js (464B)


      1 /* Recompilation that requires patching the same native stub multiple times on one stack. */
      2 
      3 var first = 0;
      4 var second = 0;
      5 
      6 function eacher(f, vfirst, vsecond) {
      7  var a = [0];
      8  a.forEach(f);
      9  assertEq(first, vfirst);
     10  assertEq(second, vsecond);
     11 }
     12 
     13 function one() {
     14  eacher(two, 'one', 'two');
     15 }
     16 
     17 function two() {
     18  eval("first = 'one';");
     19  eval("second = 'two';");
     20 }
     21 
     22 eacher(function () {}, 0, 0);
     23 eacher(function () {}, 0, 0);
     24 eacher(one, 'one', 'two');