WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
66097
REGRESSION: Qt JavaScript bridge signal connection fails
https://bugs.webkit.org/show_bug.cgi?id=66097
Summary
REGRESSION: Qt JavaScript bridge signal connection fails
Andrew Wason
Reported
2011-08-11 14:16:39 PDT
Connecting to a Qt signal from JavaScript now fails. This can be reproduced with an existing testcase: $ WebKitBuild/Debug/WebKit/qt/tests/qwebframe/tst_qwebframe connectAndDisconnect ********* Start testing of tst_QWebFrame ********* Config: Using QTest library 4.7.3, Qt 4.7.3 PASS : tst_QWebFrame::initTestCase() ASSERTION FAILED: isValidThisObject(thisValue, exec) ../../../Source/JavaScriptCore/runtime/CallData.cpp(38) : JSC::JSValue JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, const JSC::CallData&, JSC::JSValue, const JSC::ArgList&) QFATAL : tst_QWebFrame::connectAndDisconnect() Received signal 11 FAIL! : tst_QWebFrame::connectAndDisconnect() Received a fatal error. Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped ********* Finished testing of tst_QWebFrame ********* Aborted
Attachments
pass toThisObject() to JS signal handler
(5.01 KB, patch)
2011-08-11 18:36 PDT
,
Andrew Wason
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andrew Wason
Comment 1
2011-08-11 16:35:27 PDT
Looks like the problem was introduced with
r91095
from
bug 64250
Andrew Wason
Comment 2
2011-08-11 17:32:30 PDT
A workaround is to pass an anonymous object as the first arg to connect, e.g.: context.someSignal.connect({}, function() { }); Because otherwise JSC::Bindings::QtRuntimeConnectionMethod::call() uses the window object (exec->lexicalGlobalObject()) and that seems to trigger the assert. See
http://trac.webkit.org/browser/trunk/Source/WebCore/bridge/qt/qt_runtime.cpp#L1587
Andrew Wason
Comment 3
2011-08-11 18:36:36 PDT
Created
attachment 103719
[details]
pass toThisObject() to JS signal handler This also re-enables tst_QWebFrame::connectAndDisconnect() tests that were disabled with
bug 65170
Gavin Barraclough
Comment 4
2011-08-11 19:29:33 PDT
Comment on
attachment 103719
[details]
pass toThisObject() to JS signal handler Ooops, apologies for the breakage! - thanks for the fix.
WebKit Review Bot
Comment 5
2011-08-11 20:14:45 PDT
Comment on
attachment 103719
[details]
pass toThisObject() to JS signal handler Clearing flags on attachment: 103719 Committed
r92907
: <
http://trac.webkit.org/changeset/92907
>
WebKit Review Bot
Comment 6
2011-08-11 20:14:49 PDT
All reviewed patches have been landed. Closing bug.
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