Proxy.[[Set]] should reject falsish trap result in strict mode (#4418)

This patch fixes #4398.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-07 17:25:29 +01:00
committed by GitHub
parent 979a0c7826
commit 0a3aa0f48b
3 changed files with 39 additions and 4 deletions
@@ -1263,6 +1263,11 @@ ecma_proxy_object_set (ecma_object_t *obj_p, /**< proxy object */
/* 11. */
if (!boolean_trap_result)
{
if (is_strict)
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Proxy trap returned falsish"));
}
return ECMA_VALUE_FALSE;
}