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 40270f33ff471b1cd04f89e9898cce2e4f5c8db8
parent 315331 95aa4314a12cb8b3577415dbb46ea833d4d2d7d7
child 315333 d2efccd7743c541505467f0721558a3ab36d3458
push id30748
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:53:19 +0000
treeherdermozilla-central@8c84b7618840 [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)