mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 20:22:55 +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:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -4,7 +4,7 @@
|
|||
* 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>
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchController.h>
|
||||
|
@ -14,11 +14,11 @@
|
|||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(FetchController);
|
||||
GC_DEFINE_ALLOCATOR(FetchController);
|
||||
|
||||
FetchController::FetchController() = default;
|
||||
|
||||
JS::NonnullGCPtr<FetchController> FetchController::create(JS::VM& vm)
|
||||
GC::Ref<FetchController> FetchController::create(JS::VM& vm)
|
||||
{
|
||||
return vm.heap().allocate<FetchController>();
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ void FetchController::visit_edges(JS::Cell::Visitor& visitor)
|
|||
|
||||
void FetchController::set_report_timing_steps(Function<void(JS::Object const&)> report_timing_steps)
|
||||
{
|
||||
m_report_timing_steps = JS::create_heap_function(vm().heap(), move(report_timing_steps));
|
||||
m_report_timing_steps = GC::create_function(vm().heap(), move(report_timing_steps));
|
||||
}
|
||||
|
||||
void FetchController::set_next_manual_redirect_steps(Function<void()> next_manual_redirect_steps)
|
||||
{
|
||||
m_next_manual_redirect_steps = JS::create_heap_function(vm().heap(), move(next_manual_redirect_steps));
|
||||
m_next_manual_redirect_steps = GC::create_function(vm().heap(), move(next_manual_redirect_steps));
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#finalize-and-report-timing
|
||||
|
@ -63,7 +63,7 @@ void FetchController::process_next_manual_redirect() const
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#extract-full-timing-info
|
||||
JS::NonnullGCPtr<FetchTimingInfo> FetchController::extract_full_timing_info() const
|
||||
GC::Ref<FetchTimingInfo> FetchController::extract_full_timing_info() const
|
||||
{
|
||||
// 1. Assert: this’s full timing info is not null.
|
||||
VERIFY(m_full_timing_info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue