Closed Bug 1375235 Opened 3 years ago Closed 3 years ago
Channel Service::Is Window Active() creates unnecessary Audio Channel Window objects
We are using GetOrCreateWindowData() here: http://searchfox.org/mozilla-central/source/dom/audiochannel/AudioChannelService.cpp#635 We probably just want GetWindowData() instead. If it returns nullptr then we know that mAudibleAgents is effectively empty.
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Comment on attachment 8880388 [details] [diff] [review] Don't create the AudioChannelWindow unnecessarily when checking for audio activity in the window. r=padenot Paul, this is just a small optimization to avoid allocating AudioChannelWindow objects when the window is not using audio. We call IsWindowActive() for every window using setTimeout(), so we are probably allocating a lot of these that are never really needed.
Attachment #8880388 - Flags: review?(padenot)
3 years ago
Component: Audio/Video → Web Audio
Attachment #8880388 - Flags: review?(padenot) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/85d571396597 Don't create the AudioChannelWindow unnecessarily when checking for audio activity in the window. r=padenot
You need to log in before you can comment on or make changes to this bug.