mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 904282 - Don't mark atoms during last GC (r=jonco)
This commit is contained in:
parent
5f588a74e9
commit
ddad590f83
@ -687,19 +687,17 @@ js::gc::MarkRuntime(JSTracer *trc, bool useSavedRoots)
|
|||||||
MarkScriptRoot(trc, &vec[i].script, "scriptAndCountsVector");
|
MarkScriptRoot(trc, &vec[i].script, "scriptAndCountsVector");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!trc->runtime->isHeapMinorCollecting() &&
|
if (rt->hasContexts() &&
|
||||||
|
!trc->runtime->isHeapMinorCollecting() &&
|
||||||
(!IS_GC_MARKING_TRACER(trc) || rt->atomsCompartment()->zone()->isCollecting()))
|
(!IS_GC_MARKING_TRACER(trc) || rt->atomsCompartment()->zone()->isCollecting()))
|
||||||
{
|
{
|
||||||
MarkAtoms(trc);
|
MarkAtoms(trc);
|
||||||
|
rt->staticStrings.trace(trc);
|
||||||
#ifdef JS_ION
|
#ifdef JS_ION
|
||||||
/* Any Ion wrappers survive until the runtime is being torn down. */
|
ion::IonRuntime::Mark(trc);
|
||||||
if (rt->hasContexts())
|
|
||||||
ion::IonRuntime::Mark(trc);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
rt->staticStrings.trace(trc);
|
|
||||||
|
|
||||||
for (ContextIter acx(rt); !acx.done(); acx.next())
|
for (ContextIter acx(rt); !acx.done(); acx.next())
|
||||||
acx->mark(trc);
|
acx->mark(trc);
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ js::SweepAtoms(JSRuntime *rt)
|
|||||||
bool isDying = IsStringAboutToBeFinalized(&atom);
|
bool isDying = IsStringAboutToBeFinalized(&atom);
|
||||||
|
|
||||||
/* Pinned or interned key cannot be finalized. */
|
/* Pinned or interned key cannot be finalized. */
|
||||||
JS_ASSERT_IF(entry.isTagged(), !isDying);
|
JS_ASSERT_IF(rt->hasContexts() && entry.isTagged(), !isDying);
|
||||||
|
|
||||||
if (isDying)
|
if (isDying)
|
||||||
e.removeFront();
|
e.removeFront();
|
||||||
|
Loading…
Reference in New Issue
Block a user