Chromium Code Reviews
DescriptionRemove MessageLoop::current() from ppapi/proxy.
Whenever possible, use ThreadTaskRunnerHandle::Get() instead of
MessageLoop::current(). ThreadTaskRunnerHandle::Get() works within
TaskScheduler while MessageLoop::current() doesn't.
Good reasons to use MessageLoop::current():
- Add destruction, nesting or task observers.
- Run nested loops.
Bad reasons to use MessageLoop::current():
- Post tasks. Use ThreadTaskRunnerHandle::Get() instead.
- Watch a file descriptor. Use FileDescriptorWatcher instead.
- Verify that it is possible to post tasks to the current thread.
Use ThreadTaskRunnerHandle::IsSet() instead.
- Verify that code runs on a specific thread. Use
SingleThreadTaskRunner::BelongsToCurrentThread() instead.
BUG=650723
Committed: https://crrev.com/2111a57d06c915dce0a96bdfd2cffba284cf53c6
Cr-Commit-Position: refs/heads/master@{#424863}
Patch Set 1 #Patch Set 2 : fix test error #
Messages
Total messages: 16 (11 generated)
|
||||||||||||||||||||||||||||