Revert "Attach UsbContext to libusb_device(_handle) pointers"
This reverts commit daa348fa. Reason for revert: https://crbug.com/866782 Original change's description: > Attach UsbContext to libusb_device(_handle) pointers > > This change modifies ScopedLibusbDeviceRef and adds a new class > ScopedLibusbDeviceHandle. This now explicitly own a reference to the > UsbContext object (which reference counts a libusb_context) in addition > to the libusb_device or libusb_device_handle they are wrapping. > > This resolves potential use-after-frees possible when posting tasks > with a ScopedLibusbDeviceRef since the UsbService the task is being > posted to could be destroyed before the task is executed. The > libusb_device would then be released after its libusb_context has been > destroyed. > > This is based on https://crrev.com/c/1131949 after I realized there > where additional issues that needed to be addressed. > > Bug: 838947 > Change-Id: Idee02828bf615bd477033e585fffe03cf4d20595 > Reviewed-on: https://chromium-review.googlesource.com/1145910 > Reviewed-by: Ken Rockot <rockot@chromium.org> > Commit-Queue: Reilly Grant <reillyg@chromium.org> > Cr-Commit-Position: refs/heads/master@{#577329} TBR=rockot@chromium.org,reillyg@chromium.org Change-Id: I4146987c84b34e1d3625e7e91cfc672afe98054c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 838947 Reviewed-on: https://chromium-review.googlesource.com/1147950Reviewed-by:Reilly Grant <reillyg@chromium.org> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#577525}
Showing
Please register or sign in to comment