Call property should handle ECMA_SIMPLE_VALUE_REGISTER_REF. (#1631)

Fixes #1624.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-03-03 12:23:18 +01:00
committed by GitHub
parent f780f2b8dc
commit ca2b057356
2 changed files with 29 additions and 1 deletions
+7 -1
View File
@@ -364,7 +364,13 @@ opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
this_value = stack_top_p[-3];
if (vm_get_implicit_this_value (&this_value))
if (this_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF))
{
/* Lexical environment cannot be 'this' value. */
stack_top_p[-2] = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
this_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
}
else if (vm_get_implicit_this_value (&this_value))
{
ecma_free_value (stack_top_p[-3]);
stack_top_p[-3] = this_value;