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 d9ac63172636991e1e6bc750d49ea34d9cf6129a..37c9a8924204420b4d4f5d9d46cb0d691e7a1632 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -624,7 +624,7 @@ RenderProcessHost* WebContentsImpl::GetRenderProcessHost() const { |
} |
RenderFrameHost* WebContentsImpl::GetMainFrame() { |
- return frame_tree_.root()->render_frame_host(); |
+ return frame_tree_.root()->current_frame_host(); |
} |
RenderViewHost* WebContentsImpl::GetRenderViewHost() const { |
@@ -3005,8 +3005,13 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh, |
const PageState& page_state) { |
// Ensure that this state update comes from either the active RVH or one of |
// the swapped out RVHs. We don't expect to hear from any other RVHs. |
- DCHECK(rvh == GetRenderViewHost() || |
- GetRenderManager()->IsOnSwappedOutList(rvh)); |
+ // TODO(nasko): This should go through RenderFrameHost. |
+ // TODO(creis): We can't update state for cross-process subframes until we |
+ // have FrameNavigationEntries. Once we do, this should be a DCHECK. |
+ if (rvh != GetRenderViewHost() && |
+ !GetRenderManager()->IsRVHOnSwappedOutList( |
+ static_cast<RenderViewHostImpl*>(rvh))) |
+ return; |
// We must be prepared to handle state updates for any page, these occur |
// when the user is scrolling and entering form data, as well as when we're |
@@ -3433,8 +3438,8 @@ WebPreferences WebContentsImpl::GetWebkitPrefs() { |
int WebContentsImpl::CreateSwappedOutRenderView( |
SiteInstance* instance) { |
- return GetRenderManager()->CreateRenderView(instance, MSG_ROUTING_NONE, |
- true, true); |
+ return GetRenderManager()->CreateRenderFrame(instance, MSG_ROUTING_NONE, |
+ true, true); |
} |
void WebContentsImpl::OnUserGesture() { |
@@ -3603,8 +3608,8 @@ int WebContentsImpl::CreateOpenerRenderViews(SiteInstance* instance) { |
// Create a swapped out RenderView in the given SiteInstance if none exists, |
// setting its opener to the given route_id. Return the new view's route_id. |
- return GetRenderManager()->CreateRenderView(instance, opener_route_id, |
- true, true); |
+ return GetRenderManager()->CreateRenderFrame(instance, opener_route_id, |
+ true, true); |
} |
NavigationControllerImpl& WebContentsImpl::GetControllerForRenderManager() { |