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

Unified Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 18512004: Cleanup swapped out RenderViewHosts when the process goes away. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 7 years, 5 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/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 ed674d5c90592252e3345ecba9780f7e0698fa3f..648664a1bcfe9655366da81aac3fa7c46c2089f4 100644
--- a/content/browser/web_contents/render_view_host_manager.cc
+++ b/content/browser/web_contents/render_view_host_manager.cc
@@ -87,7 +87,10 @@ void RenderViewHostManager::Init(BrowserContext* browser_context,
GetControllerForRenderManager().GetSessionStorageNamespace(
site_instance)));
- // Keep track of renderer processes as they start to shut down.
+ // Keep track of renderer processes as they start to shut down or are
+ // crashed/killed.
+ registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSED,
+ NotificationService::AllSources());
registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSING,
NotificationService::AllSources());
}
@@ -397,6 +400,7 @@ void RenderViewHostManager::Observe(
const NotificationSource& source,
const NotificationDetails& details) {
switch (type) {
+ case NOTIFICATION_RENDERER_PROCESS_CLOSED:
case NOTIFICATION_RENDERER_PROCESS_CLOSING:
RendererProcessClosing(
Source<RenderProcessHost>(source).ptr());

Powered by Google App Engine
This is Rietveld 408576698