Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Issue 2791183002: [regexp] Throw on invalid capture group names in replacer string (Closed)

Created:
3 years, 8 months ago by jgruber
Modified:
3 years, 8 months ago
Reviewers:
Dan Ehrenberg, Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[regexp] Throw on invalid capture group names in replacer string References to invalid names (i.e. not specified as a named group in the pattern) throw a SyntaxError. Unmatched groups are still replaced by the empty string. See https://github.com/tc39/proposal-regexp-named-groups/issues/14. BUG=v8:5437 Review-Url: https://codereview.chromium.org/2791183002 Cr-Commit-Position: refs/heads/master@{#44471} Committed: https://chromium.googlesource.com/v8/v8/+/1329d15e99096559a41ac7cb49fbd0199607a5d2

Patch Set 1 #

Total comments: 1

Patch Set 2 : Typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -47 lines) Patch
M src/objects.h View 1 1 chunk +5 lines, -1 line 0 comments Download
M src/objects.cc View 2 chunks +20 lines, -3 lines 0 comments Download
M src/runtime/runtime-regexp.cc View 8 chunks +38 lines, -24 lines 0 comments Download
M src/runtime/runtime-strings.cc View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/harmony/regexp-named-captures.js View 1 chunk +23 lines, -18 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
jgruber
https://codereview.chromium.org/2791183002/diff/1/src/runtime/runtime-regexp.cc File src/runtime/runtime-regexp.cc (left): https://codereview.chromium.org/2791183002/diff/1/src/runtime/runtime-regexp.cc#oldcode78 src/runtime/runtime-regexp.cc:78: EMPTY, The empty replacement for unmatched captures is handled ...
3 years, 8 months ago (2017-04-03 08:35:33 UTC) #6
Dan Ehrenberg
lgtm AFAICT all of the paths here match the new specification.
3 years, 8 months ago (2017-04-06 18:13:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791183002/20001
3 years, 8 months ago (2017-04-07 07:43:57 UTC) #11
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 08:32:53 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/1329d15e99096559a41ac7cb49fbd019960...

Powered by Google App Engine
This is Rietveld 408576698