mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibWeb: Make factory method of HTML::CloseEvent fallible
This commit is contained in:
parent
b7c488e51e
commit
2ed7f64c73
3 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ class CloseEvent : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(CloseEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static CloseEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init = {});
|
||||
static CloseEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<CloseEvent>> create(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init = {});
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<CloseEvent>> construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, CloseEventInit const& event_init);
|
||||
|
||||
virtual ~CloseEvent() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue