summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1118996.js
blob: 44b345711dcda64c9b3dba9d2aece0da48cfe7af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| allow-oom; --fuzzing-safe; --no-threads; --no-ion; allow-unhandlable-oom
g = newGlobal();
gcparam('maxBytes', gcparam('gcBytes'));
try {
    evaluate("return 0", ({
        global: g,
        newContext: true
    }));
} catch (error) {
    // We expect evaluate() above to fail with OOM, but due to GC zeal settings
    // it may execute correctly and throw "SyntaxError: return not in function".
    // This catch block is to ignore that error.
}