electron/shell/browser
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
..
api fix: remove InspectableWebContentsViewMac (#43033) 2024-07-27 11:44:22 -05:00
badging chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
bluetooth chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
extensions chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
file_system_access fix: File System API permissions should reset on WebContents destruction (#43009) 2024-07-25 09:53:30 -04:00
hid chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
lib fix: crash using powerMonitor before ready event (#40888) 2024-01-09 09:41:42 +01:00
linux chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
mac chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
media chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
net fix: always terminate active Node Streams (#43056) 2024-07-27 12:25:43 -05:00
notifications chore: avoid crash while notification removal (#43040) 2024-07-26 15:34:40 +02:00
osr chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
plugins chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
printing chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
resources chore: strip trailing whitespace (#35969) 2023-02-01 12:59:16 +01:00
serial chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
ui fix: remove InspectableWebContentsViewMac (#43033) 2024-07-27 11:44:22 -05:00
usb chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
webauthn chore: add/fix interface comments for sections of methods (#42566) 2024-06-20 10:49:07 +02:00
win chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
animation_util.h feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
animation_util_mac.mm feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
auto_updater.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
auto_updater.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
auto_updater_mac.mm chore: bump chromium to 120.0.6099.0 (main) (#40316) 2023-11-01 10:02:12 -04:00
background_throttling_source.h fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
browser.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
browser.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
browser_linux.cc refactor: move impl classes into unnamed namespaces (#42390) 2024-06-10 17:00:20 -05:00
browser_mac.mm chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
browser_observer.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
browser_process_impl.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
browser_process_impl.h chore: bump chromium to 128.0.6611.0 (main) (#42779) 2024-07-23 08:59:44 -07:00
browser_win.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
certificate_manager_model.cc refactor: remove deprecated BrowserContext::ResourceContext (#41221) 2024-02-05 18:12:34 -06:00
certificate_manager_model.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
child_web_contents_tracker.cc chore: bump chromium to 99.0.4767.0 (main) (#31986) 2022-01-10 17:31:39 -05:00
child_web_contents_tracker.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
cookie_change_notifier.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
cookie_change_notifier.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
draggable_region_provider.h refactor: move draggable regions to WebContents (#36230) 2022-11-07 10:15:57 -08:00
electron_api_ipc_handler_impl.cc chore: remove deprecated ipcRenderer.sendTo() (#39087) 2023-08-28 10:29:27 -04:00
electron_api_ipc_handler_impl.h refactor: inherit Observer classes privately, pt. 2 (#42237) 2024-05-29 13:07:02 -05:00
electron_autofill_driver.cc feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
electron_autofill_driver.h chore: add/fix interface comments for sections of methods (#42566) 2024-06-20 10:49:07 +02:00
electron_autofill_driver_factory.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_autofill_driver_factory.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
electron_browser_client.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_client.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_context.cc fix: crash when resolving proxy due to network service restart (#42878) 2024-07-15 17:46:24 +09:00
electron_browser_context.h refactor: minor electron browser context cleanup (#42789) 2024-07-08 16:49:41 +02:00
electron_browser_main_parts.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_main_parts.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
electron_browser_main_parts_linux.cc refactor: move impl classes into unnamed namespaces (#42390) 2024-06-10 17:00:20 -05:00
electron_browser_main_parts_mac.mm chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_browser_main_parts_posix.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
electron_crypto_module_delegate_nss.cc feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
electron_crypto_module_delegate_nss.h feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
electron_download_manager_delegate.cc chore: bump chromium to 128.0.6611.0 (main) (#42779) 2024-07-23 08:59:44 -07:00
electron_download_manager_delegate.h chore: remove unused typedef CreateDownloadPathCallback (#42949) 2024-07-19 11:49:58 -05:00
electron_gpu_client.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_gpu_client.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_navigation_throttle.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
electron_navigation_throttle.h chore: add/fix interface comments for sections of methods (#42566) 2024-06-20 10:49:07 +02:00
electron_pdf_document_helper_client.cc chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
electron_pdf_document_helper_client.h chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
electron_permission_manager.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_permission_manager.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
electron_speech_recognition_manager_delegate.cc refactor: do not subclass ElectronSpeechRecognitionManagerDelegate from SpeechRecognitionEventListener (#42806) 2024-07-10 15:32:50 +02:00
electron_speech_recognition_manager_delegate.h refactor: do not subclass ElectronSpeechRecognitionManagerDelegate from SpeechRecognitionEventListener (#42806) 2024-07-10 15:32:50 +02:00
electron_web_contents_utility_handler_impl.cc chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
electron_web_contents_utility_handler_impl.h refactor: inherit Observer classes privately, pt. 2 (#42237) 2024-05-29 13:07:02 -05:00
electron_web_ui_controller_factory.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
electron_web_ui_controller_factory.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
event_emitter_mixin.h chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
extended_web_contents_observer.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
fake_location_provider.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
fake_location_provider.h chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +02:00
feature_list.cc chore: bump chromium to 128.0.6558.0 (main) (#42413) 2024-07-02 09:51:33 +02:00
feature_list.h fix: use ScreenCaptureKit exclusively on macOS 14.4 and higher (#41397) 2024-02-21 12:59:49 -08:00
feature_list_mac.mm fix: desktopCapturer breaks BrowserWindow resizable on macOS (#43013) 2024-07-25 11:17:37 +02:00
file_select_helper.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
file_select_helper.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
file_select_helper_mac.mm refactor: replace remaining NULL with nullptr (#40053) 2023-10-03 12:26:35 -07:00
font_defaults.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
font_defaults.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
javascript_environment.cc fix: bad js-flags shouldn't crash the app (#42414) 2024-06-11 08:32:16 -05:00
javascript_environment.h refactor: remove unused fields, methods in gin_helper::Locker (#39803) 2023-09-12 16:53:20 -07:00
login_handler.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
login_handler.h chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
microtasks_runner.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
microtasks_runner.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
native_window.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
native_window.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
native_window_features.cc chore: bump chromium to 127.0.6521.0 (main) (#42118) 2024-06-07 17:18:35 -04:00
native_window_features.h fix: Add support for Wayland window decorations (#29618) 2022-01-26 13:59:09 -08:00
native_window_mac.h chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
native_window_mac.mm fix: remove InspectableWebContentsViewMac (#43033) 2024-07-27 11:44:22 -05:00
native_window_observer.h feat: replace scroll-touch* with generic input-event (#35531) 2022-09-27 12:47:46 -07:00
native_window_views.cc fix: remove InspectableWebContentsViewMac (#43033) 2024-07-27 11:44:22 -05:00
native_window_views.h feat: enable Windows Control Overlay on Linux (#41769) 2024-06-27 14:56:36 +02:00
native_window_views_win.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
network_hints_handler_impl.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
network_hints_handler_impl.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
protocol_registry.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
protocol_registry.h perf: avoid protocol registry redundant lookup (#41991) 2024-05-09 09:53:09 -04:00
relauncher.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
relauncher.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
relauncher_linux.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
relauncher_mac.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
relauncher_win.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
session_preferences.cc refactor: add SessionPreferences::CreateForBrowserContext() (#38656) 2023-06-09 11:20:43 -05:00
session_preferences.h refactor: add SessionPreferences::CreateForBrowserContext() (#38656) 2023-06-09 11:20:43 -05:00
special_storage_policy.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
special_storage_policy.h chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
web_contents_permission_helper.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
web_contents_permission_helper.h feat: implement File System API support (#41419) 2024-04-10 22:06:47 +02:00
web_contents_preferences.cc chore: remove more unused #include calls (#43000) 2024-07-25 11:25:45 +02:00
web_contents_preferences.h refactor: remove unused web contents preferences methods (#42947) 2024-07-19 12:26:57 -05:00
web_contents_zoom_controller.cc chore: bump chromium to 128.0.6558.0 (main) (#42413) 2024-07-02 09:51:33 +02:00
web_contents_zoom_controller.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
web_contents_zoom_observer.h refactor: update WebContentsZoomController (#39428) 2023-08-15 10:33:30 +09:00
web_view_guest_delegate.cc chore: bump chromium to 128.0.6558.0 (main) (#42413) 2024-07-02 09:51:33 +02:00
web_view_guest_delegate.h refactor: prefer to inherit observer classes privately (#41360) 2024-05-21 14:21:31 -05:00
web_view_manager.cc chore: bump chromium to 121.0.6147.0 (main) (#40523) 2023-11-28 13:40:12 -08:00
web_view_manager.h perf: use flat_set, flat_map for small, trivially-moved containers (#40817) 2024-01-05 12:18:31 +01:00
window_list.cc refactor: remove WindowListObserver::OnWindowAdded() (#42979) 2024-07-22 10:44:08 +02:00
window_list.h refactor: migrate deprecated LazyInstance code to NoDestructor (#40927) 2024-01-10 14:01:49 -06:00
window_list_observer.h refactor: remove WindowListObserver::OnWindowAdded() (#42979) 2024-07-22 10:44:08 +02:00
zoom_level_delegate.cc chore: remove unused #includes (#42971) 2024-07-22 11:31:32 +02:00
zoom_level_delegate.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00