Skip to content

Commit

Permalink
LibWeb: Don't print JavaScript syntax error hints
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ElectrodeYT authored and gunnarbeutner committed Jul 20, 2021
1 parent e3fa32b commit d528c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/DOM/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d528c9c

Please sign in to comment.