Bug 1203814 - "Adding a testing function causes intermittent orange in oomInFormatStackDump.js on Win32 debug SM(p)." r=jcoppeard
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 11 Sep 2015 03:53:00 +0200
changeset 294914 7441b33a26e71618d60848d31e2f461e1a2f6c71
parent 294913 a0ce99dca83452491e41c5941771862d41727af6
child 294915 9a3bfacb1a093a26e6dc3532182875ba4b1dbccb
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcoppeard
bugs1203814
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 1203814 - "Adding a testing function causes intermittent orange in oomInFormatStackDump.js on Win32 debug SM(p)." r=jcoppeard
js/src/jit-test/lib/oomTest.js
--- a/js/src/jit-test/lib/oomTest.js
+++ b/js/src/jit-test/lib/oomTest.js
@@ -4,27 +4,31 @@
 const verbose = false;
 
 if (!("oomAtAllocation" in this && "resetOOMFailure" in this))
     quit();
 
 if ("gczeal" in this)
     gczeal(0);
 
+// Test out of memory handing by calling a function f() while causing successive
+// memory allocations to fail.  Repeat until f() finishes without reaching the
+// failing allocation.
 function oomTest(f) {
     var i = 1;
     var more;
     do {
         if (verbose)
             print("fail at " + i);
         try {
             oomAtAllocation(i);
             f();
+            more = resetOOMFailure();
         } catch (e) {
             // Ignore exceptions.
+            more = resetOOMFailure();
         }
-        more = resetOOMFailure();
         i++;
     } while(more);
 
     if (verbose)
         print("finished after " + i);
 }