Make WaitableEventWatcher TaskScheduler-friendly.
With this CL, WaitableEventWatcher uses SequencedTaskRunnerHandle instead of MessageLoop::current() to post back to the sequence that called StartWatching(). Also, WaitableEventWatcher no longer registers itself as a destruction observer of the MessageLoop from which StartWatching() is called. If the watched WaitableEvent is signaled after the MessageLoop is destroyed, the task posted by WaitableEventWatcher to the SequencedTaskRunner will simply not run (no crash). MessageLoop::current() and destruction observer do not work with TaskScheduler. BUG=650318 Review-Url: https://codereview.chromium.org/2368423002 Cr-Commit-Position: refs/heads/master@{#422856}
Showing
Please register or sign in to comment