Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb/Streams: Store PullIntoDescriptors in an IntrusiveList #3306

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Libraries/LibWeb/Streams/AbstractOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3485,14 +3485,11 @@ SinglyLinkedList<GC::Root<PullIntoDescriptor>> readable_byte_stream_controller_p

// 3. If ! ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) is true,
if (readable_byte_stream_controller_fill_pull_into_descriptor_from_queue(controller, pull_into_descriptor)) {
// NOTE: We store the returned pull into descriptor here as the 'shift pending pull into' will remove
// the first entry into the list which we have a reference to above.

// 1. Perform ! ReadableByteStreamControllerShiftPendingPullInto(controller).
auto descriptor = readable_byte_stream_controller_shift_pending_pull_into(controller);
readable_byte_stream_controller_shift_pending_pull_into(controller);

// 2. Append pullIntoDescriptor to filledPullIntos.
filled_pull_intos.append(descriptor);
filled_pull_intos.append(pull_into_descriptor);
}
}

Expand Down
Loading