Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Issue 2736853003: Media: fix memory leak because of the document holding on an EventListener. (Closed)

Created:
3 years, 9 months ago by mlamouri (slow - plz ping)
Modified:
3 years, 9 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2987
Project:
chromium
Visibility:
Public.

Description

Media: 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)
mlamouri (slow - plz ping)
3 years, 9 months ago (2017-03-07 15:11:05 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e724b2c3898091f20dd9e9c302cb12c86cdf5e5f.

Powered by Google App Engine
This is Rietveld 408576698