1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

LibWeb: Heap-allocate returned Fetch::Infrastructure::{Request,Response}

A Request/Response instance should always be heap-allocated and have
clear ownership, so let's also wrap it in a NonnullOwnPtr instead of
putting them on the stack.
This commit is contained in:
Linus Groh 2022-09-24 00:28:11 +01:00
parent 88ee15a497
commit a602a4c780
4 changed files with 25 additions and 25 deletions

View file

@ -284,7 +284,7 @@ public:
[[nodiscard]] String serialize_origin() const;
[[nodiscard]] ErrorOr<ByteBuffer> byte_serialize_origin() const;
[[nodiscard]] Request clone() const;
[[nodiscard]] NonnullOwnPtr<Request> clone() const;
[[nodiscard]] ErrorOr<void> add_range_reader(u64 first, Optional<u64> const& last);