Bug 1315551 - part1 : should pass valid window for agent's initialization. r=baku
authorAlastor Wu <alwu@mozilla.com>
Tue, 08 Nov 2016 11:06:04 +0800
changeset 366636 967dd79df01ce7a8702c87bf568a0b4807bf1561
parent 366635 5bc308f6ac4c5f428399d975cfadf4039d44827f
child 366637 dd2c93bc1da35cbd72f15896222f5744b6ae04cc
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1315551
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 1315551 - part1 : should pass valid window for agent's initialization. r=baku MozReview-Commit-ID: 4uh4nU8YVsS
dom/audiochannel/AudioChannelAgent.cpp
--- a/dom/audiochannel/AudioChannelAgent.cpp
+++ b/dom/audiochannel/AudioChannelAgent.cpp
@@ -157,17 +157,17 @@ AudioChannelAgent::InitInternal(nsPIDOMW
 
   if (mAudioChannelType != AUDIO_AGENT_CHANNEL_ERROR ||
       aChannelType > AUDIO_AGENT_CHANNEL_SYSTEM ||
       aChannelType < AUDIO_AGENT_CHANNEL_NORMAL) {
     return NS_ERROR_FAILURE;
   }
 
   if (NS_WARN_IF(!aWindow)) {
-    return NS_OK;
+    return NS_ERROR_FAILURE;
   }
 
   MOZ_ASSERT(aWindow->IsInnerWindow());
   mInnerWindowID = aWindow->WindowID();
 
   nsresult rv = FindCorrectWindow(aWindow);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;