mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
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:
committed by
Andreas Kling
parent
0e1256e5a4
commit
08d60d7521
@@ -894,7 +894,7 @@ void Element::make_html_uppercased_qualified_name()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#queue-an-element-task
|
||||
int Element::queue_an_element_task(HTML::Task::Source source, Function<void()> steps)
|
||||
HTML::TaskID Element::queue_an_element_task(HTML::Task::Source source, Function<void()> steps)
|
||||
{
|
||||
return queue_a_task(source, HTML::main_thread_event_loop(), document(), JS::create_heap_function(heap(), move(steps)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user