LibWeb: VERIFY an empty builder when emitting tokens in HTMLTokenizer
This commit is contained in:
parent
1a3e1bff7b
commit
af0b483123
Notes:
sideshowbarker
2024-07-18 09:00:58 +09:00
Author: https://github.com/MaxWipfli Commit: https://github.com/SerenityOS/serenity/commit/af0b4831232 Pull-request: https://github.com/SerenityOS/serenity/pull/8759 Issue: https://github.com/SerenityOS/serenity/issues/8757
1 changed files with 2 additions and 0 deletions
|
@ -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(); \
|
||||
|
|
Loading…
Add table
Reference in a new issue