Bug 783421 - Need to clear the right JIT code when setting GC zeal (r=dvander)

This commit is contained in:
Bill McCloskey 2012-08-17 18:47:55 -07:00
parent 3ffef35751
commit 8b90d77703

View File

@ -7117,16 +7117,16 @@ JS_SetGCZeal(JSContext *cx, uint8_t zeal, uint32_t frequency)
VerifyBarriers(rt, PostBarrierVerifier);
}
bool schedule = zeal >= js::gc::ZealAllocValue;
rt->gcZeal_ = zeal;
rt->gcZealFrequency = frequency;
rt->gcNextScheduled = schedule ? frequency : 0;
#ifdef JS_METHODJIT
/* In case JSCompartment::compileBarriers() changed... */
for (CompartmentsIter c(rt); !c.done(); c.next())
mjit::ClearAllFrames(c);
#endif
bool schedule = zeal >= js::gc::ZealAllocValue;
rt->gcZeal_ = zeal;
rt->gcZealFrequency = frequency;
rt->gcNextScheduled = schedule ? frequency : 0;
}
JS_PUBLIC_API(void)