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}
(cherry picked from commit 8daac32c17f494d496fb2ca3768d67d9bd77db5e)
Review-Url: https://codereview.chromium.org/2736853003 .
Cr-Commit-Position: refs/branch-heads/2987@{#783}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}
Committed: https://chromium.googlesource.com/chromium/src/+/e724b2c3898091f20dd9e9c302cb12c86cdf5e5f
Patch Set 1 #Messages
Total messages: 2 (1 generated)
|