Media Session: remove media elements from the ID <-> element map on destruction
authormrajca@apple.com <mrajca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Aug 2015 18:30:30 +0000 (18:30 +0000)
committermrajca@apple.com <mrajca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Aug 2015 18:30:30 +0000 (18:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147707

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp

index c65c3ab..5b56d75 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-06  Matt Rajca  <mrajca@apple.com>
+
+        Media Session: remove media elements from the ID <-> element map on destruction
+        https://bugs.webkit.org/show_bug.cgi?id=147707
+
+        Reviewed by Eric Carlson.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::~HTMLMediaElement):
+
 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
 
         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
index a561f42..98f30d4 100644 (file)
@@ -511,6 +511,8 @@ HTMLMediaElement::~HTMLMediaElement()
         m_session->removeMediaElement(*this);
         m_session = nullptr;
     }
+
+    elementIDsToElements().remove(m_elementID);
 #endif
 
     m_seekTaskQueue.close();