diff --git a/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp b/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp index 65d3e80522f..013a26ffa0e 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.cpp @@ -13,9 +13,9 @@ namespace Web::HTML { -JS::NonnullGCPtr HTMLOptionsCollection::create(DOM::ParentNode& root, Function filter) +WebIDL::ExceptionOr> HTMLOptionsCollection::create(DOM::ParentNode& root, Function filter) { - return root.heap().allocate(root.realm(), root, move(filter)).release_allocated_value_but_fixme_should_propagate_errors(); + return MUST_OR_THROW_OOM(root.heap().allocate(root.realm(), root, move(filter))); } HTMLOptionsCollection::HTMLOptionsCollection(DOM::ParentNode& root, Function filter) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.h b/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.h index 46686fd223d..da1bd85b645 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLOptionsCollection.h @@ -19,7 +19,7 @@ class HTMLOptionsCollection final : public DOM::HTMLCollection { WEB_PLATFORM_OBJECT(HTMLOptionsCollection, DOM::HTMLCollection); public: - static JS::NonnullGCPtr create(DOM::ParentNode& root, Function filter); + static WebIDL::ExceptionOr> create(DOM::ParentNode& root, Function filter); virtual ~HTMLOptionsCollection() override; WebIDL::ExceptionOr add(HTMLOptionOrOptGroupElement element, Optional before = {}); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index f1fcbfcca82..0e87831a557 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -44,7 +44,7 @@ JS::GCPtr const& HTMLSelectElement::options() // the select element, and all the option element children of all the optgroup element children // of the select element, in tree order. return is(element); - }); + }).release_value_but_fixme_should_propagate_errors(); } return m_options; }