From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 16 Apr 2019 11:25:08 -0700 Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc index 8e76a4a70717acd834db8900b36c42369151543b..d3a64a9aecee3e4e8a9be0cfa226cecd0d5cf583 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc @@ -8,6 +8,7 @@ #include "build/build_config.h" #include "content/public/common/content_switches.h" #include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" @@ -69,6 +70,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); + if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { + return nullptr; + } base::CommandLine::StringType plugin_launcher = browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher); if (!plugin_launcher.empty())