[Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Dec 2015 11:20:33 +0000 (11:20 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Dec 2015 11:20:33 +0000 (11:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152040

Reviewed by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
calling the g_source_get_id()-g_source_remove() pair, destroy the source via
the g_source_destroy() call. Also use nullptr to clear out the pointer
variable.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp

index 92fe061..6215aca 100644 (file)
@@ -1,5 +1,18 @@
 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
 
+        [Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
+        https://bugs.webkit.org/show_bug.cgi?id=152040
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/network/soup/SocketStreamHandleSoup.cpp:
+        (WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
+        calling the g_source_get_id()-g_source_remove() pair, destroy the source via
+        the g_source_destroy() call. Also use nullptr to clear out the pointer
+        variable.
+
+2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
+
         Make AudioBusGtk implementation GLib-specific
         https://bugs.webkit.org/show_bug.cgi?id=152049
 
index 5358c69..3159eda 100644 (file)
@@ -253,8 +253,8 @@ void SocketStreamHandle::stopWaitingForSocketWritability()
     if (!m_writeReadySource) // Not waiting.
         return;
 
-    g_source_remove(g_source_get_id(m_writeReadySource.get()));
-    m_writeReadySource = 0;
+    g_source_destroy(m_writeReadySource.get());
+    m_writeReadySource = nullptr;
 }
 
 static void connectedCallback(GSocketClient* client, GAsyncResult* result, void* id)