1373067 - Ensure CC isn't started too often

1373067 - Ensure CC isn't started too often.
This commit is contained in:
win7-7 2024-04-27 15:10:04 +03:00 committed by wuggy
commit 50944ecb18

View file

@ -2108,6 +2108,12 @@ nsJSContext::MaybePokeCC()
return;
}
uint32_t sinceLastCCEnd = TimeUntilNow(sLastCCEndTime);
if (sinceLastCCEnd && sinceLastCCEnd < NS_CC_DELAY) {
return;
}
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
sCCRunnerFireCount = 0;