WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
75427
WebKit deadlocks when GDK threads are initialized
https://bugs.webkit.org/show_bug.cgi?id=75427
Summary
WebKit deadlocks when GDK threads are initialized
Thierry Reding
Reported
2012-01-01 23:55:26 PST
Created
attachment 120865
[details]
Test-case that deadlocks by calling "alert()" in body.onload I have an application that uses WebKit to display a UI and uses VLC to display videos. libvlc runs in a separate thread and uses callbacks to control a GDK window where the video is displayed. To make this work properly, I initialize GDK threads as described in the GDK documentation (
http://developer.gnome.org/gdk/2.24/gdk-Threads.html
) to serialize accesses to the GDK window between the controlling thread and the VLC thread. However, after I initialize GDK threads by calling gdk_threads_init(), I see that certain operations make WebKit deadlock. After some investigation I've come up with two test-cases. The first triggers this bug by creating a WebKitWebView and loading HTML that runs an "alert()" from the body's onload handler. When running this the popup is displayed, but clicking the "Close" button triggers the deadlock. I also have a more elaborate test-case which uses an XMLHTTPRequest object to send synchronous and asynchronous requests. With synchronous requests, I can always reproduce the issue when they are run directly from an anchor's handler but not when I wrap them within a "setTimeout()" call. Asynchronous requests always work without deadlock.
Attachments
Test-case that deadlocks by calling "alert()" in body.onload
(1.19 KB, text/x-csrc)
2012-01-01 23:55 PST
,
Thierry Reding
no flags
Details
Test-case that deadlocks by running synchronous XMLHTTPRequests.
(3.24 KB, text/x-csrc)
2012-01-01 23:56 PST
,
Thierry Reding
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Thierry Reding
Comment 1
2012-01-01 23:56:14 PST
Created
attachment 120866
[details]
Test-case that deadlocks by running synchronous XMLHTTPRequests.
Alberto Garcia
Comment 2
2013-09-09 10:39:37 PDT
I can reproduce this problem, is ChromeClient::runJavaScriptAlert() run from the main GTK+ thread? Using gdk_threads_add_idle() before emitting script-alert seems to solve the issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug