mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
This commit is contained in:
parent
2a66fc6cae
commit
22089436ed
161 changed files with 367 additions and 370 deletions
|
@ -12,7 +12,7 @@ namespace Web::Geometry {
|
|||
|
||||
JS::NonnullGCPtr<DOMPoint> DOMPoint::construct_impl(JS::Realm& realm, double x, double y, double z, double w)
|
||||
{
|
||||
return *realm.heap().allocate<DOMPoint>(realm, realm, x, y, z, w);
|
||||
return realm.heap().allocate<DOMPoint>(realm, realm, x, y, z, w);
|
||||
}
|
||||
|
||||
DOMPoint::DOMPoint(JS::Realm& realm, double x, double y, double z, double w)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Web::Geometry {
|
|||
|
||||
JS::NonnullGCPtr<DOMPointReadOnly> DOMPointReadOnly::construct_impl(JS::Realm& realm, double x, double y, double z, double w)
|
||||
{
|
||||
return *realm.heap().allocate<DOMPointReadOnly>(realm, realm, x, y, z, w);
|
||||
return realm.heap().allocate<DOMPointReadOnly>(realm, realm, x, y, z, w);
|
||||
}
|
||||
|
||||
DOMPointReadOnly::DOMPointReadOnly(JS::Realm& realm, double x, double y, double z, double w)
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Web::Geometry {
|
|||
|
||||
JS::NonnullGCPtr<DOMRect> DOMRect::construct_impl(JS::Realm& realm, double x, double y, double width, double height)
|
||||
{
|
||||
return *realm.heap().allocate<DOMRect>(realm, realm, x, y, width, height);
|
||||
return realm.heap().allocate<DOMRect>(realm, realm, x, y, width, height);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<DOMRect> DOMRect::create(JS::Realm& realm, Gfx::FloatRect const& rect)
|
||||
|
|
|
@ -16,7 +16,7 @@ JS::NonnullGCPtr<DOMRectList> DOMRectList::create(JS::Realm& realm, Vector<JS::H
|
|||
Vector<JS::NonnullGCPtr<DOMRect>> rects;
|
||||
for (auto& rect : rect_handles)
|
||||
rects.append(*rect);
|
||||
return *realm.heap().allocate<DOMRectList>(realm, realm, move(rects));
|
||||
return realm.heap().allocate<DOMRectList>(realm, realm, move(rects));
|
||||
}
|
||||
|
||||
DOMRectList::DOMRectList(JS::Realm& realm, Vector<JS::NonnullGCPtr<DOMRect>> rects)
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Web::Geometry {
|
|||
|
||||
JS::NonnullGCPtr<DOMRectReadOnly> DOMRectReadOnly::construct_impl(JS::Realm& realm, double x, double y, double width, double height)
|
||||
{
|
||||
return *realm.heap().allocate<DOMRectReadOnly>(realm, realm, x, y, width, height);
|
||||
return realm.heap().allocate<DOMRectReadOnly>(realm, realm, x, y, width, height);
|
||||
}
|
||||
|
||||
DOMRectReadOnly::DOMRectReadOnly(JS::Realm& realm, double x, double y, double width, double height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue