1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

LibWeb: Make factory methods of DOM::CustomEvent fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 21:27:42 +01:00 committed by Linus Groh
parent 5ef9e02658
commit 2c8a689390
3 changed files with 6 additions and 6 deletions

View file

@ -11,12 +11,12 @@
namespace Web::DOM {
CustomEvent* CustomEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, CustomEventInit const& event_init)
WebIDL::ExceptionOr<JS::NonnullGCPtr<CustomEvent>> CustomEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, CustomEventInit const& event_init)
{
return realm.heap().allocate<CustomEvent>(realm, realm, event_name, event_init).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<CustomEvent>(realm, realm, event_name, event_init));
}
CustomEvent* CustomEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, CustomEventInit const& event_init)
WebIDL::ExceptionOr<JS::NonnullGCPtr<CustomEvent>> CustomEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, CustomEventInit const& event_init)
{
return create(realm, event_name, event_init);
}