Bug 1548146 - Tweak sLastForgetSkippableCycleEndTime handling to be able to check two tasks within < 1ms, r=mccr8

--HG--
extra : rebase_source : a4d82ac6cbac8d58b091565cb8ccc4c12d71fcde
This commit is contained in:
Olli Pettay 2019-05-01 01:41:06 +03:00
Родитель 02cf69641a
Коммит 8450c835d5
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -2066,11 +2066,11 @@ void nsJSContext::MaybePokeCC() {
// If GC hasn't run recently and forget skippable only cycle was run, // If GC hasn't run recently and forget skippable only cycle was run,
// don't start a new cycle too soon. // don't start a new cycle too soon.
if (sCleanupsSinceLastGC > NS_MAJOR_FORGET_SKIPPABLE_CALLS) { if ((sCleanupsSinceLastGC > NS_MAJOR_FORGET_SKIPPABLE_CALLS) &&
!sLastForgetSkippableCycleEndTime.IsNull()) {
uint32_t sinceLastForgetSkippableCycle = uint32_t sinceLastForgetSkippableCycle =
TimeUntilNow(sLastForgetSkippableCycleEndTime); TimeUntilNow(sLastForgetSkippableCycleEndTime);
if (sinceLastForgetSkippableCycle && if (sinceLastForgetSkippableCycle <
sinceLastForgetSkippableCycle <
NS_TIME_BETWEEN_FORGET_SKIPPABLE_CYCLES) { NS_TIME_BETWEEN_FORGET_SKIPPABLE_CYCLES) {
return; return;
} }