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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 2469123003: Call MessageFilter clean up handlers even for pending filters (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « content/browser/memory/memory_pressure_controller_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index f99274f1555f422e13138a3c6ca4648cec434fd5..1e8bec057be0410d0694cd7343048ae3b53136bf 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -211,9 +211,13 @@ void ChannelProxy::Context::OnChannelClosed() {
if (!channel_)
return;
- for (size_t i = 0; i < filters_.size(); ++i) {
- filters_[i]->OnChannelClosing();
- filters_[i]->OnFilterRemoved();
+ for (auto& filter : pending_filters_) {
Ken Rockot(use gerrit already) 2016/11/03 05:17:12 Unlike filters_, pending_filters_ is accessed from
tzik 2016/11/04 07:13:56 So, is the comment around line 226 no longer valid
Ken Rockot(use gerrit already) 2016/11/04 20:05:30 Oops. Sorry, I was conflating OnChannelError and O
+ filter->OnChannelClosing();
+ filter->OnFilterRemoved();
boliu 2016/11/07 18:03:48 the bug is filters in pending_fitlers_ here have n
+ }
+ for (auto& filter : filters_) {
+ filter->OnChannelClosing();
+ filter->OnFilterRemoved();
}
// We don't need the filters anymore.
« no previous file with comments | « content/browser/memory/memory_pressure_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698