aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-30 23:29:28 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-17 09:03:43 +0000
commita4aa358acf763469bf46244c7f5a3a358c038a81 (patch)
tree24b800bf1577cfa665609edad5f4e008f972c6f4 /src/qml/jsruntime/qv4objectproto.cpp
parentd6a1943b2410933046204102080536c4aade4442 (diff)
Fix Object::getOwnProperty API
Don't return a Proprety pointer, this has issues with StringObject. Instead pass in a pointer that will get filled with the correct data. Change-Id: I28536ca129f5be3a4a1bc9583223521458411195 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 19233583e3..41483e9ef5 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -141,8 +141,9 @@ ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx)
if (scope.hasException())
return Encode::undefined();
PropertyAttributes attrs;
- Property *desc = O->__getOwnProperty__(name, &attrs);
- return fromPropertyDescriptor(scope.engine, desc, attrs);
+ Property desc;
+ O->getOwnProperty(name, &attrs, &desc);
+ return fromPropertyDescriptor(scope.engine, &desc, attrs);
}
ReturnedValue ObjectPrototype::method_getOwnPropertyNames(CallContext *context)
@@ -463,7 +464,7 @@ ReturnedValue ObjectPrototype::method_propertyIsEnumerable(CallContext *ctx)
if (scope.engine->hasException)
return Encode::undefined();
PropertyAttributes attrs;
- o->__getOwnProperty__(p, &attrs);
+ o->getOwnProperty(p, &attrs);
return Encode(attrs.isEnumerable());
}