From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
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 833c20796bd9404e4f5d7ca738fce97143d33fac..f4bc4f94e7eb5014f7c2844d6486fbc1bc88892f 100644
--- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
+++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
@@ -6,6 +6,7 @@
#include "content/public/common/content_switches.h"
#include "sandbox/policy/mojom/sandbox.mojom.h"
+#include "sandbox/policy/switches.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
@@ -62,6 +63,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())