Index: content/browser/web_contents/render_view_host_manager.cc |
diff --git a/content/browser/web_contents/render_view_host_manager.cc b/content/browser/web_contents/render_view_host_manager.cc |
index a11689187f7932b1b7873746bdbd253cd4471e70..28139565f7b00ade95983997e0f90030413d908a 100644 |
--- a/content/browser/web_contents/render_view_host_manager.cc |
+++ b/content/browser/web_contents/render_view_host_manager.cc |
@@ -499,6 +499,12 @@ SiteInstance* RenderViewHostManager::GetSiteInstanceForEntry( |
if (entry.restore_type() != NavigationEntryImpl::RESTORE_NONE) |
curr_site_instance->SetSite(dest_url); |
+ // View-source URLs must use a new SiteInstance and BrowsingInstance. |
+ // TODO(nasko): This is the same condition as later in the function. This |
+ // should be taken into account when refactoring this method. |
+ if (entry.IsViewSourceMode()) |
+ return SiteInstance::CreateForURL(browser_context, dest_url); |
Charlie Reis
2012/08/16 22:28:09
Please move this check between the HasWrongProcess
nasko
2012/08/16 22:59:23
Done.
|
+ |
return curr_site_instance; |
} |