DescriptionFixed the speech crash when the render view has gone away then users click "try again".
After a speech recognition session is done, chrome will pop up a bubble to allow users to choose "cancel" or "try again".
If the users choose "try again", it will use the last session's SpeechRecognitionSessionConfig which is stored in ChromeSpeechRecognitionManagerDelegate to create a new session.
But the render view might have gone away if the page is automatically refreshed to another url. Then the event_listener in the SpeechRecognitionSessionConfig is not valid anymore and should not be used.
This patch added a OnAbortSessionsForListener callback from SpeechRecognitionManagerImpl to ChromeSpeechRecognitionManagerDelegate to notify chrome we should not try to restore the session for "try again" event.
BUG=222000
TEST=open the PoC.html in the issue, click on the page and then click on "try again" button.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192299
Patch Set 1 #
Total comments: 5
Patch Set 2 : used the tabwatcher to close the bubble when the renderview is going away #
Total comments: 3
Patch Set 3 : used a struct and vector instead of pair and map #Messages
Total messages: 9 (0 generated)
|