From 7295c48638b3cd9ef8b871f13235ead606e0012f Mon Sep 17 00:00:00 2001 From: Robert Fancsik Date: Tue, 19 Nov 2019 14:07:17 +0100 Subject: [PATCH] Add missing macro guard for jerry_generate_snapshot_with_args (#3331) JERRY_CONTEXT(resource_name) must be initialized with undefined when module system is enabled. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu --- jerry-core/api/jerry-snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jerry-core/api/jerry-snapshot.c b/jerry-core/api/jerry-snapshot.c index 17829e27c..952b56d8a 100644 --- a/jerry-core/api/jerry-snapshot.c +++ b/jerry-core/api/jerry-snapshot.c @@ -739,9 +739,9 @@ jerry_generate_snapshot_with_args (const jerry_char_t *resource_name_p, /**< scr JERRY_UNUSED (resource_name_p); JERRY_UNUSED (resource_name_length); -#if ENABLED (JERRY_LINE_INFO) +#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ES2015_MODULE_SYSTEM) JERRY_CONTEXT (resource_name) = ECMA_VALUE_UNDEFINED; -#endif /* ENABLED (JERRY_LINE_INFO) */ +#endif /* ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ES2015_MODULE_SYSTEM) */ snapshot_globals_t globals; ecma_value_t parse_status;