Bug 1311425, review comment fix to ensure low priority timers aren't taken into account when calling NS_GetTimerDeadlineHintOnCurrentThread, r=smaug

This commit is contained in:
Olli Pettay 2017-05-26 09:13:39 -04:00
Родитель d9d7f6e11e
Коммит 2c06db876d
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -608,15 +608,15 @@ TimerThread::FindNextFireTimeForCurrentThread(TimeStamp aDefault, uint32_t aSear
break;
}
// Track the currently highest timeout so that we can bail when we
// reach the bound or when we find a timer for the current thread.
timeStamp = timer->mTimeout;
// Don't yield to timers created with the *_LOW_PRIORITY type.
if (timer->IsLowPriority()) {
continue;
}
// Track the currently highest timeout so that we can bail when we
// reach the bound or when we find a timer for the current thread.
timeStamp = timer->mTimeout;
bool isOnCurrentThread = false;
nsresult rv = timer->mEventTarget->IsOnCurrentThread(&isOnCurrentThread);
if (NS_WARN_IF(NS_FAILED(rv))) {