mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
LibWeb: Make factory method of HTML::ErrorEvent fallible
This commit is contained in:
committed by
Linus Groh
parent
2ed7f64c73
commit
97b5aa56da
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user