Tagged template object references should be released only in post_processing (#3495)
This patch fixes #3483. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -141,8 +141,6 @@ parser_tagged_template_literal_finalize (ecma_object_t *template_obj_p, /**< tem
|
||||
{
|
||||
parser_tagged_template_literal_freeze_array (template_obj_p);
|
||||
parser_tagged_template_literal_freeze_array (raw_strings_p);
|
||||
|
||||
ecma_deref_object (template_obj_p);
|
||||
} /* parser_tagged_template_literal_finalize */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
|
||||
@@ -1614,6 +1614,14 @@ parser_post_processing (parser_context_t *context_p) /**< context */
|
||||
}
|
||||
|
||||
tagged_base_p[-1] = (ecma_value_t) context_p->tagged_template_literal_cp;
|
||||
|
||||
ecma_collection_t *collection_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,
|
||||
context_p->tagged_template_literal_cp);
|
||||
|
||||
for (uint32_t i = 0; i < collection_p->item_count; i++)
|
||||
{
|
||||
ecma_free_value (collection_p->buffer_p[i]);
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user