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

Unified Diff: src/parser.cc

Issue 20260: Issue 87: Allow unicode escapes in regexp flags. (Closed)
Patch Set: Now with test Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index a8f7623918bfa0f224d01c358354b4bf743fc5bf..0a5fa312dc3f0cadbd8700a6c852e8bfc60c0bd4 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3101,7 +3101,12 @@ Expression* Parser::ParseRegExpLiteral(bool seen_equal, bool* ok) {
if (is_pre_parsing_) {
// If we're preparsing we just do all the parsing stuff without
// building anything.
- scanner_.ScanRegExpFlags();
+ if (!scanner_.ScanRegExpFlags()) {
+ Next();
+ ReportMessage("invalid_regexp_flags", Vector<const char*>::empty());
+ *ok = false;
+ return NULL;
+ }
Next();
return NULL;
}
« no previous file with comments | « no previous file | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698