summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug732423.js
blob: caf6d116d8e62a202ef7ee704930e5bb77671e5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function testStuff(x, y) {
    for (var i = 0; i < 60; i++) {
        x[y]();
        x[y];
    }
}
testStuff({"elements":function(){}}, "elements");

var o = {
    res: 0,
    f: function() { this.res += 3; },
    __noSuchMethod__: function() { this.res += 5; }
};

function testNoSuchMethod(x, y) {
    for (var i = 0; i < 60; i++) {
        x[y]();
    }
}

testNoSuchMethod(o, "f");
assertEq(o.res, 180);