diff --git a/dom/ipc/ProcessPriorityManager.cpp b/dom/ipc/ProcessPriorityManager.cpp index 92d403f7959..4ee176bf461 100644 --- a/dom/ipc/ProcessPriorityManager.cpp +++ b/dom/ipc/ProcessPriorityManager.cpp @@ -1040,11 +1040,6 @@ ParticularProcessPriorityManager::SetPriorityNow(ProcessPriority aPriority, ProcessCPUPriority aCPUPriority, uint32_t aBackgroundLRU) { - if (aPriority == PROCESS_PRIORITY_UNKNOWN) { - MOZ_ASSERT(false); - return; - } - #ifdef MOZ_NUWA_PROCESS // Do not attempt to change the priority of the Nuwa process if (mContentParent->IsNuwaProcess()) { @@ -1052,6 +1047,11 @@ ParticularProcessPriorityManager::SetPriorityNow(ProcessPriority aPriority, } #endif + if (aPriority == PROCESS_PRIORITY_UNKNOWN) { + MOZ_ASSERT(false); + return; + } + if (aBackgroundLRU > 0 && aPriority == PROCESS_PRIORITY_BACKGROUND && mPriority == PROCESS_PRIORITY_BACKGROUND) {