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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.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/MediaControlsOrientationLockDelegate.h
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
index c30cb7b7b4476b4ae9e40e8b34e2c66ab805ed60..ed76ce06200583549ec0d2238f326fade3cb18e5 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegate.h
@@ -46,6 +46,11 @@ class CORE_EXPORT MediaControlsOrientationLockDelegate final
// EventListener implementation.
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