[webkit-gtk] What supposed to hold the GDK in calls from WebKit/gtk/WebCoreSupport

Martin Robinson mrobinson at webkit.org
Mon Aug 22 11:35:36 PDT 2011


On Mon, Aug 22, 2011 at 11:31 AM, Gustavo Noronha Silva <gns at gnome.org> wrote:
> On Mon, 2011-08-22 at 09:34 -0700, Martin Robinson wrote:
>> No, since I do not believe that libsoup depends on GDK. We may need to
>> change the libsoup backend in WebKit though. I'm just conjecturing at
>> this point though. :)
>
> Or maybe we should just wrap the functions in ChromeClient that touch
> gtk+ stuff in them? I think it's safe to assume that anything calling
> ChromeClient::* will come from the mainloop execution?

The issue with this, I think, is that ChromeClient methods may be
called from other places that already hold the GDK lock. From the
article Evan linked to: "In fact, the first two examples were wrong
because the default implementation of the GDK lock functions is a
mutex that is not reentrant, and that would have deadlocked!"

Later, it discusses switching the lock implementation to a reentrant
one. I'm not sure if that's a good solution or not. We'd be forcing
all clients to use a particular GDK lock implementation.

--Martin


More information about the webkit-gtk mailing list