Bug 1544199 - Allow `rv = shutdown->RemoveBlocker()` to be unused in SpeechRecognition. r=me
authorAndreas Pehrson <apehrson@mozilla.com>
Mon, 15 Apr 2019 11:10:41 +0200
changeset 469592 790532ec4738
parent 469467 6741a996b17d
child 469593 a57f27d3ccd0
push id35875
push userccoroiu@mozilla.com
push dateTue, 16 Apr 2019 04:06:16 +0000
treeherdermozilla-central@a83cab75b00d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1544199
milestone68.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 1544199 - Allow `rv = shutdown->RemoveBlocker()` to be unused in SpeechRecognition. r=me
dom/media/webspeech/recognition/SpeechRecognition.cpp
--- a/dom/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp
@@ -572,16 +572,17 @@ SpeechRecognition::StopRecording() {
     // MSG, as it holds a reference to us, and we reference the world, which we
     // don't want to leak.
     mSpeechListener->mRemovedPromise->Then(
         GetCurrentThreadSerialEventTarget(), __func__,
         [blocker = std::move(mShutdownBlocker)] {
           RefPtr<nsIAsyncShutdownClient> shutdown = media::GetShutdownBarrier();
           nsresult rv = shutdown->RemoveBlocker(blocker);
           MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
+          Unused << rv;
         });
   }
   MOZ_ASSERT(!mShutdownBlocker);
 
   mStream->UnregisterTrackListener(this);
   mTrack->RemoveListener(mSpeechListener);
   mStream = nullptr;
   mSpeechListener = nullptr;