| Index: content/common/sandbox_win.cc
|
| diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
|
| index 633012ff60d455883dfef18d8b80aa9474a3d51b..6dee6e96a96299cd3aa01a46772f727c46ec6bf4 100644
|
| --- a/content/common/sandbox_win.cc
|
| +++ b/content/common/sandbox_win.cc
|
| @@ -708,7 +708,8 @@ sandbox::ResultCode StartSandboxedProcess(
|
| return sandbox::SBOX_ALL_OK;
|
| }
|
|
|
| - sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy();
|
| + scoped_refptr<sandbox::TargetPolicy> policy =
|
| + g_broker_services->CreatePolicy();
|
|
|
| // Add any handles to be inherited to the policy.
|
| for (HANDLE handle : handles_to_inherit)
|
| @@ -736,7 +737,7 @@ sandbox::ResultCode StartSandboxedProcess(
|
|
|
| #if !defined(NACL_WIN64)
|
| if (type_str == switches::kRendererProcess && IsWin32kLockdownEnabled()) {
|
| - result = AddWin32kLockdownPolicy(policy, false);
|
| + result = AddWin32kLockdownPolicy(policy.get(), false);
|
| if (result != sandbox::SBOX_ALL_OK)
|
| return result;
|
| }
|
| @@ -750,12 +751,12 @@ sandbox::ResultCode StartSandboxedProcess(
|
| if (result != sandbox::SBOX_ALL_OK)
|
| return result;
|
|
|
| - result = SetJobLevel(*cmd_line, sandbox::JOB_LOCKDOWN, 0, policy);
|
| + result = SetJobLevel(*cmd_line, sandbox::JOB_LOCKDOWN, 0, policy.get());
|
| if (result != sandbox::SBOX_ALL_OK)
|
| return result;
|
|
|
| if (!delegate->DisableDefaultPolicy()) {
|
| - result = AddPolicyForSandboxedProcess(policy);
|
| + result = AddPolicyForSandboxedProcess(policy.get());
|
| if (result != sandbox::SBOX_ALL_OK)
|
| return result;
|
| }
|
| @@ -764,7 +765,7 @@ sandbox::ResultCode StartSandboxedProcess(
|
| if (type_str == switches::kRendererProcess ||
|
| type_str == switches::kPpapiPluginProcess) {
|
| AddDirectory(base::DIR_WINDOWS_FONTS, NULL, true,
|
| - sandbox::TargetPolicy::FILES_ALLOW_READONLY, policy);
|
| + sandbox::TargetPolicy::FILES_ALLOW_READONLY, policy.get());
|
| }
|
| #endif
|
|
|
| @@ -775,7 +776,7 @@ sandbox::ResultCode StartSandboxedProcess(
|
| cmd_line->AppendSwitchASCII("ignored", " --type=renderer ");
|
| }
|
|
|
| - result = AddGenericPolicy(policy);
|
| + result = AddGenericPolicy(policy.get());
|
|
|
| if (result != sandbox::SBOX_ALL_OK) {
|
| NOTREACHED();
|
| @@ -800,7 +801,7 @@ sandbox::ResultCode StartSandboxedProcess(
|
| policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
|
| policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
|
|
|
| - if (!delegate->PreSpawnTarget(policy))
|
| + if (!delegate->PreSpawnTarget(policy.get()))
|
| return sandbox::SBOX_ERROR_DELEGATE_PRE_SPAWN;
|
|
|
| TRACE_EVENT_BEGIN0("startup", "StartProcessWithAccess::LAUNCHPROCESS");
|
|
|