On Wed, May 2, 2018, at 11:34 PM, Tom Ritter wrote: > On Wed, May 2, 2018 at 5:11 AM, Robert O'Callahan <rob...@ocallahan.org> > wrote: > > On Wed, May 2, 2018 at 9:21 PM, Karl Tomlinson <mozn...@karlt.net> wrote: > > > >> It seems that Chrome works around this by choosing to garbage > >> collect input nodes even when their presence is specified to > >> require (observable) AudioWorkletProcessor.process() calls. > >> This garbage collection is performed in a way that causes the > >> process() calls to be halted (which stops sound production), and > >> so the AudioWorkletProcessor can subsequently also be garbage > >> collected if there are no rooted references, as usual. > >> > >> Having the behavior of AudioWorkletProcess depend on whether or > >> not the client maintains references to input nodes is not > >> something I'd like to implement. It would be comparable to an > >> audio element stopping playback at a time when an implementation > >> chooses to perform garbage collection after the client has removed > >> its last reference. It is contrary to [[TAG design principles]]. > >> The Chrome approach seems to be based on a different understanding > >> of [[AudioNode Lifetime]]. > >> > > > > Making GC timing observable is a big, big problem. I hope you escalate this > > aggressively with the Chrome team. > > Hey Rob, > > It's not difficult to force a GC in javascript, so I'm curious why > making the duration of a GC observable is a problem? Do you think you > could unpack it for me?
The duration of GC being observable is not a problem. The problem is the timing, i.e. when GC is triggered. The main point is that, any accessible object should not have observable behavior difference regarding whether GC is triggered. Having that observable is a problem because different implementations trigger GC at different time, and even a single implementation may choose to trigger GC at different time when they try to adopt some new optimization. If an accessible object have different behavior depending on whether GC has been triggered, web content may start depending on the timing which is currently used by some implementation. That can later become a huge webcompat nightmare for everyone. - Xidorn _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform