Changeset 92907 in webkit


Ignore:
Timestamp:
Aug 11, 2011 8:14:32 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Andrew Wason <rectalogic@rectalogic.com> 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):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92906 r92907  
     12011-08-11  Andrew Wason  <rectalogic@rectalogic.com>
     2
     3        REGRESSION: Qt JavaScript bridge signal connection fails
     4        https://bugs.webkit.org/show_bug.cgi?id=66097
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        Tests in WebKit/qt/tests/qwebframe
     9
     10        Call toThisObject() on exec->lexicalGlobalObject() so the correct
     11        object is passed to the JS signal handler.
     12
     13        * bridge/qt/qt_runtime.cpp:
     14        (JSC::Bindings::QtRuntimeConnectionMethod::call):
     15
    1162011-08-11  Nico Weber  <thakis@chromium.org>
    217
  • trunk/Source/WebCore/bridge/qt/qt_runtime.cpp

    r91903 r92907  
    15851585    if (sender) {
    15861586
    1587         JSObject* thisObject = exec->lexicalGlobalObject();
     1587        JSObject* thisObject = exec->lexicalGlobalObject()->toThisObject(exec);
    15881588        JSObject* funcObject = 0;
    15891589
  • trunk/Source/WebKit/qt/ChangeLog

    r92686 r92907  
     12011-08-11  Andrew Wason  <rectalogic@rectalogic.com>
     2
     3        REGRESSION: Qt JavaScript bridge signal connection fails
     4        https://bugs.webkit.org/show_bug.cgi?id=66097
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        Unmark tests as expected failures, they pass now.
     9
     10        * tests/qwebframe/tst_qwebframe.cpp:
     11        (tst_QWebFrame::connectAndDisconnect):
     12
    1132011-08-09  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp

    r92180 r92907  
    14551455    QCOMPARE(evalJS("signalArgs.length == 0"), sTrue);
    14561456    QCOMPARE(evalJS("signalSender"),evalJS("myObject"));
    1457     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    14581457    QCOMPARE(evalJS("slotThisObject == window"), sTrue);
    14591458
     
    15611560    QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithIntArg)"), sUndefined);
    15621561    m_myObject->resetQtFunctionInvoked();
    1563     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    15641562    QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
    15651563    QCOMPARE(m_myObject->qtFunctionInvoked(), 21);
     
    15701568    QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithDoubleArg)"), sUndefined);
    15711569    m_myObject->resetQtFunctionInvoked();
    1572     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    15731570    QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
    15741571    QCOMPARE(m_myObject->qtFunctionInvoked(), 22);
     
    15791576    QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.mySlotWithStringArg)"), sUndefined);
    15801577    m_myObject->resetQtFunctionInvoked();
    1581     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    15821578    QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
    15831579    QCOMPARE(m_myObject->qtFunctionInvoked(), 23);
     
    15891585    QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject.myOverloadedSlot)"), sUndefined);
    15901586    m_myObject->resetQtFunctionInvoked();
    1591     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    15921587    QCOMPARE(evalJS("myObject.mySignalWithIntArg(123)"), sUndefined);
    15931588    QCOMPARE(m_myObject->qtFunctionInvoked(), 26); // double overload
     
    15981593    QCOMPARE(evalJS("myObject.mySignalWithIntArg.connect(myObject['myOverloadedSlot(int)'])"), sUndefined);
    15991594    m_myObject->resetQtFunctionInvoked();
    1600     QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=65170", Continue);
    16011595    QCOMPARE(evalJS("myObject.mySignalWithIntArg(456)"), sUndefined);
    16021596    QCOMPARE(m_myObject->qtFunctionInvoked(), 28); // int overload
Note: See TracChangeset for help on using the changeset viewer.