From a7431e41128bd3aa272223746a5bb57597a87de3 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 8 Jan 2014 13:08:41 +0100 Subject: Remove Property * return value from ObjectIterator The added side effect is that the QJSValueIterator is now somewhat faster. Change-Id: I01ba9f2a72a34224f5691130df69a91ab75b72e6 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4objectproto.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4objectproto.cpp') diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index 9474442a70..806da833ea 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -239,12 +239,13 @@ ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx) while (1) { uint index; PropertyAttributes attrs; - Property *pd = it.next(name, &index, &attrs); - if (!pd) + Property pd; + it.next(name, &index, &pd, &attrs); + if (attrs.isEmpty()) break; Property n; PropertyAttributes nattrs; - val = o->getValue(pd, attrs); + val = o->getValue(&pd, attrs); toPropertyDescriptor(ctx, val, &n, &nattrs); if (scope.engine->hasException) return Encode::undefined(); -- cgit v1.2.3