Backed out changeset f1ff6d4dca5f (bug 1311149)

This commit is contained in:
Carsten "Tomcat" Book
2016-11-16 14:50:40 +01:00
parent 37e035707a
commit 979d51a6a3
23 changed files with 899 additions and 18 deletions

View File

@@ -301,6 +301,7 @@ 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,12 +618,15 @@ ProcessPriorityManagerImpl::NotifyProcessPriorityChanged(
ProcessPriority aOldPriority)
{
ProcessPriority newPriority = aParticularManager->CurrentPriority();
bool isPreallocated = aParticularManager->IsPreallocated();
if (newPriority == PROCESS_PRIORITY_BACKGROUND &&
aOldPriority != PROCESS_PRIORITY_BACKGROUND) {
aOldPriority != PROCESS_PRIORITY_BACKGROUND &&
!isPreallocated) {
mBackgroundLRUPool.Add(aParticularManager);
} else if (newPriority != PROCESS_PRIORITY_BACKGROUND &&
aOldPriority == PROCESS_PRIORITY_BACKGROUND) {
aOldPriority == PROCESS_PRIORITY_BACKGROUND &&
!isPreallocated) {
mBackgroundLRUPool.Remove(aParticularManager);
}
@@ -805,6 +809,12 @@ ParticularProcessPriorityManager::Pid() const
return mContentParent ? mContentParent->Pid() : -1;
}
bool
ParticularProcessPriorityManager::IsPreallocated() const
{
return mContentParent ? mContentParent->IsPreallocated() : false;
}
const nsAutoCString&
ParticularProcessPriorityManager::NameWithComma()
{