DescriptionInvalidate the weak factory in SpeechRecognizer::EventListener::StopOnIOThread().
When an |app_list::SpeechRecognizer| is destroyed, a callback to
SpeechRecognizer::EventListener::StopOnIOThread() is posted to the IO
thread, and the |SpeechRecognizer| releases it's reference to
|EventListener|. |EventListener| may have weak pointers that must be
invalidated on the IO thread. However, on |SpeechRecognizer| releasing
its reference, the callback may have already run and hence the
|EventListener| is deleted upon releasing that reference on the UI
thread. This change ensures there are no more weak references to
|EventListener| by the time it is destroyed.
BUG=547650
Committed: https://crrev.com/228f0a02c58c37e39099daf12d57488c25b328fe
Cr-Commit-Position: refs/heads/master@{#356008}
Patch Set 1 #
Messages
Total messages: 9 (3 generated)
|