mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix objects foreach unittest in case of mem-stress-test (#4460)
When the mem-stress-test is enabled for the objects foreach unittest the object counting is off by one. This was due to incorrect assumption on when the gc is triggered. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
parent
ad7fc07ca4
commit
abedab5ac2
@ -93,10 +93,7 @@ static void
|
|||||||
test_internal_prop (void)
|
test_internal_prop (void)
|
||||||
{
|
{
|
||||||
/* Make sure that the object is initialized in the engine. */
|
/* Make sure that the object is initialized in the engine. */
|
||||||
{
|
jerry_value_t object_dummy = jerry_create_object ();
|
||||||
jerry_value_t object = jerry_create_object ();
|
|
||||||
jerry_release_value (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the number of iterable objects. */
|
/* Get the number of iterable objects. */
|
||||||
int before_object_count = 0;
|
int before_object_count = 0;
|
||||||
@ -130,6 +127,7 @@ test_internal_prop (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
jerry_release_value (object);
|
jerry_release_value (object);
|
||||||
|
jerry_release_value (object_dummy);
|
||||||
} /* test_internal_prop */
|
} /* test_internal_prop */
|
||||||
|
|
||||||
static int test_data = 1;
|
static int test_data = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user