Debian Codegraph @

js/src/jit-test/tests/basic/bug1118996.js

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