Bug 767230 - Don't trigger a GC in MaybeGC when we are still sweeping in the background. r=billm

This commit is contained in:
Gregor Wagner 2012-06-21 18:44:46 -07:00
parent 1f78b72cdd
commit e0fb5f76e3

View File

@ -2493,7 +2493,8 @@ MaybeGC(JSContext *cx)
JSCompartment *comp = cx->compartment;
if (comp->gcBytes > 8192 &&
comp->gcBytes >= 3 * (comp->gcTriggerBytes / 4) &&
rt->gcIncrementalState == NO_INCREMENTAL)
rt->gcIncrementalState == NO_INCREMENTAL &&
!rt->gcHelperThread.sweeping())
{
PrepareCompartmentForGC(comp);
GCSlice(rt, GC_NORMAL, gcreason::MAYBEGC);