[webkit-reviews] review granted: [Bug 205785] String.prototype.replace() incorrectly handles named references on RegExp w/o named groups : [Attachment 386812] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 6 11:20:02 PST 2020
Ross Kirsling <ross.kirsling at sony.com> has granted Alexey Shvayka
<shvaikalesh at gmail.com>'s request for review:
Bug 205785: String.prototype.replace() incorrectly handles named references on
RegExp w/o named groups
https://bugs.webkit.org/show_bug.cgi?id=205785
Attachment 386812: Patch
https://bugs.webkit.org/attachment.cgi?id=386812&action=review
--- Comment #2 from Ross Kirsling <ross.kirsling at sony.com> ---
Comment on attachment 386812
--> https://bugs.webkit.org/attachment.cgi?id=386812
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=386812&action=review
Wow, what an interesting bug.
r=me, but a couple of questions.
> Source/JavaScriptCore/runtime/StringPrototype.cpp:-226
> - result.append(replacement.substring(i, 2));
> - offset = i + 2;
> - advance = 1;
So was this the correct behavior prior to named capture groups? Or is this too
associated with https://github.com/tc39/proposal-regexp-named-groups/issues/29?
> Source/JavaScriptCore/runtime/StringPrototype.cpp:-232
> - // FIXME: https://bugs.webkit.org/show_bug.cgi?id=176434
We should also close the referenced bug, right?
More information about the webkit-reviews
mailing list