Bug 957110 - Don't assert nursery start address when then nursery is disabled r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Fri, 10 Jan 2014 15:34:25 +0000
changeset 162960 cbe9f7791348460899a877bfe8068ef6d5799b4c
parent 162959 3f4308d223cf7c350c240f96f67c0680ae829799
child 162961 3336288cfca8925a7a05a7490a28445d58ca91db
push id25975
push userryanvm@gmail.com
push dateFri, 10 Jan 2014 19:46:47 +0000
treeherderautoland@e89afc241513 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs957110
milestone29.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 957110 - Don't assert nursery start address when then nursery is disabled r=terrence
js/src/gc/Nursery.cpp
js/src/jit-test/tests/gc/bug-957110.js
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -98,18 +98,20 @@ js::Nursery::disable()
     numActiveChunks_ = 0;
     currentEnd_ = 0;
 }
 
 bool
 js::Nursery::isEmpty() const
 {
     JS_ASSERT(runtime_);
+    if (!isEnabled())
+        return true;
     JS_ASSERT_IF(runtime_->gcZeal_ != ZealGenerationalGCValue, currentStart_ == start());
-    return !isEnabled() || position() == currentStart_;
+    return position() == currentStart_;
 }
 
 void *
 js::Nursery::allocate(size_t size)
 {
     JS_ASSERT(isEnabled());
     JS_ASSERT(!runtime()->isHeapBusy());
 
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-957110.js
@@ -0,0 +1,6 @@
+gczeal(7,1);
+try {
+gcparam("maxBytes", gcparam("gcBytes") + 4*1024);
+newGlobal("same-compartment");
+} catch(exc1) {}
+gczeal(1);