1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +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

@ -22,7 +22,7 @@ public:
virtual ~AbortSignal() override = default;
void add_abort_algorithm(Function<void()>);
void add_abort_algorithm(JS::SafeFunction<void()>);
// https://dom.spec.whatwg.org/#dom-abortsignal-aborted
// An AbortSignal object is aborted when its abort reason is not undefined.
@ -49,7 +49,7 @@ private:
// https://dom.spec.whatwg.org/#abortsignal-abort-algorithms
// FIXME: This should be a set.
Vector<Function<void()>> m_abort_algorithms;
Vector<JS::SafeFunction<void()>> m_abort_algorithms;
};
}