Bug 1861713 - Fix a nullptr crash in WebTaskScheduler r=dom-core,mccr8

Differential Revision: https://phabricator.services.mozilla.com/D192334
This commit is contained in:
Sean Feng 2023-11-09 14:28:30 +00:00
parent 42234038bf
commit 7f1ec478c2

View File

@ -324,9 +324,10 @@ void WebTaskScheduler::Disconnect() {
}
void WebTaskScheduler::RunTaskSignalPriorityChange(TaskSignal* aTaskSignal) {
WebTaskQueue* const taskQueue = mDynamicPriorityTaskQueues.Get(aTaskSignal);
MOZ_ASSERT(taskQueue);
taskQueue->SetPriority(aTaskSignal->Priority());
if (WebTaskQueue* const taskQueue =
mDynamicPriorityTaskQueues.Get(aTaskSignal)) {
taskQueue->SetPriority(aTaskSignal->Priority());
}
}
WebTaskQueue& WebTaskScheduler::SelectTaskQueue(