зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1398423 - Fix LabeledEventQueue bug with unlabeled events (r=froydnj)
MozReview-Commit-ID: 7ru62QTkya2
This commit is contained in:
Родитель
b9683a5b18
Коммит
0f4e7d4fe6
|
@ -162,13 +162,15 @@ LabeledEventQueue::GetEvent(EventPriority* aPriority,
|
|||
Epoch epoch = mEpochs.FirstElement();
|
||||
if (!epoch.IsLabeled()) {
|
||||
QueueEntry entry = mUnlabeled.FirstElement();
|
||||
if (IsReadyToRun(entry.mRunnable, nullptr)) {
|
||||
PopEpoch();
|
||||
mUnlabeled.Pop();
|
||||
MOZ_ASSERT(entry.mEpochNumber == epoch.mEpochNumber);
|
||||
MOZ_ASSERT(entry.mRunnable.get());
|
||||
return entry.mRunnable.forget();
|
||||
if (!IsReadyToRun(entry.mRunnable, nullptr)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PopEpoch();
|
||||
mUnlabeled.Pop();
|
||||
MOZ_ASSERT(entry.mEpochNumber == epoch.mEpochNumber);
|
||||
MOZ_ASSERT(entry.mRunnable.get());
|
||||
return entry.mRunnable.forget();
|
||||
}
|
||||
|
||||
if (!sCurrentSchedulerGroup) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче