summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Geometry
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-01-28 13:39:44 -0500
committerLinus Groh <mail@linusgroh.de>2023-01-29 00:02:45 +0000
commitb75b7f0c0d6980e474f4aad910c6b7d45c876518 (patch)
tree2907bdea34ff11105129d1d28c8a90118c52feb6 /Userland/Libraries/LibWeb/Geometry
parent109b190a19e55f407521de14cd1f984ae61d77bf (diff)
downloadserenity-b75b7f0c0d6980e474f4aad910c6b7d45c876518.zip
LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate
Callers that are already in a fallible context will now TRY to allocate cells. Callers in infallible contexts get a FIXME.
Diffstat (limited to 'Userland/Libraries/LibWeb/Geometry')
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMRect.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMRectList.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp b/Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp
index 20a091c77e..667ad56942 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp
@@ -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).release_allocated_value_but_fixme_should_propagate_errors();
}
DOMPoint::DOMPoint(JS::Realm& realm, double x, double y, double z, double w)
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.cpp b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.cpp
index bbef19a0dd..325d91187a 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.cpp
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.cpp
@@ -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).release_allocated_value_but_fixme_should_propagate_errors();
}
DOMPointReadOnly::DOMPointReadOnly(JS::Realm& realm, double x, double y, double z, double w)
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMRect.cpp b/Userland/Libraries/LibWeb/Geometry/DOMRect.cpp
index 54415fa7f0..a85a2beab3 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMRect.cpp
+++ b/Userland/Libraries/LibWeb/Geometry/DOMRect.cpp
@@ -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).release_allocated_value_but_fixme_should_propagate_errors();
}
JS::NonnullGCPtr<DOMRect> DOMRect::create(JS::Realm& realm, Gfx::FloatRect const& rect)
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMRectList.cpp b/Userland/Libraries/LibWeb/Geometry/DOMRectList.cpp
index 14e5bc4e57..788e6ce56c 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMRectList.cpp
+++ b/Userland/Libraries/LibWeb/Geometry/DOMRectList.cpp
@@ -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)).release_allocated_value_but_fixme_should_propagate_errors();
}
DOMRectList::DOMRectList(JS::Realm& realm, Vector<JS::NonnullGCPtr<DOMRect>> rects)
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp
index a583d500fc..bdc6c64695 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp
+++ b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp
@@ -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).release_allocated_value_but_fixme_should_propagate_errors();
}
DOMRectReadOnly::DOMRectReadOnly(JS::Realm& realm, double x, double y, double width, double height)