Skip to content

Conversation

@anonrig
Copy link
Member

@anonrig anonrig commented Dec 24, 2025

Fix ReadableByteStreamController to properly handle byob requests after close(), making respondWithNewView() throw correct errors per the WHATWG Streams spec.

Removed premature byob request invalidation because spec required byob requests to remain accessible after close so that respondWithNewView throw correct errors. Had to store original buffer byte length and byte offset as well in order to make it available for validation even after the underlying ByobRequest is invalidated during close.

Had to update several test contexts due to invalid configuration.

Fixes WPT readable-byte-streams/bad-buffers-and-views.any.js

@anonrig anonrig requested a review from jasnell December 24, 2025 18:38
@anonrig anonrig requested review from a team as code owners December 24, 2025 18:38
@anonrig anonrig force-pushed the yagiz/fix-byob-stream-handler branch from 7d10d2a to 8546b50 Compare December 24, 2025 18:40
@jasnell
Copy link
Collaborator

jasnell commented Dec 24, 2025

I might merge this into the state-machine update for this class. Please do not merge this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants