From d528c9c2eee7523e5b505676a92046009dd3d2f4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 19 Jul 2021 17:59:20 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 8c3a1711dc..0680b0d404 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -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();