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

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: 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
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 7139f7eaecf7fffa109e80a92bbeebf69c9471cf..04a7549b387ce31af2bec5be22a2f180c9843488 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1604,14 +1604,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();

Powered by Google App Engine
This is Rietveld 408576698