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 id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1315551
milestone52.0a1
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;