mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibWeb: Make factory method of Fetch::HeadersIterator fallible
This commit is contained in:
parent
b3734627a1
commit
a2381a672d
2 changed files with 3 additions and 3 deletions
|
@ -23,9 +23,9 @@ void Intrinsics::create_web_prototype_and_constructor<HeadersIteratorPrototype>(
|
||||||
|
|
||||||
namespace Web::Fetch {
|
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)
|
HeadersIterator::HeadersIterator(Headers const& headers, JS::Object::PropertyKind iteration_kind)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class HeadersIterator final : public Bindings::PlatformObject {
|
||||||
WEB_PLATFORM_OBJECT(HeadersIterator, Bindings::PlatformObject);
|
WEB_PLATFORM_OBJECT(HeadersIterator, Bindings::PlatformObject);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<HeadersIterator> create(Headers const&, JS::Object::PropertyKind iteration_kind);
|
static WebIDL::ExceptionOr<JS::NonnullGCPtr<HeadersIterator>> create(Headers const&, JS::Object::PropertyKind iteration_kind);
|
||||||
|
|
||||||
virtual ~HeadersIterator() override;
|
virtual ~HeadersIterator() override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue