Bug 1523974 - Map PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE to BELOW_NORMAL_PRIORITY_CLASS on Windows. r=gsvelto

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2019-02-04 22:54:05 +00:00
parent e663f0736b
commit 27b5495888

View File

@ -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);
}