mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1141563 - Don't update Shapes in parallel after compacting GC r=terrence
This commit is contained in:
parent
d8cd0f41bb
commit
535ee047bf
@ -2312,6 +2312,8 @@ struct ArenasToUpdate
|
||||
bool ArenasToUpdate::shouldProcessKind(AllocKind kind)
|
||||
{
|
||||
MOZ_ASSERT(kind < AllocKind::LIMIT);
|
||||
|
||||
// GC things that do not contain JSObject pointers don't need updating.
|
||||
if (kind == AllocKind::FAT_INLINE_STRING ||
|
||||
kind == AllocKind::STRING ||
|
||||
kind == AllocKind::EXTERNAL_STRING ||
|
||||
@ -2320,10 +2322,19 @@ bool ArenasToUpdate::shouldProcessKind(AllocKind kind)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (js::gc::IsBackgroundFinalized(kind))
|
||||
// We try to update as many GC things in parallel as we can, but there are
|
||||
// kinds for which this might not be safe:
|
||||
// - we assume JSObjects that are foreground finalized are not safe to
|
||||
// update in parallel
|
||||
// - updating a shape touches child shapes in fixupShapeTreeAfterMovingGC()
|
||||
if (js::gc::IsBackgroundFinalized(kind) &&
|
||||
kind != AllocKind::SHAPE &&
|
||||
kind != AllocKind::ACCESSOR_SHAPE)
|
||||
{
|
||||
return (kinds & BACKGROUND) != 0;
|
||||
else
|
||||
} else {
|
||||
return (kinds & FOREGROUND) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
ArenasToUpdate::ArenasToUpdate(Zone *zone, KindsToUpdate kinds)
|
||||
|
Loading…
Reference in New Issue
Block a user