Bug 1431272 - Set the process priority for the preallocated process when it becomes active. r=jimm

This is currently a no-op, but the idea here is to make sure to set the
process to "active" when we're about to use it for something.

MozReview-Commit-ID: 2QUlALhfD4k

--HG--
extra : rebase_source : 13a67e9353bb47593b1394ce7ae7a7b6eef6e381
This commit is contained in:
Blake Kaplan 2018-01-17 17:37:20 -08:00
Родитель 26304e2c11
Коммит 220f89f300
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -2833,6 +2833,10 @@ ContentParent::Observe(nsISupports* aSubject,
{
if (mSubprocess && (!strcmp(aTopic, "profile-before-change") ||
!strcmp(aTopic, "xpcom-shutdown"))) {
// Make sure that our process will get scheduled.
ProcessPriorityManager::SetProcessPriority(this,
PROCESS_PRIORITY_FOREGROUND);
// Okay to call ShutDownProcess multiple times.
ShutDownProcess(SEND_SHUTDOWN_MESSAGE);

Просмотреть файл

@ -168,6 +168,8 @@ PreallocatedProcessManagerImpl::Take()
if (mPreallocatedProcess) {
// The preallocated process is taken. Let's try to start up a new one soon.
ProcessPriorityManager::SetProcessPriority(mPreallocatedProcess,
PROCESS_PRIORITY_FOREGROUND);
AllocateOnIdle();
}