Closed Bug 815492 Opened 12 years ago Closed 12 years ago

Pause Web Audio streams when we go into the bfcache

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

Boris, can you please explain what we should do here? Thanks!
So the basic idea is that when a page is unloaded we should stop playing sound from it, whether it's going into bfache or whether the window is being torn down. Bug 814789 does the latter, because nsGlobalWindow::SetNewDocument does this: if (!currentInner->IsFrozen()) { currentInner->FreeInnerObjects(); } before switching to the new inner. To handle the bfache case, I think what we want to do is something along the lines of nsGlobalWindow::SuspendTimeouts and nsGlobalWindow::ResumeTimeouts (as called from WindowStateHolder::WindowStateHolder and nsDocShell::RestoreFromHistory, though for the latter we may be able to do it from nsGlobalWindow::RestoreWindowState instead). And we'll need to basically pause/resume the audio there, all the way down the window tree.
Assignee: nobody → ehsan
Attached patch Patch (v1) (deleted) — Splinter Review
Attachment #728022 - Flags: review?(bzbarsky)
Blocks: 853718
Comment on attachment 728022 [details] [diff] [review] Patch (v1) r=me
Attachment #728022 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Mass moving Web Audio bugs to the Web Audio component. Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: