Bug 1375235 - Don't create the AudioChannelWindow unnecessarily when checking for audio activity in the window. r=padenot

--HG--
extra : source : af66c0b948814ad0283c57533861d8c63cb14352
This commit is contained in:
Ben Kelly 2017-06-22 06:40:00 -04:00
parent cdd9ee8a97
commit 4dd00f9b49

View File

@ -634,7 +634,12 @@ AudioChannelService::IsWindowActive(nsPIDOMWindowOuter* aWindow)
if (!window) {
return false;
}
AudioChannelWindow* winData = GetOrCreateWindowData(window);
AudioChannelWindow* winData = GetWindowData(window->WindowID());
if (!winData) {
return false;
}
return !winData->mAudibleAgents.IsEmpty();
}