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

Unified Diff: content/browser/loader/cross_site_resource_handler.cc

Issue 625483002: OOPIF: Allow navigations on a RFH without a site to stay in same process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/cross_site_resource_handler.cc
diff --git a/content/browser/loader/cross_site_resource_handler.cc b/content/browser/loader/cross_site_resource_handler.cc
index 4f7ae48763e1490b40764ee830e70fc780ec0a40..aa4e88d6afbd579d0911093a79f0cfbc1be6bf4d 100644
--- a/content/browser/loader/cross_site_resource_handler.cc
+++ b/content/browser/loader/cross_site_resource_handler.cc
@@ -97,6 +97,11 @@ bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) {
if (!rfh)
return false;
+ // A transfer is not needed if the current SiteInstance doesn't yet have a
+ // site. This is the case for tests that use NavigateToURL.
+ if (!rfh->GetSiteInstance()->HasSite())
+ return false;
+
// TODO(nasko): This check is very simplistic and is used temporarily only
// for --site-per-process. It should be updated to match the check performed
// by RenderFrameHostManager::UpdateStateForNavigate.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698