Bug 1247056 - Report specific cubeb-init error code - r=jwwang
☠☠ backed out by b4cae9fb786b ☠ ☠
authorGerald Squelart <gsquelart@mozilla.com>
Wed, 07 Sep 2016 21:26:01 -0700
changeset 315252 2bfe3aeb9f59
parent 315251 934d7c9628f1
child 315253 c5cd9597ec02
push id82106
push usergsquelart@mozilla.com
push dateMon, 26 Sep 2016 13:33:47 +0000
treeherdermozilla-inbound@ff3538fd40fe [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)