Fix apply receiver operation for Proxy objects (#3730)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-05-11 16:56:41 +02:00
committed by GitHub
parent 050fbfc130
commit df7e303145
2 changed files with 40 additions and 0 deletions
+10
View File
@@ -1194,6 +1194,16 @@ ecma_op_object_put_apply_receiver (ecma_value_t receiver, /**< receiver */
return result;
}
#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
if (ECMA_OBJECT_IS_PROXY (receiver_obj_p))
{
ecma_property_descriptor_t desc;
desc.flags = ECMA_NAME_DATA_PROPERTY_DESCRIPTOR_BITS;
desc.value = value;
return ecma_proxy_object_define_own_property (receiver_obj_p, property_name_p, &desc);
}
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROXY) */
if (JERRY_UNLIKELY (ecma_op_object_is_fast_array (receiver_obj_p)))
{
ecma_fast_array_convert_to_normal (receiver_obj_p);