WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
134664
Timeout when calling dom method in WebExtension via dbus
https://bugs.webkit.org/show_bug.cgi?id=134664
Summary
Timeout when calling dom method in WebExtension via dbus
Marcel Tiede
Reported
2014-07-06 13:20:59 PDT
Hi, I created a vala GTK3 Application using a WebView which loads a WebExtension. Now I try to call a method from the WebExtension via dbus originating from the GTK Application. The WebExtension should click via the DOM API on the loaded HTML page. Calling the click method via a dbus-inspector or separate programs works ok. But calling the click from the GTK-Application via dbus results in a timeout and afterwards the click is performed. Probably this problem is related to webkitgtk / webkit, because by removing the actual clicking command the timeout is gone. In the Attachments you can find a sample including the valac commands. In the File Browser.vala are two path entries which must be adjusted to the system. For my testing I used Version 2.4.3 from webkitgtk.
Attachments
Example Files
(21.74 KB, application/octet-stream)
2014-07-06 13:21 PDT
,
Marcel Tiede
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Marcel Tiede
Comment 1
2014-07-06 13:21:51 PDT
Created
attachment 234464
[details]
Example Files
Marcel Tiede
Comment 2
2014-07-06 13:25:07 PDT
Errormessage translated: Timeout reached (g-io-error-quark, 24)
Jiří Janoušek
Comment 3
2014-07-10 13:56:05 PDT
Hi Marcel, I've modified your code to perform DOM manipulation in an idle callback and it does work :-) --- dbuswebkit(0)/WebExtension.vala 2014-06-30 21:35:54.000000000 +0200 +++ dbuswebkit/WebExtension.vala 2014-07-10 22:50:22.234275010 +0200 @@ -69,11 +69,15 @@ public void ClickFAIL() { stdout.printf("Controler:ClickFAIL1\n"); + Idle.add(() => { + DOMElement element = mControler.mDom.get_element_by_id("test"); + ((DOMHTMLElement)element).click(); + - DOMElement element = mControler.mDom.get_element_by_id("test"); - ((DOMHTMLElement)element).click(); + stdout.printf("Controler:ClickFAIL2\n"); + return false; + }); - stdout.printf("Controler:ClickFAIL2\n"); } public void ClickOK() {
Marcel Tiede
Comment 4
2014-07-14 14:00:12 PDT
Your codes fixes the Problem. Thank you Jiří. If this behaviour is expected from Webkit point of view this bug is solved.
Marcel Tiede
Comment 5
2014-10-18 05:27:12 PDT
Fixed for me.
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