Skip to content

Commit e50e271

Browse files
authored
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
1 parent ecf1597 commit e50e271

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

jerry-core/ecma/operations/ecma-objects.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -901,14 +901,6 @@ ecma_op_object_get_length (ecma_object_t *object_p, /**< the object */
901901
return ECMA_VALUE_EMPTY;
902902
}
903903

904-
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
905-
if (ecma_object_is_typedarray (object_p))
906-
{
907-
*length_p = ecma_typedarray_get_length (object_p);
908-
return ECMA_VALUE_EMPTY;
909-
}
910-
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
911-
912904
ecma_value_t len_value = ecma_op_object_get_by_magic_id (object_p, LIT_MAGIC_STRING_LENGTH);
913905
ecma_value_t len_number = ecma_op_to_length (len_value, length_p);
914906
ecma_free_value (len_value);

tests/test262-es6-excludelist.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
<test id="built-ins/ArrayBuffer/symbol-species-name.js"><reason></reason></test>
2121
<test id="built-ins/Array/from/Array.from-name.js"><reason></reason></test>
2222
<test id="built-ins/Array/of/name.js"><reason></reason></test>
23-
<test id="built-ins/Array/prototype/concat/Array.prototype.concat_large-typed-array.js"><reason></reason></test>
24-
<test id="built-ins/Array/prototype/concat/Array.prototype.concat_small-typed-array.js"><reason></reason></test>
2523
<test id="built-ins/Array/prototype/copyWithin/name.js"><reason></reason></test>
2624
<test id="built-ins/Array/prototype/entries/name.js"><reason></reason></test>
2725
<test id="built-ins/Array/prototype/fill/name.js"><reason></reason></test>

0 commit comments

Comments
 (0)