mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibWeb: Make HeaderList ref-counted
This is needed to eventually share a header list between a Request or Response object's internal infra request/response and the object's exposed Header object.
This commit is contained in:
parent
2d57d47132
commit
afe2563e2b
8 changed files with 61 additions and 46 deletions
|
@ -38,7 +38,7 @@ JS::ThrowCompletionOr<JS::Object*> HeadersIterator::next()
|
|||
{
|
||||
// The value pairs to iterate over are the return value of running sort and combine with this’s header list.
|
||||
auto value_pairs_to_iterate_over = [&]() -> JS::ThrowCompletionOr<Vector<Fetch::Infrastructure::Header>> {
|
||||
auto headers_or_error = m_headers.m_header_list.sort_and_combine();
|
||||
auto headers_or_error = m_headers.m_header_list->sort_and_combine();
|
||||
if (headers_or_error.is_error())
|
||||
return vm().throw_completion<JS::InternalError>(JS::ErrorType::NotEnoughMemoryToAllocate);
|
||||
return headers_or_error.release_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue