Commit 0e48f4b3 authored by jochen's avatar jochen Committed by Commit bot

Forgot to hook up the ExternalOneByteStringUtf16CharacterStream to lazy parsing

BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2196643002
Cr-Commit-Position: refs/heads/master@{#38157}
parent 224e2656
...@@ -1051,17 +1051,21 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info) { ...@@ -1051,17 +1051,21 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info) {
// Initialize parser state. // Initialize parser state.
source = String::Flatten(source); source = String::Flatten(source);
FunctionLiteral* result; FunctionLiteral* result;
{
std::unique_ptr<Utf16CharacterStream> stream;
if (source->IsExternalTwoByteString()) { if (source->IsExternalTwoByteString()) {
ExternalTwoByteStringUtf16CharacterStream stream( stream.reset(new ExternalTwoByteStringUtf16CharacterStream(
Handle<ExternalTwoByteString>::cast(source), Handle<ExternalTwoByteString>::cast(source),
shared_info->start_position(), shared_info->start_position(), shared_info->end_position()));
shared_info->end_position()); } else if (source->IsExternalOneByteString()) {
result = ParseLazy(isolate, info, &stream); stream.reset(new ExternalOneByteStringUtf16CharacterStream(
Handle<ExternalOneByteString>::cast(source),
shared_info->start_position(), shared_info->end_position()));
} else { } else {
GenericStringUtf16CharacterStream stream(source, stream.reset(new GenericStringUtf16CharacterStream(
shared_info->start_position(), source, shared_info->start_position(), shared_info->end_position()));
shared_info->end_position()); }
result = ParseLazy(isolate, info, &stream); result = ParseLazy(isolate, info, stream.get());
} }
if (FLAG_trace_parse && result != NULL) { if (FLAG_trace_parse && result != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment