electron/shell/browser/net
Fedor Indutny 55e7a47d70
fix: always terminate active Node Streams (#43056)
`.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: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2024-07-27 12:25:43 -05:00
..
asar chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
cert_verifier_client.cc chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
cert_verifier_client.h chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
electron_url_loader_factory.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_url_loader_factory.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
network_context_service.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
network_context_service.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
network_context_service_factory.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
network_context_service_factory.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
node_stream_loader.cc fix: always terminate active Node Streams (#43056) 2024-07-27 12:25:43 -05:00
node_stream_loader.h fix: always terminate active Node Streams (#43056) 2024-07-27 12:25:43 -05:00
proxying_url_loader_factory.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
proxying_url_loader_factory.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
proxying_websocket.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
proxying_websocket.h chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
resolve_host_function.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
resolve_host_function.h chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
resolve_proxy_helper.cc fix: crash when resolving proxy due to network service restart (#42878) 2024-07-15 17:46:24 +09:00
resolve_proxy_helper.h fix: crash when resolving proxy due to network service restart (#42878) 2024-07-15 17:46:24 +09:00
system_network_context_manager.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
system_network_context_manager.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
url_pipe_loader.cc chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
url_pipe_loader.h chore: bump chromium to 128.0.6611.0 (main) (#42779) 2024-07-23 08:59:44 -07:00
web_request_api_interface.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00