diff --git a/ipc/app/moz.build b/ipc/app/moz.build index 028f4c216cf7..ce804ee35887 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -63,17 +63,6 @@ if CONFIG['OS_ARCH'] == 'WINNT': 'xul.dll', ] -if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ('Linux', 'Android'): - USE_LIBS += [ - 'mozsandbox', - ] - - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. - if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']: - LDFLAGS += ['--param lto-partitions=1'] - if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin': # For sandbox includes and the include dependencies those have LOCAL_INCLUDES += [ diff --git a/ipc/app/pie/moz.build b/ipc/app/pie/moz.build index 0247b25b4b11..6924199b5e1a 100644 --- a/ipc/app/pie/moz.build +++ b/ipc/app/pie/moz.build @@ -16,15 +16,4 @@ LOCAL_INCLUDES += [ '/xpcom/base', ] -if CONFIG['MOZ_SANDBOX']: - USE_LIBS += [ - 'mozsandbox', - ] - - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. - if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']: - LDFLAGS += ['--param lto-partitions=1'] - LDFLAGS += ['-pie'] diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index 63b3dca3c6fa..79a6a803a8dd 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -27,11 +27,6 @@ #include "mozilla/sandboxing/sandboxLogging.h" #endif -#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX) -#include "mozilla/Sandbox.h" -#include "mozilla/SandboxInfo.h" -#endif - #ifdef MOZ_WIDGET_GONK # include # include @@ -139,13 +134,6 @@ content_process_main(int argc, char* argv[]) XRE_SetProcessType(argv[--argc]); -#if defined(XP_LINUX) && defined(MOZ_SANDBOX) - // This has to happen while we're still single-threaded, and on - // B2G that means before the Android Binder library is - // initialized. - mozilla::SandboxEarlyInit(XRE_GetProcessType()); -#endif - #ifdef MOZ_WIDGET_GONK // This creates a ThreadPool for binder ipc. A ThreadPool is necessary to // receive binder calls, though not necessary to send binder calls. diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 93c2ef974f2f..2a660a39ddc3 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -361,6 +361,11 @@ XRE_InitChildProcess(int aArgc, NS_ENSURE_ARG_POINTER(aArgv[0]); MOZ_ASSERT(aChildData); +#if defined(XP_LINUX) && defined(MOZ_SANDBOX) + // This has to happen while we're still single-threaded. + mozilla::SandboxEarlyInit(XRE_GetProcessType()); +#endif + #ifdef MOZ_JPROF // Call the code to install our handler setupProfilingStuff();