Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Issue 12982009: Fixed the speech crash when the render view has gone away then users click "try again" (Closed)

Created:
7 years, 9 months ago by no longer working on chromium
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Fixed 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -9 lines) Patch
M chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc View 1 2 3 chunks +49 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
no longer working on chromium
Tommi, please take a look.
7 years, 9 months ago (2013-03-27 15:08:13 UTC) #1
tommi (sloooow) - chröme
https://codereview.chromium.org/12982009/diff/1/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc File chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc (right): https://codereview.chromium.org/12982009/diff/1/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc#newcode278 chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc:278: void ChromeSpeechRecognitionManagerDelegate::RestartLastSession() { Hmm... rename to MaybeRestartLastSession? https://codereview.chromium.org/12982009/diff/1/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc#newcode280 chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc:280: ...
7 years, 9 months ago (2013-03-28 10:38:46 UTC) #2
no longer working on chromium
Tommi, I stepped back and looked deeper at the code, and figured out the the ...
7 years, 8 months ago (2013-04-03 09:34:04 UTC) #3
tommi (sloooow) - chröme
https://codereview.chromium.org/12982009/diff/9001/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc File chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc (right): https://codereview.chromium.org/12982009/diff/9001/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc#newcode228 chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc:228: typedef std::map< content::WebContents*, std::pair<int, int> > WebContentsMap; no space ...
7 years, 8 months ago (2013-04-03 09:38:30 UTC) #4
no longer working on chromium
https://codereview.chromium.org/12982009/diff/9001/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc File chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc (right): https://codereview.chromium.org/12982009/diff/9001/chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc#newcode228 chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc:228: typedef std::map< content::WebContents*, std::pair<int, int> > WebContentsMap; On 2013/04/03 ...
7 years, 8 months ago (2013-04-03 11:19:55 UTC) #5
no longer working on chromium
ping
7 years, 8 months ago (2013-04-04 08:17:21 UTC) #6
tommi (sloooow) - chröme
lgtm
7 years, 8 months ago (2013-04-04 09:11:50 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/12982009/14001
7 years, 8 months ago (2013-04-04 09:19:15 UTC) #8
commit-bot: I haz the power
7 years, 8 months ago (2013-04-04 11:37:12 UTC) #9
Message was sent while issue was closed.
Change committed as 192299

Powered by Google App Engine
This is Rietveld 408576698