aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-12-02 12:23:49 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-20 10:07:18 +0100
commitf2253e6b59e3e8a5d8524b766c03ce79389a4870 (patch)
treea8dda408e8f5cf9fe8c991e1eaf38627442c60e5 /src/qml/jsruntime/qv4objectiterator.cpp
parent295006428628435d300d0ac5e6a4d613430e1c4c (diff)
Fix comparisons between Object pointers
Change-Id: Icedbe32984b5b8bcb807411aa9945436b4bffca9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 80b73e52dc..5c8df40c4c 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -100,11 +100,11 @@ void ObjectIterator::next(Heap::String **name, uint *index, Property *pd, Proper
if (attrs->isEmpty())
break;
// check the property is not already defined earlier in the proto chain
- if (current->asObject() != object->asObject()) {
+ if (current->heapObject() != object->heapObject()) {
o = object->asObject();
n = *name;
bool shadowed = false;
- while (o != current->asObject()) {
+ while (o->asObject()->d() != current->heapObject()) {
if ((!!n && o->hasOwnProperty(n)) ||
(*index != UINT_MAX && o->hasOwnProperty(*index))) {
shadowed = true;
@@ -179,6 +179,7 @@ ReturnedValue ObjectIterator::nextPropertyNameAsString()
return Encode::null();
PropertyAttributes attrs;
+ // ### GC
Property p;
uint index;
Scope scope(object->engine());
@@ -189,7 +190,7 @@ ReturnedValue ObjectIterator::nextPropertyNameAsString()
if (!!name)
return name->asReturnedValue();
- assert(index < UINT_MAX);
+ Q_ASSERT(index < UINT_MAX);
return Encode(object->engine()->newString(QString::number(index)));
}