| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 276e298 commit b1890e0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -204,7 +204,9 @@ function onStreamRead(arrayBuffer) { | |||
| 204 | 204 | } | |
| 205 | 205 | ||
| 206 | 206 | if (nread !== UV_EOF) { | |
| 207 | - return stream.destroy(errnoException(nread, 'read')); | ||
| 207 | + // #34375 CallJSOnreadMethod expects the return value to be a buffer. | ||
| 208 | + stream.destroy(errnoException(nread, 'read')); | ||
| 209 | + return; | ||
| 208 | 210 | } | |
| 209 | 211 | ||
| 210 | 212 | // Defer this until we actually emit end | |
@@ -221,8 +223,11 @@ function onStreamRead(arrayBuffer) { | |||
| 221 | 223 | // test-https-truncate test. | |
| 222 | 224 | if (handle.readStop) { | |
| 223 | 225 | const err = handle.readStop(); | |
| 224 | - if (err) | ||
| 225 | - return stream.destroy(errnoException(err, 'read')); | ||
| 226 | + if (err) { | ||
| 227 | + // #34375 CallJSOnreadMethod expects the return value to be a buffer. | ||
| 228 | + stream.destroy(errnoException(err, 'read')); | ||
| 229 | + return; | ||
| 230 | + } | ||
| 226 | 231 | } | |
| 227 | 232 | ||
| 228 | 233 | // Push a null to signal the end of data. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments