Bug 1386404 - Don't try to fetch the content process tmpdir if sandboxing is disabled. r=jld
☠☠ backed out by fc577ae44921 ☠ ☠
authorGian-Carlo Pascutto <gcp@mozilla.com>
Tue, 09 Jan 2018 17:51:55 +0100
changeset 452832 be1441859e8bbc6b11b283f736801a58ecb64d3f
parent 452831 8dca7ef74c4a153c95b0577a9dfdadc7b709af57
child 452833 59bb34f20076d62dcce516e05878e781b17960f5
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1386404
milestone59.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 1386404 - Don't try to fetch the content process tmpdir if sandboxing is disabled. r=jld MozReview-Commit-ID: zaWPy4rt1J
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -274,26 +274,28 @@ GeckoChildProcessHost::PrepareLaunch()
 #if defined(MOZ_SANDBOX)
   // For other process types we can't rely on them being launched on main
   // thread and they may not have access to prefs in the child process, so allow
   // them to turn on logging via an environment variable.
   mEnableSandboxLogging = mEnableSandboxLogging
                           || !!PR_GetEnv("MOZ_SANDBOX_LOGGING");
 #endif
 #elif defined(XP_LINUX)
+#if defined(MOZ_CONTENT_SANDBOX)
   // Get and remember the path to the per-content-process tmpdir
   if (ShouldHaveDirectoryService()) {
     nsCOMPtr<nsIFile> contentTempDir;
     nsresult rv = NS_GetSpecialDirectory(NS_APP_CONTENT_PROCESS_TEMP_DIR,
-                                        getter_AddRefs(contentTempDir));
+                                         getter_AddRefs(contentTempDir));
     if (NS_SUCCEEDED(rv)) {
       contentTempDir->GetNativePath(mTmpDirName);
     }
   }
 #endif
+#endif
 }
 
 #ifdef XP_WIN
 void GeckoChildProcessHost::InitWindowsGroupID()
 {
   // On Win7+, pass the application user model to the child, so it can
   // register with it. This insures windows created by the container
   // properly group with the parent app on the Win7 taskbar.