aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qv8variantwrapper.cpp
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2011-07-12 15:55:01 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-02 08:50:21 +0200
commit6f146a5d2ea893b13e4cfcd90243e66f7c9a0083 (patch)
tree2e94aef5c7f0a10bf28928dab40a43e5f9483826 /src/declarative/qml/v8/qv8variantwrapper.cpp
parent0db6db0263defcd6ff84769b7d927d5a51606f6c (diff)
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>
Diffstat (limited to 'src/declarative/qml/v8/qv8variantwrapper.cpp')
-rw-r--r--src/declarative/qml/v8/qv8variantwrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/v8/qv8variantwrapper.cpp b/src/declarative/qml/v8/qv8variantwrapper.cpp
index d4097d7f74..907f927a26 100644
--- a/src/declarative/qml/v8/qv8variantwrapper.cpp
+++ b/src/declarative/qml/v8/qv8variantwrapper.cpp
@@ -162,14 +162,14 @@ QVariant QV8VariantWrapper::toVariant(QV8ObjectResource *r)
v8::Handle<v8::Value> QV8VariantWrapper::Getter(v8::Local<v8::String> property,
const v8::AccessorInfo &info)
{
- return v8::Undefined();
+ return v8::Handle<v8::Value>();
}
v8::Handle<v8::Value> QV8VariantWrapper::Setter(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::AccessorInfo &info)
{
- return v8::Undefined();
+ return value;
}
v8::Handle<v8::Value> QV8VariantWrapper::PreserveGetter(v8::Local<v8::String> property,