Fix the types of builtin prototype objects (#3663)

In ES2015 many builtin prototypes are no longer valid instances of their
respective classes. This change updates affected prototypes to be
regular objects as required.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2020-04-06 12:00:58 +02:00
committed by GitHub
parent 73a78bd223
commit 48fa2ec01b
41 changed files with 372 additions and 272 deletions
+10
View File
@@ -60,3 +60,13 @@ assert (r.lastIndex === 0);
var r = /abc/yg;
m = r.exec ("strabcstr");
assert (m === null);
try {
RegExp.prototype.flags;
assert (false);
} catch (e) {
assert (e instanceof TypeError);
}
var flagsProp = Object.getOwnPropertyDescriptor (RegExp.prototype, "flags");
assert(flagsProp.get.call({}) === '');