diff options
Diffstat (limited to 'deps/v8/src/background-parsing-task.cc')
-rw-r--r-- | deps/v8/src/background-parsing-task.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/deps/v8/src/background-parsing-task.cc b/deps/v8/src/background-parsing-task.cc index c7602a7def..cb31cc9982 100644 --- a/deps/v8/src/background-parsing-task.cc +++ b/deps/v8/src/background-parsing-task.cc @@ -25,6 +25,11 @@ BackgroundParsingTask::BackgroundParsingTask( options == ScriptCompiler::kNoCompileOptions); source->allow_lazy = !i::Compiler::DebuggerWantsEagerCompilation(source->info.get()); + + if (!source->allow_lazy && options_ == ScriptCompiler::kProduceParserCache) { + // Producing cached data while parsing eagerly is not supported. + options_ = ScriptCompiler::kNoCompileOptions; + } source->hash_seed = isolate->heap()->HashSeed(); } @@ -40,15 +45,16 @@ void BackgroundParsingTask::Run() { source_->info->SetCachedData(&script_data, options_); } - uintptr_t limit = reinterpret_cast<uintptr_t>(&limit) - stack_size_ * KB; - Parser::ParseInfo parse_info = {limit, source_->hash_seed, - &source_->unicode_cache}; + uintptr_t stack_limit = + reinterpret_cast<uintptr_t>(&stack_limit) - stack_size_ * KB; // Parser needs to stay alive for finalizing the parsing on the main // thread. Passing &parse_info is OK because Parser doesn't store it. - source_->parser.Reset(new Parser(source_->info.get(), &parse_info)); + source_->parser.Reset(new Parser(source_->info.get(), stack_limit, + source_->hash_seed, + &source_->unicode_cache)); source_->parser->set_allow_lazy(source_->allow_lazy); - source_->parser->ParseOnBackground(); + source_->parser->ParseOnBackground(source_->info.get()); if (script_data != NULL) { source_->cached_data.Reset(new ScriptCompiler::CachedData( |