Bug 1117140 - Avoid allocating some resources in the gmp child process which we have no use for. r=bsmedberg

This commit is contained in:
Jim Mathies 2015-01-07 17:35:04 -06:00
parent c69456ab40
commit 8eec6b6f85

View File

@ -453,9 +453,13 @@ XRE_InitChildProcess(int aArgc,
base::ProcessId parentPID = strtol(parentPIDString, &end, 10);
NS_ABORT_IF_FALSE(!*end, "invalid parent PID");
base::ProcessHandle parentHandle;
// Retrieve the parent process handle. We need this for shared memory use and
// for creating new transports in the child.
base::ProcessHandle parentHandle = 0;
if (XRE_GetProcessType() != GeckoProcessType_GMPlugin) {
mozilla::DebugOnly<bool> ok = base::OpenProcessHandle(parentPID, &parentHandle);
NS_ABORT_IF_FALSE(ok, "can't open handle to parent");
}
#if defined(XP_WIN)
// On Win7+, register the application user model id passed in by