summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug776748.js
blob: aa586254ac4ef344efb91231b0f4e746007ea0e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var eCount = 0;
var funs = [function () {}, function () {}];
function someElement(a) {
    ++eCount;
    var i = (eCount >= 8) ? 1 : 0;
    return a[i]
}
var recursionGuard = 0;
function recursiveThing() {
    someElement(funs);
    if (++recursionGuard % 2) {
        e1();
    }
}
function e1() {
    try {} catch (e) {}
    someElement(funs);
    recursiveThing()
}
recursiveThing()
gc();
recursiveThing()
recursiveThing()