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

Issue 147083014: Introduce NaClFileInfoAutoCloser as an RAII wrapper. (Closed)

Created:
6 years, 10 months ago by bsy
Modified:
6 years, 10 months ago
CC:
chromium-reviews, dmichael (off chromium), Nick Bray (chromium)
Visibility:
Public.

Description

Introduce NaClFileInfoAutoCloser as an RAII wrapper. This eliminates two descriptor leaks -- the downloaded nmf file, and the nexe itself. One socket (on Linux) still leak. Because Unixes always use the lowest available number and the leaked descriptor is the highest numbered one while the F@H nexe is running, this implies that this might be a PPAPI proxy related leak, since proxy hookup is the last thing that happens before the application itself runs. See /home/bsy/fd-leak-log for time-lapsed view of what happens when a F@H NaCl module finishes and another starts up. TEST= manually running F@H and checking /proc/<renderer>/fd/* BUG=335186 R=bbudge@chromium.org, dmichael@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247794

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 18

Patch Set 3 : CR feedback; restored mysteriously missing changes in plugin.cc #

Patch Set 4 : struct/class fix for NaClFileInfoAutoCloser #

Patch Set 5 : failed upload?!? #

Total comments: 6

Patch Set 6 : info_.desc -> get_desc() accessor consistency #

Patch Set 7 : bbudge CR fb #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -35 lines) Patch
M ppapi/native_client/src/trusted/plugin/file_downloader.h View 1 2 3 4 5 6 4 chunks +32 lines, -4 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/file_downloader.cc View 1 2 3 4 5 6 5 chunks +56 lines, -18 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.cc View 1 2 3 4 5 6 6 chunks +28 lines, -12 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
bsy
PTAL
6 years, 10 months ago (2014-01-29 00:58:11 UTC) #1
dmichael (off chromium)
Thanks, looks good overall. I just had some nits. https://codereview.chromium.org/147083014/diff/20001/ppapi/native_client/src/trusted/plugin/file_downloader.cc File ppapi/native_client/src/trusted/plugin/file_downloader.cc (right): https://codereview.chromium.org/147083014/diff/20001/ppapi/native_client/src/trusted/plugin/file_downloader.cc#newcode61 ppapi/native_client/src/trusted/plugin/file_downloader.cc:61: ...
6 years, 10 months ago (2014-01-29 18:22:27 UTC) #2
bsy
addressed CR feedback. found issue with plugin.cc's url_to_file_info_map_ -- seems like an old version was ...
6 years, 10 months ago (2014-01-29 20:51:27 UTC) #3
dmichael (off chromium)
lgtm, thanks! https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.cc File ppapi/native_client/src/trusted/plugin/file_downloader.cc (right): https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.cc#newcode67 ppapi/native_client/src/trusted/plugin/file_downloader.cc:67: if (-1 != info_.desc) { nit: this ...
6 years, 10 months ago (2014-01-29 20:59:06 UTC) #4
bbudge
https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.h File ppapi/native_client/src/trusted/plugin/file_downloader.h (right): https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.h#newcode49 ppapi/native_client/src/trusted/plugin/file_downloader.h:49: explicit NaClFileInfoAutoCloser(NaClFileInfo pass_ownership); It would be nice if pass_ownership's ...
6 years, 10 months ago (2014-01-29 21:43:31 UTC) #5
bsy
PTAL https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.cc File ppapi/native_client/src/trusted/plugin/file_downloader.cc (right): https://codereview.chromium.org/147083014/diff/80001/ppapi/native_client/src/trusted/plugin/file_downloader.cc#newcode67 ppapi/native_client/src/trusted/plugin/file_downloader.cc:67: if (-1 != info_.desc) { On 2014/01/29 20:59:06, ...
6 years, 10 months ago (2014-01-30 00:29:40 UTC) #6
bbudge
LGTM thanks for fixing this!
6 years, 10 months ago (2014-01-30 00:55:41 UTC) #7
bsy
6 years, 10 months ago (2014-01-30 01:07:30 UTC) #8
Message was sent while issue was closed.
Committed patchset #7 manually as r247794 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698