diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-07-15 00:34:54 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-15 00:48:45 +0200 |
commit | af0b483123212d2bcd93e03ba31579cb8bdcc771 (patch) | |
tree | 5a2f93052e22b3c46d84c06b477dc3b7e27d3635 /Userland/Libraries/LibWeb | |
parent | 1a3e1bff7b10287a206b7d22178965b2f03ef16a (diff) | |
download | serenity-af0b483123212d2bcd93e03ba31579cb8bdcc771.zip |
LibWeb: VERIFY an empty builder when emitting tokens in HTMLTokenizer
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp index d36ed84187..559fa1947b 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp @@ -59,6 +59,7 @@ namespace Web::HTML { #define SWITCH_TO_AND_EMIT_CURRENT_TOKEN(new_state) \ do { \ + VERIFY(m_current_builder.is_empty()); \ will_switch_to(State::new_state); \ m_state = State::new_state; \ will_emit(m_current_token); \ @@ -135,6 +136,7 @@ namespace Web::HTML { #define EMIT_CURRENT_TOKEN \ do { \ + VERIFY(m_current_builder.is_empty()); \ will_emit(m_current_token); \ m_queued_tokens.enqueue(move(m_current_token)); \ return m_queued_tokens.dequeue(); \ |