Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 305103003: Fix for 'Simple Adblock' extension crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderProcessHost can be a mock in unittests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698