Chromium Code Reviews
DescriptionMedia: fix memory leak because of the document holding on an EventListener.
MediaControls checks if they are part of a document or not in order to unregister
most of its event listeners when removed from a document to avoid leaking memory
until the document is closed.
The approach taken in this CL is the most "web based" because the controls are
using events. Another approach would be to use internal callbacks (from
ContainerNode) or even have a `addWeakEventListener` method in EventTarget. The
latter might be an interesting solution.
BUG=680898
R=zqzhang@chromium.org,ojan@chromium.org
Review-Url: https://codereview.chromium.org/2725873002
Cr-Commit-Position: refs/heads/master@{#454060}
Committed: https://chromium.googlesource.com/chromium/src/+/8daac32c17f494d496fb2ca3768d67d9bd77db5e
Patch Set 1 #
Total comments: 4
Patch Set 2 : event-based #
Total comments: 3
Messages
Total messages: 21 (8 generated)
|