electron/shell
trop[bot] 6322c329bf
fix: always terminate active Node Streams (#43071)
`.destroy()` is an important method in the lifecycle of a Node.js
Readable stream. It is typically called to reclaim the resources
(e.g., close file descriptor). The only situations where calling
it manually isn't necessary are when the following events are
emitted first:

- `end`: natural end of a stream
- `error`: stream terminated due to a failure

Prior to this commit the ended state was incorrectly tracked together
with a pending internal error. It led to situations where the request
could get aborted during a read and then get marked as ended (having
pending error).

With this change we disentangle pending "error" and "destroyed" cases to
always properly terminate an active Node.js Readable stream.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2024-07-27 14:47:12 -05:00
..
app chore: fixup gn check when enable_pdf_viewer is false (#42009) 2024-05-01 09:20:03 -04:00
browser fix: always terminate active Node Streams (#43071) 2024-07-27 14:47:12 -05:00
common chore: use v8::Local<>, not v8::Handle<> (#43037) 2024-07-25 11:00:05 +02:00
renderer chore: use v8::Local<>, not v8::Handle<> (#43037) 2024-07-25 11:00:05 +02:00
services/node fix: MessagePort closing unexpectedly with non-cloneable objects (#42580) 2024-06-19 16:43:36 -04:00
utility refactor: run Windows `SelectFileDialog` out of process (#42825) 2024-07-09 19:03:13 +02:00