Bug 1575895 - Don't start GC slices due to malloc allocation if we're already collecting the zone r=sfink

At some point we can think about triggering incremental slices here the way we do for the GC heap allocations but for now it's simplest to just not trigger any more slices if we're already allocating.

Differential Revision: https://phabricator.services.mozilla.com/D43099

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jon Coppeard 2019-08-23 16:03:08 +00:00
parent 146731f270
commit e6728a8a36

View File

@ -2985,6 +2985,14 @@ bool GCRuntime::maybeMallocTriggerZoneGC(Zone* zone, const HeapSize& heap,
return false;
}
// Don't start subsequent incremental slices if we're already collecting this
// zone. This is different to our behaviour for GC allocation in
// maybeAllocTriggerZoneGC.
if (zone->wasGCStarted()) {
MOZ_ASSERT(isIncrementalGCInProgress());
return false;
}
// Start or continue an in progress incremental GC.
triggerZoneGC(zone, reason, usedBytes, thresholdBytes);
return true;