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

Issue 22492003: Fixes leaking transfer objects due to improper USB handle closure. (Closed)

Created:
7 years, 4 months ago by Bei Zhang
Modified:
7 years, 4 months ago
Reviewers:
zel, pfeldman
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Fixes leaking transfer objects due to improper USB handle closure. We were simply close the device handle and left all the flying transfers hanging. libusb guarantees that the transfer callbacks will be called even if canceled. But it was not freed because during the libusb_close the user_data of the transfer is reset, so our handler will not be relaid to. This change is to wait for all the transfers to be canceled before we really close the platform handle. BUG=223817 BUG=261695 BUG=269048 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216793

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Fixes #

Patch Set 3 : Minor fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -94 lines) Patch
M chrome/browser/extensions/api/usb/usb_api.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/usb/usb_device.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/usb/usb_device_handle.h View 1 6 chunks +43 lines, -23 lines 0 comments Download
M chrome/browser/usb/usb_device_handle.cc View 1 2 11 chunks +257 lines, -68 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Bei Zhang
Hi Pavel and Zelidrag, Please review. Thanks, Bei
7 years, 4 months ago (2013-08-08 07:15:45 UTC) #1
pfeldman
https://codereview.chromium.org/22492003/diff/31001/chrome/browser/usb/usb_device_handle.cc File chrome/browser/usb/usb_device_handle.cc (right): https://codereview.chromium.org/22492003/diff/31001/chrome/browser/usb/usb_device_handle.cc#newcode239 chrome/browser/usb/usb_device_handle.cc:239: transfer.callback.Run(ConvertTransferStatus(handle->status), buffer, You should respond on the thread transfer ...
7 years, 4 months ago (2013-08-09 08:58:59 UTC) #2
Bei Zhang
Thanks for reviewing! https://codereview.chromium.org/22492003/diff/31001/chrome/browser/usb/usb_device_handle.cc File chrome/browser/usb/usb_device_handle.cc (right): https://codereview.chromium.org/22492003/diff/31001/chrome/browser/usb/usb_device_handle.cc#newcode239 chrome/browser/usb/usb_device_handle.cc:239: transfer.callback.Run(ConvertTransferStatus(handle->status), buffer, On 2013/08/09 08:58:59, pfeldman ...
7 years, 4 months ago (2013-08-09 16:43:55 UTC) #3
pfeldman
lgtm
7 years, 4 months ago (2013-08-09 17:13:18 UTC) #4
pfeldman
lgtm
7 years, 4 months ago (2013-08-09 17:13:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ikarienator@chromium.org/22492003/70001
7 years, 4 months ago (2013-08-09 18:49:14 UTC) #6
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=185915
7 years, 4 months ago (2013-08-09 22:35:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ikarienator@chromium.org/22492003/70001
7 years, 4 months ago (2013-08-09 22:47:02 UTC) #8
commit-bot: I haz the power
7 years, 4 months ago (2013-08-10 01:05:02 UTC) #9
Message was sent while issue was closed.
Change committed as 216793

Powered by Google App Engine
This is Rietveld 408576698