Windows: Skip InitializeSandboxInfo if no_sandbox is true

The InitializeSandboxInfo method applies mitigations to the main process
that are inappropriate when the sandbox is disabled.
This commit is contained in:
rcdrone 2020-03-05 17:52:41 +00:00 committed by Marshall Greenblatt
parent 1ab44722e8
commit 438382c5df
1 changed files with 3 additions and 2 deletions

View File

@ -392,9 +392,10 @@ bool CefContext::Initialize(const CefMainArgs& args,
#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
if (windows_sandbox_info == nullptr) {
if (!settings.no_sandbox) {
content::InitializeSandboxInfo(&sandbox_info);
}
windows_sandbox_info = &sandbox_info;
settings_.no_sandbox = true;
}
params.instance = args.instance;