feat: support mixed-sandbox mode on linux (#15870)

This commit is contained in:
Jeremy Apthorp 2018-12-05 17:42:12 -08:00 committed by GitHub
parent 764a10f7c7
commit 2845267c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 98 additions and 7 deletions

View file

@ -245,10 +245,12 @@ void WebContentsPreferences::AppendCommandLineSwitches(
// If the `sandbox` option was passed to the BrowserWindow's webPreferences,
// pass `--enable-sandbox` to the renderer so it won't have any node.js
// integration.
if (IsEnabled(options::kSandbox))
if (IsEnabled(options::kSandbox)) {
command_line->AppendSwitch(switches::kEnableSandbox);
else if (!command_line->HasSwitch(switches::kEnableSandbox))
} else if (!command_line->HasSwitch(switches::kEnableSandbox)) {
command_line->AppendSwitch(service_manager::switches::kNoSandbox);
command_line->AppendSwitch(::switches::kNoZygote);
}
// Check if nativeWindowOpen is enabled.
if (IsEnabled(options::kNativeWindowOpen))