electron/shell/browser
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
..
api refactor: move safe_storage functions into anonymous namespace (#43051) 2024-07-25 22:32:17 +02:00
badging refactor: prefer using `base::NoDestructor` to `base::{Singleton,LazyInstance}` (#41400) 2024-02-23 10:35:20 +01:00
bluetooth chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
extensions fix: multiple move() calls on the same unique_ptr (#42821) 2024-07-08 13:48:47 -04:00
file_system_access fix: File System API permissions should reset on WebContents destruction (#43048) 2024-07-25 16:01:56 -04:00
hid fix: iteration issues in hid `RevokeEphemeralDevicePermission` (#42901) 2024-07-16 12:32:35 +02:00
lib fix: crash using `powerMonitor` before ready event (#40888) 2024-01-09 09:41:42 +01:00
linux chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
mac fix: restore `wasOpenedAtLogin` functionality (#42422) 2024-06-10 11:34:21 -05:00
media chore: bump chromium to 124.0.6323.0 (main) (#41412) 2024-02-29 10:31:13 +01:00
net fix: always terminate active Node Streams (#43071) 2024-07-27 14:47:12 -05:00
notifications chore: avoid crash while notification removal (#43061) 2024-07-26 16:32:43 -04:00
osr fix: crash with creating OffScreenWebContentsView (#42941) 2024-07-17 09:10:00 -05:00
plugins fix: failing build with `enable_electron_extensions=false` (#40032) 2023-10-04 10:40:01 +02:00
printing chore: delete unused PrintPreviewMessageHandler (#41841) 2024-04-15 11:34:56 -04:00
resources chore: strip trailing whitespace (#35969) 2023-02-01 12:59:16 +01:00
serial feat(serial): allow Bluetooth ports to be requested by service class ID (#41638) 2024-03-28 18:23:13 +01:00
ui feat: enable Windows Control Overlay on Linux (#42682) 2024-07-03 16:09:12 -04:00
usb fix: don't observe WebUSB for in-memory partitions (#42462) 2024-06-12 15:04:46 -05:00
webauthn fix: WebAuthn Discoverable Credential (Resident Credential) (#35374) 2022-09-20 15:47:42 -07:00
win fix: initial dark mode title bar on Windows 10 (#39287) 2023-07-31 22:02:23 -07: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 feat: add new ElectronSquirrelPreventDowngrades flag (#38625) 2023-09-11 11:54:51 -07:00
auto_updater.h feat: add new ElectronSquirrelPreventDowngrades flag (#38625) 2023-09-11 11:54:51 -07: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 fix: `app.setLoginItemSettings` error getting swallowed by gin conversion (#41647) 2024-03-22 09:00:21 -04:00
browser.h fix: restore `wasOpenedAtLogin` functionality (#42422) 2024-06-10 11:34:21 -05:00
browser_linux.cc fix: `app.setLoginItemSettings` error getting swallowed by gin conversion (#41647) 2024-03-22 09:00:21 -04:00
browser_mac.mm fix: restore `wasOpenedAtLogin` functionality (#42422) 2024-06-10 11:34:21 -05:00
browser_observer.h chore: fix some typos (#40506) 2023-11-12 19:51:56 -08:00
browser_process_impl.cc fix: crash when resolving proxy due to network service restart (#42897) 2024-07-15 14:50:41 +02:00
browser_process_impl.h chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02:00
browser_win.cc fix: `app.setLoginItemSettings` error getting swallowed by gin conversion (#41647) 2024-03-22 09:00:21 -04:00
certificate_manager_model.cc refactor: remove deprecated BrowserContext::ResourceContext (#41221) 2024-02-05 18:12:34 -06:00
certificate_manager_model.h refactor: remove deprecated BrowserContext::ResourceContext (#41221) 2024-02-05 18:12:34 -06: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 chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04: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 chore: remove deprecated `ipcRenderer.sendTo()` (#39087) 2023-08-28 10:29:27 -04:00
electron_autofill_driver.cc feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
electron_autofill_driver.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_autofill_driver_factory.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_autofill_driver_factory.h chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_browser_client.cc chore: remove unused field `ElectronBrowserClient::browser_main_parts_` (#42965) 2024-07-19 14:37:32 -05:00
electron_browser_client.h chore: remove unused field `ElectronBrowserClient::browser_main_parts_` (#42965) 2024-07-19 14:37:32 -05:00
electron_browser_context.cc fix: crash when resolving proxy due to network service restart (#42897) 2024-07-15 14:50:41 +02:00
electron_browser_context.h refactor: minor electron browser context cleanup (#42815) 2024-07-08 13:49:23 -04:00
electron_browser_main_parts.cc fix: dangling raw_ptr NodeBindings::uv_env_ (#42955) 2024-07-19 12:26:37 -05:00
electron_browser_main_parts.h fix: dangling raw_ptr NodeBindings::uv_env_ (#42955) 2024-07-19 12:26:37 -05:00
electron_browser_main_parts_linux.cc chore: migrate base::StringPiece to std::string_view (#40915) 2024-01-10 19:00:37 -06:00
electron_browser_main_parts_mac.mm chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
electron_browser_main_parts_posix.cc chore: bump chromium to 103.0.5046.0 (main) (#33906) 2022-05-17 12:48:40 -04:00
electron_download_manager_delegate.cc chore: bump chromium to 122.0.6261.6 (main) (#40949) 2024-01-25 12:46:30 -05:00
electron_download_manager_delegate.h chore: remove unused typedef CreateDownloadPathCallback (#42968) 2024-07-19 21:44:54 -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 fix: emit will-navigate for links in chrome: pages (#40390) 2023-11-14 14:09:44 -08:00
electron_navigation_throttle.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09: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: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02:00
electron_permission_manager.h chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02:00
electron_speech_recognition_manager_delegate.cc chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02:00
electron_speech_recognition_manager_delegate.h chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +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 chore: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
electron_web_ui_controller_factory.cc chore: clean up forward declarations (#29904) 2021-07-02 09:51:37 +09: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: bump chromium to 125.0.6412.0 (main) (#41610) 2024-04-15 18:10:32 -04:00
fake_location_provider.cc chore: bump chromium to 116.0.5845.0 (main) (#38827) 2023-06-22 10:51:15 +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 126.0.6445.0 (31-x-y) (#42119) 2024-05-13 20:19:31 +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 (#43044) 2024-07-25 15:35:23 +02:00
file_select_helper.cc chore: bump chromium to 122.0.6236.2 (main) (#40871) 2024-01-11 19:33:40 +13:00
file_select_helper.h chore: bump chromium to 122.0.6236.2 (main) (#40871) 2024-01-11 19:33:40 +13:00
file_select_helper_mac.mm refactor: replace remaining `NULL` with `nullptr` (#40053) 2023-10-03 12:26:35 -07:00
font_defaults.cc perf: use fixed-size arrays for the font cache (#40898) 2024-01-08 10:31:02 +01: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 (#42441) 2024-06-11 12:10:42 -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: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
login_handler.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
microtasks_runner.cc chore: fix some typos (#40506) 2023-11-12 19:51:56 -08:00
microtasks_runner.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
native_window.cc chore: use v8::Local<>, not v8::Handle<> (#43037) 2024-07-25 11:00:05 +02:00
native_window.h feat: enable Windows Control Overlay on Linux (#42682) 2024-07-03 16:09:12 -04:00
native_window_features.cc chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02: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 fix: do not activate app when showing a panel on Mac (#41750) 2024-04-12 14:27:59 +02:00
native_window_mac.mm chore: use v8::Local<>, not v8::Handle<> (#43037) 2024-07-25 11:00:05 +02: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 feat: enable Windows Control Overlay on Linux (#42682) 2024-07-03 16:09:12 -04:00
native_window_views.h feat: enable Windows Control Overlay on Linux (#42682) 2024-07-03 16:09:12 -04:00
native_window_views_win.cc refactor: replace remaining `NULL` with `nullptr` (#40053) 2023-10-03 12:26:35 -07:00
network_hints_handler_impl.cc chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06: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: bump chromium to 124.0.6323.0 (main) (#41412) 2024-02-29 10:31:13 +01:00
protocol_registry.h chore: bump chromium to 124.0.6323.0 (main) (#41412) 2024-02-29 10:31:13 +01:00
relauncher.cc refactor: replace remaining `NULL` with `nullptr` (#40053) 2023-10-03 12:26:35 -07: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: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
relauncher_mac.cc refactor: replace remaining `NULL` with `nullptr` (#40053) 2023-10-03 12:26:35 -07:00
relauncher_win.cc fix: wide string concatenation (#40892) 2024-01-07 22:02:20 -08: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: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01: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 fix: `getUserMedia` needs macOS system permissions check (#42937) 2024-07-17 13:08:34 +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 refactor: remove unused web contents preferences methods (#42969) 2024-07-19 18:55:07 -05:00
web_contents_preferences.h refactor: remove unused web contents preferences methods (#42969) 2024-07-19 18:55:07 -05:00
web_contents_zoom_controller.cc refactor: inline simple getters (#41125) 2024-01-29 20:43:28 -06:00
web_contents_zoom_controller.h refactor: inline simple getters (#41125) 2024-01-29 20:43:28 -06:00
web_contents_zoom_observer.h refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09:00
web_view_guest_delegate.cc fix: crash when unloading some WebViews (#40400) 2023-11-03 10:36:25 -04:00
web_view_guest_delegate.h refactor: update `WebContentsZoomController` (#39428) 2023-08-15 10:33:30 +09: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() (#42984) 2024-07-22 19:12:59 +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() (#42984) 2024-07-22 19:12:59 +02:00
zoom_level_delegate.cc chore: replace absl::optional<T> with std::optional<T> (#40928) 2024-01-10 16:23:35 -06:00
zoom_level_delegate.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00