mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibWeb: Make factory method of HTML::HTMLOptionsCollection fallible
This commit is contained in:
parent
b604bbaf29
commit
2b391ea622
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/kennethmyhra
Commit: 2b391ea622
Pull-request: https://github.com/SerenityOS/serenity/pull/17491
Reviewed-by: https://github.com/linusg ✅
3 changed files with 4 additions and 4 deletions
|
@ -13,9 +13,9 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
JS::NonnullGCPtr<HTMLOptionsCollection> HTMLOptionsCollection::create(DOM::ParentNode& root, Function<bool(DOM::Element const&)> filter)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLOptionsCollection>> HTMLOptionsCollection::create(DOM::ParentNode& root, Function<bool(DOM::Element const&)> filter)
|
||||
{
|
||||
return root.heap().allocate<HTMLOptionsCollection>(root.realm(), root, move(filter)).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(root.heap().allocate<HTMLOptionsCollection>(root.realm(), root, move(filter)));
|
||||
}
|
||||
|
||||
HTMLOptionsCollection::HTMLOptionsCollection(DOM::ParentNode& root, Function<bool(DOM::Element const&)> filter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue