mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
committed by
Andreas Kling
parent
ce23efc5f6
commit
f87041bf3a
@@ -4,22 +4,22 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibGC/Heap.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchAlgorithms.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(FetchAlgorithms);
|
||||
GC_DEFINE_ALLOCATOR(FetchAlgorithms);
|
||||
|
||||
JS::NonnullGCPtr<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input input)
|
||||
GC::Ref<FetchAlgorithms> FetchAlgorithms::create(JS::VM& vm, Input input)
|
||||
{
|
||||
auto process_request_body_chunk_length = JS::create_heap_function(vm.heap(), move(input.process_request_body_chunk_length));
|
||||
auto process_request_end_of_body = JS::create_heap_function(vm.heap(), move(input.process_request_end_of_body));
|
||||
auto process_early_hints_response = JS::create_heap_function(vm.heap(), move(input.process_early_hints_response));
|
||||
auto process_response = JS::create_heap_function(vm.heap(), move(input.process_response));
|
||||
auto process_response_end_of_body = JS::create_heap_function(vm.heap(), move(input.process_response_end_of_body));
|
||||
auto process_response_consume_body = JS::create_heap_function(vm.heap(), move(input.process_response_consume_body));
|
||||
auto process_request_body_chunk_length = GC::create_function(vm.heap(), move(input.process_request_body_chunk_length));
|
||||
auto process_request_end_of_body = GC::create_function(vm.heap(), move(input.process_request_end_of_body));
|
||||
auto process_early_hints_response = GC::create_function(vm.heap(), move(input.process_early_hints_response));
|
||||
auto process_response = GC::create_function(vm.heap(), move(input.process_response));
|
||||
auto process_response_end_of_body = GC::create_function(vm.heap(), move(input.process_response_end_of_body));
|
||||
auto process_response_consume_body = GC::create_function(vm.heap(), move(input.process_response_consume_body));
|
||||
return vm.heap().allocate<FetchAlgorithms>(
|
||||
process_request_body_chunk_length,
|
||||
process_request_end_of_body,
|
||||
|
||||
Reference in New Issue
Block a user