Title: [92907] trunk/Source
Revision
92907
Author
[email protected]
Date
2011-08-11 20:14:32 -0700 (Thu, 11 Aug 2011)

Log Message

REGRESSION: Qt _javascript_ bridge signal connection fails
https://bugs.webkit.org/show_bug.cgi?id=66097

Patch by Andrew Wason <[email protected]> on 2011-08-11
Reviewed by Gavin Barraclough.

Source/WebCore:

Tests in WebKit/qt/tests/qwebframe

Call toThisObject() on exec->lexicalGlobalObject() so the correct
object is passed to the JS signal handler.

* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeConnectionMethod::call):

Source/WebKit/qt:

Unmark tests as expected failures, they pass now.

* tests/qwebframe/tst_qwebframe.cpp:
(tst_QWebFrame::connectAndDisconnect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92906 => 92907)


--- trunk/Source/WebCore/ChangeLog	2011-08-12 03:00:05 UTC (rev 92906)
+++ trunk/Source/WebCore/ChangeLog	2011-08-12 03:14:32 UTC (rev 92907)
@@ -1,3 +1,18 @@
+2011-08-11  Andrew Wason  <[email protected]>
+
+        REGRESSION: Qt _javascript_ bridge signal connection fails
+        https://bugs.webkit.org/show_bug.cgi?id=66097
+
+        Reviewed by Gavin Barraclough.
+
+        Tests in WebKit/qt/tests/qwebframe
+
+        Call toThisObject() on exec->lexicalGlobalObject() so the correct
+        object is passed to the JS signal handler.
+
+        * bridge/qt/qt_runtime.cpp:
+        (JSC::Bindings::QtRuntimeConnectionMethod::call):
+
 2011-08-11  Nico Weber  <[email protected]>
 
         Remove incorrect comment about m_wheelEventHandlerCount

Modified: trunk/Source/WebCore/bridge/qt/qt_runtime.cpp (92906 => 92907)


--- trunk/Source/WebCore/bridge/qt/qt_runtime.cpp	2011-08-12 03:00:05 UTC (rev 92906)
+++ trunk/Source/WebCore/bridge/qt/qt_runtime.cpp	2011-08-12 03:14:32 UTC (rev 92907)
@@ -1584,7 +1584,7 @@
 
     if (sender) {
 
-        JSObject* thisObject = exec->lexicalGlobalObject();
+        JSObject* thisObject = exec->lexicalGlobalObject()->toThisObject(exec);
         JSObject* funcObject = 0;
 
         // QtScript checks signalness first, arguments second

Modified: trunk/Source/WebKit/qt/ChangeLog (92906 => 92907)


--- trunk/Source/WebKit/qt/ChangeLog	2011-08-12 03:00:05 UTC (rev 92906)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-08-12 03:14:32 UTC (rev 92907)
@@ -1,3 +1,15 @@
+2011-08-11  Andrew Wason  <[email protected]>
+
+        REGRESSION: Qt _javascript_ bridge signal connection fails
+        https://bugs.webkit.org/show_bug.cgi?id=66097
+
+        Reviewed by Gavin Barraclough.
+
+        Unmark tests as expected failures, they pass now.
+
+        * tests/qwebframe/tst_qwebframe.cpp:
+        (tst_QWebFrame::connectAndDisconnect):
+
 2011-08-09  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r92683.

Modified: trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp (92906 => 92907)


--- trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-08-12 03:00:05 UTC (rev 92906)
+++ trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp	2011-08-12 03:14:32 UTC (rev 92907)
@@ -1454,7 +1454,6 @@
     QCOMPARE(evalJS("gotSignal"), sTrue);
     QCOMPARE(evalJS("signalArgs.length == 0"), sTrue);
     QCOMPARE(evalJS("signalSender"),evalJS("myObject"));
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("slotThisObject == window"), sTrue);
 
     evalJS("gotSignal = false");
@@ -1560,7 +1559,6 @@
     // one argument
     QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithIntArg)"), sUndefined);
     m_myObject->resetQtFunctionInvoked();
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
     QCOMPARE(m_myObject->qtFunctionInvoked(), 21);
     QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
@@ -1569,7 +1567,6 @@
 
     QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithDoubleArg)"), sUndefined);
     m_myObject->resetQtFunctionInvoked();
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
     QCOMPARE(m_myObject->qtFunctionInvoked(), 22);
     QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
@@ -1578,7 +1575,6 @@
 
     QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithStringArg)"), sUndefined);
     m_myObject->resetQtFunctionInvoked();
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
     QCOMPARE(m_myObject->qtFunctionInvoked(), 23);
     QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
@@ -1588,7 +1584,6 @@
     // connecting to overloaded slot
     QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.myOverloadedSlot)"), sUndefined);
     m_myObject->resetQtFunctionInvoked();
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
     QCOMPARE(m_myObject->qtFunctionInvoked(), 26); // double overload
     QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
@@ -1597,7 +1592,6 @@
 
     QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject['myOverloadedSlot(int)'])"), sUndefined);
     m_myObject->resetQtFunctionInvoked();
-    QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
     QCOMPARE(evalJS("myObject.mySignalWithIntArg(456)"), sUndefined);
     QCOMPARE(m_myObject->qtFunctionInvoked(), 28); // int overload
     QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to