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

Issue 2469123003: Call MessageFilter clean up handlers even for pending filters (Closed)

Created:
4 years, 1 month ago by tzik
Modified:
4 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, horo, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Call MessageFilter clean up handlers even for pending filters MessageFilters, specifically ResourceMessageFilter, need a chance to clean up its state on IO thread, even if the IPC channel is closed before the connection is fully established. Though in the existing code, ChannelProxy doesn't call clean up functions for its |pending_filters_|. After this CL, MessageFilter::OnChannelClosing and OnFilterRemoved will be called for all MessageFilters passed to ChannelProxy::AddFilter. Committed: https://crrev.com/0e85f1d17a35bbe7872d110e2894010801a9917b Cr-Commit-Position: refs/heads/master@{#430159}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M content/browser/memory/memory_pressure_controller_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 chunk +7 lines, -3 lines 4 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (16 generated)
tzik
PTAL
4 years, 1 month ago (2016-11-02 04:36:23 UTC) #6
haraken
(I think rockot should be a better reviewer for this.)
4 years, 1 month ago (2016-11-02 04:38:30 UTC) #7
tzik
On 2016/11/02 04:38:30, haraken wrote: > (I think rockot should be a better reviewer for ...
4 years, 1 month ago (2016-11-02 04:47:01 UTC) #8
haraken
On 2016/11/02 04:47:01, tzik wrote: > On 2016/11/02 04:38:30, haraken wrote: > > (I think ...
4 years, 1 month ago (2016-11-02 04:47:34 UTC) #9
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc#newcode214 ipc/ipc_channel_proxy.cc:214: for (auto& filter : pending_filters_) { Unlike filters_, pending_filters_ ...
4 years, 1 month ago (2016-11-03 05:17:12 UTC) #16
tzik
https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc#newcode214 ipc/ipc_channel_proxy.cc:214: for (auto& filter : pending_filters_) { On 2016/11/03 05:17:12, ...
4 years, 1 month ago (2016-11-04 07:13:56 UTC) #17
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc#newcode214 ipc/ipc_channel_proxy.cc:214: for (auto& filter : pending_filters_) { On 2016/11/04 ...
4 years, 1 month ago (2016-11-04 20:05:30 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2469123003/20001
4 years, 1 month ago (2016-11-05 08:35:32 UTC) #21
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-05 09:27:11 UTC) #23
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/0e85f1d17a35bbe7872d110e2894010801a9917b Cr-Commit-Position: refs/heads/master@{#430159}
4 years, 1 month ago (2016-11-05 09:29:29 UTC) #25
boliu
Hi, a test seemed to have caught a real bug in this CL, can we ...
4 years, 1 month ago (2016-11-07 17:46:21 UTC) #27
boliu
https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc File ipc/ipc_channel_proxy.cc (right): https://codereview.chromium.org/2469123003/diff/20001/ipc/ipc_channel_proxy.cc#newcode216 ipc/ipc_channel_proxy.cc:216: filter->OnFilterRemoved(); the bug is filters in pending_fitlers_ here have ...
4 years, 1 month ago (2016-11-07 18:03:48 UTC) #28
boliu
looking at the CL description, it's actually the intention to call OnFilterRemoved/Closed even if it ...
4 years, 1 month ago (2016-11-07 18:50:46 UTC) #29
tzik
4 years, 1 month ago (2016-11-08 17:33:22 UTC) #30
Message was sent while issue was closed.
On 2016/11/07 18:50:46, boliu wrote:
> looking at the CL description, it's actually the intention to call
> OnFilterRemoved/Closed even if it the filter hasn't been added in the first
> place? Imo, this is not safe, there are lots of existing filters written with
> the assumption that these calls happen in pairs, and breaking that is probably
> going to introduce real bugs

Oh, sorry. I thought I checked all subclasses of MessageFilter to ensure it's
safe to call, though I overlooked GpuChannel.

Powered by Google App Engine
This is Rietveld 408576698