mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 17:47:18 +00:00
LibWeb: Explicitly clear read requests for default stream reader
Expecting the list to be cleared from the move() is quite strange and not particularly clear. Explicitly clear the requests instead.
This commit is contained in:
committed by
Andrew Kaster
parent
c279d514e9
commit
e08072ac2b
@@ -425,9 +425,11 @@ WebIDL::ExceptionOr<void> readable_stream_reader_generic_release(ReadableStreamG
|
||||
void readable_stream_default_reader_error_read_requests(ReadableStreamDefaultReader& reader, JS::Value error)
|
||||
{
|
||||
// 1. Let readRequests be reader.[[readRequests]].
|
||||
// 2. Set reader.[[readRequests]] to a new empty list.
|
||||
auto read_requests = move(reader.read_requests());
|
||||
|
||||
// 2. Set reader.[[readRequests]] to a new empty list.
|
||||
reader.read_requests().clear();
|
||||
|
||||
// 3. For each readRequest of readRequests,
|
||||
for (auto& read_request : read_requests) {
|
||||
// 1. Perform readRequest’s error steps, given e.
|
||||
|
||||
Reference in New Issue
Block a user