From 7e115c5c5e954ab560afccbd04cb295232a0924c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 7 Jan 2014 09:59:10 +0100 Subject: [ChangeLog][QtQml] Fix JavaScript Array.pop() not updating the internal array length correctly While the length property was reporting the correct value, the internal array length was out-of-sync. Task-number: QTBUG-35979 Change-Id: I68820a349cf1ce88c6aabc6a2301a8a861018a10 Reviewed-by: Liang Qi Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4arrayobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4arrayobject.cpp') diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index 1628cfe4da..296471692c 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -276,7 +276,7 @@ ReturnedValue ArrayPrototype::method_pop(CallContext *ctx) if (scope.hasException()) return Encode::undefined(); if (instance->isArrayObject()) - instance->setArrayLengthUnchecked(len - 1); + instance->setArrayLength(len - 1); else instance->put(ctx->engine->id_length, ScopedValue(scope, Primitive::fromDouble(len - 1))); return result.asReturnedValue(); -- cgit v1.2.3