electron/spec
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
..
fixtures feat: expose system preferences to utility process (#42598) 2024-06-20 15:33:21 -04:00
is-valid-window test: vendor node-is-valid-window (#39965) 2023-09-25 12:43:57 +02:00
lib build: remove CircleCI (#42844) (#42909) 2024-07-15 16:00:20 -07:00
ts-smoke chore: bump chromium to 126.0.6445.0 (31-x-y) (#42119) 2024-05-13 20:19:31 +02:00
.eslintrc.json build: rename spec/.eslintrc -> spec/.eslintrc.json (#38838) 2023-06-19 14:19:11 +02:00
.gitignore test: drop now-empty remote runner (#35343) 2022-08-16 15:23:13 -04: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) (#42909) 2024-07-15 16:00:20 -07: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 (#42708) 2024-06-28 12:13:46 -05:00
api-browser-view-spec.ts fix: potentially closed webContents in BrowserView (#42810) 2024-07-10 15:33:27 +02:00
api-browser-window-spec.ts fix: BrowserWindow.setBackgroundColor should work with transparency (#42928) 2024-07-17 11:29:22 +02:00
api-clipboard-spec.ts chore: bump chromium to 126.0.6445.0 (31-x-y) (#42119) 2024-05-13 20:19:31 +02:00
api-content-tracing-spec.ts test: use longer timeout on contentTracing tests on WOA (#42554) 2024-06-18 09:25:40 -05:00
api-context-bridge-spec.ts build: remove fs-extra devdep (#42708) 2024-06-28 12:13:46 -05: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 (#43044) 2024-07-25 15:35:23 +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) (#42909) 2024-07-15 16:00:20 -07: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 (#41908) 2024-04-23 15:12:46 -04:00
api-native-theme-spec.ts chore: remove deprecated systemPreferences APIs (#39696) 2023-09-11 11:34:13 -04: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 (#42400) 2024-06-07 13:01:23 -05: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 chore: bump chromium to 124.0.6323.0 (main) (#41412) 2024-02-29 10:31:13 +01:00
api-protocol-spec.ts fix: always terminate active Node Streams (#43071) 2024-07-27 14:47:12 -05:00
api-safe-storage-spec.ts build: remove fs-extra devdep (#42708) 2024-06-28 12:13:46 -05:00
api-screen-spec.ts fix: desktopCapturer and screen display ids should match (#42890) 2024-07-14 18:30:34 +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 (#42915) 2024-07-17 09:49:05 -07:00
api-shell-spec.ts build: remove fs-extra devdep (#42708) 2024-06-28 12:13:46 -05: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 (#42598) 2024-06-20 15:33:21 -04:00
api-view-spec.ts fix: View reordering on re-addition to same parent (#42116) 2024-05-13 11:48:51 +02:00
api-web-contents-spec.ts fix: webContents.navigationHistory should be enumerable (#42182) 2024-05-15 10:49:24 +02:00
api-web-contents-view-spec.ts feat: Allow WebContentsView to accept webContents object. (#42319) 2024-06-10 07:41:12 -07: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 (#42751) 2024-07-03 14:46:29 +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 (#42708) 2024-06-28 12:13:46 -05: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 (#42809) 2024-07-08 16:46:41 +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 (#42010) 2024-04-30 22:46:53 -04:00
esm-spec.ts build: remove fs-extra devdep (#42708) 2024-06-28 12:13:46 -05:00
extensions-spec.ts chore: bump chromium to 126.0.6445.0 (31-x-y) (#42119) 2024-05-13 20:19:31 +02:00
fuses-spec.ts fix: make grant_file_protocol_extra_privileges fuse also block CORS fetches (#40801) 2024-01-02 13:06:33 -08:00
get-files.ts refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -04:00
guest-window-manager-spec.ts feat: Allow creation of new window to be customizable. (#41432) 2024-02-29 10:15:01 -05:00
index.js chore: bump chromium to 126.0.6478.36 (31-x-y) (#42167) 2024-06-07 10:22:46 +02: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 build: remove fs-extra devdep (#42708) 2024-06-28 12:13:46 -05:00
package.json test: add tests for electron fuses (#42147) 2024-05-13 13:36:03 -07: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 refactor: use node scheme imports in spec (#38487) 2023-06-15 10:42:27 -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) (#42909) 2024-07-15 16:00:20 -07:00
visibility-state-spec.ts feat: replace BrowserView with WebContentsView (#35658) 2023-12-13 13:01:03 -08:00
webview-spec.ts test: disable flaky <webview>.capturePage() specs (#41713) 2024-03-28 22:37:14 +01:00
yarn.lock test: add tests for electron fuses (#42147) 2024-05-13 13:36:03 -07:00