Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: src/parsing/parser.h

Issue 2417643004: Explicitly check for lazy parser when dealing with parser cache (Closed)
Patch Set: Reset compile options to kNoCompileOptions if the cache is invalid Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/parsing/parse-info.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698