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

This commit is contained in:
Olli Pettay 2019-05-01 23:23:24 +03:00
Родитель 4c793a1728
Коммит 2d3a4fc4ab
1 изменённых файлов: 5 добавлений и 3 удалений

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

@ -2059,9 +2059,11 @@ void nsJSContext::MaybePokeCC() {
return;
}
uint32_t sinceLastCCEnd = TimeUntilNow(sLastCCEndTime);
if (sinceLastCCEnd && sinceLastCCEnd < NS_CC_DELAY) {
return;
if (!sLastCCEndTime.IsNull()) {
uint32_t sinceLastCCEnd = TimeUntilNow(sLastCCEndTime);
if (sinceLastCCEnd < NS_CC_DELAY) {
return;
}
}
// If GC hasn't run recently and forget skippable only cycle was run,