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

@ -64,7 +64,7 @@ JS::NonnullGCPtr<DOM::DOMTokenList> SVGAElement::rel_list()
JS::GCPtr<Layout::Node> SVGAElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
}
}

View file

@ -35,7 +35,7 @@ ErrorOr<JS::NonnullGCPtr<SVGDecodedImageData>> SVGDecodedImageData::create(JS::R
JS::NonnullGCPtr<HTML::Navigable> navigable = page->top_level_traversable();
auto response = Fetch::Infrastructure::Response::create(navigable->vm());
response->url_list().append(url);
auto navigation_params = navigable->heap().allocate_without_realm<HTML::NavigationParams>();
auto navigation_params = navigable->heap().allocate<HTML::NavigationParams>();
navigation_params->navigable = navigable;
navigation_params->response = response;
navigation_params->origin = URL::Origin {};

View file

@ -58,7 +58,7 @@ class SVGDecodedImageData::SVGPageClient final : public PageClient {
public:
static JS::NonnullGCPtr<SVGPageClient> create(JS::VM& vm, Page& page)
{
return vm.heap().allocate_without_realm<SVGPageClient>(page);
return vm.heap().allocate<SVGPageClient>(page);
}
virtual ~SVGPageClient() override = default;

View file

@ -49,7 +49,7 @@ void SVGForeignObjectElement::visit_edges(Cell::Visitor& visitor)
JS::GCPtr<Layout::Node> SVGForeignObjectElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGForeignObjectBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGForeignObjectBox>(document(), *this, move(style));
}
void SVGForeignObjectElement::apply_presentational_hints(CSS::StyleProperties& style) const

View file

@ -28,7 +28,7 @@ void SVGGElement::initialize(JS::Realm& realm)
JS::GCPtr<Layout::Node> SVGGElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
}
}

View file

@ -24,7 +24,7 @@ void SVGGeometryElement::initialize(JS::Realm& realm)
JS::GCPtr<Layout::Node> SVGGeometryElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGGeometryBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGGeometryBox>(document(), *this, move(style));
}
float SVGGeometryElement::get_total_length()

View file

@ -180,7 +180,7 @@ void SVGImageElement::fetch_the_document(URL::URL const& url)
JS::GCPtr<Layout::Node> SVGImageElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGImageBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGImageBox>(document(), *this, move(style));
}
bool SVGImageElement::is_image_available() const

View file

@ -44,7 +44,7 @@ void SVGSVGElement::visit_edges(Visitor& visitor)
JS::GCPtr<Layout::Node> SVGSVGElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGSVGBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGSVGBox>(document(), *this, move(style));
}
RefPtr<CSS::CSSStyleValue> SVGSVGElement::width_style_value_from_attribute() const

View file

@ -76,7 +76,7 @@ bool SVGSymbolElement::is_direct_child_of_use_shadow_tree() const
JS::GCPtr<Layout::Node> SVGSymbolElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
}
}

View file

@ -28,7 +28,7 @@ JS::GCPtr<Layout::Node> SVGTSpanElement::create_layout_node(CSS::StyleProperties
{
// Text must be within an SVG <text> element.
if (shadow_including_first_ancestor_of_type<SVGTextElement>())
return heap().allocate_without_realm<Layout::SVGTextBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGTextBox>(document(), *this, move(style));
return {};
}

View file

@ -25,7 +25,7 @@ void SVGTextElement::initialize(JS::Realm& realm)
JS::GCPtr<Layout::Node> SVGTextElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGTextBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGTextBox>(document(), *this, move(style));
}
}

View file

@ -42,7 +42,7 @@ void SVGTextPathElement::visit_edges(Cell::Visitor& visitor)
JS::GCPtr<Layout::Node> SVGTextPathElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGTextPathBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGTextPathBox>(document(), *this, move(style));
}
};

View file

@ -237,7 +237,7 @@ JS::GCPtr<SVGElement> SVGUseElement::animated_instance_root() const
JS::GCPtr<Layout::Node> SVGUseElement::create_layout_node(CSS::StyleProperties style)
{
return heap().allocate_without_realm<Layout::SVGGraphicsBox>(document(), *this, move(style));
return heap().allocate<Layout::SVGGraphicsBox>(document(), *this, move(style));
}
}