aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4/qv4object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4/qv4object.cpp')
-rw-r--r--src/v4/qv4object.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/v4/qv4object.cpp b/src/v4/qv4object.cpp
index b68c8de8be..04eb74b41c 100644
--- a/src/v4/qv4object.cpp
+++ b/src/v4/qv4object.cpp
@@ -881,9 +881,8 @@ Value Object::arrayIndexOf(Value v, uint fromIndex, uint endIndex, ExecutionCont
}
} else if (sparseArray) {
for (SparseArrayNode *n = sparseArray->lowerBound(fromIndex); n != sparseArray->end() && n->key() < endIndex; n = n->nextNode()) {
- bool exists;
- Value value = o->getValueChecked(ctx, arrayData + n->value, arrayAttributes ? arrayAttributes[n->value] : Attr_Data, &exists);
- if (exists && __qmljs_strict_equal(value, v, ctx))
+ Value value = o->getValue(ctx, arrayData + n->value, arrayAttributes ? arrayAttributes[n->value] : Attr_Data);
+ if (__qmljs_strict_equal(value, v, ctx))
return Value::fromDouble(n->key());
}
} else {
@@ -893,10 +892,11 @@ Value Object::arrayIndexOf(Value v, uint fromIndex, uint endIndex, ExecutionCont
Property *end = pd + endIndex;
pd += fromIndex;
while (pd < end) {
- bool exists;
- Value value = o->getValueChecked(ctx, pd, arrayAttributes ? arrayAttributes[pd - arrayData] : Attr_Data, &exists);
- if (exists && __qmljs_strict_equal(value, v, ctx))
- return Value::fromDouble(pd - arrayData);
+ if (!arrayAttributes || !arrayAttributes[pd - arrayData].isGeneric()) {
+ Value value = o->getValue(ctx, pd, arrayAttributes ? arrayAttributes[pd - arrayData] : Attr_Data);
+ if (__qmljs_strict_equal(value, v, ctx))
+ return Value::fromDouble(pd - arrayData);
+ }
++pd;
}
}