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

Unified Diff: src/parsing/scanner.h

Issue 1641673002: Add use counters for how often we encounter html comments in scripts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/parser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.h
diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
index 1d0aba0611a82de422253544720998d6e1923d11..3f9bbb54a4bc698c9c3539dac7f7c77ae5e46ba0 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -448,6 +448,8 @@ class Scanner {
bool IdentifierIsFutureStrictReserved(const AstRawString* string) const;
+ bool FoundHtmlComment() const { return found_html_comment_; }
+
private:
// The current and look-ahead token.
struct TokenDesc {
@@ -473,6 +475,7 @@ class Scanner {
current_.literal_chars = NULL;
current_.raw_literal_chars = NULL;
next_next_.token = Token::UNINITIALIZED;
+ found_html_comment_ = false;
}
// Support BookmarkScope functionality.
@@ -752,6 +755,9 @@ class Scanner {
// Whether there is a multi-line comment that contains a
// line-terminator after the current token, and before the next.
bool has_multiline_comment_before_next_;
+
+ // Whether this scanner encountered an HTML comment.
+ bool found_html_comment_;
};
} // namespace internal
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698