| Index: content/common/sandbox_init_mac.cc
|
| diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
|
| index b63600becf012d364ea8284cae2e19c2b1b0c3a3..3cb3e29deb50ec410aa5f3a2f916953bd73c6579 100644
|
| --- a/content/common/sandbox_init_mac.cc
|
| +++ b/content/common/sandbox_init_mac.cc
|
| @@ -35,13 +35,20 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
|
|
|
| const base::CommandLine& command_line =
|
| *base::CommandLine::ForCurrentProcess();
|
| + std::string process_type =
|
| + command_line.GetSwitchValueASCII(switches::kProcessType);
|
| +
|
| if (command_line.HasSwitch(switches::kNoSandbox))
|
| return false;
|
| - if (command_line.HasSwitch(switches::kV2SandboxedEnabled))
|
| + if (command_line.HasSwitch(switches::kV2SandboxedEnabled)) {
|
| CHECK(sandbox::Seatbelt::IsSandboxed());
|
| + if (process_type == switches::kRendererProcess) {
|
| + Sandbox::LaunchServicesNotAvailable();
|
| + }
|
| + // Do not enable the sandbox if V2 is already enabled.
|
| + return false;
|
| + }
|
|
|
| - std::string process_type =
|
| - command_line.GetSwitchValueASCII(switches::kProcessType);
|
| if (process_type.empty()) {
|
| // Browser process isn't sandboxed.
|
| return false;
|
|
|