[webkit-gtk] What supposed to hold the GDK in calls from WebKit/gtk/WebCoreSupport
Gustavo Noronha Silva
gns at gnome.org
Mon Aug 22 05:30:38 PDT 2011
On Sun, 2011-08-21 at 11:50 +0100, Yehouda Harpaz wrote:
> Maybe it is assumed that there will a lock around, but I don't see
> where. Since it is called from Soup code that is itself called from
> g_main_dispatch, there cannot be a lock at that point. And I don't
> anyting inside that tries to look.
So, if the code is being called from the main loop it should be properly
locked. You are probably missing a pair of threads_enter/threads_leave
around gtk_main(). From the blog post:
"It turns out that you’re supposed to put gdk_threads_enter()/leave()
around the call you make to gtk_main(). I suppose that this is implicit
in the injunction to protect all GTK calls, but I know I’m not the only
one to have had the impression that the main loop was special somehow.
It certainly isn’t explicit on the GDK threads API page, and although it
turns up (sort of) in the code examples there, the number of people that
get this wrong is staggering. So I think we’ll need to improve that
documentation a bit."
I assume you missed that bit? If you are doing that and it's not working
we'll have to dive a bit more, a bug report would be a good way to go
forward I'd say.
Gustavo Noronha Silva <gns at gnome.org>
More information about the webkit-gtk