Change-Id: I19f5ae0bb0a138756bb3396ebda6300eb8958b16
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
void __qmljs_delete_subscript(ExecutionContext *ctx, Value *result, const Value &base, const Value &index)
{
if (Object *o = base.asObject()) {
- uint n = UINT_MAX;
- if (index.isInteger())
- n = index.integerValue();
- else if (index.isDouble())
- n = index.doubleValue();
+ uint n = index.asArrayIndex();
if (n < UINT_MAX) {
Value res = Value::fromBoolean(o->deleteIndexedProperty(ctx, n));
if (result)