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

Issue 835313003: UsbDeviceHandleImpl must hold a scoped_refptr to UsbDeviceImpl. (Closed)

Created:
5 years, 11 months ago by Reilly Grant (use Gerrit)
Modified:
5 years, 11 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

UsbDeviceHandleImpl must hold a scoped_refptr to UsbDeviceImpl. When a USB device is disconnected the last reference to the UsbDevice object representing it may be freed. Outstanding device handles should retain a reference to the UsbDevice object until they themselves are closed (which is done in UsbDeviceImpl::OnDisconnect). This call releases the circular reference between UsbDeviceImpl and its open UsbDeviceHandleImpl children. Otherwise the UsbDeviceImpl will outlive the UsbDeviceHandleImpl and UsbDeviceHandleImpl::GetDevice will attempt to call AddRef on an invalid pointer. BUG=447761 Committed: https://crrev.com/e1a9120d381ae6c12535ea8b2c5679700320398a Cr-Commit-Position: refs/heads/master@{#310907}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M device/usb/usb_device_handle_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M device/usb/usb_device_handle_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Reilly Grant (use Gerrit)
Bare pointers to refcounted objects FTW!
5 years, 11 months ago (2015-01-09 23:15:32 UTC) #2
Ken Rockot(use gerrit already)
lgtm
5 years, 11 months ago (2015-01-09 23:36:08 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/835313003/1
5 years, 11 months ago (2015-01-10 00:09:52 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 11 months ago (2015-01-10 00:14:15 UTC) #6
commit-bot: I haz the power
5 years, 11 months ago (2015-01-10 00:15:04 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e1a9120d381ae6c12535ea8b2c5679700320398a
Cr-Commit-Position: refs/heads/master@{#310907}

Powered by Google App Engine
This is Rietveld 408576698