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 7ab54bf0cab318432f04509f45773d236b9ffafb..6f683126f6a7c114dfafeddb3577f56a3f04a7b3 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1475,12 +1475,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->FastShutdown(RESULT_CODE_KILLED, false); |
} |
return; |
} |
@@ -1609,12 +1609,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->FastShutdown(RESULT_CODE_KILLED, false); |
} |
return; |
} |