| 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;
|
| }
|
|
|