Get the typedArray's length property properly in Array.prototype.concat (#3791)

We should use the "length" property instead of the internal arraybuffer's length

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam 2020-05-25 18:10:38 +02:00 committed by GitHub
parent ecf159795a
commit e50e2719df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 10 deletions

View File

@ -901,14 +901,6 @@ ecma_op_object_get_length (ecma_object_t *object_p, /**< the object */
return ECMA_VALUE_EMPTY;
}
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
if (ecma_object_is_typedarray (object_p))
{
*length_p = ecma_typedarray_get_length (object_p);
return ECMA_VALUE_EMPTY;
}
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
ecma_value_t len_value = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_LENGTH);
ecma_value_t len_number = ecma_op_to_length (len_value, length_p);
ecma_free_value (len_value);

View File

@ -20,8 +20,6 @@
<test id="built-ins/ArrayBuffer/symbol-species-name.js"><reason></reason></test>
<test id="built-ins/Array/from/Array.from-name.js"><reason></reason></test>
<test id="built-ins/Array/of/name.js"><reason></reason></test>
<test id="built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js"><reason></reason></test>
<test id="built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js"><reason></reason></test>
<test id="built-ins/Array/prototype/copyWithin/name.js"><reason></reason></test>
<test id="built-ins/Array/prototype/entries/name.js"><reason></reason></test>
<test id="built-ins/Array/prototype/fill/name.js"><reason></reason></test>