mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 08:51:04 +00:00
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:
parent
e663f0736b
commit
27b5495888
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user