unsandboxed_ppapi_processes_skip_zygote.patch 1.0 KB

123456789101112131415161718192021
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Jeremy Apthorp <[email protected]>
  3. Date: Tue, 16 Apr 2019 11:25:08 -0700
  4. Subject: unsandboxed_ppapi_processes_skip_zygote.patch
  5. Unsandboxed ppapi processes should skip zygote.
  6. diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
  7. index c10e41fd2cb6269e7a7bb79da14b2d1d2eb1f41f..87bb8697479eaaaa015ba2a9d25fab54fe526dab 100644
  8. --- a/content/browser/ppapi_plugin_process_host.cc
  9. +++ b/content/browser/ppapi_plugin_process_host.cc
  10. @@ -111,6 +111,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
  11. ZygoteHandle GetZygote() override {
  12. const base::CommandLine& browser_command_line =
  13. *base::CommandLine::ForCurrentProcess();
  14. + if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) {
  15. + return nullptr;
  16. + }
  17. base::CommandLine::StringType plugin_launcher = browser_command_line
  18. .GetSwitchValueNative(switches::kPpapiPluginLauncher);
  19. if (!plugin_launcher.empty())