mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibWeb: Make factory method of CSS::MediaQueryListEvent fallible
This commit is contained in:
parent
64e4d3fd94
commit
1e24126004
2 changed files with 3 additions and 3 deletions
|
@ -10,9 +10,9 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
MediaQueryListEvent* MediaQueryListEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, MediaQueryListEventInit const& event_init)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaQueryListEvent>> MediaQueryListEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, MediaQueryListEventInit const& event_init)
|
||||
{
|
||||
return realm.heap().allocate<MediaQueryListEvent>(realm, realm, event_name, event_init).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<MediaQueryListEvent>(realm, realm, event_name, event_init));
|
||||
}
|
||||
|
||||
MediaQueryListEvent::MediaQueryListEvent(JS::Realm& realm, DeprecatedFlyString const& event_name, MediaQueryListEventInit const& event_init)
|
||||
|
|
|
@ -19,7 +19,7 @@ class MediaQueryListEvent final : public DOM::Event {
|
|||
WEB_PLATFORM_OBJECT(MediaQueryListEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
static MediaQueryListEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, MediaQueryListEventInit const& event_init = {});
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MediaQueryListEvent>> construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, MediaQueryListEventInit const& event_init = {});
|
||||
|
||||
virtual ~MediaQueryListEvent() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue