aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-26 10:52:16 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-08 18:33:54 +0000
commit4d2e92b6214ac49a86685ae4f5f8ea0a78f2a7a0 (patch)
treef5f7b9f3e02bf3e71d1ed76d5a794597a4378591
parentac9276eeb9e2dd31345600a497c4d65009ae9577 (diff)
Fix regression in ObjectProto.getOwnPropertyDescriptor
Change-Id: Ie2bcfd7212773c1a48041a24433c2f73613ead3e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 1edf76e2de..3c6729c1fe 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -141,9 +141,9 @@ ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx)
if (scope.hasException())
return Encode::undefined();
PropertyAttributes attrs;
- Property desc;
- O->getOwnProperty(name, &attrs, &desc);
- return fromPropertyDescriptor(scope.engine, &desc, attrs);
+ ScopedProperty desc(scope);
+ O->getOwnProperty(name, &attrs, desc);
+ return fromPropertyDescriptor(scope.engine, desc, attrs);
}
ReturnedValue ObjectPrototype::method_getOwnPropertyNames(CallContext *context)
@@ -630,7 +630,7 @@ void ObjectPrototype::toPropertyDescriptor(ExecutionEngine *engine, const Value
ReturnedValue ObjectPrototype::fromPropertyDescriptor(ExecutionEngine *engine, const Property *desc, PropertyAttributes attrs)
{
- if (!desc)
+ if (attrs.isEmpty())
return Encode::undefined();
Scope scope(engine);