LibWeb: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR()

This commit is contained in:
Matthew Olsson 2024-04-06 10:16:04 -07:00 committed by Andreas Kling
commit 31341b280a
Notes: sideshowbarker 2024-07-17 21:16:31 +09:00
122 changed files with 199 additions and 5 deletions

View file

@ -176,6 +176,7 @@ void mark_promise_as_handled(Promise const& promise)
struct WaitForAllResults : JS::Cell {
JS_CELL(WaitForAllResults, JS::Cell);
JS_DECLARE_ALLOCATOR(WaitForAllResults);
WaitForAllResults(JS::NonnullGCPtr<JS::HeapFunction<void(Vector<JS::Value> const&)>> s, size_t t)
: success_steps(s)
@ -202,6 +203,8 @@ struct WaitForAllResults : JS::Cell {
size_t fulfilled_count = 0;
};
JS_DEFINE_ALLOCATOR(WaitForAllResults);
// https://webidl.spec.whatwg.org/#wait-for-all
void wait_for_all(JS::Realm& realm, Vector<JS::NonnullGCPtr<Promise>> const& promises, Function<void(Vector<JS::Value> const&)> success_steps, Function<void(JS::Value)> failure_steps)
{