Closed
Bug 1421004
Opened 7 years ago
Closed 7 years ago
Channels loading media as a top-level document are all leaked
Categories
(Core :: Audio/Video: Playback, defect, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: mayhemer, Assigned: bechen)
References
Details
Attachments
(1 file)
STR: 1. load http://icecast.unitedradio.it/Virgin.mp3 directly 2. let it play a bit (few secs) 3. close the tab (but leave the browser running) 4. give it some time (1 minute) to confirm that GC when kicks in doesn't release 5. close the browser The loading channel (http channel) is leaked because it's in Suspend() + Cancel() state and held by its consumers indefinitely.
Updated•7 years ago
|
Component: Audio/Video → Audio/Video: Playback
I'm making this a P2 on the assumption that it isn't difficult. If it proves to be difficult, feel free to reprioritise.
Priority: -- → P2
Assignee | ||
Comment 2•7 years ago
|
||
It's easily reproduced, the MediaElement had remove the "self reference" but not go into destructor. So the problem may point to the MediaDocument/VideoDocument, it seems that the MediaDocumentStreamListener doesn't handle the shutdown case properly.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bechen
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8933558 [details] Bug 1421004 - Break the mDocument reference cycle at Destroy(). https://reviewboard.mozilla.org/r/204490/#review210050 LGTM. But we need a DOM peer to make sure 'domwindowclosed' is the event we need to break the reference cycle.
Attachment #8933558 -
Flags: review?(jwwang) → review+
Comment 6•7 years ago
|
||
If you're relying on `domwindowclosed`, you'll need to at least check `aSubject` is the outerWindow you expected. For your use case, you should probably just notify the stream listener to null out the reference inside `MediaDocument::Destroy`.
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8933558 [details] Bug 1421004 - Break the mDocument reference cycle at Destroy(). https://reviewboard.mozilla.org/r/204490/#review210554 So PluginDocument has https://searchfox.org/mozilla-central/source/dom/html/PluginDocument.cpp#135 Could we do the same thing here? Consistency would reduce the risk for regressions. Could you please check all these media-like documents. ::: dom/html/VideoDocument.cpp:31 (Diff revision 3) > nsIStreamListener** aDocListener, > bool aReset = true, > nsIContentSink* aSink = nullptr); > virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject); > > + virtual void Destroy() { { goes to its own line here
Attachment #8933558 -
Flags: review?(bugs)
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8933558 [details] Bug 1421004 - Break the mDocument reference cycle at Destroy(). https://reviewboard.mozilla.org/r/204490/#review210948 I guess we can do this. ImageDocument does still something a bit different and would be nice to have consistent handling also there, but that can be done in a different bug.
Attachment #8933558 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 11•7 years ago
|
||
Pushed by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b0c952f7d225 Break the mDocument reference cycle at Destroy(). r=jwwang,smaug
Keywords: checkin-needed
Comment 12•7 years ago
|
||
Backed out changeset b0c952f7d225 (bug 1421004)for build bustage r=backout https://hg.mozilla.org/integration/autoland/rev/c408aa5f26f9c0e2a7ffcae82364379a73d9f1da https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=b0c952f7d225181a76d4dafbe144dcd72e10b08b
Flags: needinfo?(bechen)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(bechen)
Keywords: checkin-needed
Comment 15•7 years ago
|
||
Pushed by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0aeba8f81a2 Break the mDocument reference cycle at Destroy(). r=jwwang,smaug
Keywords: checkin-needed
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c0aeba8f81a2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•