Repository navigation
Prevent unhandled rejections when cancelling an errored stream reader - #22371
Conversation
57fa51f to
867df53
Compare
e91f72b to
6875c96
Compare
4dd68f3 to
215e2fa
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22371 +/- ##
==========================================
- Coverage 90.58% 90.58% -0.01%
==========================================
Files 278 278
Lines 68568 68584 +16
==========================================
+ Hits 62115 62125 +10
- Misses 6453 6459 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Viewer preview🗑️ Viewer previews removed. |
Merging this PR will improve performance by 24.42%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
|
The commits must be squashed. |
4c7ddfe to
9af48f2
Compare
|
Hmm, why does the commit now list me as co-author? |
|
Whoops sorry it's because I squashed the auto-suggested review commits. I'll --reset-author. |
Cancelling a `ReadableStreamDefaultReader` whose stream has errored, e.g. after a network error, returns a promise rejected with that error, which was never handled. This affects the fetch, worker, and Node.js stream readers.
9af48f2 to
743422f
Compare
|
Sorry @Snuffleupagus, force-pushed a clean commit with just me as author. |
Reference testsResults for 743422f (run, references from mozilla/pdf.js.refs@d16403bcaa).
The report is kept for 30 days and replaced by the next run. |
Fixes #22366
Cancelling a
ReadableStreamDefaultReaderwhose stream has errored, e.g. after a network error, returns a promise rejected with that error, which was never handled. This affects the fetch, worker, and Node.js stream readers.The new tests in
fetch_stream_spec.jsandnode_stream_spec.jsfail onmasterwith an unhandled rejection, and pass with this patch. They don't need any new test files.Regarding the review of #22306: the same fix is applied to
node_stream.js, as well as toworker_stream.js, so the implementations stay in sync.