1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

LibWeb: Make factory method of DOM::HTMLCollection fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 22:53:08 +01:00 committed by Linus Groh
parent c120c46acc
commit ff875d353b
9 changed files with 28 additions and 28 deletions

View file

@ -13,9 +13,9 @@
namespace Web::DOM {
JS::NonnullGCPtr<HTMLCollection> HTMLCollection::create(ParentNode& root, Function<bool(Element const&)> filter)
WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLCollection>> HTMLCollection::create(ParentNode& root, Function<bool(Element const&)> filter)
{
return root.heap().allocate<HTMLCollection>(root.realm(), root, move(filter)).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(root.heap().allocate<HTMLCollection>(root.realm(), root, move(filter)));
}
HTMLCollection::HTMLCollection(ParentNode& root, Function<bool(Element const&)> filter)