summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-01 12:39:58 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-01 18:46:11 +0200
commitdb93db8100d87ea063c1f4b686cf4368d7990937 (patch)
tree3b47b87c66225bc0c806cb13a60b18f37bc07980
parent5944abf31cab8ccdde5ddfffe7f2e55adee37512 (diff)
downloadserenity-db93db8100d87ea063c1f4b686cf4368d7990937.zip
LibWeb: Put whining about tokenizer errors behind an #ifdef
Real web content has *tons* of tokenizer errors and we don't need to complain every time as that makes the debug log unbearable.
-rw-r--r--Libraries/LibWeb/Parser/HTMLTokenizer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
index 41559630fd..6fa7554c44 100644
--- a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
+++ b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
@@ -34,10 +34,14 @@
//#define TOKENIZER_TRACE
+#ifdef TOKENIZER_TRACE
#define PARSE_ERROR() \
do { \
dbg() << "Parse error (tokenization)" << __PRETTY_FUNCTION__ << " @ " << __LINE__; \
} while (0)
+#else
+#define PARSE_ERROR()
+#endif
#define CONSUME_NEXT_INPUT_CHARACTER \
current_input_character = next_codepoint();