Closed
Bug 982438
Opened 11 years ago
Closed 7 years ago
Assertion failure on exit while playing video due to MediaResource late destruction
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: cpearce, Unassigned)
Details
As reported by Jesup in bug 978929, if we shutdown while playing a media element we normally end up with this warning:
31:59.10 [1304] WARNING: '!mMainThread', file ../../../xpcom/threads/nsThreadManager.cpp, line 269
31:59.10 [1304] WARNING: 'NS_FAILED(rv)', file /home/jesup/src/mozilla/inbound/xpcom/glue/nsThreadUtils.cpp, line 180
This is caused by the MediaDecoder owning a reference to the MediaResource, which is only released in its dtor. The HTMLMediaElements holds a reference to the MediaDecoder which is only released in its dtor. HTMLMediaElements that are active at shutdown are only destroyed after xpcom-shutdown, and the MediaResource sends an event during its shutdown (after xpcom shutdown in this case), which causes the assertion here.
I think the cleanest fix here is to have MediaShutdownManager have HTMLMediaElements register with it instead of MediaDecoders. During xpcom shutdown we then have the HTMLMediaElement's shutdown path run from MediaShutdownManager. Currently we have MediaDecoder's shutdown path run in xpcom-shutdown, but we don't actually destroy them, since the HTMLMediaElement maintains a reference to its MediaDecoder which keeps it alive until the CC/GC after xpcom-shutdown.
Updated•9 years ago
|
Component: Audio/Video → Audio/Video: Playback
Comment 1•7 years ago
|
||
Mass closing do to inactivity.
Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•