Fix typedarray validation in Atomics read_modify_write (#4879)

This patch fixes #4875.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
Robert Fancsik
2021-12-15 10:33:21 +01:00
committed by GitHub
parent d37ff33dbe
commit dbba83fe40
3 changed files with 23 additions and 16 deletions
@@ -51,9 +51,9 @@ ecma_validate_shared_integer_typedarray (ecma_value_t typedarray, /**< typedArra
bool waitable) /**< waitable argument */
{
/* 2. */
if (!ecma_is_value_object (typedarray))
if (!ecma_is_typedarray (typedarray))
{
return ecma_raise_type_error (ECMA_ERR_ARGUMENT_THIS_NOT_OBJECT);
return ecma_raise_type_error (ECMA_ERR_ARGUMENT_THIS_NOT_TYPED_ARRAY);
}
/* 3-4. */