Bug 858141 - Don't assert on EVENT_AUDIO_ERROR while on STATE_ESTIMATING. r=smaug
authorGuilherme Gonçalves <ggp@mozilla.com>
Wed, 24 Apr 2013 10:36:36 -0700
changeset 129774 d558c2172bcd44fed576892c3fcce5447cd0c6d7
parent 129773 bed3081376ca3574d6d34632d3828c46617a6e32
child 129775 c0b61756db382f57bc00d255ceeb2d9c42bd3022
push id27000
push userjschoenick@mozilla.com
push dateWed, 24 Apr 2013 18:10:24 +0000
treeherdermozilla-inbound@d73d6d6be727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs858141
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 858141 - Don't assert on EVENT_AUDIO_ERROR while on STATE_ESTIMATING. r=smaug
content/media/webspeech/recognition/SpeechRecognition.cpp
--- a/content/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/content/media/webspeech/recognition/SpeechRecognition.cpp
@@ -177,18 +177,19 @@ SpeechRecognition::TransitionAndGetNextS
         case EVENT_STOP:
           return StopRecordingAndRecognize(aEvent);
         case EVENT_ABORT:
           return AbortSilently(aEvent);
         case EVENT_RECOGNITIONSERVICE_INTERMEDIATE_RESULT:
         case EVENT_RECOGNITIONSERVICE_FINAL_RESULT:
         case EVENT_RECOGNITIONSERVICE_ERROR:
           return DoNothing(aEvent);
+        case EVENT_AUDIO_ERROR:
+          return AbortError(aEvent);
         case EVENT_START:
-        case EVENT_AUDIO_ERROR:
           SR_LOG("STATE_ESTIMATING: Unhandled event %d", aEvent->mType);
           MOZ_NOT_REACHED("");
       }
     case STATE_WAITING_FOR_SPEECH:
       switch (aEvent->mType) {
         case EVENT_AUDIO_DATA:
           return DetectSpeech(aEvent);
         case EVENT_STOP: