Commit Graph

30433 Commits

Author SHA1 Message Date
dependabot[bot]
69a4fa20e1 build(deps): bump electron/github-app-auth-action from 2.0.0 to 2.1.0 (#51358)
Bumps [electron/github-app-auth-action](https://github.com/electron/github-app-auth-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/electron/github-app-auth-action/releases)
- [Commits](e14e47722e...5f70a3726a)

---
updated-dependencies:
- dependency-name: electron/github-app-auth-action
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 10:14:11 +02:00
dependabot[bot]
4b90a3fd78 build(deps): bump slackapi/slack-github-action from 3.0.1 to 3.0.2 (#51359)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Changelog](https://github.com/slackapi/slack-github-action/blob/main/CHANGELOG.md)
- [Commits](af78098f53...03ea5433c1)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 10:14:08 +02:00
electron-roller[bot]
966e932efa chore: bump chromium to 149.0.7812.0 (main) (#51357)
* chore: bump chromium in DEPS to 149.0.7812.0

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): declare abort in Node builtin_info

Node's builtin_info.cc uses abort() but doesn't include <cstdlib>.
It used to pick up the declaration by a transitive include, but
that broke in this libc++ roll.

This patch can be removed after it's been upstreamed to Node.js.

* SharedWorker: Enforce same-origin check for IWA and Extensions

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/7784632

* chore: node script/gen-libc++-filenames.js

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
2026-04-28 10:13:10 +02:00
Charles Kerr
de8fddcacd chore: fix linter error in spec/fixtures/crash-cases/content-tracing-before-ready/ (#51356)
chore: fix linter error in spec/fixtures/crash-cases/content-tracing-before-ready/

introduced earlier today in 6f2e5cd4
2026-04-27 21:49:16 -05:00
electron-roller[bot]
76c5257fea chore: bump chromium to 149.0.7811.0 (main) (#51300)
* chore: bump chromium in DEPS to 149.0.7809.0

* chore: bump chromium in DEPS to 149.0.7810.2

* chore: bump chromium in DEPS to 149.0.7811.0

* chore: revert [OSCrypt] Remove sync backend

Electron still depends on the synchronous os_crypt API.
Revert upstream CL 7765593 until migration to async is complete.

Followup: https://github.com/electron/electron/issues/51301
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7765593

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* fix(patch): UAF fix in OnMouseRange

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7780978

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* fix(patch): kGlicTrustFirstOnboarding references removed

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7773143

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* chore: update patches (trivial only)

* fix(patch): SubtlePassKey and profile methods updates

Re-add OSCryptImpl as a friend of crypto::SubtlePassKey (removed by
https://chromium-review.googlesource.com/c/chromium/src/+/7759877)
since Electron still uses the sync backend.

Followup: https://github.com/electron/electron/issues/51301

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* fix(patch): exclude upstream scripting API

CL 7784831 moved the Scripting API from //chrome to //extensions,
which caused duplicate symbols with Electron's own implementation.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7784831

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* 7748618: [extensions] Move MimeHandlerStreamManager

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7748618

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* 7713176: Move GetURLLoaderFactory from Profile to BrowserContext

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7713176

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* 7755340: Refactor CaptureHandle storage to PageImpl

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7755340

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* 7765593: [OSCrypt] Remove sync backend

No replacement code is needed: Electron already uses the async path.
CookieEncryptionProviderImpl (backed by OSCryptAsync) supplies
encryption to the network service via the cookie_encryption_provider
NetworkContext param, making SetEncryptionKey redundant.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7765593

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* chore: stop disabling enterprise_cloud_content_analysis

CL 7757742 moved cloud_content_scanning from unconditional deps into
a conditional block gated on enterprise_cloud_content_analysis,
safe_browsing_mode, or is_android. Since Electron sets
safe_browsing_mode = 1, the dep is still included regardless, but
explicitly overriding enterprise_cloud_content_analysis to false now
causes other targets (e.g. chrome/browser/download) to omit enterprise
connectors code that the rest of the build expects to find.

It is simpler to let it default to true than to patch around it.
Electron does not use this feature — our PerformContentAnalysisIfNeeded
is a no-op passthrough that skips straight to NotifyListenerAndEnd.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7757742

Co-Authored-By: GitHub Copilot (Claude Opus 4.6)

* chore: update patches (trivial only)

* chore: update filenames.libcxx.gni

* chore: add GPU libraries to chromedriver zip manifests

Chromedriver now has transitive runtime dependencies on libEGL,
libGLESv2, and vk_swiftshader on macOS and Windows. These are
transitive deps pulled through chromedriver_server's dependency
on //mojo/core/embedder and //net.

* fix: add MicrotasksScope for worker exit emit in ContextWillDestroy

a39108c5a4 (#47244) replaced gin_helper::EmitEvent with a direct
`v8::Function::Call()` in `WebWorkerObserver::ContextWillDestroy`
to avoid re-entering the microtask checkpoint during worker teardown.

V8 `DCHECK()`s that a policy is set. Under the old code path, this
happened with a node::CallbackScope. Under the new code path, it's
possible for a policy to not be set, causing that `DCHECK()` to fail.

This PR copies a39108c5a4's changes in `ShareEnvironmentWithContext()`:
it explicitly adds a `kDoNotRunMicrotasks` scope.

* chore: override CreateChromeMetadataPacketRecorder in tracing delegate

https://chromium-review.googlesource.com/c/chromium/src/+/7770189
product-version, os-name, and channel metadata from the legacy
ChromeEventBundle path to a new ChromeMetadataPacket recorder callback.
Override the new TracingDelegate virtual so Electron still emits these fields.

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-04-27 19:41:19 -05:00
Kunal Dubey
d6888df13b fix: honor webContents.print dpi horizontal/vertical options (#51046)
* fix: honor webContents.print dpi horizontal/vertical options

* style: fix clang-format in print dpi parsing

* style: extract print dpi key constants

* fix: use local dpi constants in print options parser
2026-04-27 16:46:46 -04:00
Om Ghante
6f2e5cd426 fix: prevent crash when calling contentTracing APIs before app is ready (#50920)
Added Browser::Get()->is_ready() guards to all contentTracing API functions (startRecording, stopRecording, getCategories, getTraceBufferUsage) so they reject their returned Promises with a clear error message instead of crashing when called before app.whenReady().

Added a crash-case fixture test that validates all four APIs reject properly before readiness and work normally after.
2026-04-27 16:44:37 -04:00
Charles Kerr
126a422cfa perf: use GIO for Browser::IsDefaultProtocolClient() on Linux (#51316)
* perf: use GIO for Browser::IsDefaultProtocolClient() on Linux

perf: use GIO for Browser::SetAsDefaultProtocolClient() on Linux

Similar to 7d6227a, this speeds up app.isDefaultProtocolClient()
by using the GIO library instead of spawning a shell command to
get the info.

* feat: log errors if g_app_info_set_as_default_for_type() fails
2026-04-27 16:31:40 -04:00
Charles Kerr
170e07eee8 fix: remove early capturer_.reset() that causes nullptr deref on next refresh (#51329)
fix: remove early capturer_.reset() that causes null deref on next refresh

Another followup to dad4ab658a: remove the `capturer_.reset()` that
`desktop_media_list.patch` was adding `Worker::RefreshNextThumbnail()`.
Since we switched from the one-shot Update() model to the continuous
StartUpdating() model, resetting `capturer_` isn't necessary and is
now dangerous: ScheduleNextRefresh() posts a delayed Worker::Refresh()
that dereferences capturer_, causing a nullptr crash.

Under CI load, the NativeDesktopMediaList can survive long enough
for the next 1-second refresh cycle to fire before FinalizeList()
destroys it. The crash can manifest as either a SIGSEGV or a
DCHECK(can_refresh()) failure, which is extra fun because dad4ab658a
was fixing a similar DCHECK crash in the first place.

Sample crash:

```
[6690:0426/173732.876803:FATAL:chrome/browser/media/webrtc/native_desktop_media_list.cc:934] DCHECK failed: can_refresh().0x00000001337aa7f3 NativeDesktopMediaList::RefreshForVizFrameSinkWindows(...) + 131
```
2026-04-27 16:30:03 -04:00
Charles Kerr
6c49cb3b27 fix: add MicrotasksScope for worker exit emit in ContextWillDestroy (#51326)
a39108c5a4 (#47244) replaced gin_helper::EmitEvent with a direct
`v8::Function::Call()` in `WebWorkerObserver::ContextWillDestroy`
to avoid re-entering the microtask checkpoint during worker teardown.

V8 `DCHECK()`s that a policy is set. Under the old code path, this
happened with a node::CallbackScope. Under the new code path, it's
possible for a policy to not be set, causing that `DCHECK()` to fail.

This PR copies a39108c5a4's changes in `ShareEnvironmentWithContext()`:
it explicitly adds a `kDoNotRunMicrotasks` scope.
2026-04-27 16:18:09 -04:00
John Kleinschmidt
002249c0ed ci: Revert "build: use 32-core Windows ARC runners for build jobs (#51256)" (#51341)
* Revert "build: use 32-core Windows ARC runners for build jobs (#51256)"

This reverts commit 099c5c0038.

* chore: put back siso patch

* Revert "fix: route ThinLTO cache through junction outside bindflt mount (#51328)"

This reverts commit 9e7a343f39.

* Revert "fix: pre-create thinlto-cache dir on Windows to avoid bindflt race (#51292)"

This reverts commit 98e91ca555.
2026-04-27 15:04:20 -04:00
Noah Gregory
411e3be571 fix: make macOS text replacement work on contenteditable (#51289)
* fix: make macOS text replacement work on `contenteditable`

* fix: remove accidentally included patch line
2026-04-27 11:09:47 -05:00
Keeley Hammond
9e7a343f39 fix: route ThinLTO cache through junction outside bindflt mount (#51328)
Pre-creating out\Default\thinlto-cache dodged the CreateDirectoryW
race on bindflt-mounted ARC runners but left CreateFileW for the
cache files inside still racy. Latest symptom (publish-x86-win on
the v43.0.0-nightly.20260425 re-run):

  lld-link: error: Failed to open cache file
  thinlto-cache\llvmcache-...: invalid argument

That is the same ERROR_INVALID_PARAMETER bindflt returns under the
concurrent ThinLTO write load, just on a different file op.

Replace the pre-created directory with a junction at
out\Default\thinlto-cache pointing to $env:TEMP\electron-thinlto-cache
on the underlying volume. The reparse point is resolved in the I/O
manager before bindflt sees per-file operations, so cache reads and
writes bypass the filter driver entirely.

Idempotent for re-runs: detects an existing junction (without
following it via Remove-Item) and a leftover real directory from
older builds.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 11:06:29 -04:00
Mitchell Cohen
ccaab437cc fix: remove insets on fullscreen windows on Windows (#51287) 2026-04-26 16:32:37 -05:00
Shelley Vohr
849485dc33 fix: dispatch toast action and reply events from WinRT activation path (#51286)
* fix: dispatch toast action and reply events from WinRT activation path

ToastEventHandler::Invoke previously returned S_OK without dispatching
whenever the activation arguments looked structured (type=action,
type=reply, or contained &tag=), on the assumption that the COM
INotificationActivationCallback::Activate path would deliver the event
instead. That assumption only holds when Windows actually invokes the
COM activator — which it does for MSIX-packaged apps launched cold, and
for unpackaged apps with a properly-registered CLSID when the app is
not already running. For non-MSIX apps with activationType="foreground"
while the app is running (the common case), Windows raises only the
in-process WinRT Activated event, so action and reply were silently
dropped.

Dispatch structured activations through the same HandleToastActivation
the COM path uses. User input (reply text, selection values) is pulled
from IToastActivatedEventArgs2::UserInput, which carries the data the
COM callback would otherwise have received via
NOTIFICATION_USER_INPUT_DATA.

Also drop the &tag= term from the structured-args check. Plain clicks
in Electron-generated XML don't carry tag=, and a custom toast_xml that
puts tag= on a click argument should now dispatch as a click rather
than being silently dropped.

* fix: release HSTRING out-params from toast activation
2026-04-26 15:31:38 -05:00
Charles Kerr
ded39eecc7 test: fix race in reentrant loadURL() ready-to-commit test (#51315)
test: fix race in reentrant loadURL() ready-to-commit test

Fix 'fails if loadurl is called after the navigation is ready to commit'
by using a done() callback to ensure the test waits for did-fail-load
before exiting.

Previously, the test would return and call afterEach(closeAllWindows),
potentially destroying the window while navigation was in flight.
2026-04-26 09:40:04 -05:00
Charles Kerr
5af1a06082 fix: crash in AutofillPopup teardown (#51302)
Fix a crash in AutofillPopupView::Show() when the popup
tried to show itself after the parent's native view had
already gone away during teardown.

2026-04-23T20:44:32.7015810Z Received signal 11 SEGV_ACCERR 000000000160
2026-04-23T20:44:32.9322010Z 4   Electron Framework  ... views::Widget::IsVisible() const + 28
2026-04-23T20:44:32.9528810Z 6   Electron Framework  ... electron::AutofillPopupView::Show() + 200
2026-04-23T20:44:32.9632090Z 7   Electron Framework  ... electron::AutofillPopup::CreateView(...) + 1380
2026-04-23T20:44:32.9749770Z 8   Electron Framework  ... electron::AutofillDriver::ShowAutofillPopup(...) + 736
2026-04-23T20:44:33.0015220Z ✗ Electron tests failed with kill signal SIGSEGV.
2026-04-25 21:59:21 -05:00
Samuel Attard
e52001b0c8 ci: run siso build as part of Apply Patches workflow (#51304)
* ci: run siso build as part of Apply Patches workflow

This adds a build-siso job that runs when DEPS or .github/siso-patches
change, so siso patch issues are detected before chromium rolls land.

https://claude.ai/code/session_01TggMjnXwKFFtuLQAsrGfA3

* ci: trigger rerun-apply-patches on siso-patches changes

https://claude.ai/code/session_01TggMjnXwKFFtuLQAsrGfA3

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-25 13:23:22 -07:00
Samuel Attard
44f030f039 fix: track Node.js and V8 header sources for build invalidation (#51225)
* fix: add inputs to node_headers target for proper invalidation

The `generate_node_headers` action had no `inputs` declared, so Ninja
would not rebuild when node or V8 header files changed. This caused
stale headers to remain in gen/node_headers after a Node.js bump,
leading to build failures with errors in files like target_agent.h.

Add inputs including the install.py script (which determines which
headers to copy), key Node.js headers, inspector headers, and V8
version headers. Changes to any of these will now trigger regeneration.

https://claude.ai/code/session_018qZ1FBZCEkmDC1sRvPQnqp

* refactor: drive node_headers inputs from filenames.auto.gni

Wire the `generate_node_headers` action's inputs through the existing
auto_filenames mechanism so there is a single source of truth for which
files should invalidate the generated node_headers directory.

`script/gen-filenames.ts` now enumerates node and v8 header files via
filesystem scan and records them under `auto_filenames.node_header_sources`
in filenames.auto.gni, alongside install.py (which drives which headers
get copied). BUILD.gn consumes the list directly as the action's `inputs`
parameter.

The list will repopulate fully the next time `ts-node script/gen-filenames.ts`
runs (via lint-staged on any JS/TS commit), the same way webpack bundle
deps are refreshed today.

https://claude.ai/code/session_018qZ1FBZCEkmDC1sRvPQnqp

* chore: update filenames

* fmt

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-25 18:03:36 +00:00
Robo
f6a99d04a4 ci: route rustc linker invocations through abs_link_wrapper (#51313)
* ci: route rustc linker invocations through abs_link_wrapper

* fix: abs path to generated cmd file

* fix: remove extra quotes around args
2026-04-25 11:34:05 -05:00
Robo
37a81876de ci: test with absolute paths for lld-link on windows (#51311)
* ci: test with absolute paths for lld-link on windows

* fix: exclude system libs

* fix: skip abs wrapper for thin archive step
2026-04-25 00:17:35 +00:00
Keeley Hammond
98e91ca555 fix: pre-create thinlto-cache dir on Windows to avoid bindflt race (#51292)
* fix: pre-create thinlto-cache dir on Windows to avoid bindflt race

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

* fix: discover ThinLTO cache path from GN instead of hardcoding

Addresses review feedback from @deepak1556: the hardcoded
`out\Default\thinlto-cache` path goes out of sync if upstream
changes `cache_dir` in Chromium's build/config/compiler/BUILD.gn.

Read the `/lldltocache:` flag from `gn desc` on a linked target
(`//electron:electron_app`) and pre-create whatever path GN
actually configured. Skips the pre-create entirely when ThinLTO
is disabled (non-official builds), which is the correct no-op.

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

* fix: run gn gen before discovering ThinLTO cache path

Previous attempt failed on Windows CI for two reasons:

1. `e init` does not run `gn gen` — out/Default is still unpopulated
   when the build step starts, so `gn desc` had nothing to introspect.
2. `e` writes informational lines to stderr (e.g. "INFO Auto-updates
   disabled"), which GitHub Actions' default $ErrorActionPreference =
   'Stop' turned into a terminating NativeCommandError before e build
   could run.

Run `gn gen` explicitly here so `gn desc` can report the effective
`/lldltocache:` path, and shell each `e` invocation through cmd.exe
so its informational stderr stays out of PowerShell's error stream.
`e build` re-uses the same generated build dir so gn gen is paid
once.

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

* fix: revert to hardcoded thinlto-cache path, document the coupling

Dynamic discovery via `gn desc` required `gn gen` to run beforehand,
and `gn gen` can't run before `e build` on Windows CI — gn.exe isn't
installed in `src/third_party/gn/` or `src/buildtools/win/gn/` until
a Chromium gclient hook that the current CI workflow doesn't trigger.
`e build` works because the restored src cache lets it skip the gen
step; any attempt to force `gn gen` earlier fails with exit 2.

Go back to pre-creating the path the upstream default currently
resolves to, and leave a comment explaining the coupling so a future
upstream relocation fails loudly (via the original LLVM error) rather
than silently.

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

---------

Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 08:50:17 -05:00
Robo
0960ddc688 ci: limit the lld concurreny on windows runners (#51310) 2026-04-24 17:18:10 +09:00
Noah Gregory
9f25fc4e06 docs: fix @electron/osx-sign package name (#51254) 2026-04-23 22:32:30 -04:00
David Sanders
e04ee76c7f build: add more checks to Chromium roll message linting (#51291) 2026-04-23 22:30:16 -04:00
Samuel Attard
bd14ed60e0 build: rebase siso patches onto siso 7bcc56206d23 (#51303)
The Chromium 149.0.7798.0 roll bumped the pinned siso revision, and
upstream added a `path/filepath` import to file_parser.go. That broke
the import-block context for the 0002 ERROR_INVALID_PARAMETER retry
patch, so `git am --3way` could no longer build a fake ancestor and the
build-siso-windows job started failing at the apply step.

Re-export both patches against the new siso SHA. No functional change to
the patched code; only line offsets, index hashes and the import context
move.
2026-04-23 19:15:12 -07:00
Keeley Hammond
56ac67bf48 build: restrict npm tarball contents to an explicit allowlist (#51293)
* 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>

* 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: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 19:14:08 -07:00
Charles Kerr
746b1b2579 chore: temporarily disable new flaky test (#51295) 2026-04-23 17:56:37 -05:00
electron-roller[bot]
b93642678c chore: bump chromium to 149.0.7798.0 (main) (#50814)
* chore: bump chromium in DEPS to 149.0.7779.0

* chore: bump chromium in DEPS to 149.0.7781.0

* 7726883: Add secondary label support to SimpleMenuModel and update views_examples

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7726883

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

* chore: update patches (trivial only)

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

* fix: IWYU for base/logging.h

Upstream is removing transitive includes of base/logging.h as part of
crbug.com/499476145. Several CLs landed in this roll that required
adding explicit includes across Electron source and patches.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7732103
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7735571

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

* 7732482: [bedrock] Create BrowserProcess setters for system tray icons

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7732482

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

* chore: update patches (trivial only)

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

* 7739543: Add RenderWidgetHostView::HasSavedFrame

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7739543

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

* chore: bump chromium in DEPS to 149.0.7783.0

* chore: bump chromium in DEPS to 149.0.7789.0

* chore: update patches (trivial only)

* 7703728: DedicatedWorker: Enforce same-origin check for main script fetch.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7703728

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

* 7720140: Remove GetPrefServiceForContext from ExtensionsBrowserClient

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7720140

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

* chore: update patches (trivial only)

* 7728375: Disable reentrancy by default except for Android and iOS

Upstream changed the default ObserverList reentrancy policy from
kAllowReentrancy to kDisallowReentrancy. Electron's observer lists
are re-entered when macOS AppKit delivers synchronous window
notifications (e.g. windowDidResignMain: during windowDidChangeOcclusionState:)
because JS event handlers can trigger window state changes mid-iteration.

Explicitly opt into kAllowReentrancy for now. A follow-up should
convert synchronous Emit calls in window observer callbacks to
EmitEventSoon to eliminate the reentrancy.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7728375

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

* chore: bump chromium in DEPS to 149.0.7791.1

* chore: update patches (trivial only)

* 7696481: [pdf] Rename PdfViewerStreamManager to MimeHandlerStreamManager

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7696481

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

* 7745796: Printing: Remove parameter from ShowScriptedPrintPreview() interface

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7745796

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

* 7688714: [Lens / Cookies] Grant secure cookie exemptions for Lens side panel

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7688714

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

* 7752609: don't show glic button for non-normal BWIs.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7752609

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

* 7749860: [media] Remove VideoFrame::WrapSharedImage with coded_size

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7749860

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

* chore: bump chromium in DEPS to 149.0.7793.0

* chore: bump chromium in DEPS to 149.0.7795.0

* chore: bump chromium in DEPS to 149.0.7797.0

* chore: update patches

* chore: remove upstreamed patches

- fix_pass_trigger_for_global_shortcuts_on_wayland.patch: https://chromium-review.googlesource.com/c/chromium/src/+/7620219
- gin_mark_argumentholder_as_cppgc_stack_allocated.patch: https://chromium-review.googlesource.com/c/chromium/src/+/7728865

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

* chore: bump chromium in DEPS to 149.0.7798.0

* chore: update filenames.libcxx.gni

* 7760061: Reland Reland Add a client-side decorated frame view for non-browser widgets on Linux

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7760061

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

* 7760945: Rename WebString::UTF8ConversionMode to Utf8ConversionMode

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7760945

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

* chore: update patches

* chore: remove upstreamed patches

- patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7761316

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

* 7719004: [extensions] Gate dict-format mime_types_handler parsing

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7719004

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

* 7716681: [pdf] Introduce MimeHandlerStreamDelegate and plumb ownership

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7716681

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

* 7725342: Rename WebString::FromUTF8 to FromUtf8 in Blink

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7725342

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

* 7615475: Add a native frame view for non-browser widgets on Linux

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7615475

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

* 7735248: Move ManifestV2ExperimentManager to //extensions

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7735248

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

* 7725187: linux: set env FC_FONTATIONS and EGL_PLATFORM early

Move Ozone pre-init from ElectronBrowserMainParts::PreEarlyInitialization()
to ElectronMainDelegate::PreSandboxStartup() to match upstream's rename
and relocation. The call has to run before threads are created.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7725187

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

* 7743280: Introduce client ID for network throttling conditions.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7743280

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

* chore: disable ml-kem node test incompatible with BoringSSL

test-crypto-pqc-key-objects-ml-kem: BoringSSL's ML-KEM support is
inconsistent with the test's OpenSSL-version-based assumptions.

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

* test: update V8 serialization wire format version to 16

V8 14.9 (Chromium 149) bumped the serialization wire format from
version 15 to 16. Update the hardcoded expected bytes in the
test-v8-serdes.js test.

Remove this patch once upstream Node.js catches up via its next
V8 roll.

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: clavin <clavin@electronjs.org>
2026-04-23 16:32:10 -05:00
Charles Kerr
7d6227ad86 perf: use GIO instead of xdg-mime for app.getApplicationNameForProtocol() (#51251)
perf: use GIO instead of xdg-mime for app.getApplicationNameForProtocol()

The Linux impl of app.getApplicationNameForProtocol() now uses
`g_app_info_get_default_for_uri_scheme()` + `g_app_info_get_display_name()`
instead of spawning a call to the `xdg-mime` shell command.

Clean up the related tests: remove the xdg-mime mock.
2026-04-23 15:09:43 -05:00
Niklas Wenzel
f99a3980e5 fix: heap profiling test flakes (#51224) 2026-04-23 14:47:32 -05:00
Mitchell Cohen
38cfc66c6f fix: ensure stable bounds on Windows when toggling setResizable for frameless windows (#51252) 2026-04-23 14:47:00 -05:00
Samuel Attard
099c5c0038 build: use 32-core Windows ARC runners for build jobs (#51256)
* build: use 32-core Windows ARC runners for build jobs

* ci: add siso patch to retry ERROR_INVALID_PARAMETER on ninja file open

The existing patch removes the redundant per-chunk re-open in
fileParser.readFile, but the single remaining os.Open per subninja can
still hit the bindflt race under the ~90k-file concurrent open burst on
the 32-core Windows runners. Layer a second patch on top that wraps that
open in a Windows-only 5-attempt retry (5-80ms backoff) so a single
transient failure no longer aborts the whole manifest load.
2026-04-23 02:23:32 -07:00
Charles Kerr
2c46abe361 test: add linux coverage for default protocol client APIs (#51253)
Add Linux-only app tests to check the default protocol handler.
This includes adding reusable XDG mock fixtures.
2026-04-23 10:10:08 +02:00
David Sanders
05e0cd085c build: drop script/run-gn-format.py (#51263) 2026-04-23 09:52:36 +02:00
Asish Kumar
7c56577639 fix: preserve return value in deprecate.removeFunction (#51028)
The wrapper returned by `deprecate.removeFunction` dropped the wrapped
function's return value because it did not `return` from `fn.apply`.
Every other function wrapper in this module (`renameFunction`,
`moveAPI`) forwards the return value, and the generic type signature
`<T extends Function>(fn: T, ...): T` promises that `T`'s return type
is preserved. Callers that relied on the return value of a function
wrapped by `removeFunction` would silently receive `undefined` from
the wrapper.

Mirror the forwarding done by `renameFunction` / `moveAPI` and extend
the existing spec to assert that the wrapper preserves both the return
value and the `this` context of the deprecated function.

Assisted-By: Claude Opus 4.6

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-04-23 00:05:30 +00:00
Robo
350de668e2 refactor: api::autoUpdater managed by cppgc (#51241) 2026-04-23 05:38:47 +09:00
Robo
111b6275ee build: track PDL files as inputs in inspector GN build (#51239)
* fix: track PDL files as inputs in inspector GN build

* chore: address review feedback
2026-04-22 13:48:44 +00:00
Charles Kerr
54eb30a642 chore: remove calls to DeprecatedLayoutImmediately (#51183)
* chore: remove calls to DeprecatedLayoutImmediately

Replace the calls to `DeprecatedLayoutImmediately` that have test
coverage.

- The docked DevTools test added last week covers the three calls in IWCV.

- api-web-contents-view-spec covers the calls from NativeWindow{Views,Mac}.

There are a couple of remaining calls that don't have test coverage yet.
I'll get to them in a followup.

* test: handle both sync or microtask layout

* refactor: add a FlushPendingRootLayout() helper
v43.0.0-nightly.20260422
2026-04-22 12:34:07 +02:00
Charles Kerr
71e8a5ca80 build: FTBFS when pdf is disabled (#51223)
fix: FTBFS when pdf is disabled

pdf_features.h has a static_assert that pdf is enabled
2026-04-22 12:33:59 +02:00
Shelley Vohr
c74de25b01 fix: ignore draggable regions in hidden WebContentsView (#51200)
fix: ignore draggable regions in hidden WebContentsView

Hidden child WebContentsViews were still contributing their draggable
regions to the parent window's non-client hit test, so clicks in the
area where a hidden view's draggable element would render still dragged
the window. Early-return HTNOWHERE when the view is not visible.
2026-04-22 12:33:41 +02:00
Samuel Attard
44e4839580 build: update @electron/get to v5 (#51234) 2026-04-21 19:54:24 -07:00
Samuel Attard
fac0a1624b build: use Yarn JsZipImpl for node-modules link to fix arm32 OOM (#51226)
* 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

* 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.
2026-04-21 17:58:46 -07:00
Robo
23d95ea9f8 refactor: api::cookies managed by cppgc (#51196)
* refactor: api::cookies managed by cppgc

* chore: remove unused header
2026-04-22 05:28:31 +09:00
Shelley Vohr
89050762c6 fix: reset printToPDF queue after a rejection (#51174)
fix: reset printToPDF queue after a rejection

The module-scoped `pendingPromise` in `webContents.printToPDF` was chained
with `.then(onFulfilled)` and never cleared. Once a call rejected (e.g.
an out-of-range `pageRanges` like `"999"`), subsequent calls chained onto
the rejected promise and short-circuited without ever invoking
`_printToPDF` — so every following call re-surfaced the original error.

Replace the shared variable with a per-`WebContents` `WeakMap` queue that
swallows prior rejections before chaining and clears its entry once the
tail drains.
2026-04-21 11:36:02 -07:00
Niklas Wenzel
b8be33814e fix: skip heap profiling tests in CI (#51209) 2026-04-21 18:26:14 +00:00
Mr.Chaofan
76a03e1010 feat: Add WebContents::Clone method (#49959) 2026-04-21 10:37:48 -07:00
Shelley Vohr
2ba6d28c09 fix: preserve transparency across setResizable toggles on Windows (#51175)
After #49428 made `NativeWindowViews::CanResize()` return `resizable_`
for frameless windows (instead of `resizable_ && thick_frame_`),
`HWNDMessageHandler::SizeConstraintsChanged()` started adding
`WS_THICKFRAME` to the window style whenever `CanResize()` reported true.
`WS_THICKFRAME` is incompatible with layered (translucent) windows and
destroys their transparency.

`SetContentSizeConstraints` already guards against this by skipping
`OnSizeConstraintsChanged()` when `!thick_frame_`. `SetResizable` did
not, so toggling resizability on a transparent window (e.g.
`setResizable(false)` then `setResizable(true)`) caused the Chromium
path to add `WS_THICKFRAME` and strip transparency.

Apply the same guard in `SetResizable`. Min/max constraints are still
enforced — Chromium reads them from the widget delegate on every
`WM_GETMINMAXINFO`, independent of `SizeConstraintsChanged()`.
2026-04-21 10:32:29 -07:00
Charles Kerr
5ed6e4bf62 test: add Linux-specific test for app.getApplicationNameForProtocol() (#51197)
* test: add Linux-specific test for getApplicationNameForProtocol()

On Linux, use XDG env vars to inject a mock that we can use
to test app.getApplicationNameForProtocol().

* fixup! test: add Linux-specific test for getApplicationNameForProtocol()

better system mocks
2026-04-21 10:16:14 -07:00
Charles Kerr
4d780c67f9 test: improve browser window layout coverage (#51189)
* test: browser window webContents viewport matches content bounds

* test: browser window webContents same after vibrancy change

* fixup! test: browser window webContents viewport matches content bounds

* refactor: extract-method helper getViewportSize()

* refactor: remove non-spec change

* chore: more accurate naming
2026-04-21 10:06:49 -07:00