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

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

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures for content:// URLs on Android Created 6 years 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 | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 39956621dfd5f5cfadb5b0ad0fe123726f7e58ce..6d9e4bbf7ca20cb650bc527ab8c585e7fbd20f08 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -520,6 +520,14 @@ void NavigatorImpl::DidNavigate(
frame_tree->root()->render_manager()->DidNavigateFrame(render_frame_host);
}
+ // Save the origin of the new page. Do this before calling
+ // DidNavigateFrame(), because the origin needs to be included in the SwapOut
+ // message, which is sent inside DidNavigateFrame(). SwapOut needs the
+ // origin because it creates a RenderFrameProxy that needs this to initialize
+ // its security context. This origin will also be sent to RenderFrameProxies
+ // created via ViewMsg_New and FrameMsg_NewFrameProxy.
+ render_frame_host->frame_tree_node()->set_current_origin(params.origin);
+
// When using --site-per-process, we notify the RFHM for all navigations,
// not just main frame navigations.
if (use_site_per_process) {
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698