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

LibWeb: Make factory method of CSS::MediaQueryListEvent fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 20:05:30 +01:00 committed by Linus Groh
parent 64e4d3fd94
commit 1e24126004
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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;