[Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Dec 2015 11:22:00 +0000 (11:22 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Dec 2015 11:22:00 +0000 (11:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152041

Reviewed by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
write-ready source to the thread-default context, instead of implicitly
relying on the default context for dispatching.

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

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

index 6215aca..db962b7 100644 (file)
@@ -1,5 +1,17 @@
 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
 
+        [Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
+        https://bugs.webkit.org/show_bug.cgi?id=152041
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/network/soup/SocketStreamHandleSoup.cpp:
+        (WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
+        write-ready source to the thread-default context, instead of implicitly
+        relying on the default context for dispatching.
+
+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
 
index 3159eda..9cc5d8c 100644 (file)
@@ -245,7 +245,7 @@ void SocketStreamHandle::beginWaitingForSocketWritability()
 
     m_writeReadySource = adoptGRef(g_pollable_output_stream_create_source(m_outputStream.get(), 0));
     g_source_set_callback(m_writeReadySource.get(), reinterpret_cast<GSourceFunc>(writeReadyCallback), m_id, 0);
-    g_source_attach(m_writeReadySource.get(), 0);
+    g_source_attach(m_writeReadySource.get(), g_main_context_get_thread_default());
 }
 
 void SocketStreamHandle::stopWaitingForSocketWritability()