summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-15 18:58:32 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-18 00:52:47 +0100
commit97b5aa56da77fd8943651bec7e245adf3544c023 (patch)
tree28a7e61f61366b361e07cd3da9977bba133a4ed6 /Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp
parent2ed7f64c73f931228102b4e259c8cb53f8b07283 (diff)
downloadserenity-97b5aa56da77fd8943651bec7e245adf3544c023.zip
LibWeb: Make factory method of HTML::ErrorEvent fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp b/Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp
index 81b3cb0618..dd5062f22e 100644
--- a/Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp
+++ b/Userland/Libraries/LibWeb/HTML/ErrorEvent.cpp
@@ -9,12 +9,12 @@
namespace Web::HTML {
-ErrorEvent* ErrorEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
+WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> ErrorEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
{
- return realm.heap().allocate<ErrorEvent>(realm, realm, event_name, event_init).release_allocated_value_but_fixme_should_propagate_errors();
+ return MUST_OR_THROW_OOM(realm.heap().allocate<ErrorEvent>(realm, realm, event_name, event_init));
}
-ErrorEvent* ErrorEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
+WebIDL::ExceptionOr<JS::NonnullGCPtr<ErrorEvent>> ErrorEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, ErrorEventInit const& event_init)
{
return create(realm, event_name, event_init);
}