Changeset 142219 in webkit
- Timestamp:
- Feb 7, 2013 6:41:21 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r142217 r142219 1 2013-02-07 Seulgi Kim <seulgikim@company100.net> 2 3 [Gtk] RunLoop::run shuold run current thread's run loop. 4 https://bugs.webkit.org/show_bug.cgi?id=107887 5 6 Reviewed by Martin Robinson. 7 8 Currently, RunLoop in Gtk can use just main thread's event loop. 9 But the other ports are implemented to use RunLoop in sub threads. 10 11 This patch makes RunLoop constructor create new context, not use default 12 context. 13 But in the main thread still uses default context to use main event loop 14 since there is some codes using glib directly (e.g. in 15 LayerTreeHostGtk::scheduleLayerFlush). 16 17 No new tests. There is no case that uses RunLoop in off the main thread 18 yet. 19 20 * platform/gtk/RunLoopGtk.cpp: 21 (WebCore::RunLoop::RunLoop): 22 (WebCore::RunLoop::run): 23 1 24 2013-02-07 Kentaro Hara <haraken@chromium.org> 2 25 -
trunk/Source/WebCore/platform/gtk/RunLoopGtk.cpp
r109161 r142219 31 31 #include <glib.h> 32 32 33 #include <wtf/MainThread.h> 34 33 35 namespace WebCore { 34 36 … … 36 38 { 37 39 // g_main_context_default() doesn't add an extra reference. 38 m_runLoopContext = g_main_context_default();40 m_runLoopContext = isMainThread() ? g_main_context_default() : adoptGRef(g_main_context_new()); 39 41 ASSERT(m_runLoopContext); 40 42 GRefPtr<GMainLoop> innermostLoop = adoptGRef(g_main_loop_new(m_runLoopContext.get(), FALSE)); … … 54 56 void RunLoop::run() 55 57 { 56 RunLoop* mainRunLoop = RunLoop:: main();58 RunLoop* mainRunLoop = RunLoop::current(); 57 59 GMainLoop* innermostLoop = mainRunLoop->innermostLoop(); 58 60 if (!g_main_loop_is_running(innermostLoop)) {
Note: See TracChangeset
for help on using the changeset viewer.