Fix releasing 'exec' in regexp replace fast path (#3913)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-06-17 19:24:07 +02:00
committed by GitHub
parent e0b2f8e0d8
commit a026a7d713
2 changed files with 15 additions and 3 deletions
+14
View File
@@ -672,3 +672,17 @@ class Regexplike2 {
}
re = new Regexplike2();
assert (replace.call (re, "1") === "undefined");
var abruptStickyRegexp = /./;
Object.defineProperty(abruptStickyRegexp, 'sticky', {
get: function() {
throw "abrupt sticky";
}
});
try {
abruptStickyRegexp[Symbol.replace]();
assert(false);
} catch (e) {
assert(e === "abrupt sticky");
}