Ensure that we are using the same IonCompartment throughout the lifetime of an AFC(bug 792873, r=jandem)

This commit is contained in:
Marty Rosenberg 2012-11-08 11:14:27 -05:00
parent b34e1892f6
commit b242cbda2f
3 changed files with 6 additions and 6 deletions

View File

@ -1701,9 +1701,9 @@ ion::InvalidateAll(FreeOp *fop, JSCompartment *c)
CancelOffThreadIonCompile(c, NULL);
FinishAllOffThreadCompilations(c->ionCompartment());
for (IonActivationIterator iter(fop->runtime()); iter.more(); ++iter) {
if (iter.activation()->compartment() == c) {
IonContext ictx(NULL, c, NULL);
AutoFlushCache afc ("InvalidateAll", c->ionCompartment());
IonSpew(IonSpew_Invalidate, "Invalidating all frames for GC");
InvalidateActivation(fop, iter.top(), true);
@ -1875,10 +1875,8 @@ AutoFlushCache::AutoFlushCache(const char *nonce, IonCompartment *comp)
name_(nonce),
used_(false)
{
if (comp == NULL) {
if (CurrentIonContext() != NULL)
comp = GetIonContext()->compartment->ionCompartment();
}
if (CurrentIonContext() != NULL)
comp = GetIonContext()->compartment->ionCompartment();
// If a compartment isn't available, then be a nop, nobody will ever see this flusher
if (comp) {
if (comp->flusher())

View File

@ -230,6 +230,8 @@ ion::CheckLogging()
EnableChannel(IonSpew_Safepoints);
if (ContainsFlag(env, "pools"))
EnableChannel(IonSpew_Pools);
if (ContainsFlag(env, "cacheflush"))
EnableChannel(IonSpew_CacheFlush);
if (ContainsFlag(env, "logs"))
EnableIonDebugLogging();
if (ContainsFlag(env, "all"))

View File

@ -72,7 +72,6 @@ struct EnterJITStack
IonCode *
IonCompartment::generateEnterJIT(JSContext *cx)
{
AutoFlushCache afc("GenerateEnterJIT", cx->compartment->ionCompartment());
const Register reg_code = r0;
const Register reg_argc = r1;
@ -85,6 +84,7 @@ IonCompartment::generateEnterJIT(JSContext *cx)
JS_ASSERT(OsrFrameReg == reg_frame);
MacroAssembler masm(cx);
AutoFlushCache afc("GenerateEnterJIT", cx->compartment->ionCompartment());
Assembler *aasm = &masm;
// Save non-volatile registers. These must be saved by the trampoline,