Bug 808067 - Toggle Ion barriers when resetting incremental GC (r=sstangl)
authorBill McCloskey <wmccloskey@mozilla.com>
Mon, 05 Nov 2012 13:16:22 -0800
changeset 112352 5c5e4097dd20b5fc8b8dbcd6a0bdae83ee9142cd
parent 112351 5bd42ae5efd23bb82e6891055bbab7f74b5708ea
child 112353 f458467cc2cf2eadd74f0ac2d2b6c61d9b4968f1
push id23812
push useremorley@mozilla.com
push dateTue, 06 Nov 2012 14:01:34 +0000
treeherdermozilla-central@f4aeed115e54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs808067
milestone19.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 808067 - Toggle Ion barriers when resetting incremental GC (r=sstangl)
js/src/jit-test/tests/basic/bug808067.js
js/src/jsgc.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug808067.js
@@ -0,0 +1,19 @@
+function TestCase(n, d, e, a)
+  this.reason = '';
+function reportCompare (expected, actual, description) {
+  var output = "";
+  var testcase = new TestCase("unknown-test-name", description, expected, actual);
+  testcase.reason = output;
+}
+gcPreserveCode();
+var summary = 'return with argument and lazy generator detection';
+expect = "generator function foo returns a value";
+actual = (function (j)  {}).message;
+reportCompare(expect, actual, summary + ": 1");
+reportCompare(expect, actual, summary + ": 2");
+gcslice(0);
+gcslice(1);
+gc();
+var strings = [ (0), ];
+for (var i = 0; i < strings.length; i++)
+  reportCompare(expect, actual, summary + (5e1) + strings[i]);
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -4074,17 +4074,17 @@ ResetIncrementalGC(JSRuntime *rt, const 
         return;
 
     /* Cancel and ongoing marking. */
     bool wasMarking = false;
     {
         AutoCopyFreeListToArenas copy(rt);
         for (GCCompartmentsIter c(rt); !c.done(); c.next()) {
             if (c->isGCMarking()) {
-                c->setNeedsBarrier(false, JSCompartment::DontUpdateIon);
+                c->setNeedsBarrier(false, JSCompartment::UpdateIon);
                 c->setGCState(JSCompartment::NoGC);
                 wasMarking = true;
             }
         }
     }
 
     if (wasMarking)
         rt->gcMarker.reset();