mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1647761 - Part 2: Remove outdated process priority terminology, r=mccr8,geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D80684
This commit is contained in:
parent
328a79feca
commit
0b30d5c15f
@ -366,12 +366,12 @@ ProcessPriorityManagerImpl::ProcessPriorityManagerImpl() {
|
||||
ProcessPriorityManagerImpl::~ProcessPriorityManagerImpl() = default;
|
||||
|
||||
void ProcessPriorityManagerImpl::Init() {
|
||||
LOG("Starting up. This is the master process.");
|
||||
LOG("Starting up. This is the parent process.");
|
||||
|
||||
// The master process's priority never changes; set it here and then forget
|
||||
// about it. We'll manage only subprocesses' priorities using the process
|
||||
// The parent process's priority never changes; set it here and then forget
|
||||
// about it. We'll manage only subprocesses' priorities using the process
|
||||
// priority manager.
|
||||
hal::SetProcessPriority(getpid(), PROCESS_PRIORITY_MASTER);
|
||||
hal::SetProcessPriority(getpid(), PROCESS_PRIORITY_PARENT_PROCESS);
|
||||
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
@ -892,7 +892,7 @@ NS_IMPL_ISUPPORTS(ProcessPriorityManagerChild, nsIObserver)
|
||||
|
||||
ProcessPriorityManagerChild::ProcessPriorityManagerChild() {
|
||||
if (XRE_IsParentProcess()) {
|
||||
mCachedPriority = PROCESS_PRIORITY_MASTER;
|
||||
mCachedPriority = PROCESS_PRIORITY_PARENT_PROCESS;
|
||||
} else {
|
||||
mCachedPriority = PROCESS_PRIORITY_UNKNOWN;
|
||||
}
|
||||
|
@ -430,8 +430,8 @@ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
// From HalTypes.h.
|
||||
const char* ProcessPriorityToString(ProcessPriority aPriority) {
|
||||
switch (aPriority) {
|
||||
case PROCESS_PRIORITY_MASTER:
|
||||
return "MASTER";
|
||||
case PROCESS_PRIORITY_PARENT_PROCESS:
|
||||
return "PARENT_PROCESS";
|
||||
case PROCESS_PRIORITY_PREALLOC:
|
||||
return "PREALLOC";
|
||||
case PROCESS_PRIORITY_FOREGROUND_HIGH:
|
||||
|
@ -35,7 +35,7 @@ enum ProcessPriority {
|
||||
// CurrentProcessIsForeground().
|
||||
PROCESS_PRIORITY_FOREGROUND,
|
||||
PROCESS_PRIORITY_FOREGROUND_HIGH,
|
||||
PROCESS_PRIORITY_MASTER,
|
||||
PROCESS_PRIORITY_PARENT_PROCESS,
|
||||
NUM_PROCESS_PRIORITY
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace hal_impl {
|
||||
bool SetProcessPrioritySupported() { return true; }
|
||||
|
||||
void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
if (aPriority == PROCESS_PRIORITY_MASTER) {
|
||||
if (aPriority == PROCESS_PRIORITY_PARENT_PROCESS) {
|
||||
// This is the parent process itself, which we do not control.
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user