summaryrefslogtreecommitdiffstats
path: root/dom/webscheduling
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webscheduling')
-rw-r--r--dom/webscheduling/WebTaskScheduler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/dom/webscheduling/WebTaskScheduler.cpp b/dom/webscheduling/WebTaskScheduler.cpp
index b6fa749095..46ece9793c 100644
--- a/dom/webscheduling/WebTaskScheduler.cpp
+++ b/dom/webscheduling/WebTaskScheduler.cpp
@@ -291,9 +291,8 @@ WebTask* WebTaskScheduler::GetNextTask() const {
return nullptr;
}
- for (uint32_t priority = static_cast<uint32_t>(TaskPriority::User_blocking);
- priority < static_cast<uint32_t>(TaskPriority::EndGuard_); ++priority) {
- if (auto queues = allQueues.Lookup(priority)) {
+ for (TaskPriority priority : MakeWebIDLEnumeratedRange<TaskPriority>()) {
+ if (auto queues = allQueues.Lookup(UnderlyingValue(priority))) {
WebTaskQueue* oldestQueue = nullptr;
MOZ_ASSERT(!queues.Data().IsEmpty());
for (auto& webTaskQueue : queues.Data()) {