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 351579 967dd79df01ce7a8702c87bf568a0b4807bf1561
parent 351578 5bc308f6ac4c5f428399d975cfadf4039d44827f
child 351580 dd2c93bc1da35cbd72f15896222f5744b6ae04cc
push idunknown
push userunknown
push dateunknown
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;