Title: [153937] trunk/Source/WebCore
Revision
153937
Author
[email protected]
Date
2013-08-12 03:22:06 -0700 (Mon, 12 Aug 2013)

Log Message

Resource leak related to gstreamer and videos
https://bugs.webkit.org/show_bug.cgi?id=109350

Reviewed by Eric Carlson.

Since active DOM object are only stopped once and can not be restarted, we can
unreference the media player there, instead of waiting for garbage collection.

If the r152778 is rolled back, this also breaks a circular reference between
GStreamer and WebKit which prevented garbage collecting from triggering.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153936 => 153937)


--- trunk/Source/WebCore/ChangeLog	2013-08-12 09:38:50 UTC (rev 153936)
+++ trunk/Source/WebCore/ChangeLog	2013-08-12 10:22:06 UTC (rev 153937)
@@ -1,3 +1,19 @@
+2013-08-12  Allan Sandfeld Jensen  <[email protected]>
+
+        Resource leak related to gstreamer and videos
+        https://bugs.webkit.org/show_bug.cgi?id=109350
+
+        Reviewed by Eric Carlson.
+
+        Since active DOM object are only stopped once and can not be restarted, we can
+        unreference the media player there, instead of waiting for garbage collection.
+
+        If the r152778 is rolled back, this also breaks a circular reference between
+        GStreamer and WebKit which prevented garbage collecting from triggering.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::stop):
+
 2013-08-12  Gabor Rapcsanyi  <[email protected]>
 
         [Qt] Unreviewed buildfix for webaudio.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (153936 => 153937)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-08-12 09:38:50 UTC (rev 153936)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-08-12 10:22:06 UTC (rev 153937)
@@ -4178,6 +4178,11 @@
     cancelPendingEventsAndCallbacks();
 
     m_asyncEventQueue->close();
+
+    // Once an active DOM object has been stopped it can not be restarted, so we can deallocate
+    // the media player now. Note that userCancelledLoad will already have cleared the player
+    // if the media was not fully loaded. This handles all other cases.
+    m_player.clear();
 }
 
 void HTMLMediaElement::suspend(ReasonForSuspension why)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to