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

Issue 1174423002: Fix leak of PlatformHandleDispatchers in Mojo IPC (Closed)

Created:
5 years, 6 months ago by rogerj
Modified:
5 years, 6 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, Krzysztof Olczyk, jb
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix leak of PlatformHandleDispatchers in Mojo IPC PassWrappedPlatformHandle does not close the MojoHandle. The destructor of ScopedHandleBase will however close it. The problem with this code was that it called release() on the ScopedHandle, preventing the destructor from being called, and thus also the MojoHandle from being closed. This leaves the PlatformHandleDispatcher associated with the MojoHandle alive in mojo::system::Core::handle_table_ By calling reset() instead the MojoHandle is closed, and the leak is fixed. R=morrita@chromium.org, viettrungluu@chromium.org, agl@chromium.org BUG=None Committed: https://crrev.com/b2134362e27459f1098a35effedad91e2d553192 Cr-Commit-Position: refs/heads/master@{#334197}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M ipc/mojo/ipc_mojo_handle_attachment.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 10 (3 generated)
rogerj
5 years, 6 months ago (2015-06-11 10:48:33 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1174423002/1
5 years, 6 months ago (2015-06-12 09:50:50 UTC) #3
commit-bot: I haz the power
Dry run: No LGTM from a valid reviewer yet. Only full committers are accepted. Even ...
5 years, 6 months ago (2015-06-12 09:50:53 UTC) #5
Hajime Morrita
LGTM. Thanks much for finding and fixing this, Roger! I wasn't aware that PassWrappedPlatformHandle() just ...
5 years, 6 months ago (2015-06-12 17:14:46 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1174423002/1
5 years, 6 months ago (2015-06-12 17:16:13 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 6 months ago (2015-06-12 18:17:50 UTC) #9
commit-bot: I haz the power
5 years, 6 months ago (2015-06-12 18:18:50 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/b2134362e27459f1098a35effedad91e2d553192
Cr-Commit-Position: refs/heads/master@{#334197}

Powered by Google App Engine
This is Rietveld 408576698