Bug 1188457 - Fixed SapiService.cpp compilation on mingw. r=jimm
authorJacek Caban <jacek@codeweavers.com>
Wed, 29 Jul 2015 12:27:22 +0200
changeset 286769 d1c3131176181e6caa840ad40f0de5ee22306510
parent 286768 48085d776a69df23aca47b6bd5cfa6e1df039820
child 286770 af0fcf52e4b7c10297d10aad1db80b8dc530e1ae
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1188457
milestone42.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 1188457 - Fixed SapiService.cpp compilation on mingw. r=jimm
dom/media/webspeech/synth/windows/SapiService.cpp
toolkit/library/moz.build
--- a/dom/media/webspeech/synth/windows/SapiService.cpp
+++ b/dom/media/webspeech/synth/windows/SapiService.cpp
@@ -127,16 +127,18 @@ SapiCallback::OnSpeechEvent(const SPEVEN
     mTask->DispatchBoundary(NS_LITERAL_STRING("word"),
                             GetTickCount() - mStartingTime, mCurrentIndex);
     break;
   case SPEI_SENTENCE_BOUNDARY:
     mCurrentIndex = static_cast<ULONG>(speechEvent.lParam) - mTextOffset;
     mTask->DispatchBoundary(NS_LITERAL_STRING("sentence"),
                             GetTickCount() - mStartingTime, mCurrentIndex);
     break;
+  default:
+    break;
   }
 }
 
 // static
 void __stdcall
 SapiService::SpeechEventCallback(WPARAM aWParam, LPARAM aLParam)
 {
   nsRefPtr<SapiService> service = (SapiService*) aWParam;
@@ -175,17 +177,17 @@ SapiService::~SapiService()
 
 bool
 SapiService::Init()
 {
   MOZ_ASSERT(!mInitialized);
 
   if (Preferences::GetBool("media.webspeech.synth.test")) {
     // When enabled, we shouldn't add OS backend (Bug 1160844)
-    return nullptr;
+    return false;
   }
 
   if (FAILED(CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, IID_ISpVoice,
                               getter_AddRefs(mSapiClient)))) {
     return false;
   }
 
   // Set interest for all the events we are interested in
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -351,17 +351,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'secur32',
         'sensorsapi',
         'portabledeviceguids',
         'windowscodecs',
         'wininet',
         'wbemuuid',
         'wintrust',
         'wtsapi32',
-        'locationapi'
+        'locationapi',
+        'sapi',
     ]
     if CONFIG['ACCESSIBILITY']:
         OS_LIBS += [
             'oleacc',
         ]
 
 if CONFIG['MOZ_ENABLE_QT']:
     OS_LIBS += CONFIG['XEXT_LIBS']