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

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

Issue 18167004: Iterate over listeners when sending process died notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DISALLOW_COPY_AND_ASSIGN() Created 7 years, 6 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
« no previous file with comments | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index fe0e947da174f9b60ead07d4cec47b46b800a9a6..0287962039db0c8a9eec0d900d4415427b8e0277 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1611,14 +1611,13 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) {
channel_.reset();
gpu_message_filter_ = NULL;
- RenderWidgetHost::List widgets = RenderWidgetHost::GetRenderWidgetHosts();
- for (size_t i = 0; i < widgets.size(); ++i) {
- if (widgets[i]->GetProcess()->GetID() != GetID())
- continue;
- RenderWidgetHostImpl::From(widgets[i])->OnMessageReceived(
- ViewHostMsg_RenderViewGone(widgets[i]->GetRoutingID(),
+ IDMap<IPC::Listener>::iterator iter(&listeners_);
+ while (!iter.IsAtEnd()) {
+ iter.GetCurrentValue()->OnMessageReceived(
+ ViewHostMsg_RenderViewGone(iter.GetCurrentKey(),
static_cast<int>(status),
exit_code));
+ iter.Advance();
}
ClearTransportDIBCache();
« no previous file with comments | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698