From: Lars Knoll Date: Mon, 14 Jan 2013 21:45:00 +0000 (+0100) Subject: Smaller bug fixes to setting the length property for arrays X-Git-Tag: upstream/5.2.1~669^2~659^2~519 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b30b131babfc177c2ca4fdf783ee9a539c84870a;p=platform%2Fupstream%2Fqtdeclarative.git Smaller bug fixes to setting the length property for arrays Change-Id: I5f93d8e6648aad162bfafbcc558bd77e8d59b50f Reviewed-by: Simon Hausmann --- diff --git a/qmljs_objects.cpp b/qmljs_objects.cpp index 3ea7ede..04107d0 100644 --- a/qmljs_objects.cpp +++ b/qmljs_objects.cpp @@ -483,9 +483,11 @@ bool Object::__defineOwnProperty__(ExecutionContext *ctx, String *name, Property if (isArray && name->isEqualTo(ctx->engine->id_length)) { PropertyDescriptor *lp = array.getLengthProperty(); + if (desc->isEmpty() || desc->isSubset(lp)) + return true; if (!lp->isWritable() || desc->type == PropertyDescriptor::Accessor || desc->isConfigurable() || desc->isEnumerable()) goto reject; - bool succeeded = false; + bool succeeded = true; if (desc->type == PropertyDescriptor::Data) { bool ok; uint l = desc->value.asArrayLength(ctx, &ok); diff --git a/tests/TestExpectations b/tests/TestExpectations index cb07b97..f030ff5 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -823,7 +823,6 @@ S15.1.3.2_A5.3 failing 15.2.3.6-3-66 failing 15.2.3.6-3-94-1 failing 15.2.3.6-3-94 failing -15.2.3.6-4-163 failing 15.2.3.6-4-188 failing 15.2.3.6-4-189 failing 15.2.3.6-4-20 failing