Chromium Code Reviews| Index: src/parser.cc |
| diff --git a/src/parser.cc b/src/parser.cc |
| index d8813180d3ef2bebcba69aeb48663cb001641fa5..557fabb679d3c0551e6716ed8721cd9bad54971b 100644 |
| --- a/src/parser.cc |
| +++ b/src/parser.cc |
| @@ -566,15 +566,12 @@ FunctionLiteral* Parser::ParseProgram() { |
| // Initialize parser state. |
| source = FlattenGetString(source); |
| FunctionLiteral* result; |
| - if (source->IsTwoByteRepresentation()) { |
| - delete reusable_preparser_; |
| - delete scanner_; |
| + delete reusable_preparser_; |
| + delete scanner_; |
| + if (source->IsTwoByteRepresentation()) |
| scanner_ = new ExperimentalScanner<uint16_t>(source, isolate()); |
| - } else { |
| - delete reusable_preparser_; |
| - delete scanner_; |
| + else |
| scanner_ = new ExperimentalScanner<uint8_t>(source, isolate()); |
|
ulan
2014/01/20 14:54:28
Please wrap the branches in { } since they are in
|
| - } |
| SetScannerFlags(); |
| scanner_->Init(); |
| result = DoParseProgram(info(), source); |