Do module cleanup at a later stage (#4209)

Module info should be freed at a later stage to correctly have
all module data in every step during the execution.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2020-09-25 14:05:46 +02:00
committed by GitHub
parent 629a0e51c4
commit 0745feb670
4 changed files with 55 additions and 1 deletions
+1 -1
View File
@@ -322,11 +322,11 @@ vm_run_global (const ecma_compiled_code_t *bytecode_p) /**< pointer to bytecode
module_p->scope_p = global_scope_p;
const ecma_value_t module_init_result = ecma_module_initialize_current ();
ecma_module_cleanup ();
JERRY_CONTEXT (module_top_context_p) = NULL;
if (ECMA_IS_VALUE_ERROR (module_init_result))
{
ecma_module_cleanup ();
return module_init_result;
}
}