Index: src/preparser.cc |
diff --git a/src/preparser.cc b/src/preparser.cc |
index bd10db3d016749653d7b88faefe4f7593e3d051f..652c1ba75d79f6430b0c292b06ea5a3978f9399b 100644 |
--- a/src/preparser.cc |
+++ b/src/preparser.cc |
@@ -1232,9 +1232,10 @@ PreParser::Expression PreParser::ParseFunctionLiteral( |
void PreParser::ParseLazyFunctionLiteralBody(bool* ok) { |
int body_start = position(); |
- log_->PauseRecording(); |
+ bool is_logging = log_->ShouldLogSymbols(); |
+ if (is_logging) log_->PauseRecording(); |
ParseSourceElements(Token::RBRACE, ok); |
- log_->ResumeRecording(); |
+ if (is_logging) log_->ResumeRecording(); |
if (!*ok) return; |
// Position right after terminal '}'. |
@@ -1266,7 +1267,9 @@ PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) { |
void PreParser::LogSymbol() { |
- scanner()->LogSymbol(log_, position()); |
+ if (log_->ShouldLogSymbols()) { |
+ scanner()->LogSymbol(log_, position()); |
+ } |
} |