Issue #2654 - Remove pre-allocated process manager.

Resolves #2654
This commit is contained in:
Moonchild 2024-11-19 13:18:31 +01:00 committed by roytam1
commit 75d698133f
22 changed files with 16 additions and 879 deletions

View file

@ -300,7 +300,6 @@ public:
int32_t Pid() const;
uint64_t ChildID() const;
bool IsPreallocated() const;
/**
* Used in logging, this method returns the ContentParent's name followed by
@ -617,15 +616,12 @@ ProcessPriorityManagerImpl::NotifyProcessPriorityChanged(
ProcessPriority aOldPriority)
{
ProcessPriority newPriority = aParticularManager->CurrentPriority();
bool isPreallocated = aParticularManager->IsPreallocated();
if (newPriority == PROCESS_PRIORITY_BACKGROUND &&
aOldPriority != PROCESS_PRIORITY_BACKGROUND &&
!isPreallocated) {
aOldPriority != PROCESS_PRIORITY_BACKGROUND) {
mBackgroundLRUPool.Add(aParticularManager);
} else if (newPriority != PROCESS_PRIORITY_BACKGROUND &&
aOldPriority == PROCESS_PRIORITY_BACKGROUND &&
!isPreallocated) {
aOldPriority == PROCESS_PRIORITY_BACKGROUND) {
mBackgroundLRUPool.Remove(aParticularManager);
}
@ -808,12 +804,6 @@ ParticularProcessPriorityManager::Pid() const
return mContentParent ? mContentParent->Pid() : -1;
}
bool
ParticularProcessPriorityManager::IsPreallocated() const
{
return mContentParent ? mContentParent->IsPreallocated() : false;
}
const nsAutoCString&
ParticularProcessPriorityManager::NameWithComma()
{