Repository navigation
Commit c05a97a
stream: reject writes during WritableStream close
WritableStreamDefaultControllerProcessClose clears the controller
algorithms while the stream is still 'writable', before the sink close
settles. A write in that window, such as writer.write() after
writer.close() while the sink's close() or a TransformStream's flush()
is pending, reached the cleared size algorithm and failed an internal
assertion instead of being rejected as closing. Accept that state in
writableStreamDefaultControllerGetChunkSize so the write is rejected
with a TypeError, as it is once the stream has closed.
Refs: #57272
Refs: whatwg/streams#1341
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: #67058
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 101e729 commit c05a97a
2 files changed
Lines changed: 42 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1270 | 1272 | | |
1271 | 1273 | | |
1272 | 1274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments