зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448053 - be more efficient in MessageChannel::RepostAllMessages; r=jld
Once we've figured out that some task needs to be reposted, there's no reason to continue scanning the list to find other tasks that need to be reposted, since the logic in this function just requires one task that needs to be reposted.
This commit is contained in:
Родитель
2ef480f239
Коммит
94df69d8f2
|
@ -2855,6 +2855,7 @@ MessageChannel::RepostAllMessages()
|
|||
for (MessageTask* task : mPending) {
|
||||
if (!task->IsScheduled()) {
|
||||
needRepost = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!needRepost) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче