v8/test/webkit/fast
Patrick Thier 17b9d8728a [regexp] Add missing case for EscapeRegExpPattern
EscapeRegExpPattern should return a string representation of a
RegExp instance that in turn can be used to construct a new
RegExp instance with the same internal state as the original one.

Previous versions incorrectly escaped '/' also inside character classes
(e.g. /[/]/ returned "[\/]").

This patch properly escapes '/' when necessary and omits unnecessary
escapes.

Bug: v8:8615, v8:1982, v8:9446
Change-Id: I4ecb993dc69d6976f4637cedf43465cd0c32e427
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1688050
Commit-Queue: Patrick Thier <pthier@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62587}
2019-07-09 08:11:51 +00:00
..
js Reland "Reland "Let all early errors be SyntaxErrors."" 2019-07-08 10:15:46 +00:00
regex [regexp] Add missing case for EscapeRegExpPattern 2019-07-09 08:11:51 +00:00