mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +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:
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.
|
||||
|
|
Loading…
Reference in a new issue