mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838616 - Boost preallocated process's priority sooner after we decide to transform it into an app process. r=cjones
--HG-- extra : rebase_source : 011d56c6e06bda680d073ae420b84d42e8a37257
This commit is contained in:
parent
839fec2a80
commit
b6ea2ca2fe
@ -540,6 +540,16 @@ ContentParent::TransformPreallocatedIntoApp(const nsAString& aAppManifestURL,
|
||||
// Clients should think of mAppManifestURL as const ... we're
|
||||
// bending the rules here just for the preallocation hack.
|
||||
const_cast<nsString&>(mAppManifestURL) = aAppManifestURL;
|
||||
|
||||
// Boost this process's priority. The subprocess will call
|
||||
// TemporarilySetProcessPriorityToForeground() from within
|
||||
// ContentChild::AllocPBrowser, but this happens earlier, thus reducing the
|
||||
// window in which the child might be killed due to low memory.
|
||||
if (Preferences::GetBool("dom.ipc.processPriorityManager.enabled")) {
|
||||
SetProcessPriority(base::GetProcId(mSubprocess->GetChildProcessHandle()),
|
||||
PROCESS_PRIORITY_FOREGROUND);
|
||||
}
|
||||
|
||||
// If this fails, the child process died.
|
||||
unused << SendSetProcessPrivileges(aPrivs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user