summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1667685.js
blob: 2b9e392d241bef7e655b8bccd5532e1dcf374975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// |jit-test| skip-if: !('oomTest' in this); --fast-warmup

// Prevent slowness with --ion-eager.
setJitCompilerOption("ion.warmup.trigger", 100);

function h() {
    return 1;
}
function g() {
    for (var j = 0; j < 10; j++) {
        h();
    }
    trialInline();
}
function f() {
    for (var i = 0; i < 2; i++) {
        var fun = Function(g.toString() + "g()");
        try {
            fun();
        } catch {}
        try {
            fun();
        } catch {}
    }

}
oomTest(f);