LibWeb: Make HTML::Task IDs a sequential, distinct numeric type

This also fixes a bug where task IDs were being deallocated from the
wrong IDAllocator. I don't know if it was actually possible to cause any
real trouble with that mistake, nor do I know how to write a test for
it, but this makes the bug go away.
This commit is contained in:
Andreas Kling 2024-08-04 17:10:49 +02:00 committed by Andreas Kling
commit 08d60d7521
Notes: github-actions[bot] 2024-08-05 07:12:59 +00:00
12 changed files with 33 additions and 29 deletions

View file

@ -227,7 +227,7 @@ public:
[[nodiscard]] HashMap<FlyString, CSS::StyleProperty> const& custom_properties(Optional<CSS::Selector::PseudoElement::Type>) const;
// NOTE: The function is wrapped in a JS::HeapFunction immediately.
int queue_an_element_task(HTML::Task::Source, Function<void()>);
HTML::TaskID queue_an_element_task(HTML::Task::Source, Function<void()>);
bool is_void_element() const;
bool serializes_as_void() const;