| Index: components/nacl/browser/nacl_process_host.cc
|
| diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
|
| index 41e337a408bb0fd76fb89ad7381449f100fd71f6..aae77fa3b6783932f639b08d5614f6128c7eac5b 100644
|
| --- a/components/nacl/browser/nacl_process_host.cc
|
| +++ b/components/nacl/browser/nacl_process_host.cc
|
| @@ -68,6 +68,7 @@
|
| #include <netinet/in.h>
|
| #include <sys/socket.h>
|
|
|
| +#include "content/public/browser/zygote_handle_linux.h"
|
| #include "ipc/ipc_channel_posix.h"
|
| #elif defined(OS_WIN)
|
| #include <windows.h>
|
| @@ -155,6 +156,10 @@ bool RunningOnWOW64() {
|
|
|
| namespace {
|
|
|
| +#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
| +content::ZygoteHandle g_nacl_zygote;
|
| +#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
|
| +
|
| // NOTE: changes to this class need to be reviewed by the security team.
|
| class NaClSandboxedProcessLauncherDelegate
|
| : public content::SandboxedProcessLauncherDelegate {
|
| @@ -181,7 +186,10 @@ class NaClSandboxedProcessLauncherDelegate
|
| }
|
| }
|
| #elif defined(OS_POSIX)
|
| - bool ShouldUseZygote() override { return true; }
|
| +#if !defined(OS_MACOSX)
|
| + content::ZygoteHandle* GetZygote() override { return &g_nacl_zygote; }
|
| +#endif // !defined(OS_MACOSX)
|
| +
|
| base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
|
| #endif // OS_WIN
|
|
|
| @@ -417,6 +425,14 @@ void NaClProcessHost::EarlyStartup() {
|
| NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask);
|
| }
|
|
|
| +#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
| +// static
|
| +void NaClProcessHost::EarlyZygoteLaunch() {
|
| + DCHECK(!g_nacl_zygote);
|
| + g_nacl_zygote = content::CreateZygote();
|
| +}
|
| +#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
|
| +
|
| // static
|
| void NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(
|
| unsigned milliseconds) {
|
|
|