[Webkit-unassigned] [Bug 53600] [GTK] Add support for window.runModalDialog
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 22 10:37:44 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=53600
--- Comment #31 from Carlos Garcia Campos <cgarcia at igalia.com> 2012-02-22 10:37:44 PST ---
(From update of attachment 128211)
View in context: https://bugs.webkit.org/attachment.cgi?id=128211&action=review
> Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:99
> + if (m_modalLoop)
> + g_main_loop_quit(m_modalLoop);
You should check the loop is actually running before calling quit with g_main_loop_is_running()
> Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:206
> + GMainContext* threadDefaultContext = g_main_context_ref_thread_default();
> + g_main_context_acquire(threadDefaultContext);
> +
> + m_modalLoop = g_main_loop_new(threadDefaultContext, FALSE);
> + g_main_loop_run(m_modalLoop);
> + g_main_loop_unref(m_modalLoop);
> + m_modalLoop = 0;
> +
> + g_main_context_release(threadDefaultContext);
> + g_main_context_unref(threadDefaultContext);
You should call GDK_THREADS_LEAVE() before running the loop and GDK_THREADS_ENTER() when it finishes. Do we really need to get and ref the default context? isn't it enough to create the main loop with the default context? Something like
m_modalLoop = g_main_loop_new(0, FALSE);
GDK_THREADS_LEAVE();
g_main_loop_run(m_modalLoop);
GDK_THREADS_ENTER();
g_main_loop_unref(m_modalLoop);
--
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