1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +00:00

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
parent 131c3f50de
commit d505192014
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))