Closed
Bug 1343363
Opened 9 years ago
Closed 8 years ago
RegExp.prototype[@@replace] needs to clone input regexp for elem-base path
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla55
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
|
2.61 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
Test case:
---
(function() {
var r = /a/g;
var b = {
get a() {
r.compile("b");
return "A";
}
};
print(r[Symbol.replace]("aaa", function(a) { return b[a] }));
})();
---
Expected: Prints "AAA"
Actual: Prints "Aaa"
Similar to bug 1290506.
| Assignee | ||
Comment 1•8 years ago
|
||
Similar to the "functional" case, we need to make sure the input RegExp wasn't modified for the "elembase" optimized path.
Comment 2•8 years ago
|
||
Comment on attachment 8874394 [details] [diff] [review]
bug1343363.patch
Review of attachment 8874394 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch! r=me
Attachment #8874394 -
Flags: review?(till) → review+
| Assignee | ||
Comment 3•8 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5c2f4711c9d7c5e898216a8a1a893dded9170aa5
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7fe1ee54c97b
Check RegExp wasn't modified in RegExp.p.@@replace global elem-base optimized path. r=till
Keywords: checkin-needed
Comment 5•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 6•8 years ago
|
||
54 RC build is released. Mark 54 won't fix.
You need to log in
before you can comment on or make changes to this bug.
Description
•