Bug 1228134 - Should check media.webspeech.synth.enabled on Windows SAPI backend. r=eeejay, a=lizzard
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 02 Dec 2015 13:42:23 +0900
changeset 298581 b9a4e613d4a6f524a1d8b028eb6a108956e5667a
parent 298580 90eff805d2810e9d9ea88f6869335b0500b1a536
child 298582 8bc818a27c28578aef1ec569a4f368fe52ee820a
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay, lizzard
bugs1228134
milestone43.0
Bug 1228134 - Should check media.webspeech.synth.enabled on Windows SAPI backend. r=eeejay, a=lizzard
dom/media/webspeech/synth/windows/SapiService.cpp
--- a/dom/media/webspeech/synth/windows/SapiService.cpp
+++ b/dom/media/webspeech/synth/windows/SapiService.cpp
@@ -182,17 +182,18 @@ SapiService::~SapiService()
 {
 }
 
 bool
 SapiService::Init()
 {
   MOZ_ASSERT(!mInitialized);
 
-  if (Preferences::GetBool("media.webspeech.synth.test")) {
+  if (Preferences::GetBool("media.webspeech.synth.test") ||
+      !Preferences::GetBool("media.webspeech.synth.enabled")) {
     // When enabled, we shouldn't add OS backend (Bug 1160844)
     return false;
   }
 
   if (FAILED(CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, IID_ISpVoice,
                               getter_AddRefs(mSapiClient)))) {
     return false;
   }