mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02: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:
Notes:
sideshowbarker
2024-07-17 06:41:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d505192014
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user