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

Issue 348323002: Use base::File for the OpenResourceCallback's argument. (Closed)

Created:
6 years, 6 months ago by hidehiko
Modified:
6 years, 6 months ago
Reviewers:
teravest
CC:
chromium-reviews, dmichael (off chromium), hamaji, mazda
Project:
chromium
Visibility:
Public.

Description

Use base::File for the OpenResourceCallback's argument. ManifestServiceChannel can be removed while the DownloadFile is running. In such a case, ManifestServiceProxy::DidDownloadFile is called upon the completion of DownloadFile, and then callback is invoked. However, as the callback refers the ManifestServiceChannel weakly, so the native file descriptor will be leaked. By this change, OpenResourceCallback takes the base::File instead of base::PlatformFile. Since base::File will take the ownership of the native file descriptor, it will be closed correctly, even if the ManifestServiceChannel is deleted before. BUG=239656 TEST=Ran browser_tests --gtest_filter=*NonSfi*:*NonSFI* locally and trybots. CQ_EXTRA_TRYBOTS=tryserver.chromium:linux_rel_precise32 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279146

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -10 lines) Patch
M components/nacl/renderer/manifest_service_channel.h View 4 chunks +4 lines, -5 lines 0 comments Download
M components/nacl/renderer/manifest_service_channel.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
hidehiko
Hi Justin, I found there still remains a path that FD would be leaked even ...
6 years, 6 months ago (2014-06-23 14:54:37 UTC) #1
teravest
lgtm
6 years, 6 months ago (2014-06-23 15:07:02 UTC) #2
hidehiko
The CQ bit was checked by hidehiko@chromium.org
6 years, 6 months ago (2014-06-23 18:03:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hidehiko@chromium.org/348323002/1
6 years, 6 months ago (2014-06-23 18:05:15 UTC) #4
commit-bot: I haz the power
6 years, 6 months ago (2014-06-23 18:24:51 UTC) #5
Message was sent while issue was closed.
Change committed as 279146

Powered by Google App Engine
This is Rietveld 408576698