Changeset 154444 in webkit


Ignore:
Timestamp:
Aug 22, 2013 5:46:16 AM (11 years ago)
Author:
allan.jensen@digia.com
Message:

[Qt] DRT bug revealed/caused by r154300
https://bugs.webkit.org/show_bug.cgi?id=120151

Reviewed by Simon Hausmann.

Since QtInstance had an implementation of getOwnPropertySlot and not getOwnPropertyDescriptor,
the behavior of getOwnPropertyDescriptor changed when it got implemented using getOwnPropertySlot
in r154300.

DRT relied on getOwnPropertyDescriptor returning undefined for JS set properties to distinguish
between native Qt methods and JSC bound methods. This patch changes the check to see if the
property is writable since the Qt methods are ReadOnly.

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(DumpRenderTree::initJSObjects):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r154411 r154444  
     12013-08-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt] DRT bug revealed/caused by r154300
     4        https://bugs.webkit.org/show_bug.cgi?id=120151
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Since QtInstance had an implementation of getOwnPropertySlot and not getOwnPropertyDescriptor,
     9        the behavior of getOwnPropertyDescriptor changed when it got implemented using getOwnPropertySlot
     10        in r154300.
     11
     12        DRT relied on getOwnPropertyDescriptor returning undefined for JS set properties to distinguish
     13        between native Qt methods and JSC bound methods. This patch changes the check to see if the
     14        property is writable since the Qt methods are ReadOnly.
     15
     16        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     17        (DumpRenderTree::initJSObjects):
     18
    1192013-08-21  Joseph Pecoraro  <pecoraro@apple.com>
    220
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r153852 r154444  
    774774                                                                                   "for (var prop in this.jscBasedTestRunner) {\n"
    775775                                                                                   "    var pd = Object.getOwnPropertyDescriptor(this.qtBasedTestRunner, prop);\n"
    776                                                                                    "    if (pd !== undefined) continue;\n"
     776                                                                                   "    if (pd !== undefined && !pd.writable) continue;\n"
    777777                                                                                   "    pd = Object.getOwnPropertyDescriptor(this.jscBasedTestRunner, prop);\n"
    778778                                                                                   "    this.qtBasedTestRunner[prop] = bind(this.jscBasedTestRunner[prop], this.jscBasedTestRunner);\n"
Note: See TracChangeset for help on using the changeset viewer.