Fix weakrefs when adding a key to the same container multiple times (#3343)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-11-22 13:55:36 +01:00
committed by Zoltan Herczeg
parent 3bf2bc50bc
commit fc2218e828
6 changed files with 98 additions and 75 deletions
@@ -96,7 +96,7 @@ ecma_builtin_weakmap_prototype_object_set (ecma_value_t this_arg, /**< this argu
ecma_value_t key_arg, /**< key argument */
ecma_value_t value_arg) /**< value argument */
{
return ecma_op_container_set_weak (this_arg, key_arg, value_arg, LIT_MAGIC_STRING_WEAKMAP_UL);
return ecma_op_container_set (this_arg, key_arg, value_arg, LIT_MAGIC_STRING_WEAKMAP_UL);
} /* ecma_builtin_weakmap_prototype_object_set */
/**
@@ -47,7 +47,7 @@ static ecma_value_t
ecma_builtin_weakset_prototype_object_add (ecma_value_t this_arg, /**< this argument */
ecma_value_t value_arg) /**< value argument */
{
return ecma_op_container_set_weak (this_arg, value_arg, ECMA_VALUE_UNDEFINED, LIT_MAGIC_STRING_WEAKSET_UL);
return ecma_op_container_set (this_arg, value_arg, ECMA_VALUE_UNDEFINED, LIT_MAGIC_STRING_WEAKSET_UL);
} /* ecma_builtin_weakset_prototype_object_add */
/**