Bug 1247056 - Report specific cubeb-init error code - r=jwwang
authorGerald Squelart <gsquelart@mozilla.com>
Wed, 07 Sep 2016 21:26:01 -0700
changeset 315332 40270f33ff47
parent 315331 95aa4314a12c
child 315333 d2efccd7743c
push id32585
push usergsquelart@mozilla.com
push dateTue, 27 Sep 2016 12:36:35 +0000
treeherderautoland@a540a043466d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1247056
milestone52.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 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)