Compiled code should hold strong reference for the object in the tagged template literal collection (#3876)

This patch fixes #3866.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-06-09 08:20:30 +02:00
committed by GitHub
parent 70383255fc
commit dba9533af1
4 changed files with 40 additions and 33 deletions
-8
View File
@@ -1658,14 +1658,6 @@ parser_post_processing (parser_context_t *context_p) /**< context */
if (context_p->tagged_template_literal_cp != JMEM_CP_NULL)
{
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) */