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 7846244231558f74cf5a9afdec3cd8597e0f5368..257452822d95e74a0d6da2b731bd02a2bd99b119 100644
  8. --- a/content/browser/ppapi_plugin_process_host.cc
  9. +++ b/content/browser/ppapi_plugin_process_host.cc
  10. @@ -122,6 +122,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 (is_broker_ || !plugin_launcher.empty())