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
This commit is contained in:
parent
7ba287a05e
commit
878c5b663d
1 changed files with 7 additions and 0 deletions
|
@ -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<base::FeatureList>();
|
||||
feature_list->InitializeFromCommandLine(enable_features, disable_features);
|
||||
base::FeatureList::SetInstance(std::move(feature_list));
|
||||
|
|
Loading…
Reference in a new issue