Commit fcf2a9f
stream: fix brotli error handling in web compression streams
Convert brotli decompression errors to TypeError to match the
Compression Streams spec, by extending handleKnownInternalErrors()
in the adapters layer to recognize brotli error codes.
This replaces the manual error event handler on DecompressionStream
which was redundant with the adapter's built-in error propagation.
PR-URL: #62107
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>1 parent cdec579 commit fcf2a9fCopy full SHA for fcf2a9f
3 files changed
+26-9Lines changed: 26 additions & 9 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib/internal/webstreams
- test
- parallel
- wpt/status
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/internal/webstreams/adapters.js
Copy file name to clipboardExpand all lines: lib/internal/webstreams/adapters.js+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
120 | 120 | |
121 | 121 | |
122 | 122 | |
123 | | - |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
124 | 131 | |
125 | 132 | |
126 | 133 | |
|
Collapse file
test/parallel/test-webstreams-compression-bad-chunks.js
Copy file name to clipboardExpand all lines: test/parallel/test-webstreams-compression-bad-chunks.js+18Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
55 | 55 | |
56 | 56 | |
57 | 57 | |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
Collapse file
test/wpt/status/compression.json
Copy file name to clipboardExpand all lines: test/wpt/status/compression.json-8Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | 2 | |
11 | 3 | |
12 | 4 | |
|
0 commit comments