LibWeb: Don't print JavaScript syntax error hints

This uses the new flag in print_errors to not print hints. This
decreases the load time of JavaScript heavy webpages with many errors
significantly.
This commit is contained in:
Alexander 2021-07-19 17:59:20 +02:00 committed by Gunnar Beutner
parent e3fa32b2ad
commit d528c9c2ee

View file

@ -673,7 +673,7 @@ JS::Value Document::run_javascript(const StringView& source, const StringView& f
auto parser = JS::Parser(JS::Lexer(source, filename));
auto program = parser.parse_program();
if (parser.has_errors()) {
parser.print_errors();
parser.print_errors(false);
return JS::js_undefined();
}
auto& interpreter = document().interpreter();