| Index: src/lexer/lexer-shell.cc
|
| diff --git a/src/lexer/lexer-shell.cc b/src/lexer/lexer-shell.cc
|
| index 266727ff3ffaa9bec51d889c907e15d0e38b92b6..28722f5c8bc093d493ece96482e2e9c81715bb34 100644
|
| --- a/src/lexer/lexer-shell.cc
|
| +++ b/src/lexer/lexer-shell.cc
|
| @@ -295,10 +295,15 @@ std::pair<TimeDelta, TimeDelta> ProcessFile(
|
| Vector<const uc16>(buffer_16, buffer_end_16 - buffer_16));
|
| // If the string was just an expaneded one byte string, V8 detects it
|
| // and doesn't store it as two byte.
|
| - CHECK(source->IsTwoByteRepresentation());
|
| - experimental_time = RunExperimentalScanner<uint16_t>(
|
| - source, isolate, encoding, print_tokens || check_tokens,
|
| - &experimental_tokens, repeat, harmony_settings);
|
| + if (!source->IsTwoByteRepresentation()) {
|
| + experimental_time = RunExperimentalScanner<uint8_t>(
|
| + source, isolate, encoding, print_tokens || check_tokens,
|
| + &experimental_tokens, repeat, harmony_settings);
|
| + } else {
|
| + experimental_time = RunExperimentalScanner<uint16_t>(
|
| + source, isolate, encoding, print_tokens || check_tokens,
|
| + &experimental_tokens, repeat, harmony_settings);
|
| + }
|
| break;
|
| }
|
| default:
|
|
|