Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 06993931cba1750bd8883cce700e93d8bac6dcc9..3a90d6a471b91c0c2f7de96c3d9c78293828ed57 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -384,8 +384,9 @@ void RenderFrameHostImpl::OnDidRedirectProvisionalLoad( |
int32 page_id, |
const GURL& source_url, |
const GURL& target_url) { |
+ CHECK_EQ(render_view_host_->page_id_, page_id); |
frame_tree_node_->navigator()->DidRedirectProvisionalLoad( |
- this, page_id, source_url, target_url); |
+ this, render_view_host_->page_id_, source_url, target_url); |
} |
// Called when the renderer navigates. For every frame loaded, we'll get this |
@@ -440,6 +441,10 @@ void RenderFrameHostImpl::OnNavigate(const IPC::Message& msg) { |
process->ReceivedBadMessage(); |
} |
+ // Update the RVH's current page ID so that other IPCs make sense. |
+ // TODO(creis): Should this be above the second return statement above? |
+ render_view_host_->page_id_ = validated_params.page_id; |
+ |
// Without this check, an evil renderer can trick the browser into creating |
// a navigation entry for a banned URL. If the user clicks the back button |
// followed by the forward button (or clicks reload, or round-trips through |