Title: [184173] releases/WebKitGTK/webkit-2.8/Source
Revision
184173
Author
[email protected]
Date
2015-05-12 01:34:15 -0700 (Tue, 12 May 2015)

Log Message

Merge r183800 - [GTK] Async operations running in the WorkQueue thread should schedule their sources to the WorkQueue main lopp
https://bugs.webkit.org/show_bug.cgi?id=144541

Reviewed by Žan Doberšek.

Source/WTF:

They are currently sent to the main thread run loop, because we
are not setting the WorkQueue main context as the default one in
the worker thread.

* wtf/gtk/WorkQueueGtk.cpp:
(WTF::WorkQueue::platformInitialize): Call
g_main_context_push_thread_default() to set the WorkQueue main
context as the default of the thread before running the main loop,
and g_main_context_pop_thread_default() when the main loop quits.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog (184172 => 184173)


--- releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog	2015-05-12 08:29:37 UTC (rev 184172)
+++ releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog	2015-05-12 08:34:15 UTC (rev 184173)
@@ -1,3 +1,20 @@
+2015-05-05  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Async operations running in the WorkQueue thread should schedule their sources to the WorkQueue main lopp
+        https://bugs.webkit.org/show_bug.cgi?id=144541
+
+        Reviewed by Žan Doberšek.
+
+        They are currently sent to the main thread run loop, because we
+        are not setting the WorkQueue main context as the default one in
+        the worker thread.
+
+        * wtf/gtk/WorkQueueGtk.cpp:
+        (WTF::WorkQueue::platformInitialize): Call
+        g_main_context_push_thread_default() to set the WorkQueue main
+        context as the default of the thread before running the main loop,
+        and g_main_context_pop_thread_default() when the main loop quits.
+
 2015-04-28  Alex Christensen  <[email protected]>
 
         Properly reset deleted count when clearing HashTables.

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp (184172 => 184173)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp	2015-05-12 08:29:37 UTC (rev 184172)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp	2015-05-12 08:34:15 UTC (rev 184173)
@@ -53,7 +53,11 @@
         threadName += strlen(threadName) - kVisualStudioThreadNameLimit;
 
     RefPtr<WorkQueue> protector(this);
-    m_workQueueThread = createThread(threadName, [protector] { g_main_loop_run(protector->m_eventLoop.get()); });
+    m_workQueueThread = createThread(threadName, [protector] {
+        g_main_context_push_thread_default(protector->m_eventContext.get());
+        g_main_loop_run(protector->m_eventLoop.get());
+        g_main_context_pop_thread_default(protector->m_eventContext.get());
+    });
 }
 
 void WorkQueue::platformInvalidate()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to