Plumb through V8 use counter for matchAll with non-g RegExp
Per the July TC39 meeting consensus, we'd like to make the upcoming String.prototype.replaceAll proposal throw for non-global RegExp searchValues. However, String.prototype.matchAll currently does not throw in this case, causing consistency concerns. This patch adds a use counter for String.prototype.matchAll with a non-global RegExp as the searchValue. Hopefully, this pattern isn't too common in real-world code today, in which case we can both a) change matchAll and b) proceed with the desired replaceAll semantics. https://github.com/tc39/proposal-string-replaceall/issues/16 V8 CL: https://chromium-review.googlesource.com/c/v8/v8/+/1718145 Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/1718367 BUG=v8:9551 Change-Id: I6b4895e87bb498c0284d2852f1d9f0cafbc087d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718367 Commit-Queue: Mathias Bynens <mathias@chromium.org> Reviewed-by:Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#681918}
Showing
Please register or sign in to comment