tor-browser

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

testFunApplyMadness1.js (359B)


      1 function g() { assertEq(false, true) }
      2 var ct = 0;
      3 
      4 function f(b) {
      5    var a = arguments;
      6    if (b)
      7        f(false);
      8    else
      9        g = {
     10            apply:function(x,y) {
     11                ++ct;
     12                assertEq(x, null);
     13                assertEq(typeof y[0], "boolean");
     14            }
     15        };
     16    g.apply(null, a);
     17 }
     18 f(true);
     19 assertEq(ct, 2);