Foreach API methods should not iterate over internal objects (#3537)
The `jerry_objects_foreach` and `jerry_objects_foreach_by_native_info` methods iterates over all objects. However in ES 2015 there are a few special objects which should only be used internally thus these objects should not be accessed by the API user. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
@@ -1142,7 +1142,8 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
JERRY_ASSERT (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_UNDEFINED
|
||||
|| ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ARGUMENTS_UL
|
||||
|| ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_BOOLEAN_UL
|
||||
|| ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ERROR_UL);
|
||||
|| ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_ERROR_UL
|
||||
|| ext_object_p->u.class_prop.class_id == LIT_INTERNAL_MAGIC_STRING_INTERNAL_OBJECT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user