Variables created by eval in strict mode should ignore the properties of their parent function. (#4339)

Fixes #4018

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-11-16 15:04:22 +01:00
committed by GitHub
parent 640a7d33b3
commit 1237bef0f0
2 changed files with 31 additions and 1 deletions
+2 -1
View File
@@ -2674,7 +2674,8 @@ scanner_create_variables (parser_context_t *context_p, /**< context */
{
opcode = CBC_CREATE_VAR_EVAL;
if (context_p->global_status_flags & ECMA_PARSE_FUNCTION_CONTEXT)
if ((context_p->global_status_flags & ECMA_PARSE_FUNCTION_CONTEXT)
&& !(context_p->status_flags & PARSER_IS_STRICT))
{
opcode = PARSER_TO_EXT_OPCODE (CBC_EXT_CREATE_VAR_EVAL);
}