Commit 7c45fdba authored by allan.jensen@digia.com's avatar allan.jensen@digia.com
Browse files

[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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eebecacc
2013-08-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
[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):
2013-08-21 Joseph Pecoraro <pecoraro@apple.com>
<https://webkit.org/b/120134> [Tools] lldb_webkit.py helpers is incorrectly printing 8bit Strings
......
......@@ -773,7 +773,7 @@ void DumpRenderTree::initJSObjects()
" }\n"
"for (var prop in this.jscBasedTestRunner) {\n"
" var pd = Object.getOwnPropertyDescriptor(this.qtBasedTestRunner, prop);\n"
" if (pd !== undefined) continue;\n"
" if (pd !== undefined && !pd.writable) continue;\n"
" pd = Object.getOwnPropertyDescriptor(this.jscBasedTestRunner, prop);\n"
" this.qtBasedTestRunner[prop] = bind(this.jscBasedTestRunner[prop], this.jscBasedTestRunner);\n"
"}\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment