Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index eae5a5781ce76fe043087245870f36da14dbcae5..bb9d69337df8a6b0b39142e1512a6c7c978db4ba 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -3488,7 +3488,9 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( |
use_counts_); |
// Detaching the scopes created by PreParser from the Scope chain must be done |
// above (see ParseFunctionLiteral & AnalyzePartially). |
- if (!is_inner_function) function_scope->ResetAfterPreparsing(); |
+ if (!is_inner_function) { |
+ function_scope->ResetAfterPreparsing(result == PreParser::kPreParseAbort); |
+ } |
if (pre_parse_timer_ != NULL) { |
pre_parse_timer_->Stop(); |
} |