LibJS+LibWeb: Rename Heap::allocate_without_realm to Heap::allocate

Now that the heap has no knowledge about a JavaScript realm and is
purely for managing the memory of the heap, it does not make sense
to name this function to say that it is a non-realm variant.
This commit is contained in:
Shannon Booth 2024-11-14 06:13:46 +13:00 committed by Tim Flynn
commit 1e54003cb1
Notes: github-actions[bot] 2024-11-13 21:52:39 +00:00
115 changed files with 243 additions and 243 deletions

View file

@ -20,12 +20,12 @@ JS_DEFINE_ALLOCATOR(Body);
JS::NonnullGCPtr<Body> Body::create(JS::VM& vm, JS::NonnullGCPtr<Streams::ReadableStream> stream)
{
return vm.heap().allocate_without_realm<Body>(stream);
return vm.heap().allocate<Body>(stream);
}
JS::NonnullGCPtr<Body> Body::create(JS::VM& vm, JS::NonnullGCPtr<Streams::ReadableStream> stream, SourceType source, Optional<u64> length)
{
return vm.heap().allocate_without_realm<Body>(stream, source, length);
return vm.heap().allocate<Body>(stream, source, length);
}
Body::Body(JS::NonnullGCPtr<Streams::ReadableStream> stream)

View file

@ -60,7 +60,7 @@ Header Header::from_string_pair(StringView name, StringView value)
JS::NonnullGCPtr<HeaderList> HeaderList::create(JS::VM& vm)
{
return vm.heap().allocate_without_realm<HeaderList>();
return vm.heap().allocate<HeaderList>();
}
// Non-standard

View file

@ -37,7 +37,7 @@ void Request::visit_edges(JS::Cell::Visitor& visitor)
JS::NonnullGCPtr<Request> Request::create(JS::VM& vm)
{
return vm.heap().allocate_without_realm<Request>(HeaderList::create(vm));
return vm.heap().allocate<Request>(HeaderList::create(vm));
}
// https://fetch.spec.whatwg.org/#concept-request-url

View file

@ -38,7 +38,7 @@ void Response::visit_edges(JS::Cell::Visitor& visitor)
JS::NonnullGCPtr<Response> Response::create(JS::VM& vm)
{
return vm.heap().allocate_without_realm<Response>(HeaderList::create(vm));
return vm.heap().allocate<Response>(HeaderList::create(vm));
}
// https://fetch.spec.whatwg.org/#ref-for-concept-network-error%E2%91%A3
@ -360,7 +360,7 @@ JS::NonnullGCPtr<BasicFilteredResponse> BasicFilteredResponse::create(JS::VM& vm
header_list->append(header);
}
return vm.heap().allocate_without_realm<BasicFilteredResponse>(internal_response, header_list);
return vm.heap().allocate<BasicFilteredResponse>(internal_response, header_list);
}
BasicFilteredResponse::BasicFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@ -390,7 +390,7 @@ JS::NonnullGCPtr<CORSFilteredResponse> CORSFilteredResponse::create(JS::VM& vm,
header_list->append(header);
}
return vm.heap().allocate_without_realm<CORSFilteredResponse>(internal_response, header_list);
return vm.heap().allocate<CORSFilteredResponse>(internal_response, header_list);
}
CORSFilteredResponse::CORSFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@ -409,7 +409,7 @@ JS::NonnullGCPtr<OpaqueFilteredResponse> OpaqueFilteredResponse::create(JS::VM&
{
// An opaque filtered response is a filtered response whose type is "opaque", URL list is the empty list,
// status is 0, status message is the empty byte sequence, header list is empty, and body is null.
return vm.heap().allocate_without_realm<OpaqueFilteredResponse>(internal_response, HeaderList::create(vm));
return vm.heap().allocate<OpaqueFilteredResponse>(internal_response, HeaderList::create(vm));
}
OpaqueFilteredResponse::OpaqueFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)
@ -429,7 +429,7 @@ JS::NonnullGCPtr<OpaqueRedirectFilteredResponse> OpaqueRedirectFilteredResponse:
{
// An opaque-redirect filtered response is a filtered response whose type is "opaqueredirect",
// status is 0, status message is the empty byte sequence, header list is empty, and body is null.
return vm.heap().allocate_without_realm<OpaqueRedirectFilteredResponse>(internal_response, HeaderList::create(vm));
return vm.heap().allocate<OpaqueRedirectFilteredResponse>(internal_response, HeaderList::create(vm));
}
OpaqueRedirectFilteredResponse::OpaqueRedirectFilteredResponse(JS::NonnullGCPtr<Response> internal_response, JS::NonnullGCPtr<HeaderList> header_list)