1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

LibWeb: Make factory method of HTML::PromiseRejectionEvent fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 19:30:27 +01:00 committed by Linus Groh
parent 193de231e0
commit 3941e64fde
4 changed files with 8 additions and 8 deletions

View file

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