Adding missing may_ref_younger flags updates and assertion check for the flags value.

This commit is contained in:
Ruben Ayrapetyan
2014-08-29 18:06:20 +04:00
parent 1d02085dc6
commit 32f20a02a3
6 changed files with 15 additions and 12 deletions
+8
View File
@@ -514,6 +514,14 @@ ecma_gc_run (ecma_gc_gen_t max_gen_to_collect) /**< maximum generation to run co
{
ecma_gc_mark (obj_iter_p, max_gen_to_collect);
}
#ifndef JERRY_NDEBUG
else
{
ecma_gc_set_object_may_ref_younger_objects (obj_iter_p, true);
ecma_gc_mark (obj_iter_p, max_gen_to_collect);
JERRY_ASSERT (!ecma_gc_is_object_may_ref_younger_objects (obj_iter_p));
}
#endif /* !JERRY_NDEBUG */
}
}
-1
View File
@@ -160,7 +160,6 @@ ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< out
ecma_property_t *binding_object_prop_p = ecma_create_internal_property (new_lexical_environment_p,
ECMA_INTERNAL_PROPERTY_BINDING_OBJECT);
ECMA_SET_POINTER(binding_object_prop_p->u.internal_property.value, binding_obj_p);
ecma_gc_update_may_ref_younger_object_flag_by_object (new_lexical_environment_p, binding_obj_p);
return new_lexical_environment_p;