mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Initializing object / lexical environment descriptors with zeroes before field initialization.
This commit is contained in:
parent
ee7ac6602b
commit
5bb90fb8ca
@ -42,6 +42,8 @@ ecma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototybe
|
||||
ecma_object_type_t type) /**< object type */
|
||||
{
|
||||
ecma_object_t *object_p = ecma_alloc_object ();
|
||||
object_p->container = 0;
|
||||
|
||||
ecma_init_gc_info (object_p);
|
||||
|
||||
object_p->container = jrt_set_bit_field_value (object_p->container,
|
||||
@ -88,6 +90,8 @@ ecma_object_t*
|
||||
ecma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p) /**< outer lexical environment */
|
||||
{
|
||||
ecma_object_t *new_lexical_environment_p = ecma_alloc_object ();
|
||||
new_lexical_environment_p->container = 0;
|
||||
|
||||
ecma_init_gc_info (new_lexical_environment_p);
|
||||
|
||||
new_lexical_environment_p->container = jrt_set_bit_field_value (new_lexical_environment_p->container,
|
||||
@ -133,6 +137,8 @@ ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< out
|
||||
&& !ecma_is_lexical_environment (binding_obj_p));
|
||||
|
||||
ecma_object_t *new_lexical_environment_p = ecma_alloc_object ();
|
||||
new_lexical_environment_p->container = 0;
|
||||
|
||||
ecma_init_gc_info (new_lexical_environment_p);
|
||||
|
||||
new_lexical_environment_p->container = jrt_set_bit_field_value (new_lexical_environment_p->container,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user