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:
parent
c120c46acc
commit
ff875d353b
9 changed files with 28 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue