diff options
Diffstat (limited to 'src/qml/jsruntime/qv4lookup.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4lookup.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp index a870cdac61..66dc7b7e4a 100644 --- a/src/qml/jsruntime/qv4lookup.cpp +++ b/src/qml/jsruntime/qv4lookup.cpp @@ -316,6 +316,15 @@ ReturnedValue Lookup::stringLengthGetter(Lookup *l, const ValueRef object) return getterGeneric(l, object); } +ReturnedValue Lookup::arrayLengthGetter(Lookup *l, const ValueRef object) +{ + if (ArrayObject *a = object->asArrayObject()) + return a->memberData[ArrayObject::LengthPropertyIndex].value.asReturnedValue(); + + l->getter = getterGeneric; + return getterGeneric(l, object); +} + ReturnedValue Lookup::globalGetterGeneric(Lookup *l, ExecutionContext *ctx) { |