Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 2379d5f311d607ca0d70a2ee2e736f95982ab8d1..2e5696c7b7e15eb55d5e241c2079a129bed77dae 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -3263,6 +3263,7 @@ Parser::LazyParsingResult Parser::SkipLazyFunctionBody( |
int function_block_pos = position(); |
DeclarationScope* scope = this->scope()->AsDeclarationScope(); |
DCHECK(scope->is_function_scope()); |
+ scope->set_is_lazily_parsed(true); |
if (consume_cached_parse_data() && !cached_parse_data_->rejected()) { |
// If we have cached data, we use it to skip parsing the function body. The |
// data contains the information we need to construct the lazy function. |
@@ -3293,6 +3294,7 @@ Parser::LazyParsingResult Parser::SkipLazyFunctionBody( |
ParseLazyFunctionBodyWithPreParser(&logger, may_abort); |
// Return immediately if pre-parser decided to abort parsing. |
if (result == PreParser::kPreParseAbort) { |
+ scope->set_is_lazily_parsed(false); |
return kLazyParsingAborted; |
} |
if (result == PreParser::kPreParseStackOverflow) { |