[Webkit-unassigned] [Bug 107887] [Gtk] RunLoop::run shuold run current thread's run loop.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 31 08:05:33 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=107887


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #184936|review?                     |review-
               Flag|                            |




--- Comment #7 from Martin Robinson <mrobinson at webkit.org>  2013-01-31 08:07:33 PST ---
(From update of attachment 184936)
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());

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list