Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/gc/ (r=jorendorff)
authorEric Faust <efausbmo@gmail.com>
Tue, 09 Oct 2018 15:41:50 -0700
changeset 496120 4157315ccd54091dbc9e64bb7a744c6c9689638d
parent 496119 1b29d20f030915e9ded7070e0d7e966f2266bfef
child 496121 cb0c1944852bbeaebc2f023a6d5a60a4a2a7f403
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1496297
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/gc/ (r=jorendorff)
js/src/jit-test/tests/gc/bug-1053676.js
js/src/jit-test/tests/gc/bug-1108007.js
js/src/jit-test/tests/gc/bug-1123648.js
js/src/jit-test/tests/gc/bug-1137341.js
js/src/jit-test/tests/gc/bug-1138390.js
js/src/jit-test/tests/gc/bug-1148383.js
js/src/jit-test/tests/gc/bug-1155455.js
js/src/jit-test/tests/gc/bug-1161968.js
js/src/jit-test/tests/gc/bug-1165966.js
js/src/jit-test/tests/gc/bug-1171909.js
js/src/jit-test/tests/gc/bug-1175755.js
js/src/jit-test/tests/gc/bug-1177778.js
js/src/jit-test/tests/gc/bug-1188290.js
js/src/jit-test/tests/gc/bug-1191576.js
js/src/jit-test/tests/gc/bug-1206677.js
js/src/jit-test/tests/gc/bug-1208994.js
js/src/jit-test/tests/gc/bug-1209001.js
js/src/jit-test/tests/gc/bug-1210607.js
js/src/jit-test/tests/gc/bug-1214006.js
js/src/jit-test/tests/gc/bug-1214781.js
js/src/jit-test/tests/gc/bug-1214846.js
js/src/jit-test/tests/gc/bug-1215363-1.js
js/src/jit-test/tests/gc/bug-1215363-2.js
js/src/jit-test/tests/gc/bug-1215363-3.js
js/src/jit-test/tests/gc/bug-1216607.js
js/src/jit-test/tests/gc/bug-1221359.js
js/src/jit-test/tests/gc/bug-1221747.js
js/src/jit-test/tests/gc/bug-1223021.js
js/src/jit-test/tests/gc/bug-1224710.js
js/src/jit-test/tests/gc/bug-1226888.js
js/src/jit-test/tests/gc/bug-1226896.js
js/src/jit-test/tests/gc/bug-1231386.js
js/src/jit-test/tests/gc/bug-1232386.js
js/src/jit-test/tests/gc/bug-1234410.js
js/src/jit-test/tests/gc/bug-1236473.js
js/src/jit-test/tests/gc/bug-1238555.js
js/src/jit-test/tests/gc/bug-1238575-2.js
js/src/jit-test/tests/gc/bug-1238575.js
js/src/jit-test/tests/gc/bug-1238582.js
js/src/jit-test/tests/gc/bug-1240503.js
js/src/jit-test/tests/gc/bug-1240527.js
js/src/jit-test/tests/gc/bug-1241731.js
js/src/jit-test/tests/gc/bug-1242812.js
js/src/jit-test/tests/gc/bug-1245520.js
js/src/jit-test/tests/gc/bug-1252103.js
js/src/jit-test/tests/gc/bug-1252154.js
js/src/jit-test/tests/gc/bug-1252329.js
js/src/jit-test/tests/gc/bug-1253124.js
js/src/jit-test/tests/gc/bug-1259306.js
js/src/jit-test/tests/gc/bug-1261329.js
js/src/jit-test/tests/gc/bug-1263862.js
js/src/jit-test/tests/gc/bug-1263871.js
js/src/jit-test/tests/gc/bug-1263884.js
js/src/jit-test/tests/gc/bug-1271110.js
js/src/jit-test/tests/gc/bug-1280588.js
js/src/jit-test/tests/gc/bug-1280889.js
js/src/jit-test/tests/gc/bug-1282986.js
js/src/jit-test/tests/gc/bug-1286244.js
js/src/jit-test/tests/gc/bug-1287399.js
js/src/jit-test/tests/gc/bug-1287869.js
js/src/jit-test/tests/gc/bug-1292564.js
js/src/jit-test/tests/gc/bug-1298356.js
js/src/jit-test/tests/gc/bug-1301496.js
js/src/jit-test/tests/gc/bug-1303015.js
js/src/jit-test/tests/gc/bug-1305220.js
js/src/jit-test/tests/gc/bug-1308048.js
js/src/jit-test/tests/gc/bug-1310589.js
js/src/jit-test/tests/gc/bug-1311060.js
js/src/jit-test/tests/gc/bug-1315946.js
js/src/jit-test/tests/gc/bug-1322648.js
js/src/jit-test/tests/gc/bug-1323868.js
js/src/jit-test/tests/gc/bug-1324512.js
js/src/jit-test/tests/gc/bug-1325551.js
js/src/jit-test/tests/gc/bug-1328251.js
js/src/jit-test/tests/gc/bug-1332773.js
js/src/jit-test/tests/gc/bug-1340010.js
js/src/jit-test/tests/gc/bug-1371908.js
js/src/jit-test/tests/gc/bug-1374797.js
js/src/jit-test/tests/gc/bug-1382431.js
js/src/jit-test/tests/gc/bug-1384047.js
js/src/jit-test/tests/gc/bug-1390087.js
js/src/jit-test/tests/gc/bug-1401141.js
js/src/jit-test/tests/gc/bug-1411302.js
js/src/jit-test/tests/gc/bug-1435295.js
js/src/jit-test/tests/gc/bug-1439284.js
js/src/jit-test/tests/gc/bug-1449887.js
js/src/jit-test/tests/gc/bug-1456536.js
js/src/jit-test/tests/gc/bug-1459860.js
js/src/jit-test/tests/gc/bug-1461027.js
js/src/jit-test/tests/gc/bug-1461448.js
js/src/jit-test/tests/gc/bug-1462337.js
js/src/jit-test/tests/gc/bug-1472734.js
js/src/jit-test/tests/gc/bug-1481093.js
js/src/jit-test/tests/gc/bug-1490042.js
js/src/jit-test/tests/gc/bug-948423.js
js/src/jit-test/tests/gc/bug-978802.js
js/src/jit-test/tests/gc/bug1146213.js
js/src/jit-test/tests/gc/bug1191756.js
js/src/jit-test/tests/gc/bug1246607.js
js/src/jit-test/tests/gc/bug1283169.js
js/src/jit-test/tests/gc/bug1285186.js
js/src/jit-test/tests/gc/bug1285490.js
js/src/jit-test/tests/gc/bug1287063.js
js/src/jit-test/tests/gc/bug1326343-gcstats.js
js/src/jit-test/tests/gc/bug1337324.js
js/src/jit-test/tests/gc/bug1471949.js
js/src/jit-test/tests/gc/incremental-abort.js
js/src/jit-test/tests/gc/incremental-compacting.js
js/src/jit-test/tests/gc/incremental-state.js
js/src/jit-test/tests/gc/oomInArrayProtoTest.js
js/src/jit-test/tests/gc/oomInByteSize.js
js/src/jit-test/tests/gc/oomInDebugger.js
js/src/jit-test/tests/gc/oomInDtoa.js
js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js
js/src/jit-test/tests/gc/oomInFindPath.js
js/src/jit-test/tests/gc/oomInFormatStackDump.js
js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js
js/src/jit-test/tests/gc/oomInNewGlobal.js
js/src/jit-test/tests/gc/oomInOffTheadCompile.js
js/src/jit-test/tests/gc/oomInOffTheadCompile2.js
js/src/jit-test/tests/gc/oomInOffTheadCompile3.js
js/src/jit-test/tests/gc/oomInParseAsmJS.js
js/src/jit-test/tests/gc/oomInParseFunction.js
js/src/jit-test/tests/gc/oomInRegExp.js
js/src/jit-test/tests/gc/oomInRegExp2.js
js/src/jit-test/tests/gc/oomInWeakMap.js
--- a/js/src/jit-test/tests/gc/bug-1053676.js
+++ b/js/src/jit-test/tests/gc/bug-1053676.js
@@ -1,10 +1,9 @@
-// |jit-test| --ion-eager;
-if (typeof Symbol !== "function") quit(0);
+// |jit-test| --ion-eager
 
 var x
 (function() {
     x
 }());
 verifyprebarriers();
 x = x * 0
 x = Symbol();
