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

Issue 159366: Fix memory leak in IPC::ChannelProxy (Closed)

Created:
11 years, 5 months ago by jcampan
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, jam
Visibility:
Public.

Description

The messages attached to the task created by an IPC ChannelProxy are leaked when the message loop is destroyed (the MessageLoop deletes its pending tasks on destruction, but not the messages). BUG=17091 TEST=Run the ui_tests with Purify. We should not be leaking messages. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21900

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -3 lines) Patch
M ipc/ipc_channel_proxy.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 2 chunks +25 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jcampan
11 years, 5 months ago (2009-07-24 21:45:54 UTC) #1
kuchhal
This change will fix the message leak for this one place. Apparently there are dozens ...
11 years, 5 months ago (2009-07-24 22:09:12 UTC) #2
jam
Is this really important to fix? It seems ok to have these kinds of leaks ...
11 years, 5 months ago (2009-07-24 22:12:28 UTC) #3
jcampan1
I think it should fix the leak for all message send through a proxy channel ...
11 years, 5 months ago (2009-07-27 17:26:20 UTC) #4
jcampan1
As you say these are not important leaks as they happen on shutdown. The problem ...
11 years, 5 months ago (2009-07-27 17:35:18 UTC) #5
rahulk
Hmm I think you are right. A couple of dupes that I looked into do ...
11 years, 5 months ago (2009-07-27 19:47:36 UTC) #6
rahulk
OTOH leaks show up in Purify when NewRunnableMethod is used to post a task (for ...
11 years, 5 months ago (2009-07-27 19:56:43 UTC) #7
jcampan1
Hey Darin, What's your opinion? Do you think the change is worth it? Jay On ...
11 years, 4 months ago (2009-07-28 18:02:47 UTC) #8
darin (slow to review)
I think this change is fine, however, I worry that this is just patching one ...
11 years, 4 months ago (2009-07-28 18:10:36 UTC) #9
jam
11 years, 4 months ago (2009-07-29 18:10:29 UTC) #10
Agreed.  This also happens everywhere we use
IPC_MESSAGE_HANDLER_DELAY_REPLY, since we pass the IPC::Message* around.

On Tue, Jul 28, 2009 at 11:10 AM, <darin@chromium.org> wrote:

> I think this change is fine, however, I worry that this is just patching
> one particular instance of this bug.  The real problem is with using
> NewRunnableMethod to pass ownership of an object.  It might be worth it
> to find a better general solution for this kind of thing, but I'm not
> sure what that would be.  LGTM.
>
>
> http://codereview.chromium.org/159366
>

Powered by Google App Engine
This is Rietveld 408576698