From cb32bb3502eebbd82199fcced6382c0c982d52ad Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 11 May 2023 11:01:03 -0400 Subject: [PATCH] LibWeb: Add an alias for FetchAlgorithm's consume-body callback argument This will make it more convenient in places where the Variant would need to be re-typed outside of this class. --- .../Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h index a73f6e4856..2676547d78 100644 --- a/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h +++ b/Userland/Libraries/LibWeb/Fetch/Infrastructure/FetchAlgorithms.h @@ -20,12 +20,14 @@ class FetchAlgorithms : public JS::Cell { public: struct ConsumeBodyFailureTag { }; + using BodyBytes = Variant; + using ProcessRequestBodyChunkLengthFunction = JS::SafeFunction; using ProcessRequestEndOfBodyFunction = JS::SafeFunction; using ProcessEarlyHintsResponseFunction = JS::SafeFunction)>; using ProcessResponseFunction = JS::SafeFunction)>; using ProcessResponseEndOfBodyFunction = JS::SafeFunction)>; - using ProcessResponseConsumeBodyFunction = JS::SafeFunction, Variant)>; + using ProcessResponseConsumeBodyFunction = JS::SafeFunction, BodyBytes)>; struct Input { Optional process_request_body_chunk_length;