Bug 841563 - Actually set PROCESS_PRIORITY_FOREGROUND_HIGH when we want to. r=cjones
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 15 Feb 2013 08:40:01 -0500
changeset 122025 d61dec75e9a3407473a66cb68b64295efde783d8
parent 122024 7b5ccfcda7e757a111148e90c0e38f0137b5a47f
child 122026 6bb9636d8f6899c60d720298cdbca73c18cac7bc
push id23052
push userryanvm@gmail.com
push dateFri, 15 Feb 2013 13:40:35 +0000
treeherdermozilla-inbound@6bb9636d8f68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs841563
milestone21.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 841563 - Actually set PROCESS_PRIORITY_FOREGROUND_HIGH when we want to. r=cjones
dom/ipc/ProcessPriorityManager.cpp
hal/HalTypes.h
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -536,17 +536,17 @@ ProcessPriorityManager::SetIsForeground(
   nsCOMPtr<nsICancelableRunnable> runnable =
     do_QueryReferent(mMemoryMinimizerRunnable);
   if (runnable) {
     runnable->Cancel();
   }
 
   mProcessPriority = foregroundPriority;
   LOG("Setting priority to %s.", ProcessPriorityToString(mProcessPriority));
-  hal::SetProcessPriority(getpid(), PROCESS_PRIORITY_FOREGROUND);
+  hal::SetProcessPriority(getpid(), mProcessPriority);
 }
 
 void
 ProcessPriorityManager::SetIsBackgroundNow()
 {
   ProcessPriority backgroundPriority = GetBackgroundPriority();
   if (mProcessPriority == backgroundPriority) {
     return;
--- a/hal/HalTypes.h
+++ b/hal/HalTypes.h
@@ -8,17 +8,19 @@
 
 #include "IPCMessageUtils.h"
 #include "Observer.h"
 
 namespace mozilla {
 namespace hal {
 
 /**
- * XXX
+ * These constants specify special values for content process IDs.  You can get
+ * a content process ID by calling ContentChild::GetID() or
+ * ContentParent::GetChildID().
  */
 const uint64_t CONTENT_PROCESS_ID_UNKNOWN = uint64_t(-1);
 const uint64_t CONTENT_PROCESS_ID_MAIN = 0;
 
 /**
  * These are defined by libhardware, specifically, hardware/libhardware/include/hardware/lights.h
  * in the gonk subsystem.
  * If these change and are exposed to JS, make sure nsIHal.idl is updated as well.