Bug 1489546 - Don't drop process priority of webext process r=mconley
authorDoug Thayer <dothayer@mozilla.com>
Fri, 07 Sep 2018 16:46:42 +0000
changeset 435232 ef66eb6e2fe08ebe482ce8e22b022eb28eaa33a4
parent 435231 417fae8385d6dcc6dc223fd5340c63ae502769f8
child 435233 04be4edd4f97f46530ef9a84cceb4bd888f64c72
push id68934
push userdothayer@mozilla.com
push dateFri, 07 Sep 2018 17:03:51 +0000
treeherderautoland@ef66eb6e2fe0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1489546
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489546 - Don't drop process priority of webext process r=mconley Turned out to be fairly trivial. Not much to explain here - as far as I can tell this looks clean on try now (no web extension failures like there were before). Differential Revision: https://phabricator.services.mozilla.com/D5280
dom/ipc/ProcessPriorityManager.cpp
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -829,17 +829,18 @@ ProcessPriority
 ParticularProcessPriorityManager::CurrentPriority()
 {
   return mPriority;
 }
 
 ProcessPriority
 ParticularProcessPriorityManager::ComputePriority()
 {
-  if (!mActiveTabParents.IsEmpty()) {
+  if (!mActiveTabParents.IsEmpty() ||
+      mContentParent->GetRemoteType().EqualsLiteral(EXTENSION_REMOTE_TYPE)) {
     return PROCESS_PRIORITY_FOREGROUND;
   }
 
   if (mHoldsCPUWakeLock || mHoldsHighPriorityWakeLock) {
     return PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE;
   }
 
   return PROCESS_PRIORITY_BACKGROUND;