Rework property hashmap delete. (#1543)
Triggering hashmap recreate during property delete may damage the property chain list, so recreate postponed after the delete is done. Next attempt to fix #1533. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -52,11 +52,22 @@ typedef struct
|
||||
*/
|
||||
} ecma_property_hashmap_t;
|
||||
|
||||
/**
|
||||
* Simple ecma values
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP, /**< object has no hashmap */
|
||||
ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP, /**< object has hashmap */
|
||||
ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP, /**< hashmap should be recreated */
|
||||
} ecma_property_hashmap_delete_status;
|
||||
|
||||
void ecma_property_hashmap_create (ecma_object_t *object_p);
|
||||
void ecma_property_hashmap_free (ecma_object_t *object_p);
|
||||
void ecma_property_hashmap_insert (ecma_object_t *object_p, ecma_string_t *name_p,
|
||||
ecma_property_pair_t *property_pair_p, int property_index);
|
||||
void ecma_property_hashmap_delete (ecma_object_t *object_p, jmem_cpointer_t name_cp, ecma_property_t *property_p);
|
||||
ecma_property_hashmap_delete_status ecma_property_hashmap_delete (ecma_object_t *object_p, jmem_cpointer_t name_cp,
|
||||
ecma_property_t *property_p);
|
||||
|
||||
#ifndef CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE
|
||||
ecma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p,
|
||||
|
||||
Reference in New Issue
Block a user