29899 Commits

Author SHA1 Message Date
trop[bot]
8287d59922 build(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 (#51409)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3.0.2 to 4.0.1.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](de90cc6fb3...fbd0ab8f3e)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-30 14:01:49 -04:00
trop[bot]
a8a79eaf61 ci: backport secondary siso patch (#51390)
chore: backport secondary siso patch

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-04-29 17:57:38 -05:00
Keeley Hammond
593607e9c0 chore: cherry-pick 1 change from chromium (#51327) 2026-04-26 16:09:14 -05:00
trop[bot]
aa7791ff97 build: restrict npm tarball contents to an explicit allowlist (#51307)
* build: restrict npm tarball contents to an explicit allowlist

The npm publish flow runs `npm pack` in a staging temp dir, but
`npm/package.json` had no `files` field — so any file that happened
to land in that dir was packed into the published tarball.

Recent releases (41.2.1+, 40.9.1+, 39.8.8+) shipped a self-referential
`.npm-cache/_logs/*-debug-0.log` (npm's own debug log, written into
the pack dir before pack finishes reading files) and a stray copy of
`SHASUMS256.txt` that duplicates the info already in `checksums.json`.

Add an explicit `files` allowlist so only the intended contents are
packaged, regardless of staging-dir contamination. `package.json`,
`README.md`, and `LICENSE` are auto-included by npm.

Fixes #51290.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

* build: include LICENSE and README.md in files allowlist

These are auto-included by npm regardless, but listing them makes the
intended contents of the tarball self-documenting alongside the other
entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2026-04-24 13:10:21 +00:00
Samuel Attard
5392e9a9ad fix: ensure corsEnabled: false protocol handlers do not work across protocols (39-x-y) (#51272)
* fix: ensure corsEnabled: false protocol handlers do not work across protocols (#51152)

* fix: ensure corsEnabled: false protocol handlers do not work across protocols

Subresource requests for registered custom protocols are routed to
ElectronURLLoaderFactory via the renderer's per-scheme URLLoaderFactoryBundle
entry, which bypasses the network service's CorsURLLoaderFactory. This meant a
cross-origin page could fetch() a scheme registered with {supportFetchAPI: true}
and read the response body even when {corsEnabled: true} was not set.

Replicate CorsURLLoader::StartRequest's kCorsDisabledScheme gate in
ElectronURLLoaderFactory::CreateLoaderAndStart so cross-origin mode=cors
requests to such schemes fail before the JS handler runs, and tag cross-origin
mode=no-cors responses as opaque so the body is not script-readable while <img>
and similar subresource loads continue to work.

Re-enable the long-disabled "disallows CORS and fetch requests when only
supportFetchAPI is specified" test, add coverage for the opaque/no-cors,
same-origin, handler-not-invoked, corsEnabled-unaffected and net.fetch-unaffected
cases, and migrate spec helpers that were exercising a {supportFetchAPI: true}
scheme cross-origin to a corsEnabled scheme.

* chore: oxfmt

(cherry picked from commit 92f0993d94)

* chore: fix build

* fixup! chore: fix build

chore: make linter happy

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-23 16:29:07 -05:00
Samuel Attard
2c24640e7b fix: validate OSR frame geometry against shared-memory mapping size (39-x-y) (#51274)
fix: validate OSR frame geometry against shared-memory mapping size (#50904)

(cherry picked from commit 3ff923990d)
2026-04-23 14:51:59 +02:00
Keeley Hammond
f1304d3c60 chore: cherry-pick 7 changes from chromium (39-x-y) (#51257)
* chore: cherry-pick 2 changes from chromium (39-x-y)

Cherry-pick two Critical CVE fixes for WebNN from Chromium stable:

* https://chromium-review.googlesource.com/c/chromium/src/+/7673406
  [WebNN] Reject fusing per-channel quantized gemm if the quantized
  dimension of filter is not 0 (CVE-2026-5858)

* https://chromium-review.googlesource.com/c/chromium/src/+/7687618
  [WebNN] Prevent Pool2d indirection buffer overflow in TFLite
  (CVE-2026-5859)

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: cherry-pick 5 changes from chromium

Backported security fixes for 492668885, 493234757, 492736100, 493413432, 496281816.

cherry-pick 4e9562ca7b42 from chromium
Upgrade DCHECK_EQ to CHECK_EQ in audio_processor.cc.
Bug: 493234757
Change-Id: Iaf1abb6e84b36d36eac100ef20b88e6f2d3e8fbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7708432

cherry-pick fccaeb9e0967 from chromium
Fix dangling pointer bug in VaapiVideoEncodeAccelerator
Bug: 492736100
Change-Id: I998bc71a1f2c58a009f9e8d9e9f27fe1aed89e69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7685816

cherry-pick c75f63de7188 from chromium
[WebNN] Use int32_t for checking im2col/col2im size limits
Bug: 493413432
Change-Id: If316b1b19ead6618e67e2ff7d5f4f2c4e57b3bba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7694571

cherry-pick d141d62357df from chromium
WebNN: Use output size for TransposeConv SAME padding in TFLite
Bug: 492668885, 491869941
Change-Id: Ibfbcd2bf9b80b6ab2b2f0fccf9596975537f9cc8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7677538

cherry-pick 848cf5567223 from chromium
Check parent nodes when handling vector node insertions.
Fixed: 496281816
Change-Id: I0fc6956d1c09fcb7ea54d94819fdf1cb06fbd9e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7705373

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: update patches

* chore: fix build error in ValidateAndCalculateConv2dOutputSizes

---------

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
2026-04-23 14:51:52 +02:00
Keeley Hammond
d6009e26d2 chore: cherry-pick 3 changes from skia, angle, webrtc (#51266)
* chore: cherry-pick 8c705ac86366 from skia

Use SkSafeMath to prevent overflow in pixel offset calculations.

Bug:b/495534710
Change-Id: I0b2a684b5ad1105c7d25418556e40b4d9f511daf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1481416
Commit-Queue: Stephen Nusko <nuskos@google.com>
Reviewed-by: Herb Derby <herb@google.com>

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: cherry-pick 6d8b704e2a from angle

Metal: Remove TextureMtl::mFormat

Bug: chromium:493256564
Change-Id: I629c009b34c7ef7ca5fa7a97f5845accf22b13b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/7684363
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: cherry-pick 731795bab2d8 from webrtc

Refactor AddCertificateReports to prevent crash

Bug: chromium:486495143
Change-Id: Iabc41ae064476c1e5853cdff1dbbcab449f8df27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/459320
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47242}

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

* chore: update patches

---------

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
2026-04-23 09:50:05 +02:00
Samuel Attard
7b3793d9c7 ci: centralize build-image SHA and pre-seed node-gyp headers (39-x-y) (#51277)
ci: centralize build-image SHA and pre-seed node-gyp headers (#51148)

* ci: centralize build-image SHA and pre-seed node-gyp headers

- Add .github/actions/build-image-sha as the single source of truth for
  the ghcr.io/electron/build (and arch-tagged electron/test) image SHA,
  with an optional override input for workflow_dispatch.
- Refactor build.yml, apply-patches.yml, build-git-cache.yml,
  clean-src-cache.yml, clean-orphaned-cache-uploads.yml, and the three
  publish workflows to resolve the SHA via a small ubuntu-slim setup job
  instead of hardcoding it in each file.
- Bump the image to daad061f (electron/build-images#68, which pre-warms
  the node-gyp header cache in the Linux images).
- Run the build.yml setup job on ubuntu-slim instead of ubuntu-latest.
- In install-dependencies (and the inline yarn installs in
  pipeline-electron-lint and generate-types), link deps with
  --mode=skip-build first, run `node-gyp install` with up to 3 retries
  (5s backoff) to populate the header cache, then run the build phase.
  This avoids the parallel-download race that intermittently fails the
  first native-addon configure with an empty common.gypi on cold
  macOS/Windows runners.

* ci: skip node-gyp header pre-seed on Linux

* ci: invoke node-gyp via its JS entrypoint for Windows compat

(cherry picked from commit f7ba34064e)
2026-04-23 09:48:56 +02:00
trop[bot]
1b629b21ac build: use Yarn JsZipImpl for node-modules link to fix arm32 OOM (#51233)
* build: use Yarn JsZipImpl for node-modules link step

Patch the vendored .yarn/releases/yarn-4.12.0.cjs so the node-modules
(and pnpm-loose) linker constructs its read-only ZipOpenFS with
customZipImplementation = JsZipImpl instead of the default WASM
LibZipImpl.

LibZipImpl loads each cache zip fully into the Emscripten WASM heap and
malloc's a WASM buffer per file read. With up to 80 zips held open, the
32-bit arm32v7 test container intermittently fails to allocate the ~9 MB
buffer for typescript/lib/typescript.js. Yarn's cross-FS copyFilePromise
swallows the real error and surfaces it as a generic
"EINVAL: invalid argument, copyfile", which has been failing ~1-in-3
linux-arm test shards at Install Dependencies since 2026-04-13.

JsZipImpl opens zips by fd, reads only the central directory, and pulls
individual entries into plain Node Buffers — no WASM heap involved.
There is no .yarnrc.yml or env knob for this, so the vendored release is
edited directly. .claude/README.md documents the patch and how to
re-apply it on Yarn upgrades.

Refs: yarnpkg/berry#3972, yarnpkg/berry#6722, yarnpkg/berry#6550

Co-authored-by: Sam Attard <sattard@anthropic.com>

* docs: move JsZipImpl patch notes to .yarn/README.md

Relocate the patch rationale next to the vendored release it documents,
reword the intro for its new home, and update the header comment in
yarn-4.12.0.cjs to point at .yarn/README.md.

Co-authored-by: Sam Attard <sattard@anthropic.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-22 12:26:58 +02:00
trop[bot]
7362bac55e build: update ANGLE repository URL to GitHub mirror (#51169)
Clone angle from github.com/google/angle in fix-sync action

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
v39.8.9
2026-04-20 15:23:46 -07:00
trop[bot]
e113ed84e6 build: resolve electron_version from git when building in a worktree (#51163)
BUILD.gn previously hard-coded read_file(".git/packed-refs", ...) and
".git/HEAD" to derive electron_version. In a `git worktree` checkout
.git is a file containing a gitdir: pointer, not a directory, so GN's
read_file() fails and gn gen aborts unless override_electron_version is
set manually.

Ask git itself for the real locations via `git rev-parse --git-dir` /
`--git-common-dir` in a small helper script, and feed those resolved
paths to read_file() and the exec_script dependency list. Behaviour in
a plain clone is unchanged (both resolve to electron/.git/...), and the
tarball case still fails loudly with a pointer to
override_electron_version.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-20 08:23:14 -05:00
Samuel Attard
e9b29b0f9c chore: cherry-pick 27 changes from chromium, v8, skia, angle, pdfium, libaom (#51141)
* chore: cherry-pick 27 changes from chromium, v8, skia, angle, pdfium, libaom

* fixup: use FrameTreeNodeId in PrerenderNewTabHandle backport for M142
2026-04-19 12:47:34 -07:00
Samuel Attard
42839c11e1 ci: build a patched siso for Windows builds (#51118)
ci: build a patched siso for Windows builds (#51077)

* ci: build a patched siso for Windows builds

The Windows Chromium builds intermittently fail during manifest load
with 'The parameter is incorrect.' (ERROR_INVALID_PARAMETER) out of
bindflt.sys. Root cause is a handle-relative NtCreateFile race in
siso/toolsupport/ninjautil/file_parser.go, which opens each subninja
twice — once in the outer goroutine and once more per chunk for
ReadAt. (*os.File).ReadAt is documented as safe for concurrent use,
so the extra open is redundant and removing it both halves the
CreateFileW calls per subninja and sidesteps the race.

Add a new build-siso-windows job on ubuntu-latest (runs in parallel
with checkout-windows) that:

- reads chromium_version from DEPS and pulls the matching siso_version
  SHA from the Chromium mirror's DEPS at that ref
- shallow-clones chromium.googlesource.com/build at that SHA
- applies the in-tree patches under .github/siso-patches/ via git am
- cross-compiles siso.exe for windows/amd64
- caches the binary keyed on siso SHA + sha256 of the patches, so
  subsequent runs hit the cache and skip the clone/patch/build steps
- uploads the result as a siso-windows-amd64 artifact

The Windows build jobs now depend on build-siso-windows, download the
artifact into $RUNNER_TEMP/siso, and export SISO_PATH, which
depot_tools/siso.py already honors. Mirrored into windows-publish.yml
and the regenerated pipeline-segment-electron-publish.yml so release
builds pick it up too.

Notes: none

* ci: extract siso build into a reusable workflow segment

Move the build-siso-windows job body into
pipeline-segment-build-siso-windows.yml and call it from both build.yml
and windows-publish.yml via workflow_call. Also pin actions/cache to
v5.0.5 and add version comments next to the action SHAs introduced by
this change.

(cherry picked from commit 5523130c92)
2026-04-17 18:06:32 -05:00
Samuel Attard
fef29158ae refactor: attach translator holder via v8::Function data slot (#51122)
refactor: attach translator holder via v8::Function data slot (#50867)

(cherry picked from commit bfa5c93332)
2026-04-17 16:50:03 -05:00
Samuel Attard
27bf1cae92 fix: use ShowItemInFolder for devtools showItemInFolder embedder message (#51115)
fix: use ShowItemInFolder for devtools showItemInFolder embedder message (#50905)

(cherry picked from commit b4e14a9004)
2026-04-17 14:13:58 +00:00
Samuel Attard
db58142df2 fix: use fresh LazyNow for OnEndWorkItemImpl to fix TimeKeeper DCHECK (#51102)
fix: use fresh LazyNow for OnEndWorkItemImpl to fix TimeKeeper DCHECK (#50418)
2026-04-16 15:35:44 -07:00
trop[bot]
5b699544cb fix: use CreateDataProperty when copying objects across contextBridge (#51083)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-16 12:43:25 -04:00
trop[bot]
c0435f7a9f test: fixup autoupdater tests failures (#51060)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
v39.8.8
2026-04-15 10:06:14 -04:00
Samuel Attard
bdd027249a build: authenticate sudowoodo /token exchange via Actions OIDC (39-x-y) (#51055)
build: authenticate sudowoodo /token exchange via Actions OIDC
2026-04-14 20:44:22 -07:00
Keeley Hammond
2fd95dc5a0 chore: cherry-pick 12f932985275 from chromium (#50175)
* chore: cherry-pick 12f932985275 from chromium

* chore: update patch

* chore: update patch after rebase

* chore: fixup patch

* fixup patch for windows build

---------

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-04-13 17:20:42 -05:00
trop[bot]
d9192a0eb0 ci: capture fatal errors in clang problem matcher (#50996)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-04-13 15:37:53 -04:00
Samuel Attard
6f6e5fd635 ci: split macos-x64 tests into 3 shards (39-x-y) (#50972)
ci: split macos-x64 tests into 3 shards
2026-04-13 09:26:28 +02:00
Keeley Hammond
0d4100165f chore: cherry-pick 6 changes from v8 (#50993)
* chore: cherry-pick a0570afad500 from v8

[maglev] Fix deopt use counting for deopt scope data

We shouldn't count the deopt use when creating the scope data,
but only when creating the deopt frame.

If the scope was unused, then we were over counting,
not really a correctness issue though.

If the scope was used twice, we were under counting and
we can underflow the counting when removing the use of
a node.

Fixed: 470566252
Change-Id: I7b6f5647d1ed1f9a7c915d3682f10cfc71a5924c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7415271
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#104601}

* chore: cherry-pick b54c7841e2cd from v8

[*lev] Correctly update use counts for nested builtin continuations

Fixed: 484527367
Change-Id: I4cda8c1bbb2788fca06b564eae509511aec0957e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7593054
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#105381}

* chore: cherry-pick ba0258ba9609 from v8

[inspector] Use std::shared_ptr for InspectedContext

Unfortunately at this point we are not able to move `InspectedContext`
to the managed C++ heap due to missing Heap* collections and the lack
of labeling retainer links.

The next best thing we can do for now is use std::shared_ptr for
InspectedContext and keep an instance on the stack every time we can
potentially transition into user JS.

R=bmeurer@chromium.org

Fixed: 486927780
Change-Id: I5e4921521a24cc3cd53ffb6cb5b6b6f9d98490e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7613210
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#105489}

* chore: cherry-pick 2d9ff4098967 from v8

Merged: [maglev] Avoid eliding Smi checks too aggressively

(cherry picked from commit 433b2912c5cb94ed0979c8284e96e4d08416b620)

Bug: 491884710
Change-Id: Id73c522c6f55cb05167f436c2ee7f60e0db71840
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7673820
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Cr-Commit-Position: refs/branch-heads/14.6@{#45}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}

* chore: cherry-pick f297f82fea96 from v8

Merged: [compiler][arm64] Force explicit zero-extension of load index

This is the merge-commit for:

1) [arm64][compiler] Always emit truncation to word32
     cherry picked from commit 522e74a35cf4e53c3708ea396c299bfbb29d8489
2) [compiler][arm64] Reenable implicit truncation and force
   explicit zero-extension of load/store index
     cherry picked from commit 4ef5cc27aa50b4a7e3096bbbffaf5058a811a2a9

Bug: 496301615
Change-Id: I3e5e13a90ad0a43768c9cd46a7ebd99d0f6a4e11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715044
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
Auto-Submit: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/branch-heads/14.6@{#63}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}

* chore: cherry-pick 021c5b193bd4 from v8

Merged: [maglev] Account for phi smi type widening in BuildCheckHeapObject

Bug: 495679730
(cherry picked from commit c1e78b455e3224e286914b5ac241fbea064cb51d)

Change-Id: I77d6f184af8d62a0dbb643c6f34d4a3530b32b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715042
Auto-Submit: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/branch-heads/14.6@{#65}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}
2026-04-13 09:25:49 +02:00
trop[bot]
2764e4c351 fix: respect iframe sandbox flags for external protocol navigation (#50961)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 20:48:51 -05:00
trop[bot]
164ea8ba3d build: update build-tools to latest (#50802)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2026-04-11 16:52:11 -04:00
trop[bot]
0a6291a97d fix: use audit token instead of PID for parent code-signature check (#50933)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 13:42:42 -07:00
trop[bot]
aa9129c767 fix: apply IsSafeRedirectTarget to net module redirects (#50927)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 10:46:22 -05:00
trop[bot]
4eff3dc09e fix: restrict window.open features to allowlisted BrowserWindow options (#50946)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 09:12:17 -05:00
trop[bot]
4ca87555e1 fix: scope extension tab-ID resolution to the calling BrowserContext (#50925)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 07:35:42 -05:00
trop[bot]
09bb06522e fix: clamp autofill popup bounds to the requesting frame viewport (#50942)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 07:34:52 -05:00
trop[bot]
117d48944b fix: guard permission handlers in File System API tests (#50887)
1. Chromium can fire unrelated permission checks (e.g. 'background-sync')
on the default session. Copy a safeguard `permission === 'fileSystem'` from
"calls twice when trying to query a read/write file handle permissions".

2. add afterEach cleanup: reset setPermissionCheckHandler(null) and
remove ipcMain listeners for 'did-create-file-handle' and
'did-create-directory-handle'.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-10 10:39:16 -05:00
trop[bot]
3f1f744e88 fix: devtools re-attaches on open when previously detached (#50818)
PR #50646 added a dock state allowlist in SetDockState() that collapsed any
non-matching value to "right". WebContents::OpenDevTools passes an empty
string when no `mode` option is given, which is the sentinel LoadCompleted()
uses to restore `currentDockState` from prefs. The allowlist clobbered that
sentinel to "right", so previously-undocked devtools would flash detached
and then snap back to the right dock.

Preserve the empty string through SetDockState() so the pref-restore path
runs; still reject any non-empty invalid value to keep the JS-injection
guard from #50646 intact.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-08 13:48:36 -07:00
trop[bot]
2d7e11a76c ci: use hermetic mac SDK for the release ffmpeg build (#50758)
* ci: use hermetic mac SDK for the release ffmpeg build

gn gen out/ffmpeg runs as a raw gn invocation, so it never receives the
mac_sdk_path arg that e build injects for out/Default. On macOS runners
that means out/Default builds against the hermetic build-tools SDK while
out/ffmpeg falls through to the runner's system Xcode SDK. Reuse the
value e build already wrote so both builds share the same sysroot.

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* ci: copy hermetic SDK symlink into out/ffmpeg and rewrite path

mac_sdk_path must live under root_build_dir, so pointing out/ffmpeg at
//out/Default/... doesn't work. Copy the xcode_links symlink tree into
out/ffmpeg and rewrite the path. Gate on Darwin so Windows/Linux don't
run the sed/cp at all.

Co-authored-by: Samuel Attard <sattard@anthropic.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
v39.8.7
2026-04-06 23:15:27 -07:00
Shelley Vohr
3fc23369b6 chore: cherry-pick 89b42d2d3326 from chromium (#50624)
* chore: cherry-pick 89b42d2d3326 from chromium

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2026-04-06 18:40:55 -05:00
trop[bot]
965ac948e0 ci: make src-cache upload atomic (#50749)
ci: make src-cache upload atomic and sweep orphaned temp files

The checkout action's cp of the ~6GB zstd archive directly to the final
path on the cache share is non-atomic; an interrupted copy or a
concurrent reader produces zstd "Read error (39): premature end" on
restore, and the truncated file then satisfies the existence check so
no later run repairs it.

Upload to a run-unique *.tar.upload-<run_id>-<attempt> temp name on the
share and mv to the final path, discarding our temp if a concurrent run
got there first. A new clean-orphaned-cache-uploads workflow removes
temp files older than 4h every 4 hours.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-06 22:07:51 +00:00
Samuel Attard
e58fcdece3 build: derive patches upstream-head ref from script path (39-x-y) (#50742)
build: derive patches upstream-head ref from script path (#50727)

* build: derive patches upstream-head ref from script path

gclient-new-workdir.py symlinks each repo's .git/refs back to the source
checkout, so the fixed refs/patches/upstream-head was shared across all
worktrees. Parallel `e sync` runs in different worktrees clobbered each
other's upstream-head, breaking `e patches` and check-patch-diff.

Suffix the ref with an md5 of the script directory so each worktree writes
a distinct ref into the shared refs dir. Fall back to the legacy ref name
in guess_base_commit so existing checkouts keep working until next sync.

* fixup: also write legacy upstream-head ref and note it in docs
2026-04-06 16:08:35 -04:00
Samuel Attard
73552d2720 ci: use github mirror to get lint dependency versions (#50737)
ci: use github mirror to get lint dependency versions (#50733)

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2026-04-06 09:49:40 -07:00
Samuel Attard
da458ffd10 build: replace npx with lockfile-pinned binaries (#50711)
build: replace npx with lockfile-pinned binaries (#50598)

* build: replace npx with lockfile-pinned binaries

- nan-spec-runner: reorder yarn install first, invoke nan node-gyp bin directly
- publish-to-npm: use host npm with E404 try/catch (closes existing TODO)
- upload-symbols: add @sentry/cli devDep, invoke from node_modules/.bin
- remove script/lib/npx.py (dead since #48243)

* build: bump @sentry/cli to 1.70.0 for arm support

* build: bump @sentry/cli to 1.72.0, skip CDN download on test jobs

@sentry/cli fetches its platform binary from Sentry CDN at postinstall.
Only upload-symbols.py (release pipeline) needs the binary; set
SENTRYCLI_SKIP_DOWNLOAD=1 in the two test-segment workflows that
call install-dependencies. The 64k variant uses pre-built artifacts
and does not install deps.
2026-04-06 10:15:12 -04:00
Samuel Attard
0cbdf2f037 fix: propagate requesting frame through sync permission checks (#50714)
fix: propagate requesting frame through sync permission checks (#50679)

WebContentsPermissionHelper::CheckPermission was hardcoding
GetPrimaryMainFrame() and deriving the requesting origin from
web_contents_->GetLastCommittedURL(), so the setPermissionCheckHandler
callback always received the top frame's origin and
details.isMainFrame/details.requestingUrl always reflected the main
frame, even when a cross-origin subframe with allow="serial" or
allow="camera; microphone" triggered the check.

Thread the requesting RenderFrameHost through CheckPermission,
CheckSerialAccessPermission, and CheckMediaAccessPermission so the
permission manager receives the real requesting frame. Update the
serial delegate and WebContents::CheckMediaAccessPermission callers to
pass the frame they already have.

Adds a regression test that loads a cross-origin iframe with
allow="camera; microphone", calls enumerateDevices() from within the
iframe, and asserts the permission check handler receives the iframe
origin for requestingOrigin, isMainFrame, and requestingUrl.
2026-04-06 10:07:27 -04:00
Samuel Attard
5442f1d7fb ci: zstd-compress the src cache and drop the doubled win_toolchain (#50720)
ci: zstd-compress the src cache and drop the doubled win_toolchain (#50702)

* ci: shrink src cache and fix Windows tar cleanup

- Exclude platform-specific toolchains (llvm-build, rust-toolchain) from
  the src cache; all platforms now fetch them via fix-sync post-restore
- Exclude unused test data and benchmarks: blink/web_tests, jetstream,
  speedometer, catapult/tracing/test_data, swiftshader/tests/regres
- Fix Windows restore leaving the tarball on disk after extraction
  ($src_cache was scoped to the previous PowerShell step)
- Bump src-cache key v1 -> v2

* ci: fetch llvm/rust toolchains in gn-check and clang-tidy

These workflows restore the src cache but don't run fix-sync. Now that
llvm-build and rust-toolchain are excluded from the cache, they need to
download them directly — gn gen read_file()s both, and clang-tidy runs
the binary from llvm-build.

* ci: fetch clang-tidy package explicitly

update.py's default 'clang' package doesn't include the clang-tidy
binary; it ships as a separate package.

* ci: preserve blink/web_tests/BUILD.gn when stripping test data

//BUILD.gn references //third_party/blink/web_tests:wpt_tests as a
target label, so the BUILD.gn must exist for gn gen. The data = [...]
entries it declares are runtime-only and not existence-checked at gen
time, so the actual test directories can still be removed.

* ci: compress src cache with zstd and drop gclient sync -vv

The src cache was an uncompressed tar (~16GB after exclusions). Switch
to zstd -T0 --long=30 for ~4x smaller transfer and multi-threaded
compression. Decompress on restore:
- Linux/macOS: zstd -d -c | tar -xf -
- Windows: zstd -d to an intermediate .tar, then the existing 7z
  -snld20 extraction (preserves symlink handling)

All filename references updated .tar -> .tar.zst. -f added to the two
-o invocations so re-runs overwrite instead of failing.

Also drop -vv from gclient sync; default verbosity is sufficient.

* ci: keep .tar extension for src cache (zstd content inside)

The sas-sidecar that issues Azure SAS tokens validates filenames against
/^v[0-9]+-[a-z\-]+-[a-f0-9]+\.(tar|tgz)$/ and is not easily redeployed,
so keep the .tar extension and decode zstd on restore. Windows
decompresses to a distinct intermediate (src_cache.tar) so input and
output don't collide.

* ci: log NTFS 8.3/lastaccess/Defender state before Windows cache extract

Temporary diagnostics to see whether 8.3 short-name generation is the
cause of the ~20 min tar extraction.

* ci: revert src-cache exclusion additions

The new exclusions (web_tests contents, jetstream, speedometer,
catapult test_data, regres, llvm-build, rust-toolchain) caused siso/RBE
cache misses — even data-only deps are part of action input hashes.
Revert to the original exclusion list and drop the corresponding
toolchain-fetch plumbing. zstd compression, the Windows tar cleanup,
and the -vv removal remain.

* ci: drop win_toolchain from src cache; remove NTFS diagnostics

The Windows src cache includes 14.6GB of depot_tools/win_toolchain —
7.3GB of MSVC/SDK doubled because tar captures both the vs_files.ciopfs
backing store and the live ciopfs mount at vs_files/. Every Windows
cache consumer already re-fetches this via vs_toolchain.py update
--force (fix-sync for build/publish, inline for gn-check/clang-tidy),
so the cached copy is never used.

Diagnostics removed — CI confirmed 8dot3, last-access, and Defender are
all already off on the AKS Windows nodes.

* ci: unmount ciopfs vs_files before removing win_toolchain

vs_files is a live ciopfs mount during the win-targeted checkout; rm -rf
fails with EBUSY until it's unmounted.

* ci: skip win_toolchain download during checkout instead of removing after

fusermount isn't on the checkout container, so the ciopfs mount can't be
torn down before rm. Setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 makes the
win_toolchain hook a no-op (vs_toolchain.py:525-527), so there's no
download and no mount. All Windows consumers re-fetch it post-restore
anyway. The rm -rf stays as a safety net.

* ci: also set ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN=0 for checkout sync

build.yml sets ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN=1 at the job level for
the Windows checkout, which makes e d inject DEPOT_TOOLS_WIN_TOOLCHAIN=1
and override the inline =0. Need both: the ELECTRON_ var stops e d from
overriding, the plain one stops vs_toolchain.py from defaulting to 1.

* ci: extract Windows src cache with piped tar instead of 7z

7z takes ~20 min to extract the ~1.1M-entry tar regardless of size —
~1ms per entry of header parsing and path handling, single-threaded,
well under the 75k IOPS / 1000 MBps the ephemeral disk can do. Switch
to the same zstd -d | tar -xf - pipe used on Linux/macOS (via Git Bash
tar). No intermediate src_cache.tar, download deleted after extract.

The -snld20 flag was working around 7z's own "dangerous symlink"
refusal; GNU tar extracts symlinks as-is so it shouldn't be needed.

* ci: keep depot_tools/win_toolchain scripts in src cache

The rm -rf removed get_toolchain_if_necessary.py (a depot_tools source
file), breaking vs_toolchain.py update --force on restore.
DEPOT_TOOLS_WIN_TOOLCHAIN=0 on the sync already prevents the vs_files
download, so the rm was only removing scripts.

* ci: split src cache into 4 parallel-extractable shards

Windows tar extraction is ~1ms/entry for ~1.2M entries (~20 min)
regardless of tool, well under the 75k IOPS / 1000 MBps the D16lds_v5
ephemeral disk can do. Tar is a sequential stream so the only way to
parallelize is to split at creation time.

Shards (balanced by entry count, ~220-360k each):
  a: src/third_party/blink
  b: src/third_party/{dawn,electron_node,tflite,devtools-frontend}
  c: src/third_party (rest)
  d: src (excluding third_party)

DEPSHASH is now the raw hash; shard files are
v2-src-cache-shard-{a..d}-${DEPSHASH}.tar (all pass the sas-sidecar
filename regex). sas-token is now a JSON keyed by shard letter. All
restore paths extract the four shards in parallel with per-PID wait so
a failed shard aborts the step.

* Revert "ci: split src cache into 4 parallel-extractable shards"

This reverts commit 970574998b.
2026-04-06 10:01:23 -04:00
trop[bot]
be77994af2 ci: fetch clang-tidy package in fix-sync (#50723)
fix-sync re-downloads llvm-build on macOS/Windows with the base clang
and objdump packages, but not clang-tidy. A local gclient sync pulls
clang-tidy (checkout_clang_tidy=True in DEPS), so CI's llvm-build tree
diverges from a local one. siso hashes the toolchain as action input,
so cache-only local runs against the CI-populated RBE cache miss.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
2026-04-06 07:34:27 +00:00
trop[bot]
2046ae8773 fix: validate dock_state_ against allowlist before JS execution (#50667)
fix: validate dock_state_ against allowlist before JS execution

The dock_state_ member was concatenated directly into a JavaScript
string and executed via ExecuteJavaScript() in the DevTools context.

We should validate against the four known dock states and fall back
to "right" for any unrecognized value for safety

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-03 15:45:40 -05:00
Shelley Vohr
92892ca481 chore: cherry-pick d8b01057f740 from chromium (#50620)
* chore: cherry-pick d8b01057f740 from chromium

* fixup! chore: cherry-pick d8b01057f740 from chromium

* chore: manually update cherry-pick-d8b01057f740.patch for 142.0.7444.265

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-03 17:25:15 +02:00
John Kleinschmidt
0ba01d5cc6 ci: update actions to node24 (#50524)
ci: update actions to node24 (#50373)

* ci: update actions to node24

* chore: fixup actions/cache to 5.0.4 everywhere

(cherry picked from commit 639d3b99b7)
v39.8.6
2026-03-31 15:27:05 +02:00
trop[bot]
a32b124d64 ci: update nick-fields/retry to v4.0.0 (#50545)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-03-31 15:15:43 +02:00
trop[bot]
8f26c7a1b8 fix: add missing HandleScope in contentTracing.getTraceBufferUsage() (#50595)
The `OnTraceBufferUsageAvailable` callback creates V8 handles via
`Dictionary::CreateEmpty()` before `promise.Resolve()` enters its
`SettleScope` (which provides a `HandleScope`). When the callback
fires asynchronously from a Mojo response (i.e. when a trace session
is active), there is no `HandleScope` on the stack, causing a fatal
V8 error: "Cannot create a handle without a HandleScope".

Add an explicit `v8::HandleScope` at the top of the callback, matching
the pattern used by the other contentTracing APIs which resolve their
promises through `SettleScope` or the static `ResolvePromise` helper.

Made-with: Cursor

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alexey Kozy <alexey@anysphere.co>
2026-03-31 11:37:27 +02:00
Michaela Laurencin
45d03a5392 ci: add functionality for programmatic add/remove needs-signed-commits label (#50316) (#50585)
* remove comment based label removal

* ci: add functionality for programmatic add/remove needs-signed-commits label

* add new line to pull-request-opened-synchronized
2026-03-31 10:16:42 +02:00
Samuel Attard
c8be8adebf build: upload patch conflict fix as CI artifact (#50578)
* build: add patch conflict resolution workflow with CI artifacts (#50235)

ci: upload patch conflict fix as artifact in apply-patches

When patch-up.js cannot auto-push the 3-way-merged patch diff (e.g. on
fork PRs), the checkout action already writes patches/update-patches.patch
and tells the user to check CI artifacts — but nothing was uploading it.

This adds the missing upload-artifact step to the apply-patches job so
the resolved diff is available for download, and documents in CLAUDE.md
that pulling this artifact and applying it with `git am` is the fast
path for fixing patch conflicts on PR branches without a full local sync.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 816e5964fb)

* build: skip archiving patch conflict fix artifact (#50251)

The update-patches artifact is a single .patch file, so zipping it
is unnecessary overhead. With archive: false, gh run download fetches
the raw file directly without requiring a decompression step.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit f4a50a8fde)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-30 18:04:29 +00:00
trop[bot]
f10a9b784c refactor: improve input handling in FilePath gin converter (#50548)
refactor: improve input handling in file_path_converter

Properly handle paths containing ASCII control characters in the FilePath gin converter

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2026-03-27 14:05:00 -07:00