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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 265123003: DRAFT CL: Check that we already know the renderer's page ID (outside commit). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698