1
Fork 0
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:
Luke Wilde 2022-10-26 18:09:24 +01:00 committed by Linus Groh
parent 67e396d931
commit 07e3bb729d
3 changed files with 6 additions and 5 deletions

View file

@ -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())