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

Issue 700373003: Scanner: disallow unicode escapes in regexp flags. (Closed)

Created:
6 years, 1 month ago by marja
Modified:
6 years, 1 month ago
Reviewers:
rossberg
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Scanner: disallow unicode escapes in regexp flags. The spec explicitly forbids them. V8 never handled them properly either, just the Scanner accepted them (it had code to add them literally to the LiteralBuffer) and later on, Regexp constructor disallowed them. According to the spec, unicode escapes in regexp flags should be an early error ("It is a Syntax Error if IdentifierPart contains a Unicode escape sequence."). Note that Scanner is still more relaxed about regexp flags than the spec. Especially, it accepts any identifier parts (not just a small set of letters) and doesn't check for duplicates. R=rossberg@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=25215

Patch Set 1 #

Patch Set 2 : test update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -29 lines) Patch
M src/scanner.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/scanner.cc View 2 chunks +1 line, -22 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +3 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-136048.js View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
marja
rossberg, ptal
6 years, 1 month ago (2014-11-06 09:10:36 UTC) #2
rossberg
lgtm
6 years, 1 month ago (2014-11-06 10:45:17 UTC) #3
marja
I had to update a test since \u stuff in flags is now an early ...
6 years, 1 month ago (2014-11-07 14:03:59 UTC) #4
marja
6 years, 1 month ago (2014-11-07 14:32:03 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 25215 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698