diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-08 10:22:59 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-12-08 12:17:14 +0000 |
commit | 69b8f9169ffd66fdeca1ac60a4bc06b91d106186 (patch) | |
tree | c8b7f735583d0b4e0c0b61a014a7f4b3b26e85ab /chromium/content/browser/site_instance_impl.cc | |
parent | daa093eea7c773db06799a13bd7e4e2e2a9f8f14 (diff) | |
download | qtwebengine-chromium-69b8f9169ffd66fdeca1ac60a4bc06b91d106186.tar.gz |
BASELINE: Update Chromium to 63.0.3239.87
Change-Id: Iac27464730121b4fac76869d87d622504642e016
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/content/browser/site_instance_impl.cc')
-rw-r--r-- | chromium/content/browser/site_instance_impl.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/chromium/content/browser/site_instance_impl.cc b/chromium/content/browser/site_instance_impl.cc index 6be22050f5c..68f9dbe8532 100644 --- a/chromium/content/browser/site_instance_impl.cc +++ b/chromium/content/browser/site_instance_impl.cc @@ -364,10 +364,13 @@ GURL SiteInstance::GetSiteForURL(BrowserContext* browser_context, url::Origin origin(url); // Isolated origins should use the full origin as their site URL. A subdomain - // of an isolated origin should also use that isolated origin's site URL. + // of an isolated origin should also use that isolated origin's site URL. It + // is important to check |url| rather than |real_url| here, since some + // effective URLs (such as for NTP) need to be resolved prior to the isolated + // origin lookup. auto* policy = ChildProcessSecurityPolicyImpl::GetInstance(); url::Origin isolated_origin; - if (policy->GetMatchingIsolatedOrigin(url::Origin(real_url), + if (policy->GetMatchingIsolatedOrigin(url::Origin(url), &isolated_origin)) { return isolated_origin.GetURL(); } @@ -397,14 +400,10 @@ GURL SiteInstance::GetSiteForURL(BrowserContext* browser_context, // static GURL SiteInstanceImpl::GetEffectiveURL(BrowserContext* browser_context, const GURL& url) { - // Don't resolve URLs corresponding to isolated origins, as isolated origins - // take precedence over hosted apps. auto* policy = ChildProcessSecurityPolicyImpl::GetInstance(); - if (policy->IsIsolatedOrigin(url::Origin(url))) - return url; - - return GetContentClient()->browser()-> - GetEffectiveURL(browser_context, url); + bool is_isolated_origin = policy->IsIsolatedOrigin(url::Origin(url)); + return GetContentClient()->browser()->GetEffectiveURL(browser_context, url, + is_isolated_origin); } // static |