Bug 1009957 - Suppress GC during bailouts. r=nbp

This commit is contained in:
Jan de Mooij 2014-05-23 14:39:30 +02:00
Родитель ea3a5a9735
Коммит b399168e3f
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -76,6 +76,8 @@ jit::Bailout(BailoutStack *sp, BaselineBailoutInfo **bailoutInfo)
// We don't have an exit frame.
cx->mainThread().jitTop = nullptr;
gc::AutoSuppressGC suppress(cx);
JitActivationIterator jitActivations(cx->runtime());
IonBailoutIterator iter(jitActivations, sp);
JitActivation *activation = jitActivations->asJit();
@ -110,6 +112,8 @@ jit::InvalidationBailout(InvalidationBailoutStack *sp, size_t *frameSizeOut,
// We don't have an exit frame.
cx->mainThread().jitTop = nullptr;
gc::AutoSuppressGC suppress(cx);
JitActivationIterator jitActivations(cx->runtime());
IonBailoutIterator iter(jitActivations, sp);
JitActivation *activation = jitActivations->asJit();
@ -178,6 +182,8 @@ jit::ExceptionHandlerBailout(JSContext *cx, const InlineFrameIterator &frame,
MOZ_ASSERT_IF(!excInfo.propagatingIonExceptionForDebugMode(), cx->isExceptionPending());
cx->mainThread().jitTop = nullptr;
gc::AutoSuppressGC suppress(cx);
JitActivationIterator jitActivations(cx->runtime());
IonBailoutIterator iter(jitActivations, frame.frame());
JitActivation *activation = jitActivations->asJit();

Просмотреть файл

@ -1262,6 +1262,10 @@ jit::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
bool invalidate, BaselineBailoutInfo **bailoutInfo,
const ExceptionBailoutInfo *excInfo)
{
// The Baseline frames we will reconstruct on the heap are not rooted, so GC
// must be suppressed here.
JS_ASSERT(cx->mainThread().suppressGC);
JS_ASSERT(bailoutInfo != nullptr);
JS_ASSERT(*bailoutInfo == nullptr);