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:
Nika Layzell 2020-06-23 17:34:51 +00:00
parent 328a79feca
commit 0b30d5c15f
4 changed files with 9 additions and 9 deletions

View File

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

View File

@ -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:

View File

@ -35,7 +35,7 @@ enum ProcessPriority {
// CurrentProcessIsForeground().
PROCESS_PRIORITY_FOREGROUND,
PROCESS_PRIORITY_FOREGROUND_HIGH,
PROCESS_PRIORITY_MASTER,
PROCESS_PRIORITY_PARENT_PROCESS,
NUM_PROCESS_PRIORITY
};

View File

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