mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibWeb: Use JS::HeapFunction for AbortSignal callback
This commit is contained in:
parent
baf37af09c
commit
67aa86b5b6
2 changed files with 8 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibJS/Heap/HeapFunction.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
|
@ -22,7 +23,7 @@ public:
|
|||
|
||||
virtual ~AbortSignal() override = default;
|
||||
|
||||
void add_abort_algorithm(JS::SafeFunction<void()>);
|
||||
void add_abort_algorithm(Function<void()>);
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-abortsignal-aborted
|
||||
// An AbortSignal object is aborted when its abort reason is not undefined.
|
||||
|
@ -52,7 +53,7 @@ private:
|
|||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-abort-algorithms
|
||||
// FIXME: This should be a set.
|
||||
Vector<JS::SafeFunction<void()>> m_abort_algorithms;
|
||||
Vector<JS::NonnullGCPtr<JS::HeapFunction<void()>>> m_abort_algorithms;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue