Bug 1499473: Simplify TabGroup a bit, now that ThrottledEventQueue::Create is infallible. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D8915

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jim Blandy 2018-10-17 20:41:59 +00:00
Родитель ce7824933d
Коммит 9ac840bc86
1 изменённых файлов: 1 добавлений и 6 удалений

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

@ -85,12 +85,7 @@ TabGroup::EnsureThrottledEventQueues()
for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
TaskCategory category = static_cast<TaskCategory>(i);
if (category == TaskCategory::Worker || category == TaskCategory::Timer) {
nsCOMPtr<nsISerialEventTarget> target = ThrottledEventQueue::Create(mEventTargets[i]);
if (target) {
// This may return nullptr during xpcom shutdown. This is ok as we
// do not guarantee a ThrottledEventQueue will be present.
mEventTargets[i] = target;
}
mEventTargets[i] = ThrottledEventQueue::Create(mEventTargets[i]);
}
}
}