Bug 1247056 - Report specific cubeb-init error code - r=jwwang draft
authorGerald Squelart <gsquelart@mozilla.com>
Wed, 07 Sep 2016 21:26:01 -0700
changeset 417918 7ffdae6ca2e1
parent 417917 f3bd7a7f0b0b
child 417919 0beec5d67050
push id30524
push usergsquelart@mozilla.com
push dateTue, 27 Sep 2016 09:30:55 +0000
reviewersjwwang
bugs1247056
milestone52.0a1
Bug 1247056 - Report specific cubeb-init error code - r=jwwang MozReview-Commit-ID: AqR2jKKtNHL
dom/media/AudioStream.cpp
--- a/dom/media/AudioStream.cpp
+++ b/dom/media/AudioStream.cpp
@@ -346,17 +346,17 @@ AudioStream::Init(uint32_t aNumChannels,
 
   params.format = ToCubebFormat<AUDIO_OUTPUT_FORMAT>::value;
   mAudioClock.Init(aRate);
 
   cubeb* cubebContext = CubebUtils::GetCubebContext();
   if (!cubebContext) {
     NS_WARNING("Can't get cubeb context!");
     CubebUtils::ReportCubebStreamInitFailure(true);
-    return NS_ERROR_FAILURE;
+    return NS_ERROR_DOM_MEDIA_CUBEB_INITIALIZATION_ERR;
   }
 
   return OpenCubeb(cubebContext, params, startTime, CubebUtils::GetFirstStream());
 }
 
 nsresult
 AudioStream::OpenCubeb(cubeb* aContext, cubeb_stream_params& aParams,
                        TimeStamp aStartTime, bool aIsFirst)