Commit Graph

30147 Commits

Author SHA1 Message Date
trop[bot]
f47840be6a build: update ANGLE repository URL to GitHub mirror (#51170)
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>
2026-04-20 13:27:31 -07:00
trop[bot]
936347d024 docs: update versioning references (#51173)
* docs: update versioning references

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* fixups

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-04-20 13:25:55 -07:00
trop[bot]
830a77cbee build: resolve electron_version from git when building in a worktree (#51165)
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 15:07:45 -05:00
trop[bot]
82ed28e817 fix: nodeIntegrationInWorker not working in AudioWorklet (#51006)
* fix: nodeIntegrationInWorker not working in AudioWorklet

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: deadlock on Windows when destroying non-AudioWorklet worker contexts

The previous change kept the WebWorkerObserver alive across
ContextWillDestroy so the worker thread could be reused for the next
context (AudioWorklet thread pooling, Chromium CL:5270028). This is
correct for AudioWorklet but wrong for PaintWorklet and other worker
types, which Blink does not pool — each teardown destroys the thread.

For those worker types, ~NodeBindings was deferred to the thread-exit
TLS callback. By that point set_uv_env(nullptr) had already run, so on
Windows the embed thread was parked in GetQueuedCompletionStatus with a
stale async_sent latch that swallowed the eventual WakeupEmbedThread()
from ~NodeBindings. uv_thread_join then blocked forever, deadlocking
renderer navigation. The worker-multiple-destroy crash case timed out
on win-x64/x86/arm64 as a result. macOS/Linux (epoll/kqueue) don't have
the latch and were unaffected.

Plumb is_audio_worklet from WillDestroyWorkerContextOnWorkerThread into
ContextWillDestroy. For non-AudioWorklet contexts, restore the
pre-existing behavior of calling lazy_tls->Set(nullptr) at the end of
the last-context cleanup so ~NodeBindings runs while the worker thread
is still healthy. AudioWorklet continues to keep the observer alive so
the next pooled context can share NodeBindings.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: address review feedback

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: stop embed thread before destroying environments in worker teardown

FreeEnvironment (called via environments_.clear()) runs uv_run to drain
handle close callbacks. On Windows, both that uv_run and the embed
thread's PollEvents call GetQueuedCompletionStatus on the same IOCP
handle. IOCP completions are consumed by exactly one waiter, so the
embed thread can steal completions that FreeEnvironment needs, causing
uv_run to block indefinitely. On Linux/Mac epoll_wait/kevent can wake
multiple waiters for the same event so the race doesn't manifest.

Add NodeBindings::StopPolling() which cleanly joins the embed thread
without destroying handles or the loop, and allows PrepareEmbedThread +
StartPolling to restart it later. Call StopPolling() in
WebWorkerObserver::ContextWillDestroy before environments_.clear() so
FreeEnvironment's uv_run is the only thread touching the IOCP.

Split PrepareEmbedThread's handle initialization (uv_async_init,
uv_sem_init) from thread creation via a new embed_thread_prepared_ flag
so the handles survive across stop/restart cycles for pooled worklets
while the embed thread itself can be recreated.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: address outstanding feedback

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2026-04-20 12:01:52 +02:00
Samuel Attard
d86cbe9284 chore: cherry-pick 27 changes from chromium, v8, angle, skia, pdfium, libaom (#51137)
* chore: cherry-pick b149a5c62d76 from angle

* chore: cherry-pick 4073d491fb55 from chromium

* chore: cherry-pick 0566b2f5f0d1 from skia

* chore: cherry-pick 8c1ead5a699f from chromium

* chore: cherry-pick 8b08fb7c9dce from chromium

* chore: cherry-pick be87466afecb from chromium

* chore: cherry-pick c215f8e6f049 from chromium

* chore: cherry-pick 036e5e8f69be from v8

* chore: cherry-pick a6357144e7bf from chromium

* chore: cherry-pick 3f9969421ad5 from skia

* chore: cherry-pick ca8a943c247c from pdfium

* chore: cherry-pick 07398289d921 from v8

* chore: cherry-pick 41bfbc009df8 from chromium

* chore: cherry-pick 4002a66778d2 from chromium

* chore: cherry-pick 23865499a86a from chromium

* chore: cherry-pick 7c11e1188705 from dawn

* chore: cherry-pick c81f01b469c4 from chromium

* chore: cherry-pick 1b69067db7d2 from chromium

* chore: cherry-pick d513cd2fe668 from chromium

* chore: cherry-pick bb8d4c29dfdb from chromium

* chore: cherry-pick 847b11ad2fa3 from chromium

* chore: cherry-pick bce2e6728279 from pdfium

* chore: cherry-pick eeb3e031eb89 from chromium

* chore: cherry-pick a068030f5179 from v8

* chore: cherry-pick 4 changes from libaom and add new patch dirs to config.json

* chore: update patches (e sync --3 resolved; drop dawn — no M146 upstream merge)

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2026-04-19 12:47:43 -07:00
trop[bot]
7f61587762 fix: linux test shutdown error "AttributeError: type object 'DBusTestCase' has no attribute 'stop_dbus'" (#51150)
stop_dbus() was removed on 2025-09-14 by
99c4800e9e

I think CI isn't seeing this yet because its image has an older version.

This patched script should work on old & new versions of python-dbusmock.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-19 01:28:15 -07:00
Samuel Attard
03a05497a0 ci: build a patched siso for Windows builds (#51116)
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-18 03:46:10 -04:00
Samuel Attard
c2420b9f44 refactor: attach translator holder via v8::Function data slot (#51120)
refactor: attach translator holder via v8::Function data slot (#50867)

(cherry picked from commit bfa5c93332)
2026-04-17 16:49:56 -05:00
Samuel Attard
8f2ba3c176 fix: use fresh LazyNow for OnEndWorkItemImpl to fix TimeKeeper DCHECK (#51100)
fix: use fresh LazyNow for OnEndWorkItemImpl to fix TimeKeeper DCHECK (#50418)
2026-04-17 15:16:26 +02:00
trop[bot]
60abafe15c fix: fix types in devtools console for release (#51109)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2026-04-16 15:15:45 -07:00
trop[bot]
18b92afb73 chore: add Node.js skill to settings (#51107)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-16 15:11:03 -07:00
trop[bot]
c33d43bd67 fix: prevent uaf when destroying guest WebContents during event emission (#51081)
fix: prevent use-after-free when destroying guest WebContents during event emission

Multiple event emission sites in WebContents destroy the underlying C++
object via a JavaScript event handler calling webContents.destroy(), then
continue to dereference the freed `this` pointer. This is exploitable
through <webview> guest WebContents because Destroy() calls `delete this`
synchronously for guests, unlike non-guests which safely defer deletion.

The fix has two layers:

1. A new `is_emitting_event_` flag is checked in Destroy() — when true,
   guest deletion is deferred to a posted task instead of executing
   synchronously. This is separate from `is_safe_to_delete_` (which
   gates LoadURL re-entrancy) to avoid rejecting legitimate loadURL
   calls from event handlers.

2. AutoReset<bool> guards on `is_emitting_event_` are added to
   CloseContents, RenderViewDeleted, DidFinishNavigation, and
   SetContentsBounds, preventing synchronous destruction while their
   Emit() calls are on the stack.

Destroy() now requires both `is_safe_to_delete_` (navigation re-entrancy)
and `!is_emitting_event_` (event emission) to allow synchronous guest
deletion. The existing AutoReset guards on `is_safe_to_delete_` in
DidStartNavigation, DidRedirectNavigation, and ReadyToCommitNavigation
are also now effective for guests.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-16 15:27:08 -04:00
trop[bot]
e59169714a fix: show 'Electron Isolated Context' in Dev Tools (#51078)
Because of a bug after the [upstream refactor][0] Dev Tools stopped
showing 'Electron Isolated Context' in the execution context selector.
'Electron Isolated Context' runs with origin set to `file://`. Since
domain name is empty for the origin the respective UI item in the
context selector is created with an empty `subtitle`. However, with the
upstream change items with either of `title` or `subtitle` are omitted
from rendering.

Here we float an [in-review patch][1] until it is fixed upstream.

[0]: dbb61cf4b2
[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7761316

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2026-04-16 15:21:47 -04:00
trop[bot]
17d5d26499 fix: use CreateDataProperty when copying objects across contextBridge (#51084)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-16 10:57:27 -07:00
trop[bot]
8ee008ad48 fix: simpleFullScreen exits when web content calls requestFullscreen (#50985)
fix: simpleFullScreen exits when web content calls requestFullscreen

SetHtmlApiFullscreen only checked IsFullscreen() to detect that the
window was already fullscreen, missing the simple-fullscreen case on
macOS. When web content triggered requestFullscreen the code fell
through to SetFullScreen(true) which toggled simple fullscreen off.

Include IsSimpleFullScreen() in the guard so the HTML-API fullscreen
state is updated without touching the window's fullscreen mode.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
v41.2.1
2026-04-15 16:10:25 +02:00
trop[bot]
881d198dca fix: avoid window drag during corner resize in MAS build (#51002)
* fix: avoid window drag during corner resize in MAS build

Co-authored-by: Kunal Dubey <xakep8@protonmail.com>

* chore: update chromium patch offsets

Co-authored-by: Kunal Dubey <xakep8@protonmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kunal Dubey <xakep8@protonmail.com>
2026-04-15 16:10:14 +02:00
trop[bot]
af412f8073 test: add desktopCapturer icon validation (#50821)
* chore: testing of desktopCapturer can run on arm

* fix: DesktopMediaListCaptureThread crash

Fixed a crash when Windows calls ::CoCreateInstance() in the
DesktopMediaListCaptureThread before COM is initialized.

* test: added test for desktopCapturer fetchWindowIcons

* chore: updating Chromium patch hash

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kanishk Ranjan <68316017+KanishkRanjan@users.noreply.github.com>
2026-04-15 11:36:07 +02:00
trop[bot]
290d3cffef test: fixup autoupdater tests failures (#51059)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-04-15 11:00:07 +02:00
Robo
04f4d4b0e6 chore: backport cppgc cleanups (#50915)
* chore: backport cppgc cleanups

Key fixes:
- Replace `base::WeakPtrFactory` with `gin::WeakCellFactory` in
  MenuMac, MenuViews, and NetLog, since weak pointers to cppgc-managed
  objects must go through weak cells
- Replace `v8::Global<v8::Value>` with `cppgc::Persistent<Menu>` for
  the menu reference in BaseWindow
- Stop using `gin_helper::Handle<T>` with cppgc types; use raw `T*`
  and add a `static_assert` to prevent future misuse
- Add proper `Trace()` overrides for Menu, MenuMac, MenuViews, and
  NetLog to ensure cppgc members are visited during garbage collection
- Replace `SelfKeepAlive` prevent-GC mechanism in Menu with a
  `cppgc::Persistent` prevent-GC captured in `BindSelfToClosure`
- Introduce `GC_PLUGIN_IGNORE` macro to suppress
  known-safe violations: mojo::Remote fields, ObjC bridging pointers,
  and intentional persistent self-references
- Mark `ArgumentHolder` as `CPPGC_STACK_ALLOCATED()` in both Electron's
  and gin's function_template.h to silence raw-pointer-to-GC-type
  warnings

* chore: fix build
2026-04-15 16:39:44 +09:00
Samuel Attard
a8c34b8193 build: authenticate sudowoodo /token exchange via Actions OIDC (41-x-y) (#51053)
build: authenticate sudowoodo /token exchange via Actions OIDC
2026-04-14 20:44:11 -07:00
trop[bot]
ec9b4dc1b8 fix: crash when closing devtools after focus (#51037)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-14 17:45:31 -04:00
Samuel Attard
7ffb67691d ci: split macos-x64 tests into 3 shards (41-x-y) (#50974)
ci: split macos-x64 tests into 3 shards
2026-04-14 09:23:59 -07:00
Niklas Wenzel
0d4172035d fix: include missing metadata in trace files (#51021) 2026-04-13 17:09:46 -04:00
trop[bot]
b610b411d8 ci: capture fatal errors in clang problem matcher (#50997)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-04-13 13:57:01 -07:00
Niklas Wenzel
e30ba680c9 fix: preference initialization with app.setPath('sessionData') (#50958) 2026-04-13 11:13:21 -07:00
Keeley Hammond
f197c9201f chore: cherry-pick 2 changes from chromium (#50983)
* chore: cherry-pick fc10b0d6304d from chromium

[WebNN] Reject fusing per-channel quantized gemm if the quantized
dimension of filter is not 0

Bug: 493319454
Change-Id: Ib7e1236a535dc6a34d3ff9b9f0124a101bd89dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7673406
Reviewed-by: Phillis Tang <phillis@chromium.org>
Commit-Queue: Wang, Wei4 <wei4.wang@intel.com>
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1601718}

* chore: cherry-pick 41c622eea273 from chromium

[WebNN] Prevent Pool2d indirection buffer overflow in TFLite

Bug: 494158331
Change-Id: I984556f0f608badf8f73fcbb096da5f41170a958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7687618
Reviewed-by: Hu, Ningxin <ningxin.hu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Wang, Wei4 <wei4.wang@intel.com>
Cr-Commit-Position: refs/heads/main@{#1602966}
2026-04-13 10:43:52 -07:00
David Sanders
92e38b3f8d build: don't use //third_party/depot_tools in gn build scripts (#50988)
build: don't use //third_party/depot_tools in gn build scripts (#50858)
2026-04-13 09:31:19 +02:00
Keeley Hammond
3ebb08062c chore: cherry-pick 2 changes from v8 (#50991)
* 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.

Fixed: 486927780
Change-Id: I5e4921521a24cc3cd53ffb6cb5b6b6f9d98490e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7613210
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zuend <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#105489}
2026-04-13 09:27:10 +02:00
David Sanders
bd778011c0 chore: clean up clang-tidy warnings (#50921)
chore: clean up clang-tidy warnings (#50862)

* chore: use emplace and use it correctly

* chore: redundant cast to the same type [google-readability-casting]

* chore: do not create objects with +new [google-objc-avoid-nsobject-new]

* chore: default arguments on virtual or override methods are prohibited [google-default-arguments]

* chore: warning: C-style casts are discouraged; use static_cast [google-readability-casting]

CFLocaleGetValue already returns CFTypeRef so that redundant static_cast was removed

* chore: refactor block to avoid use after move warning from clang-tidy

Looks like clang-tidy couldn't tell these were two mutually exclusive
branches so there was no actual issue, but refactoring is cleaner
anyway since it makes it more DRY.

* chore: C-style casts are discouraged; use static_cast [google-readability-casting]

No cast needed here, everything is already the correct type

* chore: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting]

* chore: use '= default' to define a trivial destructor [modernize-use-equals-default]

* chore: use range-based for loop instead [modernize-loop-convert]

* chore: redundant void argument list [modernize-redundant-void-arg]

* chore: address code review feedback

* chore: use auto



---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-12 10:15:22 -05:00
trop[bot]
bbdcaf2913 chore: add Claude Code skill for Node.js upgrades (#50971)
Adds a new skill mirroring the Chromium upgrade skill, adapted for
Node.js rolls. Covers patch conflict resolution, build fix workflow,
commit guidelines, and documents high-churn patches and major version
upgrade patterns (V8 bridge patch deletions, BoringSSL complexity).

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-11 22:05:19 -07:00
trop[bot]
598f3b13a7 fix: apply IsSafeRedirectTarget to net module redirects (#50929)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:07:02 -07:00
trop[bot]
120be8544d fix: use audit token instead of PID for parent code-signature check (#50934)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:05:43 -07:00
trop[bot]
1b8a298d62 fix: use ShowItemInFolder for devtools showItemInFolder embedder message (#50937)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:05:29 -07:00
trop[bot]
aa6835662a fix: clamp autofill popup bounds to the requesting frame viewport (#50944)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:05:11 -07:00
trop[bot]
fe2e7d0073 fix: restrict window.open features to allowlisted BrowserWindow options (#50948)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:04:40 -07:00
trop[bot]
08b9d0a220 fix: respect iframe sandbox flags for external protocol navigation (#50964)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sam Attard <sattard@anthropic.com>
2026-04-11 19:04:01 -07:00
trop[bot]
afbd450ddc build: update build-tools to latest (#50801)
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:33 -04:00
trop[bot]
b239f27d53 fix: validate OSR frame geometry against shared-memory mapping size (#50940)
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:22 -07:00
trop[bot]
a2567d6e24 fix: scope extension tab-ID resolution to the calling BrowserContext (#50926)
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:25 -05:00
trop[bot]
8532a336db fix: remove decorateURL from default_app (#50898)
remove decorateURL from default_app

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
2026-04-10 18:20:37 -07:00
trop[bot]
d41f8ae706 fix: guard permission handlers in File System API tests (#50889)
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 18:30:37 +02:00
trop[bot]
b4db821b6a fix: pass root_gen_dir from GN to generate_node_headers.py (#50873)
fix: pass root_gen_dir from GN to generate_node_headers.py

PR #50828 replaced a local get_out_dir() (defaulting to 'Testing') with
the shared one from script/lib/util.py (defaulting to 'Default').
Neither default is correct because the actual output directory depends
on the active build config. Pass $root_gen_dir from the GN action so
the script always uses the correct path.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-10 18:29:49 +02:00
Shelley Vohr
5db62e9870 chore: cherry-pick 1fd9cf824950 from chromium (#50880) 2026-04-10 10:41:04 -05:00
trop[bot]
0e66d9f774 test: add cppgc backed menu leak regression test (#50882)
* spec: add menu leak regression test

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* spec: reduce menu count to remove CI flakiness

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2026-04-10 10:40:40 -05:00
trop[bot]
8720df9baa fix: return numeric blksize and blocks from asar fs.stat (#50876)
fix: return numeric `blksize` and `blocks` from asar `fs.stat`

Previously, `fs.stat` on files inside `.asar` archives returned
`undefined` for `blksize` and `blocks`, violating the Node.js API
contract where these fields must be `number | bigint`.

Use `4096` for `blksize` (matching the convention used by `memfs` and
the proposed `node:vfs` module in nodejs/node#61478) and compute
`blocks` as `ceil(size / 512)` (standard 512-byte block units).

Fixes #42686

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2026-04-10 12:15:26 +02:00
trop[bot]
45232e2ce7 fix: PDF support when site isolation trials disabled (#50845)
* fix: use proper OOPIF PDF check in `StreamsPrivateAPI`

* fix: add `ShouldEnableSubframeZoom` override to `ElectronBrowserClient` for upstream parity

* fix: add `MaybeOverrideLocalURLCrossOriginEmbedderPolicy` override to `ElectronBrowserClient` for upstream parity

* fix: add `DoesSiteRequireDedicatedProcess` override to `ElectronBrowserClient` for upstream parity

* style: move `DoesSiteRequireDedicatedProcess` to correct override section

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Noah Gregory <noahmgregory@gmail.com>
2026-04-10 12:10:35 +02:00
trop[bot]
ef2562a59a fix: external resize hit targets for frameless windows on Windows (#50863)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2026-04-10 12:07:28 +02:00
trop[bot]
f39d7d8b37 fix: restore std::deque for dynamic crash key storage (#50837)
#47171 migrated `std::deque` to `base::circular_deque` in
`shell/common/crash_keys.cc`. However, `CrashKeyString` wraps a
`crashpad::Annotation` that holds self-referential pointers and
registers itself in a process-global linked list. `circular_deque`
relocates elements on growth (via `VectorBuffer::MoveConstructRange`),
leaving those pointers dangling — causing missing crash keys or a hung
crashpad handler (especially on macOS). The `base/containers/README.md`
warns: "Since `base::deque` does not have stable iterators and it will
move the objects it contains, it may not be appropriate for all uses."

Reverts to `std::deque`, whose block-based layout never relocates
existing elements. Adds a regression test that registers 50 dynamic
crash keys and verifies they all survive a renderer crash.

Notes: Fixed crash keys being lost and the crash reporter hanging on
macOS when many dynamic crash keys were registered.

Made-with: Cursor

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alexey Kozy <alexey@anysphere.co>
2026-04-10 10:18:48 +02:00
trop[bot]
93387921c0 fix: webContents.print() ignoring mediaSize when silent (#50856)
fix: webContents.print() ignoring mediaSize when silent

PR #49523 moved the default media size fallback into OnGetDeviceNameToUse,
but the new code unconditionally writes kSettingMediaSize — clobbering
any mediaSize the caller had already set in WebContents::Print() from
options.mediaSize / pageSize. As a result, silent prints with an
explicit pageSize (e.g. "Letter") fell back to A4 with tiny content.

Only populate the default/printer media size when the caller hasn't
already supplied one, preserving the precedence:
  1. user-supplied mediaSize / pageSize
  2. printer default (when usePrinterDefaultPageSize is true)
  3. A4 fallback

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-04-09 21:02:25 -05:00
trop[bot]
0bb55bb6f2 fix: move Electron help menu links to default app only (#50859)
fix: move Electron help menu links to default app only (#50629)

* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeenat Lawal <zeenatlawal82@gmail.com>
2026-04-09 15:13:32 -07:00