mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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:
parent
e3fa32b2ad
commit
d528c9c2ee
1 changed files with 1 additions and 1 deletions
|
@ -673,7 +673,7 @@ JS::Value Document::run_javascript(const StringView& source, const StringView& f
|
||||||
auto parser = JS::Parser(JS::Lexer(source, filename));
|
auto parser = JS::Parser(JS::Lexer(source, filename));
|
||||||
auto program = parser.parse_program();
|
auto program = parser.parse_program();
|
||||||
if (parser.has_errors()) {
|
if (parser.has_errors()) {
|
||||||
parser.print_errors();
|
parser.print_errors(false);
|
||||||
return JS::js_undefined();
|
return JS::js_undefined();
|
||||||
}
|
}
|
||||||
auto& interpreter = document().interpreter();
|
auto& interpreter = document().interpreter();
|
||||||
|
|
Loading…
Add table
Reference in a new issue