Add check Proxy object [[SetPrototypeOf]] (#4631)

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
This commit is contained in:
kisbg
2021-04-26 09:21:29 +02:00
committed by GitHub
parent b4bea25f13
commit ce24edae24
2 changed files with 7 additions and 1 deletions
@@ -361,6 +361,7 @@ ecma_proxy_object_get_prototype_of (ecma_object_t *obj_p) /**< proxy object */
*
* See also:
* ECMAScript v6, 9.5.2
* ECMAScript v11: 9.5.2
*
* Note: Returned value is always a simple value so freeing it is unnecessary.
*
@@ -422,6 +423,12 @@ ecma_proxy_object_set_prototype_of (ecma_object_t *obj_p, /**< proxy object */
ecma_free_value (trap_result);
/* ES11: 9 */
if (!boolean_trap_result)
{
return ecma_make_boolean_value (false);
}
if (obj_p->u2.prototype_cp & JERRY_PROXY_SKIP_RESULT_VALIDATION)
{
return ecma_make_boolean_value (boolean_trap_result);