Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 138ebabd6a0a778de75ec5df9ab250965a26718d..1e74ffcadb95b4922df7ce1ff659c82dc5ff5f25 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -247,11 +247,12 @@ class Parser : public ParserBase<Parser> { |
return compile_options_; |
} |
bool consume_cached_parse_data() const { |
- return compile_options_ == ScriptCompiler::kConsumeParserCache && |
- cached_parse_data_ != NULL; |
+ return allow_lazy() && |
+ compile_options_ == ScriptCompiler::kConsumeParserCache; |
} |
bool produce_cached_parse_data() const { |
- return compile_options_ == ScriptCompiler::kProduceParserCache; |
+ return allow_lazy() && |
+ compile_options_ == ScriptCompiler::kProduceParserCache; |
} |
void ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); |