Ensure that the prototype chain is checked in property Get
authorChris Adams <christopher.adams@nokia.com>
Tue, 12 Jul 2011 05:55:01 +0000 (15:55 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 2 Aug 2011 06:50:21 +0000 (08:50 +0200)
commit6f146a5d2ea893b13e4cfcd90243e66f7c9a0083
tree2e94aef5c7f0a10bf28928dab40a43e5f9483826
parent0db6db0263defcd6ff84769b7d927d5a51606f6c
Ensure that the prototype chain is checked in property Get

This commit ensures that the prototype chain is checked during
property Get operations on QObjects and other types in QML by
returning an empty handle from the property Get interceptor if
no valid property with the given name is found.

Task-number: QTBUG-20336
Change-Id: I670ee211c74c0fdcb68c3f91b29fcc0ea8b55d6f
Reviewed-on: http://codereview.qt.nokia.com/1477
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/declarative/qml/v8/qv8listwrapper.cpp
src/declarative/qml/v8/qv8qobjectwrapper.cpp
src/declarative/qml/v8/qv8typewrapper.cpp
src/declarative/qml/v8/qv8valuetypewrapper.cpp
src/declarative/qml/v8/qv8variantwrapper.cpp
tests/auto/declarative/qdeclarativeecmascript/data/declarativeHasOwnProperty.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp