[GTK] Timeout sources not correctly removed
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Mar 2014 13:27:55 +0000 (13:27 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Mar 2014 13:27:55 +0000 (13:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129877

Reviewed by Philippe Normand.

Set source ID variables to 0 after removing the sources from the
context. Also give a name to the sources.

* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::disconnect):
(WebCore::TrackPrivateBaseGStreamer::activeChanged):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp

index 2b4ece6..4263ea5 100644 (file)
@@ -1,3 +1,19 @@
+2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Timeout sources not correctly removed
+        https://bugs.webkit.org/show_bug.cgi?id=129877
+
+        Reviewed by Philippe Normand.
+
+        Set source ID variables to 0 after removing the sources from the
+        context. Also give a name to the sources.
+
+        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
+        (WebCore::TrackPrivateBaseGStreamer::disconnect):
+        (WebCore::TrackPrivateBaseGStreamer::activeChanged):
+        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
+        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
+
 2014-03-07  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
 
         Remove FFTFrameMKL.
index 45f4fa1..16bd494 100644 (file)
@@ -97,9 +97,11 @@ void TrackPrivateBaseGStreamer::disconnect()
 
     if (m_activeTimerHandler)
         g_source_remove(m_activeTimerHandler);
+    m_activeTimerHandler = 0;
 
     if (m_tagTimerHandler)
         g_source_remove(m_tagTimerHandler);
+    m_tagTimerHandler = 0;
 
     m_pad.clear();
     m_tags.clear();
@@ -111,6 +113,7 @@ void TrackPrivateBaseGStreamer::activeChanged()
         g_source_remove(m_activeTimerHandler);
     m_activeTimerHandler = g_timeout_add(0,
         reinterpret_cast<GSourceFunc>(trackPrivateActiveChangeTimeoutCallback), this);
+    g_source_set_name_by_id(m_activeTimerHandler, "[WebKit] trackPrivateActiveChangeTimeoutCallback");
 }
 
 void TrackPrivateBaseGStreamer::tagsChanged()
@@ -127,10 +130,12 @@ void TrackPrivateBaseGStreamer::tagsChanged()
 
     m_tagTimerHandler = g_timeout_add(0,
         reinterpret_cast<GSourceFunc>(trackPrivateTagsChangeTimeoutCallback), this);
+    g_source_set_name_by_id(m_tagTimerHandler, "[WebKit] trackPrivateTagsChangeTimeoutCallback");
 }
 
 void TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged()
 {
+    m_activeTimerHandler = 0;
     if (!m_pad)
         return;