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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 921443003: Fix RenderFrameCreated and RenderFrameDeleted WebContentsObserver methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Geolocation unit tests to create TestWebContents instead of regular WebContents. Created 5 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 14e1545b6b7733572557052b15a5cc5598be65db..ceee91562878262fb985987d44d268a52b08fd32 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -317,6 +317,11 @@ bool RenderViewHostImpl::CreateRenderView(
// Let our delegate know that we created a RenderView.
delegate_->RenderViewCreated(this);
+ // Since this method creates the main RenderFrame in the renderer process,
+ // set the proper state on its corresponding RenderFrameHost.
+ RenderFrameHostImpl::FromID(GetProcess()->GetID(), main_frame_routing_id_)
+ ->SetRenderFrameCreated(true);
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698