devel/electron40: Update to 40.9.3

Changelog: https://github.com/electron/electron/releases/tag/v40.9.3

Reported by:	GitHub (watch releases)
This commit is contained in:
Hiroki Tagato
2026-05-05 20:57:45 +09:00
parent 5e0d273b68
commit 1a4933cc53
58 changed files with 369 additions and 36 deletions
-1
View File
@@ -1,7 +1,6 @@
PORTNAME= electron
DISTVERSIONPREFIX= v
DISTVERSION= ${ELECTRON_VER}
PORTREVISION= 1
PULSEMV= 16
PULSEV= ${PULSEMV}.1
CATEGORIES= devel
+1 -1
View File
@@ -1,2 +1,2 @@
ELECTRON_VER= 40.9.2
ELECTRON_VER= 40.9.3
ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//}
+5 -5
View File
@@ -1,4 +1,4 @@
TIMESTAMP = 1777116979
TIMESTAMP = 1777728936
SHA256 (electron/chromium-144.0.7559.236.tar.xz.0) = 21556e44d5f5e464a7603afc1e912127c4546d3c55d777055614b769247d2714
SIZE (electron/chromium-144.0.7559.236.tar.xz.0) = 2000000000
SHA256 (electron/chromium-144.0.7559.236.tar.xz.1) = 389e96ab80e7f3ea7a330060c51ed714f2277810b13bbd1d72bb9e6119dce3a2
@@ -9,10 +9,10 @@ SHA256 (electron/pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1
SIZE (electron/pulseaudio-16.1.tar.gz) = 2763111
SHA256 (electron/yarn-4.12.0.tgz) = bd58d06826ce9542c4cd904fe10bab7bc718ea2cc39a45d9fbd15f2edb45761c
SIZE (electron/yarn-4.12.0.tgz) = 1056794
SHA256 (electron/electron40-40.9.2-node-modules.tar.xz) = b0068fa06ba9c5bc449a2ab423a3a4c65e77a7f6cff3255e2d9aae61ac036df1
SIZE (electron/electron40-40.9.2-node-modules.tar.xz) = 59792711
SHA256 (electron/electron-electron-v40.9.2_GH0.tar.gz) = f066f2e6b6d878fce77bbbd64316f8848acb3bbc5827ab9f6220f4a0700bd58c
SIZE (electron/electron-electron-v40.9.2_GH0.tar.gz) = 17293190
SHA256 (electron/electron40-40.9.3-node-modules.tar.xz) = b0068fa06ba9c5bc449a2ab423a3a4c65e77a7f6cff3255e2d9aae61ac036df1
SIZE (electron/electron40-40.9.3-node-modules.tar.xz) = 59792711
SHA256 (electron/electron-electron-v40.9.3_GH0.tar.gz) = db5da7cf3bb3d9c5a20c4082470135a714a56e99b93c7a6ae9ab76e283d4458a
SIZE (electron/electron-electron-v40.9.3_GH0.tar.gz) = 17331287
SHA256 (electron/nodejs-node-v24.14.1_GH0.tar.gz) = dd9da50596e7b1c4edeb56daf0e81f57e1b61e43c36f40eadeee77be7d779e08
SIZE (electron/nodejs-node-v24.14.1_GH0.tar.gz) = 126384322
SHA256 (electron/nodejs-nan-675cefebca42410733da8a454c8d9391fcebfbc2_GH0.tar.gz) = 3983c68f19ed75dd37dc228eab385093ae2533132730f253f0c3d19ff10788e3
@@ -0,0 +1,82 @@
# Vendored Yarn release
This directory holds the Yarn release used by this repo (`yarnPath` in
`.yarnrc.yml`). The release file is checked in so every contributor and CI job
runs the exact same Yarn, and so we can carry small local patches when needed.
`releases/yarn-4.12.0.cjs` currently carries one such patch, described below.
If you bump the Yarn version, read the **Upgrading Yarn** section first.
## Patch: use `JsZipImpl` for the node-modules link step
### What changed
Two call sites in `releases/yarn-4.12.0.cjs` are modified so the
`node-modules` linker (and the `pnpm`-loose linker) construct their read-only
`ZipOpenFS` with `customZipImplementation: ST` — Yarn's pure-JS `JsZipImpl`
instead of falling through to the default WASM-backed `LibZipImpl`:
```text
new $f({maxOpenFiles:80,readOnlyArchives:!0})
→ new $f({maxOpenFiles:80,readOnlyArchives:!0,customZipImplementation:ST})
```
A comment block at the top of the `.cjs` file marks the file as patched and
points back here.
### Why
On the `linux-arm` CI test shards we run a 32-bit `arm32v7` container. During
`yarn install`'s **Link step**, Yarn opens up to 80 cache zips concurrently.
With `LibZipImpl`, each open zip is `readFileSync`'d into a Node `Buffer`
**and copied again into the WASM linear memory**, and every file read does a
WASM `_malloc(size)` for the entry. The WASM heap has to grow as a single
contiguous region of the 32-bit address space; once enough zips are resident,
the `_malloc` for a large entry — most often `typescript/lib/typescript.js`
(~9 MB inside a ~22 MB zip) — fails.
Yarn's cross-FS `copyFilePromise` swallows the underlying error and re-throws
a generic one, so CI shows:
```text
YN0001: While persisting .../typescript-patch-...zip/node_modules/typescript/
EINVAL: invalid argument, copyfile '/node_modules/typescript/lib/typescript.js' -> '...'
```
The unmasked form (occasionally seen on `pdfjs-dist`) is the WASM-heap failure
string `Couldn't allocate enough memory`. This started failing ~1-in-3
`linux-arm / test` shards at **Install Dependencies** on 2026-04-13, after
[#50692](https://github.com/electron/electron/pull/50692) grew the cache enough
to push the 32-bit process over the edge nondeterministically — e.g.
[run 24739817558](https://github.com/electron/electron/actions/runs/24739817558/job/72380803746).
`JsZipImpl` avoids the problem entirely: it opens the zip by file descriptor,
reads only the central directory into memory, and `readSync`s individual
entries into ordinary Node `Buffer`s — **no WASM heap involved**. It is
read-only and path-based, which is exactly how the linker uses these archives.
There is no `.yarnrc.yml` setting or environment variable to select the zip
implementation (verified against the bundle), so editing the vendored release
is the only way to switch it short of re-implementing the linker in a plugin.
Upstream references:
[yarnpkg/berry#3972](https://github.com/yarnpkg/berry/issues/3972),
[yarnpkg/berry#6722](https://github.com/yarnpkg/berry/issues/6722),
[yarnpkg/berry#6550](https://github.com/yarnpkg/berry/issues/6550).
### Upgrading Yarn
When bumping `releases/yarn-*.cjs`:
1. Check whether upstream now defaults `readOnlyArchives` opens to `JsZipImpl`,
or exposes a config knob for the zip implementation. If so, drop this patch.
2. Otherwise, re-apply: search the new bundle for
`maxOpenFiles:80,readOnlyArchives:!0` (the surrounding minified identifiers
will differ) and add `,customZipImplementation:<JsZipImpl symbol>` — that
symbol is whatever the new bundle exports as `JsZipImpl` from
`@yarnpkg/libzip`.
3. Re-add the header comment pointing back to this README.
4. Verify with
`rm -rf node_modules spec/node_modules && node script/yarn.js install --immutable --mode=skip-build`
and confirm `node_modules/typescript/lib/typescript.js` is byte-identical to
an unpatched install.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
{
"name": "electron",
"productName": "Electron",
"main": "main.js",
"type": "module"
}
@@ -0,0 +1,28 @@
{
"main": "index.js",
"types": "electron.d.ts",
"bin": {
"electron": "cli.js"
},
"scripts": {
"postinstall": "node install.js"
},
"files": [
"LICENSE",
"README.md",
"abi_version",
"checksums.json",
"cli.js",
"electron.d.ts",
"index.js",
"install.js"
],
"dependencies": {
"@electron/get": "^2.0.0",
"@types/node": "^24.9.0",
"extract-zip": "^2.0.1"
},
"engines": {
"node": ">= 12.20.55"
}
}
@@ -85,7 +85,7 @@
"gn-typescript-definitions": "npm run create-typescript-definitions && node script/cp.mjs electron.d.ts",
"pre-flight": "pre-flight",
"gn-check": "node ./script/gn-check.js",
"gn-format": "python3 script/run-gn-format.py",
"gn-format": "node ./script/lint.js --gn --fix",
"precommit": "lint-staged",
"preinstall": "node -e 'process.exit(0)'",
"pretest": "npm run create-typescript-definitions",
@@ -116,7 +116,7 @@
],
"*.{gn,gni}": [
"npm run gn-check",
"npm run gn-format"
"node ./script/lint.js --gn --fix --only --"
],
"*.py": [
"node script/lint.js --py --fix --only --"
@@ -0,0 +1,4 @@
{
"name": "electron-test-app-path",
"main": "lib/index.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-command-line",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-context-bridge-mutability",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-cookie-app",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-default-menu",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-exit-closes-all-windows",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-first-party-sets-base",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-first-party-sets-command-line",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-ipc-main-listeners",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-locale-check",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-mixed-sandbox",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-net-log",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-protocol-name",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-quit-app",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-relaunch",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-safe-storage",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-safe-storage",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-shared-dictionary-app",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-singleton-data",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-singleton-userdata",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-singleton",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-menu",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-menu",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-utility-process-env-app",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-utility-process-inherit-stderr",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-utility-process-inherit-stdout",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-window-all-closed",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-crash",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-node-options-utility-process",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-open-new-window-from-link",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-refresh-page",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-remote-control",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-self-module-paths",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-set-path",
"main": "main.js"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-xwindow-icon",
"main": "main.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-check-with-headers",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-check",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-initial-app",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-update-json",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-update-race",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-update-stack",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-update-triple-stack",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,5 @@
{
"name": "electron-test-update",
"version": "1.0.0",
"main": "./index.js"
}
@@ -0,0 +1,4 @@
{
"main": "main.mjs",
"type": "module"
}
@@ -0,0 +1,4 @@
{
"main": "index.mjs",
"type": "module"
}
@@ -0,0 +1,4 @@
{
"name": "electron-test-snapshot-items-available",
"main": "main.js"
}
@@ -1,6 +1,6 @@
--- electron/spec/api-app-spec.ts.orig 2026-03-17 08:46:36 UTC
--- electron/spec/api-app-spec.ts.orig 2026-04-30 19:26:43 UTC
+++ electron/spec/api-app-spec.ts
@@ -129,11 +129,11 @@ describe('app module', () => {
@@ -145,11 +145,11 @@ describe('app module', () => {
});
describe('app.getPreferredSystemLanguages()', () => {
@@ -14,7 +14,7 @@
const languages = app.getPreferredSystemLanguages();
if (languages.length) {
expect(languages).to.not.include('C');
@@ -210,7 +210,7 @@ describe('app module', () => {
@@ -226,7 +226,7 @@ describe('app module', () => {
expect(code).to.equal(123, 'exit code should be 123, if you see this please tag @MarshallOfSound');
});
@@ -23,7 +23,7 @@
const electronPath = process.execPath;
const appPath = path.join(fixturesPath, 'api', 'singleton');
appProcess = cp.spawn(electronPath, [appPath]);
@@ -374,7 +374,7 @@ describe('app module', () => {
@@ -390,7 +390,7 @@ describe('app module', () => {
});
// GitHub Actions macOS-13 runners used for x64 seem to have a problem with this test.
@@ -32,7 +32,7 @@
const tempFiles = [
path.join(fixturesPath, 'foo.txt'),
path.join(fixturesPath, 'bar.txt'),
@@ -502,7 +502,7 @@ describe('app module', () => {
@@ -518,7 +518,7 @@ describe('app module', () => {
// let w = null
// before(function () {
@@ -41,7 +41,7 @@
// this.skip()
// }
// })
@@ -609,7 +609,7 @@ describe('app module', () => {
@@ -625,7 +625,7 @@ describe('app module', () => {
describe('app.badgeCount', () => {
const platformIsNotSupported =
(process.platform === 'win32') ||
@@ -50,7 +50,7 @@
const expectedBadgeCount = 42;
@@ -653,7 +653,7 @@ describe('app module', () => {
@@ -669,7 +669,7 @@ describe('app module', () => {
});
});
@@ -59,7 +59,7 @@
const isMac = process.platform === 'darwin';
const isWin = process.platform === 'win32';
@@ -1033,7 +1033,7 @@ describe('app module', () => {
@@ -1049,7 +1049,7 @@ describe('app module', () => {
});
});
@@ -68,7 +68,7 @@
it('is mutable', () => {
const values = [false, true, false];
const setters: Array<(arg: boolean) => void> = [
@@ -1302,7 +1302,7 @@ describe('app module', () => {
@@ -1318,7 +1318,7 @@ describe('app module', () => {
});
});
@@ -77,7 +77,16 @@
let w: BrowserWindow;
before(function () {
@@ -1437,7 +1437,7 @@ describe('app module', () => {
@@ -1451,7 +1451,7 @@ describe('app module', () => {
});
});
- ifdescribe(process.platform === 'linux')('default protocol client APIs with mocked XDG settings', () => {
+ ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')('default protocol client APIs with mocked XDG settings', () => {
const protocol = 'electron-test-linux';
const desktopFileId = 'electron-test.desktop';
const protocolMimeType = `x-scheme-handler/${protocol}`;
@@ -1541,7 +1541,7 @@ describe('app module', () => {
describe('getApplicationNameForProtocol()', () => {
// TODO: Linux CI doesn't have registered http & https handlers
@@ -86,7 +95,16 @@
// We can't expect particular app names here, but these protocols should
// at least have _something_ registered. Except on our Linux CI
// environment apparently.
@@ -1455,7 +1455,7 @@ describe('app module', () => {
@@ -1558,7 +1558,7 @@ describe('app module', () => {
expect(app.getApplicationNameForProtocol('bogus-protocol://')).to.equal('');
});
- ifdescribe(process.platform === 'linux')('on Linux with mocked XDG dirs', () => {
+ ifdescribe(process.platform === 'linux' || process.platform === 'freebsd')('on Linux with mocked XDG dirs', () => {
const fixtureApp = path.join(fixturesPath, 'api', 'protocol-name');
const desktopFileId = 'mock-browser.desktop';
const mockScheme = 'mockproto';
@@ -1685,7 +1685,7 @@ describe('app module', () => {
});
});
@@ -95,7 +113,7 @@
it('returns promise rejection for a bogus protocol', async function () {
await expect(
app.getApplicationInfoForProtocol('bogus-protocol://')
@@ -1528,7 +1528,7 @@ describe('app module', () => {
@@ -1758,7 +1758,7 @@ describe('app module', () => {
});
// FIXME Get these specs running on Linux CI
@@ -104,7 +122,7 @@
const iconPath = path.join(__dirname, 'fixtures/assets/icon.ico');
const sizes = {
small: 16,
@@ -1610,7 +1610,7 @@ describe('app module', () => {
@@ -1840,7 +1840,7 @@ describe('app module', () => {
expect(entry.memory).to.have.property('privateBytes').that.is.greaterThan(0);
}
@@ -113,7 +131,7 @@
expect(entry.sandboxed).to.be.a('boolean');
}
@@ -1684,7 +1684,7 @@ describe('app module', () => {
@@ -1914,7 +1914,7 @@ describe('app module', () => {
it('succeeds with complete GPUInfo', async () => {
const completeInfo = await getGPUInfo('complete');
@@ -122,7 +140,7 @@
// For linux and macOS complete info is same as basic info
await verifyBasicGPUInfo(completeInfo);
const basicInfo = await getGPUInfo('basic');
@@ -1708,7 +1708,7 @@ describe('app module', () => {
@@ -1938,7 +1938,7 @@ describe('app module', () => {
});
});
@@ -1,6 +1,6 @@
--- electron/spec/api-protocol-spec.ts.orig 2026-04-15 14:05:49 UTC
--- electron/spec/api-protocol-spec.ts.orig 2026-04-30 19:26:43 UTC
+++ electron/spec/api-protocol-spec.ts
@@ -1757,7 +1757,7 @@ describe('protocol module', () => {
@@ -1899,7 +1899,7 @@ describe('protocol module', () => {
// TODO(nornagon): this test doesn't pass on Linux currently, investigate.
// test is also flaky on CI on macOS so it is currently disabled there as well.
@@ -1,6 +1,6 @@
--- electron/spec/api-web-contents-spec.ts.orig 2026-04-21 14:16:24 UTC
--- electron/spec/api-web-contents-spec.ts.orig 2026-04-30 19:26:43 UTC
+++ electron/spec/api-web-contents-spec.ts
@@ -1244,7 +1244,7 @@ describe('webContents module', () => {
@@ -1245,7 +1245,7 @@ describe('webContents module', () => {
// back to OpenFolder() which does a blocking DirectoryExists() on the UI
// thread (pre-existing behavior). Workspace-gating is covered by the test
// above.
@@ -9,7 +9,7 @@
const w = new BrowserWindow({ show: false });
await openDevTools(w);
@@ -2979,7 +2979,7 @@ describe('webContents module', () => {
@@ -2990,7 +2990,7 @@ describe('webContents module', () => {
});
// TODO(codebytere): OOPIF printing is disabled on Linux at the moment due to crashes.
@@ -1,4 +1,4 @@
--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2026-01-18 20:29:18 UTC
--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2026-05-02 13:49:55 UTC
+++ third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -362,7 +362,7 @@
"default": "",
@@ -108,7 +108,7 @@
status: "experimental",
public: true,
base_feature_status: "enabled",
@@ -5420,7 +5420,7 @@
@@ -5425,7 +5425,7 @@
name: "UnrestrictedSharedArrayBuffer",
base_feature: "none",
origin_trial_feature_name: "UnrestrictedSharedArrayBuffer",
@@ -117,7 +117,7 @@
},
// Enables using policy-controlled feature "usb-unrestricted" to allow
// isolated context to access protected USB interface classes and to
@@ -5615,7 +5615,7 @@
@@ -5620,7 +5620,7 @@
name: "WebAppInstallation",
status: {"Android": "", "default": "test"},
origin_trial_feature_name: "WebAppInstallation",
@@ -126,7 +126,7 @@
base_feature_status: "enabled",
copied_from_base_feature_if: "overridden",
},
@@ -5627,7 +5627,7 @@
@@ -5632,7 +5632,7 @@
{
name: "WebAppScopeExtensions",
origin_trial_feature_name: "WebAppScopeExtensions",
@@ -135,7 +135,7 @@
status: "experimental",
base_feature: "none",
},
@@ -5735,7 +5735,7 @@
@@ -5740,7 +5740,7 @@
{
name: "WebAuthenticationImmediateGet",
origin_trial_feature_name: "WebAuthenticationImmediateGet",