electron/spec
trop[bot] e5237eb2ce
fix: always terminate active Node Streams (#43072)
`.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:46:47 -05:00
..
fixtures feat: expose system preferences to utility process (#42600) 2024-06-20 16:32:34 -04:00
is-valid-window test: vendor node-is-valid-window (#39965) 2023-09-25 12:43:57 +02:00
lib build: remove CircleCI (#42912) 2024-07-17 09:49:45 -04:00
ts-smoke chore: remove deprecated inputFieldType (#41440) 2024-02-28 14:52:01 +09: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 (#42912) 2024-07-17 09:49:45 -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 (#42711) 2024-06-29 13:08:22 -05:00
api-browser-view-spec.ts fix: setTopBrowserView focus issue with reordering (#42735) 2024-07-09 11:24:00 +02:00
api-browser-window-spec.ts feat: enable Windows Control Overlay on Linux (#42683) 2024-07-04 11:28:44 +02:00
api-clipboard-spec.ts chore: bump chromium to 124.0.6367.78 (30-x-y) (#41959) 2024-04-25 09:11:00 -04:00
api-content-tracing-spec.ts test: use longer timeout on contentTracing tests on WOA (#42553) 2024-06-18 14:15:43 +02:00
api-context-bridge-spec.ts build: remove fs-extra devdep (#42711) 2024-06-29 13:08:22 -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 (#41740) 2024-03-28 20:52:08 -05:00
api-desktop-capturer-spec.ts refactor: use for-of instead of for simple array iteration (#39338) 2023-08-07 11:30:15 +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 (30-x-y) (#41475) 2024-02-29 09:50:27 -05:00
api-media-handler-spec.ts build: remove CircleCI (#42912) 2024-07-17 09:49:45 -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 (#41909) 2024-04-19 10:56:43 -05: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 (#42398) 2024-06-07 14:03:52 -04:00
api-net-spec.ts docs: add missing headers option to ClientRequest options (#41732) 2024-04-01 12:05:56 -04: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 (30-x-y) (#41475) 2024-02-29 09:50:27 -05:00
api-protocol-spec.ts fix: always terminate active Node Streams (#43072) 2024-07-27 14:46:47 -05:00
api-safe-storage-spec.ts build: remove fs-extra devdep (#42711) 2024-06-29 13:08:22 -05:00
api-screen-spec.ts feat: add/update missing Display properties (#40497) 2023-11-17 10:43:04 +01: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 (#42914) 2024-07-17 09:50:50 -07:00
api-shell-spec.ts build: remove fs-extra devdep (#42711) 2024-06-29 13:08:22 -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 fix: utilityProcess exit codes (#42395) 2024-06-25 19:01:18 +02:00
api-view-spec.ts fix: View reordering on re-addition to same parent (#42115) 2024-05-13 13:01:05 +02:00
api-web-contents-spec.ts fix: webContents.navigationHistory should be enumerable (#42181) 2024-05-14 17:46:59 -07:00
api-web-contents-view-spec.ts fix: View reordering on re-addition to same parent (#42115) 2024-05-13 13:01:05 +02: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 refactor: use replaceAll() instead of replace() when appropriate (#39721) 2023-09-07 15:50:14 +09: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 (#42711) 2024-06-29 13:08:22 -05:00
asar-spec.ts fix: original-fs import replacement (#41209) 2024-02-05 09:51:04 +01: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 (#42807) 2024-07-09 11:44:22 +02:00
crash-spec.ts test: disable CapturableScreen tests on Windows x64 (#41547) 2024-03-08 09:32:34 -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: bump chromium to 124.0.6367.118 (30-x-y) (#42015) 2024-05-02 17:40:21 -05:00
esm-spec.ts build: remove fs-extra devdep (#42711) 2024-06-29 13:08:22 -05:00
extensions-spec.ts test: add test and api_feature definition for chrome.scripting.globalParams (#41700) 2024-03-27 10:21:04 +01: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 test: disable flaky macOS panel test & refactor screen capture testing (#41461) 2024-02-28 14:55:15 +09:00
index.js fix: data corruption in protocol.handle (#41933) 2024-04-23 11:23:19 -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 build: remove fs-extra devdep (#42711) 2024-06-29 13:08:22 -05:00
package.json test: add tests for electron fuses (#42148) 2024-05-13 13:35:52 -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 (#42912) 2024-07-17 09:49:45 -04: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 (#41737) 2024-03-28 20:51:57 -05:00
yarn.lock test: add tests for electron fuses (#42148) 2024-05-13 13:35:52 -07:00