Improve RegExp.prototype.compile (#2971)
This patch fixes the return value of the routine also fixes several incorrect regression-tests due to the previously incorrect [[RegExpMatcher]] internal slot check. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -14,5 +14,12 @@
|
||||
|
||||
((new RegExp("}").constructor)("a", "g").constructor)(undefined).constructor.prototype.toString();
|
||||
new Date("2015-07-09T12:13:14.121+01:30").toISOString();
|
||||
RegExp(new RegExp("a", "g")).constructor("").constructor.prototype.compile(RegExp.prototype);
|
||||
|
||||
try {
|
||||
RegExp(new RegExp("a", "g")).constructor("").constructor.prototype.compile(RegExp.prototype);
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
new Date("2015-09-17").getUTCFullYear();
|
||||
|
||||
Reference in New Issue
Block a user