| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index 2f329764600427e0fc52e3bc223ec031af7097f1..c324fad32c4453dd840af9bc9baca3593c417f8a 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -36,6 +36,7 @@
|
| #include "globals.h"
|
| #include "hashmap.h"
|
| #include "list.h"
|
| +#include "parser-thread.h"
|
| #include "preparse-data-format.h"
|
| #include "preparse-data.h"
|
| #include "preparser.h"
|
| @@ -936,10 +937,17 @@ void PreParser::ParseLazyFunctionLiteralBody(bool* ok) {
|
| // Position right after terminal '}'.
|
| ASSERT_EQ(Token::RBRACE, scanner()->peek());
|
| int body_end = scanner()->peek_location().end_pos;
|
| - log_->LogFunction(body_start, body_end,
|
| - function_state_->materialized_literal_count(),
|
| - function_state_->expected_property_count(),
|
| - strict_mode());
|
| + if (thread_) {
|
| + // This is PreParser ran in a separate thread.
|
| + thread_->Produce(body_start, body_end,
|
| + function_state_->materialized_literal_count(),
|
| + function_state_->expected_property_count(), strict_mode());
|
| + } else {
|
| + log_->LogFunction(body_start, body_end,
|
| + function_state_->materialized_literal_count(),
|
| + function_state_->expected_property_count(),
|
| + strict_mode());
|
| + }
|
| }
|
|
|
|
|
|
|