Bug 1468112 - Use runnable name also for IdleTaskRunner's timer, r=farre

This commit is contained in:
Olli Pettay 2018-06-12 12:17:08 +03:00
Родитель 0300566d26
Коммит bad979936f
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -42,6 +42,7 @@ IdleTaskRunner::IdleTaskRunner(const CallbackType& aCallback,
, mRepeating(aRepeating), mTimerActive(false)
, mMayStopProcessing(aMayStopProcessing)
, mTaskCategory(aTaskCategory)
, mName(aRunnableName)
{
}
@ -159,7 +160,7 @@ IdleTaskRunner::Schedule(bool aAllowIdleDispatch)
// short timeout.
mScheduleTimer->InitWithNamedFuncCallback(ScheduleTimedOut, this, 16,
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,
"IdleTaskRunner");
mName);
}
}
}
@ -201,7 +202,7 @@ IdleTaskRunner::SetTimerInternal(uint32_t aDelay)
}
mTimer->InitWithNamedFuncCallback(TimedOut, this, aDelay,
nsITimer::TYPE_ONE_SHOT,
"IdleTaskRunner");
mName);
mTimerActive = true;
}
}

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

@ -67,6 +67,7 @@ private:
bool mTimerActive;
MayStopProcessingCallbackType mMayStopProcessing;
TaskCategory mTaskCategory;
const char* mName;
};
} // end of namespace mozilla.