Fix arrow function this binding resolving if environment record is present (#4878)
This patch fixes #4872 and fixes #4876. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
@@ -1159,6 +1159,13 @@ ecma_op_function_call_simple (ecma_object_t *func_obj_p, /**< Function object */
|
||||
}
|
||||
|
||||
this_binding = arrow_func_p->this_binding;
|
||||
|
||||
if (JERRY_UNLIKELY (this_binding == ECMA_VALUE_UNINITIALIZED))
|
||||
{
|
||||
ecma_environment_record_t *env_record_p = ecma_op_get_environment_record (scope_p);
|
||||
JERRY_ASSERT (env_record_p);
|
||||
this_binding = env_record_p->this_binding;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user