summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1118996.js
blob: b5c8a48057132d739c7ea2aac495c5679166402a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| allow-oom; --fuzzing-safe; --no-threads; --no-ion
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.
}