Backed out changeset 3466be6fd32c (bug 1162692) for apparently causing the gip(a) permafail on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 08 May 2015 18:09:48 -0700
changeset 274443 05e4643b27ec2d7474bc20ba6d12f64526fe58ab
parent 274442 352218aee2620ba70136ae1549c6aaec39b1b949
child 274444 24378757d86c7a85d6f1195416f47d391a8d6d5a
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1162692
milestone40.0a1
backs out3466be6fd32ca5189d9d785f036382763b3175b7
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
Backed out changeset 3466be6fd32c (bug 1162692) for apparently causing the gip(a) permafail on a CLOSED TREE
dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
dom/media/webspeech/synth/SpeechSynthesisUtterance.h
dom/media/webspeech/synth/ipc/PSpeechSynthesisRequest.ipdl
dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
dom/media/webspeech/synth/ipc/SpeechSynthesisParent.cpp
dom/media/webspeech/synth/ipc/SpeechSynthesisParent.h
dom/media/webspeech/synth/nsSpeechTask.cpp
dom/media/webspeech/synth/nsSpeechTask.h
dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
dom/webidl/SpeechSynthesisUtterance.webidl
--- a/dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
+++ b/dom/media/webspeech/synth/SpeechSynthesisUtterance.cpp
@@ -143,22 +143,16 @@ SpeechSynthesisUtterance::Pitch() const
 
 void
 SpeechSynthesisUtterance::SetPitch(float aPitch)
 {
   mPitch = aPitch;
 }
 
 void
-SpeechSynthesisUtterance::GetChosenVoiceURI(nsString& aResult) const
-{
-  aResult = mChosenVoiceURI;
-}
-
-void
 SpeechSynthesisUtterance::DispatchSpeechSynthesisEvent(const nsAString& aEventType,
                                                        uint32_t aCharIndex,
                                                        float aElapsedTime,
                                                        const nsAString& aName)
 {
   SpeechSynthesisEventInit init;
   init.mBubbles = false;
   init.mCancelable = false;
--- a/dom/media/webspeech/synth/SpeechSynthesisUtterance.h
+++ b/dom/media/webspeech/synth/SpeechSynthesisUtterance.h
@@ -66,18 +66,16 @@ public:
   float Rate() const;
 
   void SetRate(float aRate);
 
   float Pitch() const;
 
   void SetPitch(float aPitch);
 
-  void GetChosenVoiceURI(nsString& aResult) const;
-
   enum {
     STATE_NONE,
     STATE_PENDING,
     STATE_SPEAKING,
     STATE_ENDED
   };
 
   uint32_t GetState() { return mState; }
@@ -104,18 +102,16 @@ private:
   nsString mLang;
 
   float mVolume;
 
   float mRate;
 
   float mPitch;
 
-  nsString mChosenVoiceURI;
-
   uint32_t mState;
 
   bool mPaused;
 
   nsRefPtr<SpeechSynthesisVoice> mVoice;
 };
 
 } // namespace dom
--- a/dom/media/webspeech/synth/ipc/PSpeechSynthesisRequest.ipdl
+++ b/dom/media/webspeech/synth/ipc/PSpeechSynthesisRequest.ipdl
@@ -20,17 +20,17 @@ async protocol PSpeechSynthesisRequest
   Resume();
 
   Cancel();
 
  child:
 
   __delete__(bool aIsError, float aElapsedTime, uint32_t aCharIndex);
 
-  OnStart(nsString aUri);
+  OnStart();
 
   OnPause(float aElapsedTime, uint32_t aCharIndex);
 
   OnResume(float aElapsedTime, uint32_t aCharIndex);
 
   OnBoundary(nsString aName, float aElapsedTime, uint32_t aCharIndex);
 
   OnMark(nsString aName, float aElapsedTime, uint32_t aCharIndex);
--- a/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
+++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
@@ -68,19 +68,19 @@ SpeechSynthesisRequestChild::SpeechSynth
 }
 
 SpeechSynthesisRequestChild::~SpeechSynthesisRequestChild()
 {
   MOZ_COUNT_DTOR(SpeechSynthesisRequestChild);
 }
 
 bool
