Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index ccd90c4e6d4c7dc4619a2b10432e6b125b2bea82..c202a5ab6387888528b82b6b039ad8f1efcafe72 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -1042,6 +1042,19 @@ void RenderViewHostImpl::Shutdown() { |
run_modal_opener_id_ = MSG_ROUTING_NONE; |
} |
+ // We can't release the SessionStorageNamespace until our peer |
+ // in the renderer has wound down. |
+ if (GetProcess()->HasConnection()) { |
+ SessionStorageNamespaceMap map = |
+ delegate_->GetSessionStorageNamespaceMap(); |
+ if (!map.empty()) { |
+ // Note: in unittests, process is a MockRenderProcessHost so this |
+ // cast doesn't work there. |
michaeln
2014/06/02 20:13:39
i'll have to do something better about this, just
|
+ static_cast<RenderProcessHostImpl*>(GetProcess())-> |
+ ReleaseOnCloseAck(map, GetRoutingID()); |
+ } |
+ } |
+ |
RenderWidgetHostImpl::Shutdown(); |
} |