зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1840313 fetch and remove the first element of queue in one operation r=emilio
The two-step logic was left over from a previous std::queue implementation. https://hg.mozilla.org/mozilla-central/rev/4534179de22c013eb97e8226a538096d7a648721#l2.36 Depends on D181966 Differential Revision: https://phabricator.services.mozilla.com/D181967
This commit is contained in:
Родитель
5749d47352
Коммит
a3c1002422
|
@ -238,8 +238,7 @@ nsresult TaskQueue::Runner::Run() {
|
|||
mon.NotifyAll();
|
||||
return NS_OK;
|
||||
}
|
||||
event = std::move(mQueue->mTasks.FirstElement());
|
||||
mQueue->mTasks.Pop();
|
||||
event = mQueue->mTasks.Pop();
|
||||
}
|
||||
MOZ_ASSERT(event.event);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче