зеркало из https://github.com/mozilla/gecko-dev.git
Bug 984537 - Keep JIT code around for compartments on the stack when triggering GC, r=jandem.
This commit is contained in:
Родитель
3b258ba0d5
Коммит
5bb9404b74
|
@ -1221,6 +1221,14 @@ MarkJitActivations(JSRuntime *rt, JSTracer *trc)
|
|||
MarkJitActivation(trc, activations);
|
||||
}
|
||||
|
||||
JSCompartment *
|
||||
TopmostJitActivationCompartment(JSRuntime *rt)
|
||||
{
|
||||
for (JitActivationIterator activations(rt); !activations.done(); ++activations)
|
||||
return activations.activation()->compartment();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
void
|
||||
UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc)
|
||||
|
|
|
@ -268,6 +268,9 @@ void EnsureExitFrame(IonCommonFrameLayout *frame);
|
|||
void MarkJitActivations(JSRuntime *rt, JSTracer *trc);
|
||||
void MarkIonCompilerRoots(JSTracer *trc);
|
||||
|
||||
JSCompartment *
|
||||
TopmostJitActivationCompartment(JSRuntime *rt);
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
void UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc);
|
||||
#endif
|
||||
|
|
|
@ -2770,6 +2770,11 @@ BeginMarkPhase(JSRuntime *rt)
|
|||
c->zone()->setPreservingCode(true);
|
||||
}
|
||||
|
||||
if (!rt->gcShouldCleanUpEverything) {
|
||||
if (JSCompartment *comp = jit::TopmostJitActivationCompartment(rt))
|
||||
comp->zone()->setPreservingCode(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Atoms are not in the cross-compartment map. So if there are any
|
||||
* zones that are not being collected, we are not allowed to collect
|
||||
|
|
Загрузка…
Ссылка в новой задаче