--- a/js/src/jit-test/tests/gc/bug-1108007.js
+++ b/js/src/jit-test/tests/gc/bug-1108007.js
@@ -1,24 +1,23 @@
-// |jit-test| --no-threads; --no-ion; --no-baseline
-if (!("gczeal" in this))
-    quit();
+// |jit-test| --no-threads; --no-ion; --no-baseline; skip-if: !('gczeal' in this)
+
 gczeal(2);
 (function() {
     evaluate(cacheEntry((function() {
         return "".toSource()
     })()), Object.create({ global: newGlobal({ cloneSingletons: true }) }, {
         saveBytecode: {
             value: true
         }
     }))
 })();
 [[0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
  [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
  [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
- [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], 
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
+ [0], [0], [0], [0], [0], [0], [0], [0], [0], [0],
  [0], [0], [0], [0]];
--- a/js/src/jit-test/tests/gc/bug-1123648.js
+++ b/js/src/jit-test/tests/gc/bug-1123648.js
@@ -1,5 +1,4 @@
-if (!("ctypes" in this))
-   quit();
+// |jit-test| skip-if: !('ctypes' in this)
 
 gczeal(14, 1);
 ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr;
--- a/js/src/jit-test/tests/gc/bug-1137341.js
+++ b/js/src/jit-test/tests/gc/bug-1137341.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() == 0)
-   quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 gczeal(0);
 gc();
 
 schedulegc(this);
 startgc(0, "shrinking");
 var g = newGlobal();
 g.offThreadCompileScript('debugger;', {});
--- a/js/src/jit-test/tests/gc/bug-1138390.js
+++ b/js/src/jit-test/tests/gc/bug-1138390.js
@@ -1,17 +1,9 @@
-if (!("startgc" in this &&
-      "offThreadCompileScript" in this &&
-      "runOffThreadScript" in this))
-{
-    quit();
-}
-
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 gczeal(0);
 gc();
 
 // Start an incremental GC that includes the atoms zone
 startgc(0);
 var g = newGlobal();
 
--- a/js/src/jit-test/tests/gc/bug-1148383.js
+++ b/js/src/jit-test/tests/gc/bug-1148383.js
@@ -1,12 +1,10 @@
 // This testcase tests setting object metadata for objects created from JIT
 // code.
-if (!("getJitCompilerOptions" in this))
-  quit();
 opts = getJitCompilerOptions();
 if (!opts['ion.enable'] || !opts['baseline.enable'])
   quit();
 
 function TestCase() {}
 function reportCompare () {
   var output = "";
   var testcase = new TestCase();
--- a/js/src/jit-test/tests/gc/bug-1155455.js
+++ b/js/src/jit-test/tests/gc/bug-1155455.js
@@ -1,11 +1,9 @@
-// |jit-test| error: TypeError
-if (!("gczeal" in this))
-    quit();
+// |jit-test| error: TypeError; skip-if !('gczeal' in this)
 var g = newGlobal();
 gczeal(10, 2)
 var dbg = Debugger(g);
 dbg.onDebuggerStatement = function (frame1) {
     function hit(frame2) {
       return hit[0] = "mutated";
     }
     var s = frame1.script;
--- a/js/src/jit-test/tests/gc/bug-1161968.js
+++ b/js/src/jit-test/tests/gc/bug-1161968.js
@@ -1,12 +1,11 @@
-// This test case is a simplified version of debug/Source-invisible.js.
+// |jit-test| skip-if: !('gczeal' in this)
 
-if (!'gczeal' in this)
-    quit();
+// This test case is a simplified version of debug/Source-invisible.js.
 
 gczeal(2,21);
 
 var gi = newGlobal();
 gi.eval('function f() {}');
 
 var gv = newGlobal();
 gv.f = gi.f;
--- a/js/src/jit-test/tests/gc/bug-1165966.js
+++ b/js/src/jit-test/tests/gc/bug-1165966.js
@@ -1,8 +1,6 @@
-// |jit-test| --no-ion
-if (!('oomTest' in this))
-    quit();
+// |jit-test| --no-ion; skip-if: !('oomTest' in this)
 
 var g = newGlobal();
 oomTest(function() {
     Debugger(g);
 });
--- a/js/src/jit-test/tests/gc/bug-1171909.js
+++ b/js/src/jit-test/tests/gc/bug-1171909.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest((function(x) { assertEq(x + y + ex, 25); }));
--- a/js/src/jit-test/tests/gc/bug-1175755.js
+++ b/js/src/jit-test/tests/gc/bug-1175755.js
@@ -1,9 +1,6 @@
-// |jit-test| allow-oom; allow-unhandlable-oom
-
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !('oomAfterAllocations' in this)
 
 setGCCallback({
     action: "majorGC",
 });
 oomAfterAllocations(50);
--- a/js/src/jit-test/tests/gc/bug-1177778.js
+++ b/js/src/jit-test/tests/gc/bug-1177778.js
@@ -1,10 +1,9 @@
-if (!("setGCCallback" in this))
-    quit();
+// |jit-test| skip-if: !('setGCCallback' in this)
 
 setGCCallback({
     action: "majorGC",
     phases: "both"
 });
 var g = newGlobal();
 var dbg = new Debugger;
 var gw = dbg.addDebuggee(g);
--- a/js/src/jit-test/tests/gc/bug-1188290.js
+++ b/js/src/jit-test/tests/gc/bug-1188290.js
@@ -1,16 +1,15 @@
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject") || typeof minorgc !== 'function'
+
 load(libdir + "immutable-prototype.js");
 
 if (globalPrototypeChainIsMutable())
     this.__proto__ = [];
 
-if (!this.hasOwnProperty("TypedObject") || typeof minorgc !== 'function')
-    quit();
-
 var T = TypedObject;
 var ObjectStruct = new T.StructType({f: T.Object});
 var o = new ObjectStruct();
 
 minorgc();
 
 function writeObject(o, v) {
     o.f = v;
--- a/js/src/jit-test/tests/gc/bug-1191576.js
+++ b/js/src/jit-test/tests/gc/bug-1191576.js
@@ -1,12 +1,9 @@
-// |jit-test| allow-oom
-
-if (!('gczeal' in this && 'oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('gczeal' in this && 'oomAfterAllocations' in this)
 
 var lfcode = new Array();
 gczeal(14);
 loadFile(`
 for (let e of Object.values(newGlobal())) {
     if (oomAfterAllocations(100))
         continue;
 }
--- a/js/src/jit-test/tests/gc/bug-1206677.js
+++ b/js/src/jit-test/tests/gc/bug-1206677.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-  quit(0);
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 var lfGlobal = newGlobal();
 for (lfLocal in this) {
     if (!(lfLocal in lfGlobal)) {
         lfGlobal[lfLocal] = this[lfLocal];
     }
 }
 const script = 'oomTest(() => getBacktrace({args: true, locals: "123795", thisprops: true}));';
--- a/js/src/jit-test/tests/gc/bug-1208994.js
+++ b/js/src/jit-test/tests/gc/bug-1208994.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => getBacktrace({args: oomTest[load+1], locals: true, thisprops: true}));
--- a/js/src/jit-test/tests/gc/bug-1209001.js
+++ b/js/src/jit-test/tests/gc/bug-1209001.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => parseModule('import v from "mod";'));
--- a/js/src/jit-test/tests/gc/bug-1210607.js
+++ b/js/src/jit-test/tests/gc/bug-1210607.js
@@ -1,9 +1,6 @@
-// |jit-test| allow-oom
-
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
 
 var g = newGlobal();
 x = Debugger(g);
 selectforgc(g);
 oomAfterAllocations(1);
--- a/js/src/jit-test/tests/gc/bug-1214006.js
+++ b/js/src/jit-test/tests/gc/bug-1214006.js
@@ -1,10 +1,7 @@
-// |jit-test| allow-oom
-
-if (!('oomTest' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomTest' in this)
 
 function f() {
     eval("(function() y)()");
 }
 oomTest(f);
 fullcompartmentchecks(true);
--- a/js/src/jit-test/tests/gc/bug-1214781.js
+++ b/js/src/jit-test/tests/gc/bug-1214781.js
@@ -1,9 +1,7 @@
-// |jit-test| allow-unhandlable-oom
-if (!('oomTest' in this))
-    quit();
+// |jit-test| allow-unhandlable-oom; skip-if: !('oomTest' in this)
 
 try {
     gcparam("maxBytes", gcparam("gcBytes"));
     newGlobal("");
 } catch (e) {};
 oomTest(function() {})
--- a/js/src/jit-test/tests/gc/bug-1214846.js
+++ b/js/src/jit-test/tests/gc/bug-1214846.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 enableGeckoProfiling();
 var s = newGlobal();
 s.offThreadCompileScript('oomTest(() => {});');
 s.runOffThreadScript();
--- a/js/src/jit-test/tests/gc/bug-1215363-1.js
+++ b/js/src/jit-test/tests/gc/bug-1215363-1.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => parseModule(10));
--- a/js/src/jit-test/tests/gc/bug-1215363-2.js
+++ b/js/src/jit-test/tests/gc/bug-1215363-2.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var lfcode = new Array();
 oomTest((function(x) {
     assertEq(...Object);
 }));
--- a/js/src/jit-test/tests/gc/bug-1215363-3.js
+++ b/js/src/jit-test/tests/gc/bug-1215363-3.js
@@ -1,5 +1,4 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var lfcode = new Array();
 oomTest(() => getBacktrace({}));
--- a/js/src/jit-test/tests/gc/bug-1216607.js
+++ b/js/src/jit-test/tests/gc/bug-1216607.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 enableGeckoProfilingWithSlowAssertions();
 try {
 (function() {
    while (n--) {
    }
 })();
 } catch(exc1) {}
--- a/js/src/jit-test/tests/gc/bug-1221359.js
+++ b/js/src/jit-test/tests/gc/bug-1221359.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => getBacktrace({
     locals: true,
     thisprops: true
 }));
--- a/js/src/jit-test/tests/gc/bug-1221747.js
+++ b/js/src/jit-test/tests/gc/bug-1221747.js
@@ -1,8 +1,6 @@
-// |jit-test| --dump-bytecode
-if (!('oomTest' in this))
-    quit();
+// |jit-test| --dump-bytecode; skip-if: !('oomTest' in this)
 
 function f() {
     eval("(function() {})()");
 }
 oomTest(f);
--- a/js/src/jit-test/tests/gc/bug-1223021.js
+++ b/js/src/jit-test/tests/gc/bug-1223021.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 function f() {
     return this === null;
 };
 
 function g() {
     if (!f.apply(9)) {}
 }
--- a/js/src/jit-test/tests/gc/bug-1224710.js
+++ b/js/src/jit-test/tests/gc/bug-1224710.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() {
     eval("\
 	function g() {\
 	    \"use asm\";\
 	    function f(d) {\
 		d = +d;\
 		print(.0 + d);\
--- a/js/src/jit-test/tests/gc/bug-1226888.js
+++ b/js/src/jit-test/tests/gc/bug-1226888.js
@@ -1,10 +1,9 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 setJitCompilerOption('ion.forceinlineCaches', 1);
 // Adapted from randomly chosen test: js/src/jit-test/tests/TypedObject/jit-write-references.js
 with({}) {}
 v = new new TypedObject.StructType({
     f: TypedObject.Any
 })
 gc();
--- a/js/src/jit-test/tests/gc/bug-1226896.js
+++ b/js/src/jit-test/tests/gc/bug-1226896.js
@@ -1,9 +1,6 @@
-// |jit-test| --ion-pgo=on
-
-if (!('oomTest' in this))
-   quit();
+// |jit-test| --ion-pgo=on; skip-if: !('oomTest' in this)
 
 oomTest(() => {
     var g = newGlobal({sameZoneAs: this});
     g.eval("(function() {})()");
 });
--- a/js/src/jit-test/tests/gc/bug-1231386.js
+++ b/js/src/jit-test/tests/gc/bug-1231386.js
@@ -1,12 +1,9 @@
-// |jit-test| slow
-
-if (!('oomTest' in this))
-    quit();
+// |jit-test| slow; skip-if: !('oomTest' in this)
 
 function f1() {}
 function f2() {}
 r = [function() {}, function() {}, [], function() {}, f1, function() {}, f2];
 l = [0];
 function f3() {
     return {
         a: 0
--- a/js/src/jit-test/tests/gc/bug-1232386.js
+++ b/js/src/jit-test/tests/gc/bug-1232386.js
@@ -1,11 +1,9 @@
-// |jit-test| allow-oom
-if (!('oomTest' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomTest' in this)
 
 var dbg = new Debugger;
 dbg.onNewGlobalObject = function(global) {
     global.seen = true;
 };
 
 oomTest(function() {
     newGlobal({sameZoneAs: this})
--- a/js/src/jit-test/tests/gc/bug-1234410.js
+++ b/js/src/jit-test/tests/gc/bug-1234410.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 enableGeckoProfiling();
 oomTest(() => {
     try {
         for (var quit of oomTest.gcparam("//").ArrayBuffer(1)) {}
     } catch (e) {}
 });
 
--- a/js/src/jit-test/tests/gc/bug-1236473.js
+++ b/js/src/jit-test/tests/gc/bug-1236473.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-  quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => {
     offThreadCompileScript(`try {} catch (NaN) {}`);
     runOffThreadScript();
 });
--- a/js/src/jit-test/tests/gc/bug-1238555.js
+++ b/js/src/jit-test/tests/gc/bug-1238555.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-  quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(
   function x() {
     try {
       eval('let ')
     } catch (ex) {
       (function() {})()
     }
--- a/js/src/jit-test/tests/gc/bug-1238575-2.js
+++ b/js/src/jit-test/tests/gc/bug-1238575-2.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => evalInWorker("1"));
--- a/js/src/jit-test/tests/gc/bug-1238575.js
+++ b/js/src/jit-test/tests/gc/bug-1238575.js
@@ -1,8 +1,5 @@
-// |jit-test| allow-oom; allow-unhandlable-oom
-
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; allow-unhandlable-oom; skip-if: !('oomAfterAllocations' in this)
 
 oomAfterAllocations(5)
 gcslice(11);
 evalInWorker("1");
--- a/js/src/jit-test/tests/gc/bug-1238582.js
+++ b/js/src/jit-test/tests/gc/bug-1238582.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => { let a = [2147483651]; [a[0], a[undefined]].sort(); });
--- a/js/src/jit-test/tests/gc/bug-1240503.js
+++ b/js/src/jit-test/tests/gc/bug-1240503.js
@@ -1,8 +1,7 @@
-if (!('oomTest' in this))
-  quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 function arrayProtoOutOfRange() {
     for (let [] = () => r, get;;)
         var r = f(i % 2 ? a : b);
 }
 oomTest(arrayProtoOutOfRange);
--- a/js/src/jit-test/tests/gc/bug-1240527.js
+++ b/js/src/jit-test/tests/gc/bug-1240527.js
@@ -1,14 +1,7 @@
-if (typeof offThreadCompileScript !== 'function' ||
-    typeof runOffThreadScript !== 'function' ||
-    typeof oomTest !== 'function' ||
-    typeof fullcompartmentchecks !== 'function' ||
-    helperThreadCount() === 0)
-{
-    quit(0);
-}
+// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this)
 
 offThreadCompileScript(`
  oomTest(() => "".search(/d/));
  fullcompartmentchecks(3);
 `);
 runOffThreadScript();
--- a/js/src/jit-test/tests/gc/bug-1241731.js
+++ b/js/src/jit-test/tests/gc/bug-1241731.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => serialize(0, [{}]));
--- a/js/src/jit-test/tests/gc/bug-1242812.js
+++ b/js/src/jit-test/tests/gc/bug-1242812.js
@@ -1,5 +1,4 @@
-if (!('oomTest' in this))
-   quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var lfcode = new Array();
 oomTest(() => { let a = [2147483651]; [-1, 0, 1, 31, 32].sort(); });
--- a/js/src/jit-test/tests/gc/bug-1245520.js
+++ b/js/src/jit-test/tests/gc/bug-1245520.js
@@ -1,5 +1,4 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var t = {};
 oomTest(() => serialize(t));
--- a/js/src/jit-test/tests/gc/bug-1252103.js
+++ b/js/src/jit-test/tests/gc/bug-1252103.js
@@ -1,14 +1,13 @@
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
+
 // Bug 1252103: Inline typed array objects need delayed metadata collection.
 // Shouldn't crash.
 
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
-
 function foo() {
     enableTrackAllocations();
     gczeal(2, 10);
     TO = TypedObject;
     PointType = new TO.StructType({
         y: TO.float64,
         name: TO.string
     })
--- a/js/src/jit-test/tests/gc/bug-1252154.js
+++ b/js/src/jit-test/tests/gc/bug-1252154.js
@@ -1,11 +1,10 @@
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
+
 // Bug 1252154: Inline typed array objects need delayed metadata collection.
 // Shouldn't crash.
 
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
-
 gczeal(7,1);
 enableShellAllocationMetadataBuilder();
 var T = TypedObject;
 var AT = new T.ArrayType(T.Any,10);
 var v = new AT();
--- a/js/src/jit-test/tests/gc/bug-1252329.js
+++ b/js/src/jit-test/tests/gc/bug-1252329.js
@@ -1,12 +1,9 @@
-// |jit-test| allow-oom
-
-if (helperThreadCount() == 0 || !('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: helperThreadCount() == 0 || !('oomAfterAllocations' in this)
 
 var lfcode = new Array();
 lfcode.push("5");
 lfcode.push(`
 gczeal(8, 2);
 try {
     [new String, y]
 } catch (e) {}
--- a/js/src/jit-test/tests/gc/bug-1253124.js
+++ b/js/src/jit-test/tests/gc/bug-1253124.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 for (let i = 0; i < 10; i++)
     toPrimitive = Date.prototype[Symbol.toPrimitive];
 assertThrowsInstanceOf(() =>  0);
 obj = {};
 oomTest(() => assertThrowsInstanceOf(() => toPrimitive.call(obj, "boolean")));
 function assertThrowsInstanceOf(f) {
     f();
--- a/js/src/jit-test/tests/gc/bug-1259306.js
+++ b/js/src/jit-test/tests/gc/bug-1259306.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 let runCount = 0;
 oomTest(() => {
     if (runCount < 5) {
         let lfGlobal = newGlobal();
         var lfVarx = `
             gczeal(8, 1);
             try {
--- a/js/src/jit-test/tests/gc/bug-1261329.js
+++ b/js/src/jit-test/tests/gc/bug-1261329.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 print = function() {}
 function k() { return dissrc(print); }
 function j() { return k(); }
 function h() { return j(); }
 function f() { return h(); }
 f();
 oomTest(() => f())
--- a/js/src/jit-test/tests/gc/bug-1263862.js
+++ b/js/src/jit-test/tests/gc/bug-1263862.js
@@ -1,9 +1,8 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 function loadFile(lfVarx) {
   oomTest(() => eval(lfVarx));
 }
 for (var i = 0; i < 10; ++i) {
   loadFile(`"use strict"; const s = () => s;`);
 }
--- a/js/src/jit-test/tests/gc/bug-1263871.js
+++ b/js/src/jit-test/tests/gc/bug-1263871.js
@@ -1,9 +1,8 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 lfLogBuffer = `this[''] = function() {}`;
 loadFile(lfLogBuffer);
 loadFile(lfLogBuffer);
 function loadFile(lfVarx) {
     return oomTest(function() { return parseModule(lfVarx); });
 }
--- a/js/src/jit-test/tests/gc/bug-1263884.js
+++ b/js/src/jit-test/tests/gc/bug-1263884.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() {
   eval(`
     var argObj = function () { return arguments }()
     for (var p in argObj);
     delete argObj.callee;
   `);
 });
--- a/js/src/jit-test/tests/gc/bug-1271110.js
+++ b/js/src/jit-test/tests/gc/bug-1271110.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 gczeal(0);
 
 var x1 = [];
 var x2 = [];
 var x3 = [];
 var x4 = [];
 (function() {
--- a/js/src/jit-test/tests/gc/bug-1280588.js
+++ b/js/src/jit-test/tests/gc/bug-1280588.js
@@ -1,6 +1,5 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var x = [];
 oomTest(() => setGCCallback({ action: "minorGC" }));
 oomTest(() => setGCCallback({ action: "majorGC" }));
--- a/js/src/jit-test/tests/gc/bug-1280889.js
+++ b/js/src/jit-test/tests/gc/bug-1280889.js
@@ -1,9 +1,8 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 evalInWorker(`
   function f() {
     fullcompartmentchecks(f);
   }
   try { f(); } catch(e) {}
 `);
--- a/js/src/jit-test/tests/gc/bug-1282986.js
+++ b/js/src/jit-test/tests/gc/bug-1282986.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var lfLogBuffer = `
 evalInWorker(\`
         try { oomAfterAllocations(2); } catch(e) {}
     \`);
 `;
 loadFile("");
 loadFile(lfLogBuffer);
--- a/js/src/jit-test/tests/gc/bug-1286244.js
+++ b/js/src/jit-test/tests/gc/bug-1286244.js
@@ -1,16 +1,8 @@
-if (typeof verifyprebarriers != 'function' ||
-    typeof offThreadCompileScript != 'function')
-    quit();
+// |jit-test| skip-if: !getBuildConfiguration()['has-gczeal'] || helperThreadCount() === 0
 
-try {
-    // This will fail with --no-threads.
-    verifyprebarriers();
-    var lfGlobal = newGlobal();
-    lfGlobal.offThreadCompileScript(`
-      version(185);
-    `);
-}
-catch (e) {
-    quit(0);
-}
-
+// This will fail with --no-threads.
+verifyprebarriers();
+var lfGlobal = newGlobal();
+lfGlobal.offThreadCompileScript(`
+  version(185);
+`);
--- a/js/src/jit-test/tests/gc/bug-1287399.js
+++ b/js/src/jit-test/tests/gc/bug-1287399.js
@@ -1,10 +1,9 @@
-if (typeof gczeal != "function" || helperThreadCount() === 0)
-	quit(0);
+// |jit-test| skip-if: typeof gczeal !== 'function' || helperThreadCount() === 0
 
 var lfGlobal = newGlobal();
 gczeal(4);
 for (lfLocal in this) {}
 lfGlobal.offThreadCompileScript(`
   var desc = {
     value: 'bar',
     value: false,
--- a/js/src/jit-test/tests/gc/bug-1287869.js
+++ b/js/src/jit-test/tests/gc/bug-1287869.js
@@ -1,8 +1,7 @@
-if (!('gczeal' in this))
-    quit();
+// |jit-test| skip-if: !('gczeal' in this)
 
 gczeal(16);
 let a = [];
 for (let i = 0; i < 1000; i++)
     a.push({x: i});
 gc();
--- a/js/src/jit-test/tests/gc/bug-1292564.js
+++ b/js/src/jit-test/tests/gc/bug-1292564.js
@@ -1,12 +1,9 @@
-// |jit-test| allow-oom
-
-if (!('oomTest' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomTest' in this)
 
 oomTest(() => {
     let global = newGlobal({sameZoneAs: this});
     Debugger(global).onDebuggerStatement = function (frame) {
         frame.eval("f")
     }
     global.eval("debugger")
 }, false);
--- a/js/src/jit-test/tests/gc/bug-1298356.js
+++ b/js/src/jit-test/tests/gc/bug-1298356.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 /x/;
 oomTest(function(){
     offThreadCompileScript('');
 })
--- a/js/src/jit-test/tests/gc/bug-1301496.js
+++ b/js/src/jit-test/tests/gc/bug-1301496.js
@@ -1,8 +1,7 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 gczeal(0);
 startgc(1, 'shrinking');
 offThreadCompileScript("");
 // Adapted from randomly chosen test: js/src/jit-test/tests/parser/bug-1263355-13.js
 gczeal(9);
 newGlobal();
--- a/js/src/jit-test/tests/gc/bug-1303015.js
+++ b/js/src/jit-test/tests/gc/bug-1303015.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var x = ``.split();
 oomTest(function() {
     var lfGlobal = newGlobal({sameZoneAs: this});
     for (lfLocal in this) {
         if (!(lfLocal in lfGlobal)) {
                 lfGlobal[lfLocal] = this[lfLocal];
         }
--- a/js/src/jit-test/tests/gc/bug-1305220.js
+++ b/js/src/jit-test/tests/gc/bug-1305220.js
@@ -1,11 +1,10 @@
-// |jit-test| allow-oom
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
+
 s = newGlobal();
 evalcx("\
     gczeal(10, 2);\
     k = {\
         [Symbol]() {}\
     };\
 ", s);
 gczeal(0);
--- a/js/src/jit-test/tests/gc/bug-1308048.js
+++ b/js/src/jit-test/tests/gc/bug-1308048.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 m = 'x';
 for (var i = 0; i < 10; i++)
     m += m;
 offThreadCompileScript("", ({elementAttributeName: m}));
 var n = newGlobal();
 gczeal(2,1);
 n.runOffThreadScript();
--- a/js/src/jit-test/tests/gc/bug-1310589.js
+++ b/js/src/jit-test/tests/gc/bug-1310589.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 a = o = s = r = []
 o2 = s2 = r2 = g2 = f2 = m2 = Map
 e2 = Set
 v2 = b2 = new ArrayBuffer
 t2 = new Uint8ClampedArray
 minorgc()
 x = /x/
--- a/js/src/jit-test/tests/gc/bug-1311060.js
+++ b/js/src/jit-test/tests/gc/bug-1311060.js
@@ -1,3 +1,2 @@
-if (helperThreadCount() === 0)
-   quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 evalInWorker(`schedulegc("s1");`);
--- a/js/src/jit-test/tests/gc/bug-1315946.js
+++ b/js/src/jit-test/tests/gc/bug-1315946.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 // Don't run a full oomTest because it takes ages - a few iterations are
 // sufficient to trigger the bug.
 let i = 0;
 
 oomTest(Function(`
     if (i < 10) {
         i++;
--- a/js/src/jit-test/tests/gc/bug-1322648.js
+++ b/js/src/jit-test/tests/gc/bug-1322648.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 gczeal(0);
 print = function(s) {}
 startgc(1);
 offThreadCompileScript("");
 gczeal(10, 3);
 for (var count = 0; count < 20; count++) {
     print(count);
 }
--- a/js/src/jit-test/tests/gc/bug-1323868.js
+++ b/js/src/jit-test/tests/gc/bug-1323868.js
@@ -1,7 +1,6 @@
-// |jit-test| allow-oom
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| allow-oom; skip-if: helperThreadCount() === 0
+
 gczeal(0);
 startgc(8301);
 offThreadCompileScript("(({a,b,c}))");
 gcparam("maxBytes", gcparam("gcBytes"));
--- a/js/src/jit-test/tests/gc/bug-1324512.js
+++ b/js/src/jit-test/tests/gc/bug-1324512.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 evalInWorker(`
     if (!('gczeal' in this))
         quit();
     try {
       gczeal(2,1);
       throw new Error();
     } catch (e) {
--- a/js/src/jit-test/tests/gc/bug-1325551.js
+++ b/js/src/jit-test/tests/gc/bug-1325551.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 let g = newGlobal();
 let dbg = new Debugger;
 let gw = dbg.addDebuggee(g);
 g.eval("function f(){}");
 oomTest(() => {
     gw.makeDebuggeeValue(g.f).script.source.sourceMapURL = 'a';
 });
--- a/js/src/jit-test/tests/gc/bug-1328251.js
+++ b/js/src/jit-test/tests/gc/bug-1328251.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 evalInWorker(`
     if (!('gczeal' in this))
         quit();
     gczeal(2);
     for (let i = 0; i < 30; i++) {
         var a = [1, 2, 3];
         a.indexOf(1);
--- a/js/src/jit-test/tests/gc/bug-1332773.js
+++ b/js/src/jit-test/tests/gc/bug-1332773.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 evalInWorker(`
 var gTestcases = new Array();
 typeof document != "object" || !document.location.href.match(/jsreftest.html/);
 gczeal(4, 10);
 f = ([a = class target extends b {}, b] = [void 0]) => {};
 f()
 `)
--- a/js/src/jit-test/tests/gc/bug-1340010.js
+++ b/js/src/jit-test/tests/gc/bug-1340010.js
@@ -1,12 +1,9 @@
-if (helperThreadCount() === 0)
-    quit();
-if (!('deterministicgc' in this))
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0 || !('deterministicgc' in this)
 gczeal(0);
 
 gc();
 function weighted(wa) {
     var a = [];
     for (var i = 0; i < 30; ++i) {
         for (var j = 0; j < 20; ++j) {
             a.push(0);
--- a/js/src/jit-test/tests/gc/bug-1371908.js
+++ b/js/src/jit-test/tests/gc/bug-1371908.js
@@ -1,6 +1,6 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
+
 gczeal(0);
 offThreadCompileScript("");
 startgc(0);
 runOffThreadScript();
--- a/js/src/jit-test/tests/gc/bug-1374797.js
+++ b/js/src/jit-test/tests/gc/bug-1374797.js
@@ -1,12 +1,11 @@
-// Exercise triggering GC of atoms zone while off-thread parsing is happening.
+// |jit-test| skip-if: helperThreadCount() === 0
 
-if (helperThreadCount() === 0)
-   quit();
+// Exercise triggering GC of atoms zone while off-thread parsing is happening.
 
 gczeal(0);
 
 // Reduce some GC parameters so that we can trigger a GC more easily.
 gcparam('lowFrequencyHeapGrowth', 120);
 gcparam('highFrequencyHeapGrowthMin', 120);
 gcparam('highFrequencyHeapGrowthMax', 120);
 gcparam('allocationThreshold', 1);
--- a/js/src/jit-test/tests/gc/bug-1382431.js
+++ b/js/src/jit-test/tests/gc/bug-1382431.js
@@ -1,6 +1,5 @@
-if (helperThreadCount() === 0)
-   quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 var fe = "vv";
 for (i = 0; i < 24; i++) fe += fe;
 offThreadCompileScript(fe, {});
--- a/js/src/jit-test/tests/gc/bug-1384047.js
+++ b/js/src/jit-test/tests/gc/bug-1384047.js
@@ -1,5 +1,4 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 newGlobal();
 evalcx("oomTest(newGlobal);", newGlobal());
--- a/js/src/jit-test/tests/gc/bug-1390087.js
+++ b/js/src/jit-test/tests/gc/bug-1390087.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 setGCCallback({
     action: "majorGC"
 });
 gcparam("allocationThreshold", 1);
 offThreadCompileScript("");
 for (let i = 0; i < 40000; i++)
     Symbol.for(i);
--- a/js/src/jit-test/tests/gc/bug-1401141.js
+++ b/js/src/jit-test/tests/gc/bug-1401141.js
@@ -1,12 +1,9 @@
-if (!('gczeal' in this))
-    quit();
-if (helperThreadCount() == 0)
-    quit();
+// |jit-test| skip-if: !('gczeal' in this) || helperThreadCount() === 0
 
 gczeal(15,1);
 setGCCallback({
   action: "majorGC",
 });
 gcslice(3);
 var lfGlobal = newGlobal();
 lfGlobal.offThreadCompileScript("");
--- a/js/src/jit-test/tests/gc/bug-1411302.js
+++ b/js/src/jit-test/tests/gc/bug-1411302.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 let lfPreamble = `
     value:{
 `;
 try {
     evaluate("");
     evalInWorker("");
 } catch (exc) {}
--- a/js/src/jit-test/tests/gc/bug-1435295.js
+++ b/js/src/jit-test/tests/gc/bug-1435295.js
@@ -1,11 +1,8 @@
-if (helperThreadCount() === 0)
-    quit();
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this)
 
 oomTest(new Function(`function execOffThread(source) {
     offThreadCompileModule(source);
     return finishOffThreadModule();
 }
 b = execOffThread("[1, 2, 3]")
 `));
--- a/js/src/jit-test/tests/gc/bug-1439284.js
+++ b/js/src/jit-test/tests/gc/bug-1439284.js
@@ -1,10 +1,10 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
+
 gcparam('allocationThreshold', 1);
 setGCCallback({
     action: "majorGC",
 });
 offThreadCompileScript(('Boolean.prototype.toSource.call(new String())'));
 for (let i = 0; i < 10; i++) {
     for (let j = 0; j < 10000; j++) Symbol.for(i + 10 * j);
 }
--- a/js/src/jit-test/tests/gc/bug-1449887.js
+++ b/js/src/jit-test/tests/gc/bug-1449887.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() { x, 0, { z: function() {} } });
--- a/js/src/jit-test/tests/gc/bug-1456536.js
+++ b/js/src/jit-test/tests/gc/bug-1456536.js
@@ -1,3 +1,3 @@
-if (!('oomTest' in this))
-   quit();
+// |jit-test| skip-if: !('oomTest' in this)
+
 oomTest(new Function(`let a = grayRoot();`));
--- a/js/src/jit-test/tests/gc/bug-1459860.js
+++ b/js/src/jit-test/tests/gc/bug-1459860.js
@@ -1,10 +1,8 @@
-// |jit-test| allow-overrecursed
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| allow-overrecursed; skip-if: helperThreadCount() === 0
 function eval(source) {
     offThreadCompileModule(source);
     let get = (eval("function w(){}") ++);
 };
 gczeal(21, 10);
 gczeal(11, 8);
 eval("");
--- a/js/src/jit-test/tests/gc/bug-1461027.js
+++ b/js/src/jit-test/tests/gc/bug-1461027.js
@@ -1,7 +1,6 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 for (var i = 0; i < 99; i++) {
 	    w = new TypedObject.ArrayType(TypedObject.int32, 100).build(function() {});
 }
 relazifyFunctions();
--- a/js/src/jit-test/tests/gc/bug-1461448.js
+++ b/js/src/jit-test/tests/gc/bug-1461448.js
@@ -1,10 +1,9 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 
 gczeal(0);
 
 let lfPreamble = `
   var lfOffThreadGlobal = newGlobal();
   for (lfLocal in this)
     try {} catch(lfVare5) {}
 `;
--- a/js/src/jit-test/tests/gc/bug-1462337.js
+++ b/js/src/jit-test/tests/gc/bug-1462337.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() {
     grayRoot().x = Object.create((obj[name]++));
 });
 oomTest(function() {
     gczeal(9);
     gcslice(new.target);
 });
--- a/js/src/jit-test/tests/gc/bug-1472734.js
+++ b/js/src/jit-test/tests/gc/bug-1472734.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 try {
     oomTest(function() {
       eval(`
         function eval(source) {
           offThreadCompileModule(source);
           minorgc();
         }
--- a/js/src/jit-test/tests/gc/bug-1481093.js
+++ b/js/src/jit-test/tests/gc/bug-1481093.js
@@ -1,8 +1,7 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 v = new new TypedObject.StructType({
     f: TypedObject.Any
 })
 gczeal(14);
 var lfOffThreadGlobal = newGlobal();
--- a/js/src/jit-test/tests/gc/bug-1490042.js
+++ b/js/src/jit-test/tests/gc/bug-1490042.js
@@ -1,12 +1,9 @@
-// |jit-test| --no-ion; --no-baseline
-
-if (!('gcstate' in this))
-    quit();
+// |jit-test| --no-ion; --no-baseline; skip-if: !('gcstate' in this)
 
 gczeal(0);
 
 // Create a bunch of ObjectGroups with TypeNewScript attached.
 const count = 1000;
 let c = [];
 let a = [];
 for (let i = 0; i < count; i++) {
--- a/js/src/jit-test/tests/gc/bug-948423.js
+++ b/js/src/jit-test/tests/gc/bug-948423.js
@@ -1,21 +1,20 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 var ArrayType = TypedObject.ArrayType;
 var StructType = TypedObject.StructType;
 var uint8 = TypedObject.uint8;
 var uint32 = TypedObject.uint32;
 var ObjectType = TypedObject.Object;
 function runTests() {
   (function DimensionLinkedToUndimension() {
     var FiveUintsA = uint32.array(5);
     var FiveUintsB = uint32.array(5);
-    assertEq(true, 
+    assertEq(true,
 	FiveUintsA.equivalent(FiveUintsB)
 	);
   })();
   (function PrototypeHierarchy() {
     schedulegc(3);
     var Uint8s = uint8.array(5);
   })();
 }
--- a/js/src/jit-test/tests/gc/bug-978802.js
+++ b/js/src/jit-test/tests/gc/bug-978802.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => {
     try {
         var max = 400;
         function f(b) {
             if (b) {
                 f(b - 1);
             } else {
--- a/js/src/jit-test/tests/gc/bug1146213.js
+++ b/js/src/jit-test/tests/gc/bug1146213.js
@@ -1,20 +1,9 @@
-if (!("setGCCallback" in this &&
-      "schedulegc" in this &&
-      "gcslice" in this &&
-      "newGlobal" in this &&
-      "helperThreadCount" in this))
-{
-    quit();
-}
-
-if (helperThreadCount() == 0)
-    quit();
-
+// |jit-test| skip-if: !(getBuildConfiguration()['has-gczeal']) || helperThreadCount() === 0
 setGCCallback({
   action: "majorGC",
 });
 schedulegc(this)
 gcslice(3)
 var lfGlobal = newGlobal();
 lfGlobal.offThreadCompileScript("");
 lfGlobal.runOffThreadScript();
--- a/js/src/jit-test/tests/gc/bug1191756.js
+++ b/js/src/jit-test/tests/gc/bug1191756.js
@@ -1,10 +1,9 @@
-if (typeof 'oomAtAllocation' === 'undefined')
-    quit();
+// |jit-test| skip-if: typeof 'oomAtAllocation' === 'undefined'
 
 function fn(i) {
     if (i == 3)
       return ["isFinite"].map(function (i) {});
     return [];
 }
 
 try {
--- a/js/src/jit-test/tests/gc/bug1246607.js
+++ b/js/src/jit-test/tests/gc/bug1246607.js
@@ -1,10 +1,9 @@
-if (typeof oomTest !== 'function' || typeof Intl !== 'object')
-    quit();
+// |jit-test| skip-if: typeof oomTest !== 'function' || typeof Intl !== 'object'
 
 oomTest(() => {
     try {
         new Intl.DateTimeFormat;
         x1 = 0;
     }  catch (e) {
         switch (1) {
             case 0:
--- a/js/src/jit-test/tests/gc/bug1283169.js
+++ b/js/src/jit-test/tests/gc/bug1283169.js
@@ -1,5 +1,5 @@
-if (helperThreadCount() === 0)
-    quit(0);
+// |jit-test| skip-if: helperThreadCount() === 0
+
 gczeal(0);
 startgc(45);
 offThreadCompileScript("print(1)");
--- a/js/src/jit-test/tests/gc/bug1285186.js
+++ b/js/src/jit-test/tests/gc/bug1285186.js
@@ -1,6 +1,5 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 gczeal(10);
 newGlobal();
 offThreadCompileScript("let x = 1;");
 abortgc();
--- a/js/src/jit-test/tests/gc/bug1285490.js
+++ b/js/src/jit-test/tests/gc/bug1285490.js
@@ -1,4 +1,3 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
 gczeal(4);
 offThreadCompileScript("let x = 1;");
--- a/js/src/jit-test/tests/gc/bug1287063.js
+++ b/js/src/jit-test/tests/gc/bug1287063.js
@@ -1,4 +1,4 @@
-if (helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0
+
 schedulegc("");
 offThreadCompileScript("");
--- a/js/src/jit-test/tests/gc/bug1326343-gcstats.js
+++ b/js/src/jit-test/tests/gc/bug1326343-gcstats.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 setJitCompilerOption('baseline.warmup.trigger', 4);
 oomTest((function () {
     gcslice(0);
 }))
--- a/js/src/jit-test/tests/gc/bug1337324.js
+++ b/js/src/jit-test/tests/gc/bug1337324.js
@@ -1,6 +1,5 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 oomTest(function () {
     offThreadCompileModule('');
     finishOffThreadModule();
 });
--- a/js/src/jit-test/tests/gc/bug1471949.js
+++ b/js/src/jit-test/tests/gc/bug1471949.js
@@ -1,8 +1,5 @@
-// |jit-test| allow-oom
-
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
 
 gczeal(15);
 oomAfterAllocations(5);
 gcslice(11);
--- a/js/src/jit-test/tests/gc/incremental-abort.js
+++ b/js/src/jit-test/tests/gc/incremental-abort.js
@@ -1,12 +1,11 @@
-// Test aborting an incremental GC in all possible states
+// |jit-test| skip-if: !getBuildConfiguration()['has-gczeal']
 
-if (!("gcstate" in this && "gczeal" in this && "abortgc" in this))
-    quit();
+// Test aborting an incremental GC in all possible states
 
 gczeal(0);
 gc();
 
 function testAbort(zoneCount, objectCount, sliceCount, abortState)
 {
     // Allocate objectCount objects in zoneCount zones and run a incremental
     // shrinking GC.
--- a/js/src/jit-test/tests/gc/incremental-compacting.js
+++ b/js/src/jit-test/tests/gc/incremental-compacting.js
@@ -1,14 +1,13 @@
+// |jit-test| skip-if: !("gcstate" in this && "gczeal" in this)
+
 // Exercise incremental compacting GC
 // Run with MOZ_GCTIMER to see the timings
 
-if (!("gcstate" in this && "gczeal" in this))
-    quit();
-
 gczeal(0);
 
 function testCompacting(zoneCount, objectCount, sliceCount)
 {
     // Allocate objectCount objects in zoneCount zones
     // On linux64 debug builds we will move them all
     // Run compacting GC with multiple slices
 
--- a/js/src/jit-test/tests/gc/incremental-state.js
+++ b/js/src/jit-test/tests/gc/incremental-state.js
@@ -1,12 +1,11 @@
+// |jit-test| skip-if: !('gcstate' in this)
+
 // Test expected state changes during collection.
-if (!("gcstate" in this))
-    quit();
-
 gczeal(0);
 
 // Non-incremental GC.
 gc();
 assertEq(gcstate(), "NotActive");
 
 // Incremental GC in minimal slice. Note that finalization always uses zero-
 // sized slices while background finalization is on-going, so we need to loop.
--- a/js/src/jit-test/tests/gc/oomInArrayProtoTest.js
+++ b/js/src/jit-test/tests/gc/oomInArrayProtoTest.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 function arrayProtoOutOfRange() {
     function f(obj) {
         return typeof obj[15];
     }
 
     function test() {
         var a = [1, 2];
--- a/js/src/jit-test/tests/gc/oomInByteSize.js
+++ b/js/src/jit-test/tests/gc/oomInByteSize.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => byteSize({}));
 oomTest(() => byteSize({ w: 1, x: 2, y: 3 }));
 oomTest(() => byteSize({ w:1, x:2, y:3, z:4, a:6, 0:0, 1:1, 2:2 }));
 oomTest(() => byteSize([1, 2, 3]));
 oomTest(() => byteSize(function () {}));
 
 function f1() {
--- a/js/src/jit-test/tests/gc/oomInDebugger.js
+++ b/js/src/jit-test/tests/gc/oomInDebugger.js
@@ -1,5 +1,4 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var g = newGlobal();
 oomTest(() => Debugger(g));
--- a/js/src/jit-test/tests/gc/oomInDtoa.js
+++ b/js/src/jit-test/tests/gc/oomInDtoa.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() { return 1e300; })
--- a/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js
+++ b/js/src/jit-test/tests/gc/oomInExceptionHandlerBailout.js
@@ -1,11 +1,9 @@
-if (!('oomTest' in this))
-    quit();
-
+// |jit-test| skip-if: !('oomTest' in this)
 oomTest(() => {
     let x = 0;
     try {
         for (let i = 0; i < 100; i++) {
             if (i == 99)
                 throw "foo";
             x += i;
         }
--- a/js/src/jit-test/tests/gc/oomInFindPath.js
+++ b/js/src/jit-test/tests/gc/oomInFindPath.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 var o = { w: { x: { y: { z: {} } } } };
 oomTest(() => findPath(o, o.w.x.y.z));
 
 var a = [ , o ];
 oomTest(() => findPath(a, o));
 
 function C() {}
--- a/js/src/jit-test/tests/gc/oomInFormatStackDump.js
+++ b/js/src/jit-test/tests/gc/oomInFormatStackDump.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => getBacktrace({args: true, locals: true, thisprops: true}));
--- a/js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js
+++ b/js/src/jit-test/tests/gc/oomInGetJumpLabelForBranch.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => getBacktrace({thisprops: gc() && delete addDebuggee.enabled}));
--- a/js/src/jit-test/tests/gc/oomInNewGlobal.js
+++ b/js/src/jit-test/tests/gc/oomInNewGlobal.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(newGlobal);
--- a/js/src/jit-test/tests/gc/oomInOffTheadCompile.js
+++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 oomTest(() => {
     offThreadCompileScript(
         `
         function f(x) {
             if (x == 0)
                 return "foobar";
             return 1 + f(x - 1);
--- a/js/src/jit-test/tests/gc/oomInOffTheadCompile2.js
+++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile2.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 oomTest(() => {
     offThreadCompileScript("function a(x) {");
     runOffThreadScript();
 });
--- a/js/src/jit-test/tests/gc/oomInOffTheadCompile3.js
+++ b/js/src/jit-test/tests/gc/oomInOffTheadCompile3.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this) || helperThreadCount() === 0)
-    quit();
+// |jit-test| skip-if: !('oomTest' in this) || helperThreadCount() === 0
 
 oomTest(() => {
     offThreadCompileScript(`
         function f(x) {
             class of extends ("ABCDEFGHIJK") {
                 test() { return true; };
                 static get() {};
                 static get() {};
--- a/js/src/jit-test/tests/gc/oomInParseAsmJS.js
+++ b/js/src/jit-test/tests/gc/oomInParseAsmJS.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 function parseAsmJS() {
     eval(`function m(stdlib)
           {
             "use asm";
             var abs = stdlib.Math.abs;
             function f(d)
             {
--- a/js/src/jit-test/tests/gc/oomInParseFunction.js
+++ b/js/src/jit-test/tests/gc/oomInParseFunction.js
@@ -1,4 +1,3 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => eval("function f() {}"));
--- a/js/src/jit-test/tests/gc/oomInRegExp.js
+++ b/js/src/jit-test/tests/gc/oomInRegExp.js
@@ -1,6 +1,5 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3));
 oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false));
 oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true));
--- a/js/src/jit-test/tests/gc/oomInRegExp2.js
+++ b/js/src/jit-test/tests/gc/oomInRegExp2.js
@@ -1,6 +1,5 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3), {keepFailing: true});
 oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false), {keepFailing: true});
 oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true), {keepFailing: true});
--- a/js/src/jit-test/tests/gc/oomInWeakMap.js
+++ b/js/src/jit-test/tests/gc/oomInWeakMap.js
@@ -1,7 +1,6 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function () {
     eval(`var wm = new WeakMap();
          wm.set({}, 'FOO').get(false);`);
 });