Bug 1527811 - Don't pass appdir and omnijar path to GMP processes. r=bobowen
authorChris Pearce <cpearce@mozilla.com>
Fri, 15 Feb 2019 10:47:45 +1300
changeset 461692 4afca6b3252ee9a327eaf3c2ecfdaaf432025621
parent 461691 ad0dfa4133e60c498598f52b8a9307e8f2307584
child 461693 56d43815607853dacf7ae7d272912ef3e8927229
push id35626
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 11:31:08 +0000
treeherdermozilla-central@2ea0c1db7e60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs1527811
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527811 - Don't pass appdir and omnijar path to GMP processes. r=bobowen GMP shouldn't need them anyway, and this reduces the dependencies from the x86 build we need to package in the "i686" subdir. Differential Revision: https://phabricator.services.mozilla.com/D19902
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -851,35 +851,36 @@ bool GeckoChildProcessHost::PerformAsync
   childArgv.push_back(exePath.value());
 
   if (pathType == BinaryPathType::Self) {
     childArgv.push_back("-contentproc");
   }
 
   childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end());
 
-  if (Omnijar::IsInitialized()) {
-    // Make sure that child processes can find the omnijar
-    // See XRE_InitCommandLine in nsAppRunner.cpp
-    nsAutoCString path;
-    nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE);
-    if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
-      childArgv.push_back("-greomni");
-      childArgv.push_back(path.get());
+  if (mProcessType != GeckoProcessType_GMPlugin) {
+    if (Omnijar::IsInitialized()) {
+      // Make sure that child processes can find the omnijar
+      // See XRE_InitCommandLine in nsAppRunner.cpp
+      nsAutoCString path;
+      nsCOMPtr<nsIFile> file = Omnijar::GetPath(Omnijar::GRE);
+      if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
+        childArgv.push_back("-greomni");
+        childArgv.push_back(path.get());
+      }
+      file = Omnijar::GetPath(Omnijar::APP);
+      if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
+        childArgv.push_back("-appomni");
+        childArgv.push_back(path.get());
+      }
     }
-    file = Omnijar::GetPath(Omnijar::APP);
-    if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
-      childArgv.push_back("-appomni");
-      childArgv.push_back(path.get());
-    }
+    // Add the application directory path (-appdir path)
+    AddAppDirToCommandLine(childArgv);
   }
 
-  // Add the application directory path (-appdir path)
-  AddAppDirToCommandLine(childArgv);
-
   childArgv.push_back(pidstring);
 
   if (!CrashReporter::IsDummy()) {
 #  if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
     int childCrashFd, childCrashRemapFd;
     if (!CrashReporter::CreateNotificationPipeForChild(&childCrashFd,
                                                        &childCrashRemapFd)) {
       return false;