diff options
author | Kenneth Myhra <kennethmyhra@gmail.com> | 2023-02-15 18:56:00 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-18 00:52:47 +0100 |
commit | 2ed7f64c73f931228102b4e259c8cb53f8b07283 (patch) | |
tree | e415feec6cd8ad5b3a56ffaa28cac14f7bd4b7a4 /Userland/Libraries/LibWeb/HTML/CloseEvent.cpp | |
parent | b7c488e51e9eb437d983d4f51f8f8262805b7e9d (diff) | |
download | serenity-2ed7f64c73f931228102b4e259c8cb53f8b07283.zip |
LibWeb: Make factory method of HTML::CloseEvent fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/CloseEvent.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/CloseEvent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CloseEvent.cpp b/Userland/Libraries/LibWeb/HTML/CloseEvent.cpp index 7bcf7361c5..a761e47847 100644 --- a/Userland/Libraries/LibWeb/HTML/CloseEvent.cpp +++ b/Userland/Libraries/LibWeb/HTML/CloseEvent.cpp @@ -9,12 +9,12 @@ namespace Web::HTML { -CloseEvent* CloseEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init) +WebIDL::ExceptionOr<JS::NonnullGCPtr<CloseEvent>> CloseEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init) { - return realm.heap().allocate<CloseEvent>(realm, realm, event_name, event_init).release_allocated_value_but_fixme_should_propagate_errors(); + return MUST_OR_THROW_OOM(realm.heap().allocate<CloseEvent>(realm, realm, event_name, event_init)); } -CloseEvent* CloseEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init) +WebIDL::ExceptionOr<JS::NonnullGCPtr<CloseEvent>> CloseEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, CloseEventInit const& event_init) { return create(realm, event_name, event_init); } |