Bug 1575794 - Fix INCREMENTAL_TOO_SLOW trigger to check the non-incremental threshold r=sfink

I missed changing this when I changed the threshold to be the incremental trigger rather than the non-incremental one. I'm not entirely sure we need this chech at all - I think it will only happen in the case where we've requested a non-incremental GC but the interrupt hasn't caused one to run yet.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jon Coppeard 2019-08-23 16:02:46 +00:00
Родитель 39041986c7
Коммит 7766340a8a
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -368,12 +368,13 @@ bool GCRuntime::gcIfNeededAtAllocation(JSContext* cx) {
gcIfRequested();
}
// If we have grown past our GC heap threshold while in the middle of
// an incremental GC, we're growing faster than we're GCing, so stop
// If we have grown past our non-incremental heap threshold while in the
// middle of an incremental GC, we're growing faster than we're GCing, so stop
// the world and do a full, non-incremental GC right now, if possible.
Zone* zone = cx->zone();
if (isIncrementalGCInProgress() &&
zone->gcHeapSize.bytes() > zone->gcHeapThreshold.bytes()) {
zone->gcHeapSize.bytes() >
zone->gcHeapThreshold.nonIncrementalTriggerBytes(tunables)) {
PrepareZoneForGC(cx->zone());
gc(GC_NORMAL, JS::GCReason::INCREMENTAL_TOO_SLOW);
}