Backed out changeset 54d1e8caf69b (bug 1178738)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 02 Jun 2016 20:32:46 +0200
changeset 341264 cb32941f1d4633db39f4b1bd5bb3bca46071dd3f
parent 341263 d59a4523909bc104e6db02a02fc08bdebc29f8ce
child 341265 f19dab43cca7b07844907792d861570933f3f500
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1178738
milestone49.0a1
backs out54d1e8caf69b2ffe033c4664b5651a1f7987ecb5
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 54d1e8caf69b (bug 1178738)
toolkit/components/narrate/Narrator.jsm
--- a/toolkit/components/narrate/Narrator.jsm
+++ b/toolkit/components/narrate/Narrator.jsm
@@ -172,44 +172,39 @@ Narrator.prototype = {
           this._sendTestEvent("paragraphstart", {
             voice: utterance.chosenVoiceURI,
             rate: utterance.rate,
             paragraph: paragraph.textContent
           });
         }
       });
 
-      let onDone = (e) => {
+      utterance.addEventListener("end", () => {
         if (!this._win) {
           // page got unloaded, don't do anything.
           return;
         }
 
-        if (e.type == "error" &&
-            !(['interrupted', 'canceled'].includes(e.error))) {
-          reject("speech synthesis failed");
-          return;
-        }
-
         paragraph.classList.remove("narrating");
         this._startTime = 0;
         if (this._inTest) {
           this._sendTestEvent("paragraphend", {});
         }
 
         if (this._stopped) {
           // User pressed stopped.
           resolve();
         } else {
           this._speakInner().then(resolve, reject);
         }
-      };
+      });
 
-      utterance.addEventListener("end", onDone);
-      utterance.addEventListener("error", onDone);
+      utterance.addEventListener("error", () => {
+        reject("speech synthesis failed");
+      });
 
       this._win.speechSynthesis.speak(utterance);
     });
   },
 
   start: function(speechOptions) {
     this._speechOptions = {
       rate: speechOptions.rate,