| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4930244 commit 3a3f5c9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1176,9 +1176,18 @@ function writableStreamDefaultControllerGetDesiredSize(controller) { | |||
| 1176 | 1176 | } | |
| 1177 | 1177 | ||
| 1178 | 1178 | function writableStreamDefaultControllerGetChunkSize(controller, chunk) { | |
| 1179 | + const { | ||
| 1180 | + stream, | ||
| 1181 | + sizeAlgorithm, | ||
| 1182 | + } = controller[kState]; | ||
| 1183 | + if (sizeAlgorithm === undefined) { | ||
| 1184 | + assert(stream[kState].state === 'errored' || stream[kState].state === 'erroring'); | ||
| 1185 | + return 1; | ||
| 1186 | + } | ||
| 1187 | + | ||
| 1179 | 1188 | try { | |
| 1180 | 1189 | return FunctionPrototypeCall( | |
| 1181 | - controller[kState].sizeAlgorithm, | ||
| 1190 | + sizeAlgorithm, | ||
| 1182 | 1191 | undefined, | |
| 1183 | 1192 | chunk); | |
| 1184 | 1193 | } catch (error) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments