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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h

Issue 2725873002: Media: fix memory leak because of the document holding on an EventListener. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h b/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h
index cd88cb44e0ed098afd5ae863da541460cb305169..71c5a13bb63388a6e384522167493172dfe530b1 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h
@@ -16,8 +16,15 @@ class MediaControlsMediaEventListener final : public EventListener {
public:
explicit MediaControlsMediaEventListener(MediaControls*);
+ ~MediaControlsMediaEventListener() override;
+
bool operator==(const EventListener&) const override;
+ // Called by MediaControls when the HTMLMediaElement is no longer in the
+ // document. All event listeners on the document should be removed in order
+ // for the object to be ready for garbage collection.
+ void detach();
+
DECLARE_VIRTUAL_TRACE();
private:

Powered by Google App Engine
This is Rietveld 408576698