Open Bug 1932526 Opened 1 year ago Updated 6 months ago

Rework shutdown monitoring for WebCodecs Decoders/Encoders to ensure objects properly released

Categories

(Core :: Audio/Video: Web Codecs, defect, P3)

defect

Tracking

()

People

(Reporter: chunmin, Assigned: chunmin)

References

(Blocks 1 open bug)

Details

We may run into similar issues as bug 1927020 since the mShutdownBlocker in both decoder and encoder hold strong references to themselves:
https://searchfox.org/mozilla-central/rev/81ac0fe96e1bd6020408c2ae7eae6e5b5114d1db/dom/media/webcodecs/DecoderTemplate.cpp#861
https://searchfox.org/mozilla-central/rev/2deb9bcf801f9de83d4f30c890d442072b9b6595/dom/media/webcodecs/EncoderTemplate.cpp#1109

It's better to use similar techniques as ShutdownWatcher / ShutdownConsumer pair introduced in bug 1927020 to replace the UniquePtr<media::ShutdownBlockingTicket> mShutdownBlocker in DecoderTemplate and EncoderTemplate. However, the replacement will require adding a nsIAsyncShutdownBlocker on main thread for decoders, so that RemoteMediaDataDecoder can be safely used under the hood.

Assignee: nobody → cchang
See Also: → 2025505
You need to log in before you can comment on or make changes to this bug.