--- content/app/content_main_runner_impl.cc.orig 2021-12-31 00:57:31 UTC +++ content/app/content_main_runner_impl.cc @@ -137,7 +137,7 @@ #endif // OS_POSIX || OS_FUCHSIA -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "base/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" @@ -157,7 +157,7 @@ #include "content/public/common/content_client.h" #endif -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if BUILDFLAG(USE_ZYGOTE_HANDLE) #include "base/stack_canary_linux.h" @@ -344,7 +344,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if BUILDFLAG(ENABLE_PLUGINS) // Loads the (native) libraries but does not initialize them (i.e., does not @@ -432,7 +432,7 @@ void PreSandboxInit() { } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) mojo::ScopedMessagePipeHandle MaybeAcceptMojoInvitation() { const auto& command_line = *base::CommandLine::ForCurrentProcess(); @@ -565,7 +565,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) PreSandboxInit(); #endif @@ -976,7 +976,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run(bool mojo::core::InitFeatures(); } -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later @@ -986,7 +986,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run(bool CHECK_EQ(mojo::LoadCoreLibrary(GetMojoCoreSharedLibraryPath()), MOJO_RESULT_OK); } -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } MainFunctionParams main_params(command_line);