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 3ec87d36263b55afd0769088dbaf5edcc6980a7e..66dcee66dcc35059bf923b25ab6f54857474fe07 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -40,6 +40,7 @@ |
#include "content/common/frame_owner_properties.h" |
#include "content/common/site_isolation_policy.h" |
#include "content/common/view_messages.h" |
+#include "content/public/browser/browser_context.h" |
#include "content/public/browser/content_browser_client.h" |
#include "content/public/browser/render_process_host_observer.h" |
#include "content/public/browser/render_widget_host_iterator.h" |
@@ -772,6 +773,20 @@ RenderFrameHostImpl* RenderFrameHostManager::GetFrameHostForNavigation( |
no_renderer_swap |= !CanSubframeSwapProcess( |
request.common_params().url, request.source_site_instance(), |
request.dest_site_instance(), was_server_redirect); |
+ |
+ // Even if the url should warrant a process swap, check if the newly |
+ // created SiteInstance would use the same StoragePartition as its parent. |
+ // If that's not the case, the subframe should not swap processes, as there |
+ // is not support for having an OOPIF that does not share the storage |
nasko
2017/03/06 18:12:07
nit: StoragePartition.
|
+ // partition of its parent. |
+ BrowserContext* browser_context = |
+ frame_tree_node_->navigator()->GetController()->GetBrowserContext(); |
+ no_renderer_swap |= BrowserContext::GetStoragePartition( |
+ browser_context, dest_site_instance.get()) != |
+ BrowserContext::GetStoragePartition( |
+ browser_context, frame_tree_node_->parent() |
+ ->current_frame_host() |
+ ->GetSiteInstance()); |
} |
if (no_renderer_swap) { |