diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js new file mode 100644 index 0000000000..ed24db8f0f --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack-02.js @@ -0,0 +1,28 @@ +// |jit-test| --no-ion; --no-baseline; --no-blinterp; skip-if: !('oomAtAllocation' in this) +// This shouldn't assert (bug 1516514). +// +// Disabled for ion and baseline because those introduce OOMs at some point that +// we don't seem to be able to catch, and they're not relevant to the bug. + +let g = newGlobal(); + +function oomTest() { + let done = false; + for (let j = 1; !done; j++) { + saveStack(); + + oomAtAllocation(j); + + try { + g.saveStack(); + } catch {} + + done = !resetOOMFailure(); + + try { + g.saveStack(); + } catch {} + } +} + +oomTest(); |