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

LibWeb: Make factory method of Fetch::HeadersIterator fallible

This commit is contained in:
Kenneth Myhra 2023-02-19 15:33:03 +01:00 committed by Andreas Kling
parent b3734627a1
commit a2381a672d
2 changed files with 3 additions and 3 deletions

View file

@ -23,9 +23,9 @@ void Intrinsics::create_web_prototype_and_constructor<HeadersIteratorPrototype>(
namespace Web::Fetch {
JS::NonnullGCPtr<HeadersIterator> HeadersIterator::create(Headers const& headers, JS::Object::PropertyKind iteration_kind)
WebIDL::ExceptionOr<JS::NonnullGCPtr<HeadersIterator>> HeadersIterator::create(Headers const& headers, JS::Object::PropertyKind iteration_kind)
{
return headers.heap().allocate<HeadersIterator>(headers.realm(), headers, iteration_kind).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(headers.heap().allocate<HeadersIterator>(headers.realm(), headers, iteration_kind));
}
HeadersIterator::HeadersIterator(Headers const& headers, JS::Object::PropertyKind iteration_kind)