Fix typedarray validation in Atomics read_modify_write (#4879)

This patch fixes #4875.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
This commit is contained in:
Robert Fancsik authored and GitHub committed 2021-12-15 10:33:21 +01:00
1 parent d37ff33dbe
commit dbba83fe40
3 files changed
+23 -16

No files matched your search

@@ -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. */