Bug 1736396 - Fix SweepingTracer to work correctly on things in zones that are not being swept r=sfink

Most of the time we only sweep things in zones that are being swept, but there
are a couple of places where this isn't true. This fixes the sweeping tracer to
take account of that.

Differential Revision: https://phabricator.services.mozilla.com/D128758
This commit is contained in:
Jon Coppeard 2021-10-19 08:43:20 +00:00
Родитель c8821c3179
Коммит 03ccf4bce6
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -2875,12 +2875,12 @@ inline T* SweepingTracer::onEdge(T* thing) {
return thing;
}
// TODO: We should assert the zone of the tenured cell is in Sweeping state,
// however we need to fix atoms and JitcodeGlobalTable first.
// Bug 1501334 : IsAboutToBeFinalized doesn't work for atoms
// Bug 1071218 : Refactor Debugger::sweepAll and
// JitRuntime::SweepJitcodeGlobalTable to work per sweep group
if (!thing->isMarkedAny()) {
// It would be nice if we could assert that the zone of the tenured cell is in
// the Sweeping state, but that isn't always true for:
// - atoms
// - the jitcode map
// - the mark queue
if (thing->zoneFromAnyThread()->isGCSweeping() && !thing->isMarkedAny()) {
return nullptr;
}