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

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