From 7be361414765484bb8a36b254ede2d62dacbb916 Mon Sep 17 00:00:00 2001 From: Ting-Yu Chou Date: Fri, 29 Aug 2014 11:53:49 +0800 Subject: [PATCH] Bug 1054208 - Assert priority only on non-Nuwa process. r=gsvelto --- dom/ipc/ProcessPriorityManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) {