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

Unified Diff: src/parsing/parser.cc

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 | « include/v8.h ('k') | src/parsing/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 5377e1694d4cfaad0c1f782c9bd82b58b8fca809..627a6ecaff0fe09e3dc4d7eb42d55341fd0a7542 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -5148,6 +5148,12 @@ void Parser::Internalize(Isolate* isolate, Handle<Script> script, bool error) {
isolate->CountUsage(v8::Isolate::UseCounterFeature(feature));
}
}
+ if (scanner_.FoundHtmlComment()) {
+ isolate->CountUsage(v8::Isolate::kHtmlComment);
+ if (script->line_offset() == 0 && script->column_offset() == 0) {
+ isolate->CountUsage(v8::Isolate::kHtmlCommentInExternalScript);
+ }
+ }
isolate->counters()->total_preparse_skipped()->Increment(
total_preparse_skipped_);
}
« no previous file with comments | « include/v8.h ('k') | src/parsing/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698