mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Convert DOM::AbortSignal to use JS::SafeFunction
This protects the captured GC pointers automatically instead of manually.
This commit is contained in:
parent
67e396d931
commit
07e3bb729d
3 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,7 @@ AbortSignal::AbortSignal(JS::Realm& realm)
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-add
|
||||
void AbortSignal::add_abort_algorithm(Function<void()> abort_algorithm)
|
||||
void AbortSignal::add_abort_algorithm(JS::SafeFunction<void()> abort_algorithm)
|
||||
{
|
||||
// 1. If signal is aborted, then return.
|
||||
if (aborted())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue