Backed out changeset ddc08e87843f (bug 1184058) for AudioChannelAgent crashes/asserts.

This commit is contained in:
Ryan VanderMeulen 2015-09-01 09:47:02 -04:00
Родитель 8247350bbe
Коммит 3a9297bd76
1 изменённых файлов: 10 добавлений и 23 удалений

Просмотреть файл

@ -103,10 +103,7 @@ AudioChannelAgent::InitInternal(nsIDOMWindow* aWindow, int32_t aChannelType,
return NS_ERROR_FAILURE;
}
if (NS_WARN_IF(!aWindow)) {
return NS_ERROR_FAILURE;
}
if (aWindow) {
nsCOMPtr<nsPIDOMWindow> pInnerWindow = do_QueryInterface(aWindow);
MOZ_ASSERT(pInnerWindow->IsInnerWindow());
mInnerWindowID = pInnerWindow->WindowID();
@ -117,9 +114,6 @@ AudioChannelAgent::InitInternal(nsIDOMWindow* aWindow, int32_t aChannelType,
if (mWindow) {
mWindow = mWindow->GetOuterWindow();
}
if (!mWindow) {
return NS_ERROR_FAILURE;
}
mAudioChannelType = aChannelType;
@ -140,13 +134,6 @@ NS_IMETHODIMP AudioChannelAgent::NotifyStartedPlaying(uint32_t aNotifyPlayback,
MOZ_ASSERT(aVolume);
MOZ_ASSERT(aMuted);
// Window-less AudioChannelAgents are muted by default.
if (!mWindow) {
*aVolume = 0;
*aMuted = true;
return NS_OK;
}
nsRefPtr<AudioChannelService> service = AudioChannelService::GetOrCreate();
if (mAudioChannelType == AUDIO_AGENT_CHANNEL_ERROR ||
service == nullptr || mIsRegToService) {