Bug 1504188 - Don't define AppendSandboxParams if building the sandbox is disabled. r=haik
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Fri, 02 Nov 2018 13:59:43 +0100
changeset 503491 11b22116160cb3231938004542803439a7c08e91
parent 503490 33f8860558aa393f0091ed20bfc2603c077f8c5f
child 503492 ab19a1589b291a36f7e2812bc9d3a64cb50af70e
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershaik
bugs1504188
milestone65.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 1504188 - Don't define AppendSandboxParams if building the sandbox is disabled. r=haik
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2122,17 +2122,17 @@ ContentParent::DestroyTestShell(TestShel
 
 TestShellParent*
 ContentParent::GetTestShellSingleton()
 {
   PTestShellParent* p = LoneManagedOrNullAsserts(ManagedPTestShellParent());
   return static_cast<TestShellParent*>(p);
 }
 
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
 void
 ContentParent::AppendSandboxParams(std::vector<std::string> &aArgs)
 {
   nsCOMPtr<nsIProperties>
     directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID));
   if (!directoryService) {
     MOZ_CRASH("Failed to get the directory service");
   }
@@ -2234,17 +2234,17 @@ ContentParent::AppendSandboxParams(std::
     // of that path.
     nsAutoCString bloatDirectoryPath =
       nsMacUtilsImpl::GetDirectoryPath(bloatLog);
     aArgs.push_back("-sbDebugWriteDir");
     aArgs.push_back(bloatDirectoryPath.get());
   }
 #endif // DEBUG
 }
-#endif // XP_MACOSX
+#endif // XP_MACOSX && MOZ_CONTENT_SANDBOX
 
 bool
 ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PRIORITY_FOREGROUND */)
 {
   AUTO_PROFILER_LABEL("ContentParent::LaunchSubprocess", OTHER);
 
   if (!ContentProcessManager::GetSingleton()) {
     // Shutdown has begun, we shouldn't spawn any more child processes.