| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 4a738e6ac1d7f07b483b88869c78425e97058adf..64679cd364e932fc68df960a6fbf6d5eac5aa58d 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -1472,12 +1472,12 @@ void WebContentsImpl::CreateNewWindow(
|
| // this WebContentsImpl instance. If any other process sends the request,
|
| // it is invalid and the process must be terminated.
|
| if (GetRenderProcessHost()->GetID() != render_process_id) {
|
| - base::ProcessHandle process_handle =
|
| - RenderProcessHost::FromID(render_process_id)->GetHandle();
|
| + RenderProcessHost* rph = RenderProcessHost::FromID(render_process_id);
|
| + base::ProcessHandle process_handle = rph->GetHandle();
|
| if (process_handle != base::kNullProcessHandle) {
|
| RecordAction(
|
| base::UserMetricsAction("Terminate_ProcessMismatch_CreateNewWindow"));
|
| - base::KillProcess(process_handle, RESULT_CODE_KILLED, false);
|
| + rph->Shutdown(RESULT_CODE_KILLED, false);
|
| }
|
| return;
|
| }
|
| @@ -1606,12 +1606,12 @@ void WebContentsImpl::CreateNewWidget(int render_process_id,
|
| // this WebContentsImpl instance. If any other process sends the request,
|
| // it is invalid and the process must be terminated.
|
| if (process->GetID() != render_process_id) {
|
| - base::ProcessHandle process_handle =
|
| - RenderProcessHost::FromID(render_process_id)->GetHandle();
|
| + RenderProcessHost* rph = RenderProcessHost::FromID(render_process_id);
|
| + base::ProcessHandle process_handle = rph->GetHandle();
|
| if (process_handle != base::kNullProcessHandle) {
|
| RecordAction(
|
| base::UserMetricsAction("Terminate_ProcessMismatch_CreateNewWidget"));
|
| - base::KillProcess(process_handle, RESULT_CODE_KILLED, false);
|
| + rph->Shutdown(RESULT_CODE_KILLED, false);
|
| }
|
| return;
|
| }
|
|
|