Bug 1191756: Improve tests to not always exit with status 3 (OOM); r=jonco
authorBenjamin Bouvier <benj@benj.me>
Thu, 13 Aug 2015 17:28:48 +0200
changeset 257599 20c9570b07342a00d881cfb606695d1608626b16
parent 257598 02d10fc80c18619b3f4d180dde166aa8cb296d17
child 257600 e15f2c2caaff757e8c3722cc9cfd5aae53f8a309
push id29223
push userkwierso@gmail.com
push dateThu, 13 Aug 2015 22:18:08 +0000
treeherdermozilla-central@4b35236fc76e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1191756
milestone43.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 1191756: Improve tests to not always exit with status 3 (OOM); r=jonco
js/src/jit-test/tests/gc/bug1191756.js
js/src/jit-test/tests/ion/scalar-replacement-oom.js
js/src/jspropertytree.h
--- a/js/src/jit-test/tests/gc/bug1191756.js
+++ b/js/src/jit-test/tests/gc/bug1191756.js
@@ -1,18 +1,19 @@
-// |jit-test| exitstatus: 3
-
 if (typeof 'oomAtAllocation' === 'undefined')
-    quit(3);
+    quit();
 
 function fn(i) {
     if (i == 3)
       return ["isFinite"].map(function (i) {});
     return [];
 }
 
-fn(0);
-fn(1);
-fn(2);
-oomAtAllocation(50);
-fn(3);
+try {
+    fn(0);
+    fn(1);
+    fn(2);
+    oomAtAllocation(50);
+    fn(3);
+} catch(e) {
+    // Ignore oom
+}
 
-quit(3);
--- a/js/src/jit-test/tests/ion/scalar-replacement-oom.js
+++ b/js/src/jit-test/tests/ion/scalar-replacement-oom.js
@@ -1,22 +1,23 @@
-// |jit-test| exitstatus: 3
 if (typeof oomAtAllocation !== 'function')
-    quit(3);
+    quit();
 
 var lfcode = new Array();
 function k(a, f_arg, b, c) {
     for (var i = 0; i < 5; ++i) {
         f_arg(i + a);
     }
 }
 function t() {
     var x = 2;
     k(50, function(i) {
         x = i;
     }, 100, 200);
     oomAtAllocation(101);
 }
 
-t();
-t();
-
-quit(3);
+try {
+    t();
+    t();
+} catch(e) {
+    // ignore the exception
+}
--- a/js/src/jspropertytree.h
+++ b/js/src/jspropertytree.h
@@ -91,14 +91,14 @@ class PropertyTree
 
     explicit PropertyTree(JSCompartment* comp)
         : compartment_(comp)
     {
     }
 
     JSCompartment* compartment() { return compartment_; }
 
-    Shape* getChild(ExclusiveContext* cx, Shape* parent, Handle<StackShape> child);
+    Shape* getChild(ExclusiveContext* cx, Shape* parent, JS::Handle<StackShape> child);
 };
 
 } /* namespace js */
 
 #endif /* jspropertytree_h */