Fix the types of builtin prototype objects (#3922)

ES2015 spec made an incompatible change, many builtin prototypes became
no longer valid instances of their respective classes. But unfortunately
it broke the web, so ES2016 reverted String, Boolean and Number prototype
to the original behaviour (ES5.1). JerryScript should match the latest spec.

references:
- ES11 19.3.3 Properties of the Boolean Prototype Object
- ES11 20.1.3 Properties of the Number Prototype Object
- ES11 21.1.3 Properties of the String Prototype Object

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
This commit is contained in:
Csaba Osztrogonác authored and GitHub committed 2020-06-22 16:31:13 +02:00
1 parent 8ccccd9705
commit 281635cb40
7 files changed
+45 -145

No files matched your search

@@ -2648,9 +2648,6 @@ ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ERROR_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_STRING_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_NUMBER_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_DATE_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_REGEXP_PROTOTYPE)
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE)