Fix undefined behaviour of global object freezing

Freezing the global object and later trying to add properties to it caused an assertion error (issue #2105).
This patch fixes the issue.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2017-11-23 13:48:26 +01:00
committed by yichoi
parent 1ed886b872
commit a1df9c1420
3 changed files with 60 additions and 1 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ vm_var_decl (vm_frame_ctx_t *frame_ctx_p, /**< interpreter context */
* and CreateMutableBinding sets the created binding's value to undefined */
JERRY_ASSERT (ecma_is_value_undefined (ecma_op_get_binding_value (frame_ctx_p->lex_env_p,
var_name_str_p,
true)));
vm_is_strict_mode ())));
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
} /* vm_var_decl */