feat: support mixed-sandbox mode on linux (#15870)
This commit is contained in:
parent
764a10f7c7
commit
2845267c18
4 changed files with 98 additions and 7 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue