Index: src/background-parsing-task.cc |
diff --git a/src/background-parsing-task.cc b/src/background-parsing-task.cc |
index 33d3d518aff0b1fe2b91503e8309f53bd143d772..5df46c82b9049c372b33673b013395274627795d 100644 |
--- a/src/background-parsing-task.cc |
+++ b/src/background-parsing-task.cc |
@@ -42,6 +42,9 @@ BackgroundParsingTask::BackgroundParsingTask( |
// Parser needs to stay alive for finalizing the parsing on the main |
// thread. |
source_->parser.reset(new Parser(source_->info.get())); |
+ source_->parser->DeserializeScopeChain( |
+ source_->info.get(), Handle<Context>::null(), |
+ Scope::DeserializationMode::kDeserializeOffHeap); |
} |
@@ -61,9 +64,6 @@ void BackgroundParsingTask::Run() { |
Isolate* isolate = source_->info->isolate(); |
source_->info->set_isolate(nullptr); |
- source_->parser->DeserializeScopeChain( |
- source_->info.get(), Handle<Context>::null(), |
- Scope::DeserializationMode::kDeserializeOffHeap); |
source_->parser->ParseOnBackground(source_->info.get()); |
if (script_data_ != nullptr) { |