Skip to content

Commit

Permalink
Bug 1523974 - Map PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE to BELOW_NO…
Browse files Browse the repository at this point in the history
…RMAL_PRIORITY_CLASS on Windows. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D18394

--HG--
extra : moz-landing-system : lando
  • Loading branch information
mikeconley committed Feb 4, 2019
1 parent e663f07 commit 27b5495
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hal/windows/WindowsProcessPriority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
MOZ_ASSERT(processHandle);
if (processHandle) {
DWORD priority = NORMAL_PRIORITY_CLASS;
if (aPriority == PROCESS_PRIORITY_BACKGROUND ||
aPriority == PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE) {
if (aPriority == PROCESS_PRIORITY_BACKGROUND) {
priority = IDLE_PRIORITY_CLASS;
} else if (aPriority == PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE) {
priority = BELOW_NORMAL_PRIORITY_CLASS;
}
::SetPriorityClass(processHandle, priority);
}
Expand Down

0 comments on commit 27b5495

Please sign in to comment.