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

LibWeb: Make factory method of UIEvents::FocusEvent fallible

This commit is contained in:
Kenneth Myhra 2023-02-19 10:17:13 +01:00 committed by Andreas Kling
parent ad13c45c28
commit b91d599177
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -18,7 +18,7 @@ class FocusEvent final : public UIEvent {
WEB_PLATFORM_OBJECT(FocusEvent, UIEvent); WEB_PLATFORM_OBJECT(FocusEvent, UIEvent);
public: public:
static FocusEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, FocusEventInit const& event_init); static WebIDL::ExceptionOr<JS::NonnullGCPtr<FocusEvent>> construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, FocusEventInit const& event_init);
virtual ~FocusEvent() override; virtual ~FocusEvent() override;