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:
Karl Tomlinson 2023-06-26 21:52:50 +00:00
Родитель 5749d47352
Коммит a3c1002422
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -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);