Index: content/browser/site_instance_impl.cc |
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc |
index f1555dc1af8f627c7eb50d811a3ae445adec9678..d9069548b379896267977d569ec1a89bb73b5013 100644 |
--- a/content/browser/site_instance_impl.cc |
+++ b/content/browser/site_instance_impl.cc |
@@ -141,6 +141,7 @@ void SiteInstanceImpl::SetSite(const GURL& url) { |
// be fixed, but until then, we should still not set the site of a |
// SiteInstance more than once. |
DCHECK(!has_site_); |
+ DCHECK(!browsing_instance_->HasSiteInstance(url)); |
// Remember that this SiteInstance has been used to load a URL, even if the |
// URL is invalid. |
@@ -181,6 +182,10 @@ SiteInstance* SiteInstanceImpl::GetRelatedSiteInstance(const GURL& url) { |
return browsing_instance_->GetSiteInstanceForURL(url); |
} |
+SiteInstance* SiteInstanceImpl::GetRelatedEmptySiteInstance() { |
+ return new SiteInstanceImpl(browsing_instance_.get()); |
+} |
+ |
bool SiteInstanceImpl::IsRelatedSiteInstance(const SiteInstance* instance) { |
return browsing_instance_.get() == static_cast<const SiteInstanceImpl*>( |
instance)->browsing_instance_.get(); |