tor-browser

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

testFunApplyMadness400.js (358B)


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