From db695c5b1d07275f208446dad178b1131b20bb0a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 22 Jun 2018 22:59:43 +0200 Subject: Unify the get and getIndexed vtable functions of QV4::Object This finalizes the refactoring of Object's vtable API. Also added the receiver argument to the method as required by the ES7 spec. Change-Id: I36f9989211c47458788fe9f7e929862bcfe7b845 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4jsonobject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4jsonobject.cpp') diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index ed7d8611ee..58c17b54cc 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -847,7 +847,7 @@ QString Stringify::JA(Object *a) ScopedValue v(scope); for (uint i = 0; i < len; ++i) { bool exists; - v = a->getIndexed(i, &exists); + v = a->get(i, &exists); if (!exists) { partial += QStringLiteral("null"); continue; @@ -919,7 +919,7 @@ ReturnedValue JsonObject::method_stringify(const FunctionObject *b, const Value stringify.propertyList = static_cast(scope.alloc(arrayLen)); for (uint i = 0; i < arrayLen; ++i) { Value *v = stringify.propertyList + i; - *v = o->getIndexed(i); + *v = o->get(i); if (v->as() || v->as() || v->isNumber()) *v = v->toString(scope.engine); if (!v->isString()) { @@ -1081,7 +1081,7 @@ QJsonArray JsonObject::toJsonArray(const ArrayObject *a, V4ObjectSet &visitedObj ScopedValue v(scope); quint32 length = a->getLength(); for (quint32 i = 0; i < length; ++i) { - v = a->getIndexed(i); + v = a->get(i); if (v->as()) v = Encode::null(); result.append(toJsonValue(v, visitedObjects)); -- cgit v1.2.3