1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibWeb: Make factory method of URL::URLSearchParamsIterator fallible

This commit is contained in:
Kenneth Myhra 2023-02-19 13:11:31 +01:00 committed by Andreas Kling
parent e776171d8f
commit b3734627a1
2 changed files with 3 additions and 3 deletions

View file

@ -23,9 +23,9 @@ void Intrinsics::create_web_prototype_and_constructor<URLSearchParamsIteratorPro
namespace Web::URL {
JS::NonnullGCPtr<URLSearchParamsIterator> URLSearchParamsIterator::create(URLSearchParams const& url_search_params, JS::Object::PropertyKind iteration_kind)
WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParamsIterator>> URLSearchParamsIterator::create(URLSearchParams const& url_search_params, JS::Object::PropertyKind iteration_kind)
{
return url_search_params.heap().allocate<URLSearchParamsIterator>(url_search_params.realm(), url_search_params, iteration_kind).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(url_search_params.heap().allocate<URLSearchParamsIterator>(url_search_params.realm(), url_search_params, iteration_kind));
}
URLSearchParamsIterator::URLSearchParamsIterator(URLSearchParams const& url_search_params, JS::Object::PropertyKind iteration_kind)

View file

@ -15,7 +15,7 @@ class URLSearchParamsIterator : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(URLSearchParamsIterator, Bindings::PlatformObject);
public:
static JS::NonnullGCPtr<URLSearchParamsIterator> create(URLSearchParams const&, JS::Object::PropertyKind iteration_kind);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<URLSearchParamsIterator>> create(URLSearchParams const&, JS::Object::PropertyKind iteration_kind);
virtual ~URLSearchParamsIterator() override;