Index: content/browser/frame_host/render_frame_host_manager.cc |
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
index 67a150e11a6ac9700f05fa5aa63cc57d0bd0075a..491a01a2827eccaecc4dd17ecf0ee4517fe4213a 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -1269,6 +1269,10 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( |
SiteInstance* new_site_instance, |
const GURL& new_effective_url, |
bool new_is_view_source_mode) const { |
+ // Subframe must stay in the same BrowsingInstance as its parent. |
Charlie Reis
2015/12/04 18:23:23
nit: A subframe
Do we want a TODO for "Ensure tha
nasko
2015/12/04 18:32:33
Done.
|
+ if (!frame_tree_node_->IsMainFrame()) |
+ return false; |
+ |
// If new_entry already has a SiteInstance, assume it is correct. We only |
// need to force a swap if it is in a different BrowsingInstance. |
if (new_site_instance) { |