mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
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:
parent
ecf159795a
commit
e50e2719df
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user