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

Unified Diff: content/browser/site_instance.cc

Issue 9147051: Don't swap processes for javascript: URLs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing all variable style issues while at it. Created 8 years, 11 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/site_instance_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance.cc
diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc
index 2c5a1d76622c93def01d846d1193a0be108a680e..eb5ec071bdbc5d1a5293bdc352199baea4476e08 100644
--- a/content/browser/site_instance.cc
+++ b/content/browser/site_instance.cc
@@ -129,6 +129,11 @@ bool SiteInstance::HasWrongProcessForURL(const GURL& url) const {
if (!HasProcess())
return false;
+ // If the URL to navigate to can be associated with any site instance,
+ // we want to keep it in the same process.
+ if (IsURLSameAsAnySiteInstance(url))
+ return false;
+
// If the site URL is an extension (e.g., for hosted apps or WebUI) but the
// process is not (or vice versa), make sure we notice and fix it.
GURL site_url = GetSiteForURL(browsing_instance_->browser_context(), url);
« no previous file with comments | « no previous file | content/browser/site_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698