| Index: src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| index b2d1de962e8a1e446c5d0a79e3b80eb1182b7a0c..30493908447b8eaf5ae16a89e642519a76bf2eaf 100644
|
| --- a/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| +++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc
|
| @@ -105,11 +105,11 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
|
| }
|
| HandleScope scope(isolate_);
|
| unicode_cache_.reset(new UnicodeCache());
|
| + zone_.reset(new Zone(isolate_->allocator(), ZONE_NAME));
|
| Handle<Script> script(Script::cast(shared_->script()), isolate_);
|
| DCHECK(script->type() != Script::TYPE_NATIVE);
|
|
|
| Handle<String> source(String::cast(script->source()), isolate_);
|
| - parse_info_.reset(new ParseInfo(isolate_->allocator()));
|
| if (source->IsExternalTwoByteString() || source->IsExternalOneByteString()) {
|
| character_stream_.reset(ScannerStream::For(
|
| source, shared_->start_position(), shared_->end_position()));
|
| @@ -140,7 +140,7 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
|
| offset = shared_->start_position();
|
|
|
| int byte_len = length * (source->IsOneByteRepresentation() ? 1 : 2);
|
| - data = parse_info_->zone()->New(byte_len);
|
| + data = zone_->New(byte_len);
|
|
|
| DisallowHeapAllocation no_allocation;
|
| String::FlatContent content = source->GetFlatContent();
|
| @@ -178,6 +178,7 @@ void CompilerDispatcherJob::PrepareToParseOnMainThread() {
|
| ScannerStream::For(wrapper_, shared_->start_position() - offset,
|
| shared_->end_position() - offset));
|
| }
|
| + parse_info_.reset(new ParseInfo(zone_.get()));
|
| parse_info_->set_isolate(isolate_);
|
| parse_info_->set_character_stream(character_stream_.get());
|
| parse_info_->set_hash_seed(isolate_->heap()->HashSeed());
|
| @@ -350,6 +351,7 @@ bool CompilerDispatcherJob::FinalizeCompilingOnMainThread() {
|
| return false;
|
| }
|
|
|
| + zone_.reset();
|
| compile_job_.reset();
|
| compile_info_.reset();
|
| handles_from_parsing_.reset();
|
| @@ -373,6 +375,7 @@ void CompilerDispatcherJob::ResetOnMainThread() {
|
| character_stream_.reset();
|
| handles_from_parsing_.reset();
|
| parse_info_.reset();
|
| + zone_.reset();
|
|
|
| if (!source_.is_null()) {
|
| i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location());
|
|
|