mirror of https://github.com/electron/electron
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
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 62cc6bca4793447c35b6ab435b461e57c2c59f4f..d9bb02a43b48d731d7e85537f255bc7ba1b128c9 100644
|
|
--- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
|
|
+++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc
|
|
@@ -10,6 +10,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 "sandbox/policy/win/sandbox_win.h"
|
|
@@ -56,6 +57,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::AllowWindowsFontsDir() {
|
|
ZygoteCommunication* 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())
|