mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-25 19:51:59 +00:00
LibWeb: Implement container class for fetch algorithms
This commit is contained in:
parent
dd5d3e2f4f
commit
ba31547fa0
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/linusg
Commit: ba31547fa0
Pull-request: https://github.com/SerenityOS/serenity/pull/15795
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/davidot ✅
4 changed files with 88 additions and 0 deletions
|
@ -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))
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue