mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 06:32:26 +02:00
LibJS: Make PromiseCapability GC-allocated
A struct with three raw pointers to other GC'd types is a pretty big liability, let's just turn this into a Cell itself. This comes with the additional benefit of being able to capture it in a lambda effortlessly, without having to create handles for individual members.
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
[[nodiscard]] WebIDL::ExceptionOr<Body> clone() const;
|
||||
|
||||
[[nodiscard]] JS::PromiseCapability fully_read_as_promise() const;
|
||||
[[nodiscard]] JS::NonnullGCPtr<JS::PromiseCapability> fully_read_as_promise() const;
|
||||
|
||||
private:
|
||||
// https://fetch.spec.whatwg.org/#concept-body-stream
|
||||
|
||||
Reference in New Issue
Block a user