Bug 1384215 - Try to run deferred deletion more likely during idle time, r=mccr8

--HG--
extra : rebase_source : 0dd6ec9641e323959a454d812a9d2f15b1d02982
This commit is contained in:
Olli Pettay 2017-07-25 22:22:12 +03:00
Родитель 4d36acb0f4
Коммит 866053df7a
2 изменённых файлов: 10 добавлений и 5 удалений

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

@ -2090,10 +2090,15 @@ CCRunnerFired(TimeStamp aDeadline, void* aData)
// Our efforts to avoid a CC have failed, so we return to let the
// timer fire once more to trigger a CC.
// Clear content unbinder before the first CC slice.
Element::ClearContentUnbinder();
// And trigger deferred deletion too.
nsCycleCollector_doDeferredDeletion();
if (!aDeadline.IsNull() && TimeStamp::Now() < aDeadline) {
// Clear content unbinder before the first CC slice.
Element::ClearContentUnbinder();
if (TimeStamp::Now() < aDeadline) {
// And trigger deferred deletion too.
nsCycleCollector_doDeferredDeletion();
}
}
return didDoWork;
}
} else {

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

@ -140,7 +140,7 @@ public:
nsresult Dispatch()
{
nsCOMPtr<nsIRunnable> self(this);
return NS_IdleDispatchToCurrentThread(self.forget(), 1000);
return NS_IdleDispatchToCurrentThread(self.forget(), 2500);
}
void Start(bool aContinuation = false, bool aPurge = false)