forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a race in the creation of HidConnectionLinux::Helper.
The creation of this object on the FILE thread races with the possible destruction of the object on the UI thread. The scoped_ptr<> that owns the pointer may try to destroy the object on the UI thread if the connection is closed before the helper is started. Generally, updating the helper_ pointer from the FILE thread is a bad idea. This patch moves creation of the helper to the UI thread, it is then detached from that thread when it is started. The HidConnectionLinux no longer uses a scoped_ptr<> to hold it and instead must always free it explicitly with DeleteSoon. BUG= Review URL: https://codereview.chromium.org/786343003 Cr-Commit-Position: refs/heads/master@{#307850}
- Loading branch information
Showing
2 changed files
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters