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

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

Issue 2739193004: Check for already existing entry when adding to SiteProcessMap. (Closed)
Patch Set: More fixes based on reviews. Created 3 years, 9 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
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 07f3cc9d1eb6137155132c4f146032ea6b1efe7d..a10793e4a2ca4295fb26f2fd507bf061d2902a1a 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -625,12 +625,12 @@ void NavigatorImpl::DidNavigate(
}
// Update the site of the SiteInstance if it doesn't have one yet, unless
- // assigning a site is not necessary for this URL. In that case, the
- // SiteInstance can still be considered unused until a navigation to a real
- // page.
+ // assigning a site is not necessary for this URL or the commit was for an
+ // error page. In that case, the SiteInstance can still be considered unused
Charlie Reis 2017/03/13 22:31:33 Leaving it unassigned for the error page is someth
nasko 2017/03/14 16:56:02 We correctly transfer it to the extension process
Charlie Reis 2017/03/14 23:46:47 Ok-- I'm glad you tested the redirect case, since
nasko 2017/03/15 00:32:06 Commits as expected in the extension process :). H
+ // until a navigation to a real page.
SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance();
- if (!site_instance->HasSite() &&
- ShouldAssignSiteForURL(params.url)) {
+ if (!site_instance->HasSite() && ShouldAssignSiteForURL(params.url) &&
+ !params.url_is_unreachable) {
site_instance->SetSite(params.url);
}

Powered by Google App Engine
This is Rietveld 408576698