[webkit-help] [gtk+] Locking webkit for use in a thread

Luka Napotnik luka.napotnik at gmail.com
Sun Aug 9 14:54:03 PDT 2009


Hello.

I have a strange problem using WebKit Gtk+ within a thread. Normally a
critical section of a gtk+ program is locked with the
GTK_THREADS_ENTER() and GDK_THREADS_LEAVE() calls within a thread to
protect the GUI. In that section I should be able to access and
manipulate Gtk+ widgets.

But that isn't the case with webkit's web view. I got crashes and
weird/unpredictable behaviour like pages that are rendered wrong. I do
the usual Gtk+ thread init:

gtk_init(NULL);
gdk_threads_init()
gtk_init(&argc, &argv);
...
gdk_threads_enter();
...
gtk_main();
gdk_threads_leave()

Because I still have problems using the webview inside the critical
section I'm asking if WebKit has it's own locking mechanism to protect
the code?

Greets,
Luka



More information about the webkit-help mailing list