summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/oomInOffTheadCompile.js
blob: 1ad79fadbc342f35d1bcba34676eb0af64412c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if (!('oomTest' in this) || helperThreadCount() === 0)
    quit();

oomTest(() => {
    offThreadCompileScript(
        `
        function f(x) {
            if (x == 0)
                return "foobar";
            return 1 + f(x - 1);
        }
        f(5);
        `);
    runOffThreadScript();
});