From d9f11af4bed20fd4466572d1762a2b7147a83d5c Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Mon, 5 Nov 2012 13:17:06 -0800 Subject: [PATCH] Bug 808067 - Change the compartments we iterate over when ending GC (r=jonco) --- js/src/jsgc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index abda88be0bd4..6a9af5bc9fe2 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -4154,12 +4154,12 @@ AutoGCSlice::AutoGCSlice(JSRuntime *rt) AutoGCSlice::~AutoGCSlice() { - for (GCCompartmentsIter c(runtime); !c.done(); c.next()) { + /* We can't use GCCompartmentsIter if this is the end of the last slice. */ + for (CompartmentsIter c(runtime); !c.done(); c.next()) { if (c->isGCMarking()) { c->setNeedsBarrier(true, JSCompartment::UpdateIon); c->arenas.prepareForIncrementalGC(runtime); } else { - JS_ASSERT(c->isGCSweeping()); c->setNeedsBarrier(false, JSCompartment::UpdateIon); } }