Do not mark the unused items of a WeakMap (#4663)

The new method is slower, but correctly release unused objects.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-27 09:42:03 +02:00
committed by GitHub
parent ce24edae24
commit 8aaabd8b01
5 changed files with 117 additions and 4 deletions
+2 -2
View File
@@ -3419,10 +3419,10 @@ ecma_op_object_set_weak (ecma_object_t *object_p, /**< key object */
if (property_p == NULL)
{
refs_p = ecma_new_collection ();
ecma_property_value_t *value_p;
ECMA_CREATE_INTERNAL_PROPERTY (object_p, weak_refs_string_p, property_p, value_p);
refs_p = ecma_new_collection ();
ECMA_SET_INTERNAL_VALUE_POINTER (value_p->value, refs_p);
}
else