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

Unified Diff: src/compiler.cc

Issue 1801203002: Parser: Make skipping HTML comments optional. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index aff7f48513a26e01cbc513fe9bc70ad2c106154d..65e29aa220c7e1c8a92c070f604d0a1698ce30e8 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1666,6 +1666,11 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
info.PrepareForSerializing();
}
+ bool ignore = script_name.is_null() ||
vogelheim 2016/03/15 18:22:59 This is... strange. Should this alternatively go
jochen (gone - plz use gerrit) 2016/03/15 18:36:08 the embedder should tell us whether or not to igno
+ (script_name->IsString() &&
+ Handle<String>::cast(script_name)->length() == 0);
+ parse_info.set_ignore_html_comments(ignore);
+
parse_info.set_language_mode(
static_cast<LanguageMode>(info.language_mode() | language_mode));
result = CompileToplevel(&info);
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698