Tie the life-time of the AudioContext to the life-time of the document owning it

RESOLVED FIXED in mozilla20

Status

()

defect
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla20
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

So we need to this because of two reasons.

1. The spec says so (!)
2. Otherwise, the shutdown code that I'm adding for shutting down the audio thread pool will depend on when the AudioContext object gets gc'ed, which in practice means a multi-second pause during shutdown.
Posted patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #684818 - Flags: review?(bzbarsky)
Comment on attachment 684818 [details] [diff] [review]
Patch (v1)

nsPIDOMWindow inherits from nsIDOMWindow, so in the constructor you can just make "window" be of type nsCOMPtr<nsPIDOMWindow> and not have the extra QI.

r=me with that.

Do we do something with pausing audio when we go into bfcache, btw?
Attachment #684818 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky (:bz) from comment #2)
> Comment on attachment 684818 [details] [diff] [review]
> Patch (v1)
> 
> nsPIDOMWindow inherits from nsIDOMWindow, so in the constructor you can just
> make "window" be of type nsCOMPtr<nsPIDOMWindow> and not have the extra QI.
> 
> r=me with that.

Will do.

> Do we do something with pausing audio when we go into bfcache, btw?

Filed bug 815492.
This is failing to compile on tbox because AudioContext.h is not actually exported to mozilla/dom ?
(In reply to Boris Zbarsky (:bz) from comment #5)
> This is failing to compile on tbox because AudioContext.h is not actually
> exported to mozilla/dom ?

Hmm, yeah, it seems like I have that file in my objdir for some reason...  Will push a fix shortly.
The reason is that I have added that in one of my other patches on this branch, of course...
https://hg.mozilla.org/mozilla-central/rev/125716cf3d81
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Depends on: 827541
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.