fix streams byob request handling after close for spec compliance#5769
fix streams byob request handling after close for spec compliance#5769
Conversation
7d10d2a to
8546b50
Compare
|
I might merge this into the state-machine update for this class. Please do not merge this yet. |
8546b50 to
e60c1c6
Compare
@jasnell ping |
|
No updates yet, the remaining state machine improvements are pending completion of rolling out a couple autogates. One of those just finished rolling out this morning the remaining one will roll out monday morning. I'll update when there's additional progress. |
|
Ok, the state machine changes have landed. This should be revisited now. |
e60c1c6 to
a721cfe
Compare
|
@jasnell you can re-review this. i've fixed the conflicts. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5769 +/- ##
==========================================
- Coverage 70.56% 70.55% -0.02%
==========================================
Files 409 409
Lines 109532 109575 +43
Branches 18038 18053 +15
==========================================
+ Hits 77291 77310 +19
- Misses 21436 21454 +18
- Partials 10805 10811 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jasnell
left a comment
There was a problem hiding this comment.
Nice, well-scoped fix! Two optional nits below — neither is blocking. 🤖 This review was generated by an AI assistant.
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