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:
Péter Gál
2020-02-03 19:07:24 +01:00
committed by GitHub
parent a78c8d4f16
commit fa81944743
4 changed files with 154 additions and 4 deletions
+2 -1
View File
@@ -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;
}
}