electron/spec
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
..
fixtures feat: expose system preferences to utility process (#42203) 2024-06-20 11:15:57 -04:00
is-valid-window test: vendor node-is-valid-window (#39965) 2023-09-25 12:43:57 +02:00
lib ci: upload test artifacts (#42925) 2024-07-16 22:56:56 -07:00
ts-smoke feat: remove File.path (#42053) 2024-05-15 11:07:23 -07:00
.eslintrc.json build: rename spec/.eslintrc -> spec/.eslintrc.json (#38838) 2023-06-19 14:19:11 +02:00
.gitignore ci: upload test artifacts (#42925) 2024-07-16 22:56:56 -07:00
ambient.d.ts test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
api-app-spec.ts build: remove CircleCI (#42844) 2024-07-15 14:26:41 -04:00
api-auto-updater-spec.ts refactor: use optional catch binding (#39232) 2023-07-27 10:53:45 -04:00
api-autoupdater-darwin-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
api-browser-view-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
api-browser-window-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
api-clipboard-spec.ts chore: bump chromium to 126.0.6445.0 (main) (#41868) 2024-05-10 11:21:10 -04:00
api-content-tracing-spec.ts test: use longer timeout on contentTracing tests on WOA (#42537) 2024-06-18 10:37:18 +02:00
api-context-bridge-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
api-crash-reporter-spec.ts chore: cleanup tests creating crashpad handler in the test runner process (#40668) 2023-12-12 19:38:42 +09:00
api-debugger-spec.ts fix: `Storage.{get|set|clear}Cookies` via CDP not working (#41718) 2024-03-28 16:09:27 -07:00
api-desktop-capturer-spec.ts fix: desktopCapturer breaks BrowserWindow resizable on macOS (#43013) 2024-07-25 11:17:37 +02:00
api-dialog-spec.ts fix: crash when `dialog.showMessageBoxSync` with missing buttons (#40996) 2024-01-18 13:21:15 +01:00
api-global-shortcut-spec.ts refactor: move spec helpers to spec/lib (#37010) 2023-01-25 13:01:25 -08:00
api-in-app-purchase-spec.ts fix: InAppPurchase pre-emptive deallocation (#40938) 2024-01-11 13:32:29 +01:00
api-ipc-main-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
api-ipc-renderer-spec.ts chore: remove deprecated `ipcRenderer.sendTo()` (#39087) 2023-08-28 10:29:27 -04:00
api-ipc-spec.ts chore: bump chromium to 124.0.6323.0 (main) (#41412) 2024-02-29 10:31:13 +01:00
api-media-handler-spec.ts build: remove CircleCI (#42844) 2024-07-15 14:26:41 -04:00
api-menu-item-spec.ts refactor: replace `.forEach()` with `for-of` (#39691) 2023-08-31 23:36:43 +09:00
api-menu-spec.ts test: convert a few more specs to async/await (#39712) 2023-09-04 12:33:29 +02:00
api-native-image-spec.ts fix: `nativeImage.createThumbnailFromPath` and `shell.openExternal` in renderer (#41875) 2024-04-19 09:43:01 -04:00
api-native-theme-spec.ts feat: add transparency checking to `nativeTheme` (#42862) 2024-07-24 14:38:22 +02:00
api-net-custom-protocols-spec.ts feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
api-net-log-spec.ts refactor: use optional catch binding (#39232) 2023-07-27 10:53:45 -04:00
api-net-session-spec.ts refactor: improve cookie failure rejection messages (#42362) 2024-06-07 10:06:37 +02:00
api-net-spec.ts docs: add missing headers option to ClientRequest options (#41723) 2024-03-28 09:38:16 -07:00
api-notification-dbus-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
api-notification-spec.ts fix: set prototype names on `gin::Constructible` classes (#39006) 2023-07-10 11:49:20 +02:00
api-power-monitor-spec.ts test: convert a few more specs to async/await (#40313) 2023-11-17 10:44:03 +01:00
api-power-save-blocker-spec.ts test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
api-process-spec.ts feat: add cumulativeCPUUsage to AppMetrics and CPUUsage (#41819) 2024-06-11 09:38:03 -05:00
api-protocol-spec.ts fix: always terminate active Node Streams (#43056) 2024-07-27 12:25:43 -05:00
api-safe-storage-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
api-screen-spec.ts fix: `desktopCapturer` and `screen` display ids should match (#42883) 2024-07-14 09:51:57 +02:00
api-service-workers-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
api-session-spec.ts feat: add `getPercentComplete` / `getCurrentBytesPerSecond` / `getEndTime` to DownloadItem (#42805) 2024-07-15 19:32:44 -04:00
api-shell-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
api-subframe-spec.ts refactor: replace `.forEach()` with `for-of` (#39691) 2023-08-31 23:36:43 +09:00
api-system-preferences-spec.ts feat: `systemPreferences.getColor` should return RGBA instead of RGB (#38960) 2023-09-28 18:56:16 -04:00
api-touch-bar-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
api-tray-spec.ts test: convert a few more specs to async/await (#39712) 2023-09-04 12:33:29 +02:00
api-utility-process-spec.ts feat: expose system preferences to utility process (#42203) 2024-06-20 11:15:57 -04:00
api-view-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
api-web-contents-spec.ts feat: duplicate navigation related APIs to `contents.navigationHistory` (#41752) 2024-06-05 09:34:47 -07:00
api-web-contents-view-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
api-web-frame-main-spec.ts refactor: use types for once() return values in spec (#38872) 2023-06-22 14:38:52 -04:00
api-web-frame-spec.ts test: add missing tests to api-web-frame-spec.ts (#39720) 2023-09-05 11:20:58 +09:00
api-web-request-spec.ts fix: use `BlockedRequest` struct to handle `webRequest` data (#42647) 2024-07-02 14:02:49 +02:00
api-web-utils-spec.ts feat: add webUtils module with getPathForFile method (#38776) 2023-11-20 15:59:36 -08:00
asar-integrity-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
asar-spec.ts fix: support `withFileTypes` in `fs.{readdir|readdirSync}` (#41627) 2024-03-21 10:22:40 -04:00
autofill-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
chromium-spec.ts fix: video and audio capture should be separate (#42775) 2024-07-08 10:11:40 +02:00
crash-spec.ts test: disable CapturableScreen tests on Windows x64 (#41543) 2024-03-07 19:17:39 -05:00
deprecate-spec.ts chore: revert deprecate as an internal module (#40146) 2023-10-10 11:50:47 -04:00
disabled-tests.json chore: disable tests that require nut.js (#42006) 2024-04-30 21:13:38 -04:00
esm-spec.ts build: remove fs-extra devdep (#42533) 2024-06-19 10:10:16 -04:00
extensions-spec.ts chore: bump chromium to 126.0.6445.0 (main) (#41868) 2024-05-10 11:21:10 -04:00
fuses-spec.ts test: add test for nodeCliInspect fuse (#43035) 2024-07-25 11:00:02 +02:00
get-files.ts chore: remove walkdir dev dependency (#42591) 2024-06-21 10:31:10 -04:00
guest-window-manager-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
index.js chore: remove walkdir dev dependency (#42591) 2024-06-21 10:31:10 -04:00
logging-spec.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
modules-spec.ts refactor: const Module = require('module') as NodeJS.ModuleInternal; (#38757) 2023-09-06 18:04:25 -04:00
node-spec.ts fix: fetch-dependent interfaces in Web Workers (#42579) 2024-06-20 11:01:50 -04:00
package.json chore: remove walkdir dev dependency (#42591) 2024-06-21 10:31:10 -04:00
parse-features-string-spec.ts test: rename & split internal module tests (#37318) 2023-02-17 10:14:40 +01:00
pipe-transport.ts test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04:00
process-binding-spec.ts test: rename & split internal module tests (#37318) 2023-02-17 10:14:40 +01:00
release-notes-spec.ts chore: fix notes stack updates (#41600) 2024-04-29 11:41:54 -04:00
security-warnings-spec.ts test: convert a few more specs to async/await (#40313) 2023-11-17 10:44:03 +01:00
spellchecker-spec.ts test: convert a few more specs to async/await (#40313) 2023-11-17 10:44:03 +01:00
types-spec.ts chore: update node types version (#36924) 2023-01-18 14:46:27 +01:00
version-bump-spec.ts build: remove CircleCI (#42844) 2024-07-15 14:26:41 -04:00
visibility-state-spec.ts feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
webview-spec.ts feat: customize border radius of Views (#42320) 2024-07-16 20:16:25 -04:00
yarn.lock chore: remove walkdir dev dependency (#42591) 2024-06-21 10:31:10 -04:00