diff --git a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp index bdc6c64695..f17c66c9f3 100644 --- a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp +++ b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.cpp @@ -6,12 +6,13 @@ #include #include +#include namespace Web::Geometry { -JS::NonnullGCPtr DOMRectReadOnly::construct_impl(JS::Realm& realm, double x, double y, double width, double height) +WebIDL::ExceptionOr> DOMRectReadOnly::construct_impl(JS::Realm& realm, double x, double y, double width, double height) { - return realm.heap().allocate(realm, realm, x, y, width, height).release_allocated_value_but_fixme_should_propagate_errors(); + return MUST_OR_THROW_OOM(realm.heap().allocate(realm, realm, x, y, width, height)); } DOMRectReadOnly::DOMRectReadOnly(JS::Realm& realm, double x, double y, double width, double height) diff --git a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.h b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.h index 0fd39aa462..8b78a2dd8b 100644 --- a/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.h +++ b/Userland/Libraries/LibWeb/Geometry/DOMRectReadOnly.h @@ -17,7 +17,7 @@ class DOMRectReadOnly : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(DOMRectReadOnly, Bindings::PlatformObject); public: - static JS::NonnullGCPtr construct_impl(JS::Realm&, double x = 0, double y = 0, double width = 0, double height = 0); + static WebIDL::ExceptionOr> construct_impl(JS::Realm&, double x = 0, double y = 0, double width = 0, double height = 0); virtual ~DOMRectReadOnly() override;