mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibWeb: Make factory method of UIEvents::FocusEvent fallible
This commit is contained in:
parent
ad13c45c28
commit
b91d599177
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue