DescriptionUse 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 #
Messages
Total messages: 5 (0 generated)
|