mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 06:18:38 +09:00
1376614 - Pass budget to forgetSkippable and return early when budget has been used
1376614 - Pass budget to forgetSkippable and return early when budget has been used,
This commit is contained in:
parent
50944ecb18
commit
d3450c11de
3 changed files with 50 additions and 18 deletions
|
|
@ -1325,7 +1325,13 @@ FireForgetSkippable(uint32_t aSuspected, bool aRemoveChildless)
|
|||
FinishAnyIncrementalGC();
|
||||
bool earlyForgetSkippable =
|
||||
sCleanupsSinceLastGC < NS_MAJOR_FORGET_SKIPPABLE_CALLS;
|
||||
nsCycleCollector_forgetSkippable(aRemoveChildless, earlyForgetSkippable);
|
||||
|
||||
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);
|
||||
|
||||
sPreviousSuspectedCount = nsCycleCollector_suspectedCount();
|
||||
++sCleanupsSinceLastGC;
|
||||
PRTime delta = PR_Now() - startTime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue