1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 21:45:09 +00:00

LibWeb: Implement container class for fetch algorithms

This commit is contained in:
Linus Groh 2022-10-13 19:23:43 +02:00
parent dd5d3e2f4f
commit ba31547fa0
4 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Heap/Heap.h>
#include <LibJS/Runtime/VM.h>
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
namespace Web::Fetch::Infrastructure {
JS::NonnullGCPtr<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input input)
{
return { *vm.heap().allocate_without_realm<FetchAlgorithms>(move(input)) };
}
FetchAlgorithms::FetchAlgorithms(Input input)
: m_process_request_body_chunk_length(move(input.process_request_body_chunk_length))
, m_process_request_end_of_body(move(input.process_request_end_of_body))
, m_process_early_hints_response(move(input.process_early_hints_response))
, m_process_response(move(input.process_response))
, m_process_response_end_of_body(move(input.process_response_end_of_body))
, m_process_response_consume_body(move(input.process_response_consume_body))
{
}
}