LibWeb: Use JS::SafeFunction in the HTML task queues

This means that HTML tasks automatically protect anything in their
capture lists, and we no longer need to jump through hoops with
JS::Handle etc.
This commit is contained in:
Andreas Kling 2022-09-24 12:04:06 +02:00
commit d505192014
Notes: sideshowbarker 2024-07-17 06:41:15 +09:00
4 changed files with 13 additions and 11 deletions

View file

@ -9,7 +9,7 @@
namespace Web::HTML {
Task::Task(Source source, DOM::Document* document, Function<void()> steps)
Task::Task(Source source, DOM::Document* document, JS::SafeFunction<void()> steps)
: m_source(source)
, m_steps(move(steps))
, m_document(JS::make_handle(document))