Propagate strict mode flag from scanner when parsing functions (#4262)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
Dániel Bátyai
2020-10-06 10:25:13 +02:00
committed by GitHub
parent fb1c21beb7
commit 17c8ec57bb
4 changed files with 20 additions and 1 deletions
+5
View File
@@ -775,6 +775,11 @@ scanner_pop_literal_pool (parser_context_t *context_p, /**< context */
{
u8_arg |= SCANNER_FUNCTION_LEXICAL_ENV_NEEDED;
}
if (status_flags & SCANNER_LITERAL_POOL_IS_STRICT)
{
u8_arg |= SCANNER_FUNCTION_IS_STRICT;
}
#endif /* ENABLED (JERRY_ESNEXT) */
info_p->u8_arg = u8_arg;