| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
markPromiseAsHandled does not cancel V8's unhandled-rejection notification when the write promise is already rejected. Fall back to setPromiseHandled when the destination is no longer writable. Fixes: nodejs#64561 Refs: nodejs#63572 Signed-off-by: dushyant <dushyanthada90@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64580 +/- ##
==========================================
- Coverage 90.24% 90.24% -0.01%
==========================================
Files 739 739
Lines 241772 241787 +15
Branches 45561 45571 +10
==========================================
- Hits 218194 218192 -2
- Misses 15111 15120 +9
- Partials 8467 8475 +8
... and 30 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
@nodejs/streams |
Sorry, something went wrong.
|
Friendly ping @nodejs/streams @nodejs-github-bot |
Sorry, something went wrong.
|
The issue has been fixed in this PR #64890 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes a v26.4.0 regression where ReadableStream.pipeTo() could crash the
process with an unhandled rejection even when the pipeTo() promise
rejection was already caught.
In #63572, per-chunk setPromiseHandled() was replaced with
markPromiseAsHandled(). That is safe for pending write promises, but when
a later chunk is written after the destination has already errored,
writableStreamDefaultWriterWrite() returns an already-rejected promise.
Marking that promise handled afterwards does not cancel V8's pending
unhandled-rejection notification.
This keeps markPromiseAsHandled() on the writable fast path and falls
back to setPromiseHandled() when the destination is no longer writable
(or close is queued/in flight).
No documentation changes; behavior is restored to match Node.js ≤ v26.3.1,
Deno, Bun, and browsers.
Checklist
Fixes: #64561
Refs: #63572