Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1685133003: Associate RenderWidgetHostView for new widget with correct process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit addressed Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4ff0a3a18951b3884bacf6315ffc450b21b2da24..0eb18f9b438ad4aeff1d7770497f08cb298e8dd2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1956,17 +1956,16 @@ void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
int32_t route_id,
bool is_fullscreen,
blink::WebPopupType popup_type) {
- RenderProcessHost* process = GetRenderProcessHost();
+ RenderProcessHost* process = RenderProcessHost::FromID(render_process_id);
// A message to create a new widget can only come from an active process for
// this WebContentsImpl instance. If any other process sends the request,
// it is invalid and the process must be terminated.
if (!HasMatchingProcess(&frame_tree_, render_process_id)) {
- RenderProcessHost* rph = RenderProcessHost::FromID(render_process_id);
- base::ProcessHandle process_handle = rph->GetHandle();
+ base::ProcessHandle process_handle = process->GetHandle();
if (process_handle != base::kNullProcessHandle) {
RecordAction(
base::UserMetricsAction("Terminate_ProcessMismatch_CreateNewWidget"));
- rph->Shutdown(RESULT_CODE_KILLED, false);
+ process->Shutdown(RESULT_CODE_KILLED, false);
}
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698