This field: /* Number of zones collected in this GC. */ int collectedZoneCount = 0; Is used here: bool isFullCollection() const { return collectedZoneCount == collectableZoneCount; } Both of these fields are computed in GCRuntime::scanZonesBeforeGC: if (zone->canCollect()) { zoneStats.collectableZoneCount++; } if (zone->isGCScheduled()) { zoneStats.collectedZoneCount++; ... It's possible however for a zone to have isGCScheduled() with canCollect() == false (via JS::PrepareForFullGC for example). This can result in repeatedly triggering full GCs in Gecko: https://searchfox.org/mozilla-central/rev/93905b660fc99a5d52b683690dd26471daca08c8/dom/base/nsJSEnvironment.cpp#2214
Bug 1529265 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This field: ``` /* Number of zones collected in this GC. */ int collectedZoneCount = 0; ``` Is used here: ``` bool isFullCollection() const { return collectedZoneCount == collectableZoneCount; } ``` Both of these fields are computed in GCRuntime::scanZonesBeforeGC: ``` if (zone->canCollect()) { zoneStats.collectableZoneCount++; } if (zone->isGCScheduled()) { zoneStats.collectedZoneCount++; ... ``` It's possible however for a zone to have isGCScheduled() with canCollect() == false (via JS::PrepareForFullGC for example). This can result in repeatedly triggering full GCs in Gecko: https://searchfox.org/mozilla-central/rev/93905b660fc99a5d52b683690dd26471daca08c8/dom/base/nsJSEnvironment.cpp#2214