From 878c5b663df543c684395b672b191fcfbc9f8629 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 8 Oct 2018 15:21:01 +0900 Subject: [PATCH] fix: disable the V2 sandbox on macOS The new v2 sandbox uses system sandbox API, there does not seem to have a way to support it in --enable-mixed-sandbox, we should probably deprecate the API. See https://chromium.googlesource.com/chromium/src.git/+/master/sandbox/mac/seatbelt_sandbox_design.md --- brightray/browser/browser_main_parts.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index 62ad62362d..41e417f3a5 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -192,6 +192,13 @@ void BrowserMainParts::InitializeFeatureList() { enable_features += std::string(",") + features::kSharedArrayBuffer.name; auto disable_features = cmd_line->GetSwitchValueASCII(switches::kDisableFeatures); +#if defined(OS_MACOSX) + // Disable the V2 sandbox on macOS. + // Chromium is going to use the system sandbox API of macOS for the sandbox + // implmentation, we may have to deprecate --mixed-sandbox for macOS once + // Chromium drops support for the old sandbox implmentation. + disable_features += std::string(",") + features::kMacV2Sandbox.name; +#endif auto feature_list = std::make_unique(); feature_list->InitializeFromCommandLine(enable_features, disable_features); base::FeatureList::SetInstance(std::move(feature_list));