-SpeechSynthesisRequestChild::RecvOnStart(const nsString& aUri)
+SpeechSynthesisRequestChild::RecvOnStart()
 {
-  mTask->DispatchStartImpl(aUri);
+  mTask->DispatchStartImpl();
   return true;
 }
 
 bool
 SpeechSynthesisRequestChild::Recv__delete__(const bool& aIsError,
                                             const float& aElapsedTime,
                                             const uint32_t& aCharIndex)
 {
--- a/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
+++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.h
@@ -43,17 +43,17 @@ protected:
 
 class SpeechSynthesisRequestChild : public PSpeechSynthesisRequestChild
 {
 public:
   explicit SpeechSynthesisRequestChild(SpeechTaskChild* aTask);
   virtual ~SpeechSynthesisRequestChild();
 
 protected:
-  virtual bool RecvOnStart(const nsString& aUri) override;
+  virtual bool RecvOnStart() override;
 
   virtual bool Recv__delete__(const bool& aIsError,
                               const float& aElapsedTime,
                               const uint32_t& aCharIndex) override;
 
   virtual bool RecvOnPause(const float& aElapsedTime, const uint32_t& aCharIndex) override;
 
   virtual bool RecvOnResume(const float& aElapsedTime, const uint32_t& aCharIndex) override;
--- a/dom/media/webspeech/synth/ipc/SpeechSynthesisParent.cpp
+++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisParent.cpp
@@ -115,20 +115,20 @@ SpeechSynthesisRequestParent::RecvCancel
   MOZ_ASSERT(mTask);
   mTask->Cancel();
   return true;
 }
 
 // SpeechTaskParent
 
 nsresult
-SpeechTaskParent::DispatchStartImpl(const nsAString& aUri)
+SpeechTaskParent::DispatchStartImpl()
 {
   MOZ_ASSERT(mActor);
-  NS_ENSURE_TRUE(mActor->SendOnStart(nsString(aUri)), NS_ERROR_FAILURE);
+  NS_ENSURE_TRUE(mActor->SendOnStart(), NS_ERROR_FAILURE);
 
   return NS_OK;
 }
 
 nsresult
 SpeechTaskParent::DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex)
 {
   MOZ_ASSERT(mActor);
--- a/dom/media/webspeech/synth/ipc/SpeechSynthesisParent.h
+++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisParent.h
@@ -70,17 +70,17 @@ protected:
 
 class SpeechTaskParent : public nsSpeechTask
 {
   friend class SpeechSynthesisRequestParent;
 public:
   SpeechTaskParent(float aVolume, const nsAString& aUtterance)
     : nsSpeechTask(aVolume, aUtterance) {}
 
-  virtual nsresult DispatchStartImpl(const nsAString& aUri);
+  virtual nsresult DispatchStartImpl();
 
   virtual nsresult DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchPauseImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchResumeImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchErrorImpl(float aElapsedTime, uint32_t aCharIndex);
--- a/dom/media/webspeech/synth/nsSpeechTask.cpp
+++ b/dom/media/webspeech/synth/nsSpeechTask.cpp
@@ -135,22 +135,16 @@ nsSpeechTask::~nsSpeechTask()
 
 void
 nsSpeechTask::BindStream(ProcessedMediaStream* aStream)
 {
   mStream = MediaStreamGraph::GetInstance()->CreateSourceStream(nullptr);
   mPort = aStream->AllocateInputPort(mStream, 0);
 }
 
-void
-nsSpeechTask::SetChosenVoiceURI(const nsAString& aUri)
-{
-  mChosenVoiceURI = aUri;
-}
-
 NS_IMETHODIMP
 nsSpeechTask::Setup(nsISpeechTaskCallback* aCallback,
                     uint32_t aChannels, uint32_t aRate, uint8_t argc)
 {
   MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
 
   LOG(PR_LOG_DEBUG, ("nsSpeechTask::Setup"));
 
@@ -283,30 +277,23 @@ nsSpeechTask::DispatchStart()
   }
 
   return DispatchStartImpl();
 }
 
 nsresult
 nsSpeechTask::DispatchStartImpl()
 {
-  return DispatchStartImpl(mChosenVoiceURI);
-}
-
-nsresult
-nsSpeechTask::DispatchStartImpl(const nsAString& aUri)
-{
   LOG(PR_LOG_DEBUG, ("nsSpeechTask::DispatchStart"));
 
   MOZ_ASSERT(mUtterance);
   NS_ENSURE_TRUE(mUtterance->mState == SpeechSynthesisUtterance::STATE_PENDING,
                  NS_ERROR_NOT_AVAILABLE);
 
   mUtterance->mState = SpeechSynthesisUtterance::STATE_SPEAKING;
-  mUtterance->mChosenVoiceURI = aUri;
   mUtterance->DispatchSpeechSynthesisEvent(NS_LITERAL_STRING("start"), 0, 0,
                                            NS_LITERAL_STRING(""));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSpeechTask::DispatchEnd(float aElapsedTime, uint32_t aCharIndex)
--- a/dom/media/webspeech/synth/nsSpeechTask.h
+++ b/dom/media/webspeech/synth/nsSpeechTask.h
@@ -42,24 +42,20 @@ public:
   uint32_t GetCurrentCharOffset();
 
   void SetSpeechSynthesis(SpeechSynthesis* aSpeechSynthesis);
 
   void SetIndirectAudio(bool aIndirectAudio) { mIndirectAudio = aIndirectAudio; }
 
   void BindStream(ProcessedMediaStream* aStream);
 
-  void SetChosenVoiceURI(const nsAString& aUri);
-
 protected:
   virtual ~nsSpeechTask();
 
-  nsresult DispatchStartImpl();
-
-  virtual nsresult DispatchStartImpl(const nsAString& aUri);
+  virtual nsresult DispatchStartImpl();
 
   virtual nsresult DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchPauseImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchResumeImpl(float aElapsedTime, uint32_t aCharIndex);
 
   virtual nsresult DispatchErrorImpl(float aElapsedTime, uint32_t aCharIndex);
@@ -88,16 +84,14 @@ private:
 
   nsCOMPtr<nsISpeechTaskCallback> mCallback;
 
   uint32_t mChannels;
 
   nsRefPtr<SpeechSynthesis> mSpeechSynthesis;
 
   bool mIndirectAudio;
-
-  nsString mChosenVoiceURI;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif
--- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
+++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp
@@ -556,18 +556,16 @@ nsSynthVoiceRegistry::Speak(const nsAStr
 {
   LOG(PR_LOG_DEBUG,
       ("nsSynthVoiceRegistry::Speak text='%s' lang='%s' uri='%s' rate=%f pitch=%f",
        NS_ConvertUTF16toUTF8(aText).get(), NS_ConvertUTF16toUTF8(aLang).get(),
        NS_ConvertUTF16toUTF8(aUri).get(), aRate, aPitch));
 
   VoiceData* voice = FindBestMatch(aUri, aLang);
 
-  aTask->SetChosenVoiceURI(voice->mUri);
-
   if (!voice) {
     NS_WARNING("No voices found.");
     aTask->DispatchError(0, 0);
     return;
   }
 
   LOG(PR_LOG_DEBUG, ("nsSynthVoiceRegistry::Speak - Using voice URI: %s",
                      NS_ConvertUTF16toUTF8(voice->mUri).get()));
--- a/dom/webidl/SpeechSynthesisUtterance.webidl
+++ b/dom/webidl/SpeechSynthesisUtterance.webidl
@@ -23,12 +23,9 @@ interface SpeechSynthesisUtterance : Eve
 
   attribute EventHandler onstart;
   attribute EventHandler onend;
   attribute EventHandler onerror;
   attribute EventHandler onpause;
   attribute EventHandler onresume;
   attribute EventHandler onmark;
   attribute EventHandler onboundary;
-
-  [ChromeOnly]
-  readonly attribute DOMString chosenVoiceURI;
 };