Bug 902145 - Remove priority events, which were unused. r=smaug
authorGuilherme Gonçalves <ggp@mozilla.com>
Tue, 10 Sep 2013 13:12:54 -0400
changeset 159297 27785ee9e9e0b7b5a7807e9ed82ed7f382bccd56
parent 159296 c3384a3b42801dfecb3ea01e18dff554354a594c
child 159298 86594e931122e6f3cd6f7555938df44ce5b8177e
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs902145
milestone26.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 902145 - Remove priority events, which were unused. r=smaug
content/media/webspeech/recognition/SpeechRecognition.cpp
content/media/webspeech/recognition/SpeechRecognition.h
--- a/content/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/content/media/webspeech/recognition/SpeechRecognition.cpp
@@ -133,27 +133,16 @@ SpeechRecognition::GetParentObject() con
 
 void
 SpeechRecognition::ProcessEvent(SpeechEvent* aEvent)
 {
   SR_LOG("Processing %s, current state is %s",
          GetName(aEvent),
          GetName(mCurrentState));
 
-  // Run priority events first
-  for (uint32_t i = 0; i < mPriorityEvents.Length(); ++i) {
-    nsRefPtr<SpeechEvent> event = mPriorityEvents[i];
-
-    SR_LOG("Processing priority %s", GetName(event));
-    Transition(event);
-  }
-
-  mPriorityEvents.Clear();
-
-  SR_LOG("Processing %s received as argument", GetName(aEvent));
   Transition(aEvent);
 }
 
 void
 SpeechRecognition::Transition(SpeechEvent* aEvent)
 {
   switch (mCurrentState) {
     case STATE_IDLE:
--- a/content/media/webspeech/recognition/SpeechRecognition.h
+++ b/content/media/webspeech/recognition/SpeechRecognition.h
@@ -243,17 +243,16 @@ private:
 
   nsRefPtr<DOMMediaStream> mDOMStream;
   nsRefPtr<SpeechStreamListener> mSpeechListener;
   nsCOMPtr<nsISpeechRecognitionService> mRecognitionService;
 
   void GetRecognitionServiceCID(nsACString& aResultCID);
 
   FSMState mCurrentState;
-  nsTArray<nsRefPtr<SpeechEvent> > mPriorityEvents;
 
   Endpointer mEndpointer;
   uint32_t mEstimationSamples;
 
   uint32_t mAudioSamplesPerChunk;
 
   // buffer holds one chunk of mAudioSamplesPerChunk
   // samples before feeding it to mEndpointer