Don't reset speech_recognition_manager_ in BrowserMainLoop::ShutdownThreadsAndCleanUp()
Instead, let it be reset during the destruction of BrowserMainLoop, which happens after the IO thread has been shutdown. This prevents a race condition between ShutdownThreadsAndCleanUp() and the destructor of InputTagSpeechDispatcherHost. The latter runs on the IO thread, and could sometimes end up trying to use the SpeechRecognitionManager at the same time as it was being destructed. Tested by running WorkerTest.QueuedSharedWorkerShutdown a couple of hundred times under ASan, as well as running existing speech tests. BUG=none Review URL: https://chromiumcodereview.appspot.com/10836007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149394 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment