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

Issue 1291543002: Merge M45: Remove "delete this" pattern from UsbContext completely. (Closed)

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

Description

Merge M45: Remove "delete this" pattern from UsbContext completely. This change fixes a much rarer possible use-after-free on USB context shutdown than commit 3219ab0a9caf806b6dda0fe970869735726a5481. If there is an event that wakes up the event loop thread after running_ is set to false then the context could be freed before the attempt to wake it up with libusb_interrupt_handle_event() is made, instead signaling a freed object. This change instead makes it the responsibility of UsbContext to free the UsbEventHandler once its thread has been joined. BUG=518749 R=rockot@chromium.org Review URL: https://codereview.chromium.org/1281373002 Cr-Commit-Position: refs/heads/master@{#342711} (cherry-picked from commit 7ecee444661e8b855c15171615d68162602c39fa) Committed: https://chromium.googlesource.com/chromium/src/+/fb1944dab73e2db9807a40bcfe84d901d38aa29e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -14 lines) Patch
M device/usb/usb_context.h View 1 chunk +2 lines, -1 line 0 comments Download
M device/usb/usb_context.cc View 3 chunks +9 lines, -13 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Reilly Grant (use Gerrit)
Please look at this merge.
5 years, 4 months ago (2015-08-11 22:43:03 UTC) #1
Ken Rockot(use gerrit already)
lgtm
5 years, 4 months ago (2015-08-11 22:52:26 UTC) #2
Reilly Grant (use Gerrit)
5 years, 4 months ago (2015-08-11 22:57:57 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
fb1944dab73e2db9807a40bcfe84d901d38aa29e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698