Revert "1376614 - Pass budget to forgetSkippable and return early when budget has been used"

This reverts commit d28a0aef504d68c33220c5358b2f12b7e891d304.
This commit is contained in:
win7-7 2026-01-28 20:07:23 +02:00 committed by wuggy
commit 4890ee7978
3 changed files with 18 additions and 50 deletions

View file

@ -1325,13 +1325,7 @@ FireForgetSkippable(uint32_t aSuspected, bool aRemoveChildless,
FinishAnyIncrementalGC();
bool earlyForgetSkippable =
sCleanupsSinceLastGC < NS_MAJOR_FORGET_SKIPPABLE_CALLS;
int64_t budgetMs = aDeadline.IsNull() ?
kForgetSkippableSliceDuration :
int64_t((aDeadline - TimeStamp::Now()).ToMilliseconds());
js::SliceBudget budget = js::SliceBudget(js::TimeBudget(budgetMs));
nsCycleCollector_forgetSkippable(budget, aRemoveChildless, earlyForgetSkippable);
nsCycleCollector_forgetSkippable(aRemoveChildless, earlyForgetSkippable);
sPreviousSuspectedCount = nsCycleCollector_suspectedCount();
++sCleanupsSinceLastGC;
PRTime delta = PR_Now() - startTime;