summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1259306.js
blob: 4f8412dad594f8a9608feee1a3110f644f1f6965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if (!('oomTest' in this))
    quit();

let runCount = 0;
oomTest(() => {
    if (runCount < 5) {
        let lfGlobal = newGlobal();
        var lfVarx = `
            gczeal(8, 1);
            try {
                (5).replace(r, () => {});
            } catch (x) {}
            gczeal(0);
        `;
        lfGlobal.offThreadCompileScript(lfVarx);
        lfGlobal.runOffThreadScript();
        runCount++;
    }
});