RESOLVED FIXED 107887
[Gtk] RunLoop::run shuold run current thread's run loop.
https://bugs.webkit.org/show_bug.cgi?id=107887
Summary [Gtk] RunLoop::run shuold run current thread's run loop.
Seulgi Kim
Reported 2013-01-24 17:42:35 PST
When off-the main thread use RunLoop with Timer, Timer doesn't fire callback.
Attachments
Patch (2.28 KB, patch)
2013-01-27 20:55 PST, Seulgi Kim
no flags
Patch (2.27 KB, patch)
2013-01-27 21:40 PST, Seulgi Kim
no flags
Patch (2.30 KB, patch)
2013-01-31 18:40 PST, Seulgi Kim
no flags
Seulgi Kim
Comment 1 2013-01-27 20:55:10 PST
Seulgi Kim
Comment 2 2013-01-27 21:40:37 PST
Mario Sanchez Prada
Comment 3 2013-01-28 02:11:51 PST
Comment on attachment 184936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184936&action=review > Source/WebCore/ChangeLog:15 > + No new tests. There is no case that uses RunLoop in off the main thread yet. I guess you have some specific use cases for this change already in mind, and also that you probably have tested this manually in some way. If so, would you mind sharing those use cases / manual tests here? Also, I really think it would be worth trying to provide some kind of test along with this patch (probably an unit test). I don't have much experience with this part of the code besides the implementation of modal dialogs in WebKit2GTK+, which I remember used this part of the code to control "modality" of the dialogs, so that's where my interest comes from.
Seulgi Kim
Comment 4 2013-01-28 02:48:52 PST
(In reply to comment #3) Now my team is developing threaded model of coordinated graphics in Gtk (https://bugs.webkit.org/show_bug.cgi?id=100341). And RunLoop is needed in compositor thread. I'll share prototype sometime this week.
Mario Sanchez Prada
Comment 5 2013-01-28 03:03:18 PST
(In reply to comment #4) > (In reply to comment #3) > > Now my team is developing threaded model of coordinated graphics in Gtk (https://bugs.webkit.org/show_bug.cgi?id=100341). > And RunLoop is needed in compositor thread. > I'll share prototype sometime this week. Thanks for the clarification and for sharing that prototype, that will be really useful to properly understand this in a better way. BTW, I'm also adding Denis Nomiyama to CC here as he's working in something quite related to this and so he might be interested, I guess.
Seulgi Kim
Comment 6 2013-01-30 19:24:02 PST
I uploaded the prototype at https://github.com/DorothyBrowser/webkit/tree/threaded-compositor. I welcome your comments. Thank you.
Martin Robinson
Comment 7 2013-01-31 08:07:33 PST
Comment on attachment 184936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184936&action=review Looks pretty reasonable, but there is a memory leak in this new code, I think. > Source/WebCore/platform/gtk/RunLoopGtk.cpp:35 > #include <glib.h> > > +#include <wtf/MainThread.h> > + > namespace WebCore { You should have these includes be all one block. > Source/WebCore/platform/gtk/RunLoopGtk.cpp:40 > + m_runLoopContext = isMainThread() ? g_main_context_default() : g_main_context_new(); g_main_context_default does not return a new reference while g_main_context_new does. You are leaking the new main loop here. You should do: m_runLoopContext = isMainThread() ? g_main_context_default() : adoptGRef(g_main_context_new());
Seulgi Kim
Comment 8 2013-01-31 18:40:06 PST
Martin Robinson
Comment 9 2013-02-07 18:08:02 PST
Comment on attachment 185912 [details] Patch Okay. This seem pretty reasonable.
WebKit Review Bot
Comment 10 2013-02-07 18:42:57 PST
Comment on attachment 185912 [details] Patch Clearing flags on attachment: 185912 Committed r142219: <http://trac.webkit.org/changeset/142219>
WebKit Review Bot
Comment 11 2013-02-07 18:43:02 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.