summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testFunApplyMadness400.js
blob: 886d559347016cc5021b5c1dcf9776cc586a2d45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function g() { assertEq(false, true) }
var max = 400; ct = 0;

function f(b) {
    if (b) {
        f(b - 1);
    } else {
        g = {
            apply:function(x,y) {
                assertEq(x, null);
                assertEq(y[0], ct);
                ++ct;
            }
        };
    }
    g.apply(null, arguments);
}
f(max - 1);
assertEq(ct, max);