Bug 1202667 - make TaskQueue task running slightly more efficient; r=mccr8

We can transfer the reference out of the queue of runnables instead of
taking a new reference right before we drop the old one.
This commit is contained in:
Nathan Froyd 2015-09-07 20:02:16 -04:00
Родитель fbb4e33fce
Коммит 444fb07360
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -155,7 +155,7 @@ TaskQueue::Runner::Run()
mon.NotifyAll();
return NS_OK;
}
event = mQueue->mTasks.front();
event = mQueue->mTasks.front().forget();
mQueue->mTasks.pop();
}
MOZ_ASSERT(event);