Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/saved-stacks/ (r=jorendorff)
authorEric Faust <efausbmo@gmail.com>
Tue, 09 Oct 2018 15:41:50 -0700
changeset 488677 085483ce64fefc6564581ed67f706471a8aa0a47
parent 488676 f6a61c3b3dbb8609c91c2aced93f8ce89b20a33f
child 488678 ca4e8e9425aeb3545b3c3788a953fcd93359e26a
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersjorendorff
bugs1496297
milestone64.0a1
Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/saved-stacks/ (r=jorendorff)
js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js
js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js
--- a/js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js
+++ b/js/src/jit-test/tests/saved-stacks/bug-1445973-quick.js
@@ -1,9 +1,9 @@
-// |jit-test| --no-baseline
+// |jit-test| --no-baseline; skip-if: !('oomTest' in this)
 //
 // For background, see the comments for LiveSavedFrameCache in js/src/vm/Stack.h.
 //
 // The cache would like to assert that, assuming the cache hasn't been
 // completely flushed due to a compartment mismatch, if a stack frame's
 // hasCachedSavedFrame bit is set, then that frame does indeed have an entry in
 // the cache.
 //
@@ -14,19 +14,16 @@
 // to OOM, then we are left with no cache entry for that frame.
 //
 // The fix for 1445973 is simply to clear the frame's bit when we remove the
 // cache entry for a pc mismatch. Previously the code neglected to do this, but
 // usually got away with it because the cache would be re-populated. OOM fuzzing
 // interrupted the code at the proper place and revealed the crash, but did so
 // with a test that took 90s to run. This test runs in a fraction of a second.
 
-if (!('oomTest' in this))
-    quit();
-
 function f() {
   // Ensure that we will try to allocate fresh SavedFrame objects.
   clearSavedFrames();
 
   // Ensure that all frames have their hasCachedSavedFrame bits set.
   saveStack();
 
   try {
--- a/js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js
+++ b/js/src/jit-test/tests/saved-stacks/oom-in-save-stack.js
@@ -1,4 +1,4 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
+
 let s = saveStack();
 oomTest(() => { saveStack(); });