mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1880171 - Fix assertion about GC finalization that doesn't hold. r=sfink
The issue here is that we can delete zones if we hit OOM during zone creation at which point the GC might also be doing foreground finalization, so the assertion doesn't hold. This is fine because we won't be finalizing arenas in this zone at this point. Instead we can move it to where we are sweeping zones at the end of GC, where it does hold. Differential Revision: https://phabricator.services.mozilla.com/D201984
This commit is contained in:
parent
9dc5b89f7d
commit
1aaacaeb4f
@ -2207,6 +2207,7 @@ void Compartment::sweepRealms(JS::GCContext* gcx, bool keepAtleastOne,
|
||||
|
||||
void GCRuntime::sweepZones(JS::GCContext* gcx, bool destroyingRuntime) {
|
||||
MOZ_ASSERT_IF(destroyingRuntime, numActiveZoneIters == 0);
|
||||
MOZ_ASSERT(foregroundFinalizedArenas.ref().isNothing());
|
||||
|
||||
if (numActiveZoneIters) {
|
||||
return;
|
||||
|
@ -235,8 +235,6 @@ void ReleaseArenaList(JSRuntime* rt, ArenaList& arenaList,
|
||||
}
|
||||
|
||||
ArenaLists::~ArenaLists() {
|
||||
MOZ_ASSERT(runtime()->gc.foregroundFinalizedArenas.ref().isNothing());
|
||||
|
||||
AutoLockGC lock(runtime());
|
||||
|
||||
for (auto i : AllAllocKinds()) {
|
||||
|
Loading…
Reference in New Issue
Block a user