mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
main
388
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
708d5fe414 |
chore: bump chromium to 158.0.8127.0 (main) (#55378)
* chore: bump chromium in DEPS to 158.0.8126.0 * chore: update siso revision * chore: update patches * build: rebase siso patches onto siso dfc32e4 Upstream https://chromium-review.googlesource.com/c/build/+/8609448 (146ec3de) passes grpc.WaitForHandlers(true) to the reapitest fake server, conflicting with our UnaryInterceptor plumbing on the same grpc.NewServer() call. Seed our server options with upstream's. Skip-Lint: siso patch rebase; siso CLs don't map to Chromium versions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 158.0.8127.0 * chore: update patches --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a4b0cc65a5 |
refactor: generate PreloadRealmGlobalScope IDL bindings in //electron (#55165)
* refactor: use PreloadRealmGlobalScope for service worker preloads
Service worker preload scripts ran in Blink's ShadowRealmGlobalScope.
The ShadowRealm proposal has stalled, so Chromium may remove that class.
A new Chromium patch adds PreloadRealmGlobalScope, a global scope that
exposes the same interfaces without depending on any ShadowRealm code,
and Electron now creates the preload context with it.
Uncaught errors and unhandled rejections in a service worker preload
script are now reported through the worker's console. Before, they hit
NOTREACHED() in ShadowRealmGlobalScope.
Calling getEventListeners() from the DevTools console in the preload
context no longer crashes the renderer.
* refactor: generate PreloadRealmGlobalScope IDL bindings in //electron
* ci: normalize include paths in Windows gen headers for clang-tidy
The Windows clang-tidy job runs in a Linux container using generated
headers downloaded from out_gen_artifacts_win_x64. On Windows, Python
code generators such as inspector_protocol/code_generator.py use
os.path.join() and emit backslashes in #include directives, causing
Linux Siso scandeps and clang-tidy on RBE workers to fail with:
gen/third_party/blink/renderer/core/inspector/protocol/forward.h:15:10: error: 'third_party/inspector_protocol\crdtp/error_support.h' file not found [clang-diagnostic-error]
15 | #include "third_party/inspector_protocol\crdtp/error_support.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* fixup! normalize include paths in Windows gen headers for clang-tidy
* fix: resolve root worker context for ShadowRealms nested in preload realms
When a ShadowRealm is created inside a service worker preload realm
(e.g. with --harmony-shadow-realm), its initiator ExecutionContext is
PreloadRealmGlobalScope rather than a WorkerOrWorkletGlobalScope or
ShadowRealmGlobalScope. Previously, GetRootInitiatorExecutionContext()
only walked initiators via To<ShadowRealmGlobalScope>(), which either
stopped at PreloadRealmGlobalScope (failing the subsequent
To<WorkerOrWorkletGlobalScope>() cast on unhandled rejections or console
messages) or performed an invalid downcast to ShadowRealmGlobalScope.
Delegate GetRootInitiatorExecutionContext() to
initiator_execution_context_->GetRootExecutionContext() so nested
ShadowRealms walk through PreloadRealmGlobalScope to the underlying
ServiceWorkerGlobalScope.
* fix: use Supplement<ExecutionContext> for PreloadRealmLifetimeController
Replace V8 embedder data slot storage in PreloadRealmLifetimeController with
blink::Supplement<ExecutionContext> so it cannot collide with NodeBindings
storing node::IsolateData* in kElectronContextEmbedderDataIndex
or require a persistent self root.
* build: track blink pydeps
* chore: update patches
---------
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
|
||
|
|
863cbdd57d |
build: update PGO profiles (#55317)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
efef1ddd83 |
chore: bump chromium to 158.0.8111.0 (main) (#55110)
* chore: bump chromium in DEPS to 158.0.8111.0 * chore: update siso revision * chore: remove upstreamed patches Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8454983 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8567285 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8268365: Reduce includes in ui/display/display.h Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8268365 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8351530: extensions: Migrate extensions/ Event constructors to scoped_refptr ExtensionsBrowserClient::BroadcastEventToRenderers now takes a scoped_refptr<const EventArgs>, and the by-value extensions::Event constructors were removed. Mirror EventRouterForwarder: share the args across browser contexts when kShareEventArgsOnDispatch is enabled, otherwise clone them per context as before. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8351530 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8238373 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8594202: Roll BoringSSL from 5b83e5d1abf0 to 437b75f34c38 (6 revisions) Refs https://chromium-review.googlesource.com/c/chromium/src/+/8594202 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> |
||
|
|
99210aea72 | build: update NMV to 154 (#54895) | ||
|
|
03461bac82 |
build: stop overriding node GN declare_args defaults in patch (#55042)
The build_add_gn_build_files node patch changed several defaults in node.gni's declare_args() and hardcoded BoringSSL in unofficial.gni, even though those are build args meant to be set by the embedder. - Set node_v8_path and node_use_v8_platform from build/args/all.gn and restore upstream's defaults in the patch. - Restore upstream's node_use_node_snapshot default; the later startup snapshot patch replaces it anyway, so the end result is unchanged. - Drop the unofficial.gni hunk replacing $node_openssl_path with //third_party/boringssl, since all.gn already sets node_openssl_path to that value. node_path stays patched: node_module_version's default in the same declare_args() block runs exec_script() on $node_path, and GN evaluates it against node_path's default even when it is overridden, so gn gen fails if it only comes from args. Claude-Session: https://claude.ai/code/session_01E1JKPsp6CSJJNzT5UKpfJ1 Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f3636b8927 |
feat: support Widevine CDM (#50046)
* patches: add chromium cdm renderer visibility patch patch-reason: 2 Electron needs //electron visibility on //components/cdm/renderer to build Electron-specific CDM renderer integration. * build: enable Widevine support by default * docs: address Widevine review feedback * fix: address Widevine CI failures * fix: address Widevine initialization review feedback * fix: restrict Widevine path loading in packaged apps * test: fix packaged Widevine path coverage * docs: remove Widevine CDM sourcing instructions * docs: format Widevine EME example |
||
|
|
4565cf72fa |
build: update v8_embedder_string from net patch effects (#54618)
* fix: derive V8 cache compatibility from net patch effects Replace the custom V8 cache salt and Wasm embedded blob guard from #54234 with embedder string version hashing. Generate -electron.<16-hex fingerprint> during GN configuration from the net committed changes between Chromium's pinned V8 revision and patched HEAD. This requires no release time bookkeeping and preserves cache identities across packaging only changes to the patch series. * build: fix metadata generation and restoration * build: address review follow-ups - Keep code cache hash checks free of process global mutation - Limit the helper to DCHECK enabled builds - Make the fingerprint algorithm self contained and include it in the source cache key - Allow an explicit packager identity - Skip Wasm tests without generated assets - Correct the documentation structure * build: simplify V8 fingerprint regeneration tracking Track Git HEAD and the exported V8 patch series instead of symbolic branch refs, packed-refs, or Git directories. Detached checkout updates and patch exports trigger regeneration, while equivalent re-exports preserve the committed source fingerprint. Reject reftable storage explicitly and provide actionable diagnostics when the checkout does not contain Chromium's pinned V8 revision. * fix: gn check for release builds * chore: convert to vitest imports * chore: cleanup testing binding dependency * chore: update patches * chore: remove redundant dep declaration |
||
|
|
572906f42c |
build: use clang modules (#54812)
Claude-Session: https://claude.ai/code/session_01GkpQ9nmAGxxVpwT8wPzfbC Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
f66b295009 |
chore: bump chromium to 157.0.8103.0 (main) (#54879)
* chore: bump chromium in DEPS to 157.0.8103.0 * chore: update patches Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: update siso revision Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * 8546315: [Extensions] Add filtered event listener metrics Upstream added an inline distinct_count() that calls entries_.size() on a std::vector of the forward-declared ValueCounter::Entry. With libcxx_abi_unstable=false that needs a complete type, so move it out of line alongside is_empty(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8546315 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * 8518058: [ExclusiveAccess] Remove dead pointer lock permission prompt state Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8518058 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * 8540814: [DevTools] Enforce local-frontend embedder checks in dispatcher Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8540814 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> --------- Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
3da8468c48 |
feat: support heap profiling in contentTracing (#53349)
* feat: support heap profiling in contentTracing Integrate Chromium's trace-scoped native heap profiler with contentTracing.startRecording() and emit protobuf traces when heap profiling is enabled. This adapts the related Chromium changes: https://chromium-review.googlesource.com/c/chromium/src/+/8163651 https: //chromium-review.googlesource.com/c/chromium/src/+/8263276 Co-Authored-By: GitHub Copilot (GPT-5.3-Codex) <175728472+Copilot@users.noreply.github.com> * ci: suppress by-design PoissonAllocationSampler leak under LSan The heap-profiling contentTracing specs are the first tests to engage the native sampling heap profiler, whose sampled-address hash set deliberately leaks its previous map on growth (see PoissonAllocationSampler::BalanceAddressesHashSet), tripping the linux-x64-asan job at shutdown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ntRtbDdSvAdYJ9qRJHfJu Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: apply review suggestions * chore: rename sampling_interval_ms to dump_interval_ms for clarity * chore: don't use setTimeout because it can cause flakes * chore: fixup build failure * chore: update patch after rebase * chore: update patch after rebase * chore: update to match current patch * chore: update yarn.lock after rebase * chore: move all of content tracing to Perfetto protobuf * chore: update patch after rebase * chore: remove upstreamed patch * chore: update native heap profiler test for CI contention * chore: address review feedback * chore: address additional feedback --------- Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: GitHub Copilot (GPT-5.3-Codex) <175728472+Copilot@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
9e1fffcfb5 |
chore: bump chromium to 157.0.8091.0 (main) (#54740)
* chore: bump chromium in DEPS to 157.0.8091.0 * chore: update siso revision * 8518399: [Fullscreen] Reject requestFullscreen() when FullscreenAllowed is false Upstream moved the kFullscreenAllowed pref check into a new IsFullscreenAllowedByPref() helper that is now consulted from both CanEnterFullscreenModeForTab() and EnterFullscreenModeInternal(). Electron has no Profile (ExclusiveAccessContext::GetProfile() returns nullptr), so guarding only the old call site would now reject every fullscreen request on non-Mac platforms. Disable the pref lookup inside the helper instead so it always allows fullscreen. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8518399 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 7867823: [android] Add a feature to propagate occlusion to viz DisplayPrivate::SetDisplayVisible() now takes a viz::mojom::DisplayVisibility enum instead of a bool. Keep the display kVisible whenever background throttling is disabled, and kInvisible only when throttling is enabled and the compositor is hidden. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7867823 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8510323: Use C++20 std::numbers::e and std::numbers::sqrt2 in blink Remove the cherry-pick patch now that the upstream change has rolled in. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8510323 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8403316: [content] Add ContentClient::Schemes::code_cache_schemes Upstream landed the embedder code cache scheme list that feat_allow_code_cache_in_custom_schemes.patch added (it cites the patch's earlier CL 5019665), so the patch is removed. The upstream version records the schemes in blink::CommonSchemeRegistry rather than in url::SchemeRegistry, so: - RegisterSchemesAsPrivileged() now calls CommonSchemeRegistry::RegisterURLSchemeAsSupportingCodeCache() for custom schemes with codeCache enabled. The browser process registers these after RegisterContentSchemes() has already run, so it cannot rely on ContentClient::Schemes for them. Renderers keep registering them as CodeCacheWithHashing from the --code-cache-schemes switch. - ElectronContentClient lists chrome-extension in Schemes::code_cache_schemes, matching ChromeContentClient, since the browser-side checks no longer special-case IsExtensionScheme(). - feat_allow_enabling_extensions_on_custom_protocols.patch loses the removed url::AddCodeCacheScheme() lines from its context. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8403316 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8362417: content: Add CopyFromSurfaceSecure and plumb is_secure to capturer RenderWidgetHostViewBase::CopyFromSurface() is now final and dispatches to CopyFromSurfaceImpl(), which takes is_copy_request_secure and must pass it on to DelegatedFrameHost::CopyFromCompositingSurface(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8362417 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8499040: Decisions API: Add Blink IDL, Mojo interfaces, Echo impl, and WPTs Stub the new AIManager decision model methods as unavailable, like the other unsupported AI APIs. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8499040 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8349225: Decouple Cookies API from Profile via CookiesApiDelegate ExtensionsBrowserClient::GetBrowserContextLifetimeTracker() is now pure virtual. Electron has no off-the-record sibling contexts to track, so return nullptr, which the cookies API handles. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8349225 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8285500: hid: Restrict WebHID access in guest and partitioned contexts HidDelegate::IsHidAllowedForFrame() is now pure virtual and gates HidService creation. Mirror ElectronUsbDelegate::PageMayUseUsb(): deny WebViewGuests and HTTP(S) pages in non-default storage partitions. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8285500 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8488316: [Linux] Query XDG portal versions per interface RequestXdgDesktopPortal() now takes the portal interface whose version to report; pass the FileChooser interface. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8488316 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8508466: Remove duplicate DownloadManager::CreateDownloadItem() overload Pass an empty display_name, as the removed overload did. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8508466 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8357569: Move Cookies API implementation to //extensions Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8357569 * 8485746: gin: Use v8::CppHeapExternal for CallbackHolderBase Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8485746 * fix: re-enable v8 metagen Skip-Lint: enabling a feature with cherry picked CL. * fixup! 8499040: Decisions API: Add Blink IDL, Mojo interfaces, Echo impl, and WPTs * 8526928: Reland "Mac: Activate the widget when focusing a View in an inactive widget" FocusManager::SetFocusedViewWithReason() now activates an inactive widget before focusing a View in it on macOS, and NativeWidgetMacNSWindowHost::OnIsFirstResponderChanged() no longer restores focus while the window is not key. Forward both notifications to super so the views host tracks the window's key status. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8526928 * fix: stop the remote debugging HTTP server on shutdown DevToolsHttpHandler keeps a raw_ptr to the DevToolsManagerDelegate owned by the DevToolsManager singleton, which is destroyed at exit. Electron never stopped the HTTP server, so the delegate was freed while the handler still pointed at it. Skip-Lint: raw_ptr shutdown crash fix --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> |
||
|
|
18f7d6cc5c |
chore: bump chromium to 157.0.8085.0 (main) (#54590)
* chore: bump chromium in DEPS to 157.0.8079.0 * chore: update patches * 8426044: Deduplicate notifications for find-in-page Upstream removed WebContentsDelegate::FindReply() in favor of WebContentsObserver::DidReceiveFindReply(). Moved Electron's found-in-page handling from the delegate forwarder to the observer forwarder on the NativeLifecycle peer. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8426044 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8471431: siso: don't include optional LLVM tools in clang inputs https://crrev.com/c/8471431 narrowed the third_party/llvm-build/Release+Asserts:headers filegroup glob from bin/clang-* to bin/clang-cl, bin/clang-cl.exe and bin/clang-[0-9]*. siso uploads that filegroup as a precomputed subtree and drops other inputs under it, so bin/clang-tidy no longer reached the RBE workers and the clang-tidy steps failed with exit 127. build-tools now adds bin/clang-tidy back to that filegroup: https://github.com/electron/build-tools/pull/910 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8471431 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V38FjDEdZgMvFpf5Fmp65m * chore: bump chromium in DEPS to 157.0.8081.0 * 8469895: [VideoCapture] Remove unsafe lifetime assumptions in InProcessVideoCaptureDeviceLauncher Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8469895 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8261571: dbus: Let desktop Linux end the session instead of crashing when a bus is lost Upstream landed Bus::Options::disconnected_callback and a reworked dbus_thread_linux that takes the embedder's callback via Initialize(), which supersedes both the backport patch and the downstream SetDisconnectedCallback() shim. Removed both patches and switched ElectronBrowserMainParts to dbus_thread_linux::Initialize(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8261571 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8470272: [find-in-page] Fix endless frame traversal around an inner WebContents Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8470272 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8424588: [mojo] (Mostly) ban untyped `handle` use TakeHeapSnapshot now takes handle<platform>, so the browser passes the mojo::PlatformHandle directly and the renderer receives it without unwrapping. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8424588 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8465643: Forward proxy auth for requests without login prompts Plumb the new do_not_prompt_for_login flag through URLLoaderNetworkObserver, SimpleURLLoaderClient and CreateLoginDelegate. Electron keeps routing these challenges to the 'login' event, which is its non-UI credential source, mirroring how Chrome still consults extensions for them. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8465643 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8422739: Enforce cross-origin access control in WebUIURLLoaderFactory CreateWebUIURLLoaderFactory now requires a request initiator origin lock. Pass the frame's initiator origin that content already hands to RegisterNonNetworkSubresourceURLLoaderFactories; the lock only gates chrome-untrusted:// initiators, so component extensions keep their access to chrome://resources. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8422739 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: bump chromium in DEPS to 157.0.8083.0 * 8497008: CATransaction: Clean up old flags Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8497008 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8499815: Ruff: reformat third_party/blink. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8499815 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8455902: gin: Mark Invoker as stack allocated and drop raw_ptr for its Arguments Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8455902 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8469168: Change DataPipeGetter::Read to return result as base::expected Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8469168 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8480632: Ignore stale UpdateDragOperation replies from non-current RWH on Android Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8480632 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: bump chromium in DEPS to 157.0.8085.0 * chore: update patches * 8463605: [Clear-Site-Data] Prevent cross-site fetch clearing unpartitioned data Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8463605 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8448270: [Linux] Support XDG NetworkMonitor portal in NetworkChangeNotifierLinux The browser process now opens a private session bus for the portal, with no Bus::Options::disconnected_callback, so it aborts when the session bus is lost. That is what fails "when a D-Bus bus goes away > exits cleanly instead of crashing" on Linux. Carry the upstream fix until it rolls in. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8448270 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8512441#nolint * 8465423: Use C++20 std::numbers::pi in blink Backport the upstream fix for Windows math constants. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8465423 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8510323#nolint * 8489251: Exit tab fullscreen when the held-Esc timer fires under keyboard lock Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8489251 * 8366647: [snapshot] Optional SHA256 code cache source hashing Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8366647 * fix: disable V8 metagen feature Refs https://issues.chromium.org/issues/531344950 Skip-Lint: General feature disablement, no specific to a particular CL. * 8503816: Enable AperitifHelpers by default Disable AperitifHelpers on macOS until Electron adopts the new helpers. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8503816 * build: pin build-tools to merged siso clang-tidy fix electron/build-tools#910 squash-merged as 32e2253f7c5696d85a77fe19d54d284cf9a62322; re-pin from the PR branch commit a411ee5 so CI no longer depends on the deleted branch. Skip-Lint: build-tools pin, not a Chromium CL adaptation Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V38FjDEdZgMvFpf5Fmp65m --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> |
||
|
|
e91b6a0ab5 |
build: update PGO profiles (#54642)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
07a3f54605 |
build: enable dangling raw_ptr checks (#54619)
* fix: clear vibrancy view before destruction Keep the removed NativeViewHost alive until vibrant_native_view_host_ has been cleared. Memory was freed at: 0 Electron Framework 0x000000012b8e4940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012b8cfa00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x000000012b8ea86c base::allocator::(anonymous namespace)::DanglingRawPtrDetected(unsigned long) + 764 3 Electron Framework 0x000000012b996bcc void partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)8>(void*) + 5392 4 Electron Framework 0x00000001335fe8f4 views::NativeViewHost::~NativeViewHost() + 16 5 Electron Framework 0x0000000124916004 ___ZN8electron15NativeWindowMac11SetVibrancyERKNSt4__Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi_block_invoke + 140 6 Electron Framework 0x0000000124915a74 electron::NativeWindowMac::SetVibrancy(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, int) + 1048 The dangling raw_ptr was released at: 0 Electron Framework 0x000000012b8e4940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012b8cfa00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x000000012b8eb158 void base::allocator::(anonymous namespace)::DanglingRawPtrReleased<(base::features::DanglingPtrMode)1, (base::features::DanglingPtrType)0>(unsigned long) + 92 3 Electron Framework 0x000000012b93c3b4 base::internal::RawPtrBackupRefImpl<false>::ReleaseInternal(unsigned long) + 480 4 Electron Framework 0x0000000124916058 ___ZN8electron15NativeWindowMac11SetVibrancyERKNSt4__Cr12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi_block_invoke + 224 5 Electron Framework 0x0000000124915a74 electron::NativeWindowMac::SetVibrancy(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, int) + 1048 * fix: clear notification delegate before callback Release delegate_ before NotificationDestroyed() can synchronously delete the delegate. Memory was freed at: 0 Electron Framework 0x000000012b8e4940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012b8cfa00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x000000012b8ea86c base::allocator::(anonymous namespace)::DanglingRawPtrDetected(unsigned long) + 764 3 Electron Framework 0x000000012b9aa080 void partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)22>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)22)>::Type) + 5928 4 Electron Framework 0x000000012b99f940 void partition_alloc::PartitionRoot::FreeInUnknownRoot<(partition_alloc::internal::FreeFlags)22>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)22)>::Type) + 1324 5 Electron Framework 0x000000012b9c3a50 allocator_shim::internal::PartitionAllocFunctionsInternal<(partition_alloc::internal::AllocFlags)16, (partition_alloc::internal::FreeFlags)6>::FreeWithSize(void*, unsigned long, void*) + 200 6 Electron Framework 0x00000001247f797c electron::Notification::~Notification() + 72 7 Electron Framework 0x0000000124919fbc electron::CocoaNotification::~CocoaNotification() + 220 8 Electron Framework 0x000000012491a014 electron::CocoaNotification::~CocoaNotification() + 12 9 Electron Framework 0x00000001247f81cc electron::NotificationPresenter::RemoveNotification(electron::Notification*) + 200 The dangling raw_ptr was released at: 0 Electron Framework 0x000000012b8e4940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012b8cfa00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x000000012b8eb158 void base::allocator::(anonymous namespace)::DanglingRawPtrReleased<(base::features::DanglingPtrMode)1, (base::features::DanglingPtrType)0>(unsigned long) + 92 3 Electron Framework 0x000000012b93c3b4 base::internal::RawPtrBackupRefImpl<false>::ReleaseInternal(unsigned long) + 480 4 Electron Framework 0x00000001247f7a50 electron::Notification::~Notification() + 284 5 Electron Framework 0x0000000124919fbc electron::CocoaNotification::~CocoaNotification() + 220 6 Electron Framework 0x000000012491a014 electron::CocoaNotification::~CocoaNotification() + 12 7 Electron Framework 0x00000001247f81cc electron::NotificationPresenter::RemoveNotification(electron::Notification*) + 200 * fix: erase notifications before destruction Remove each raw_ptr from notifications_ before deleting the Notification it references. Memory was freed at: 0 Electron Framework 0x000000012cacd6e0 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012cab6968 base::debug::StackTrace::StackTrace(unsigned long) + 168 2 Electron Framework 0x000000012cad3a24 base::allocator::(anonymous namespace)::DanglingRawPtrDetected(unsigned long) + 764 3 Electron Framework 0x000000012cbbb9ac void partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)22>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)22)>::Type) + 5868 4 Electron Framework 0x000000012cbb1264 void partition_alloc::PartitionRoot::FreeInUnknownRoot<(partition_alloc::internal::FreeFlags)22>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)22)>::Type) + 1324 5 Electron Framework 0x000000012cbd522c allocator_shim::internal::PartitionAllocFunctionsInternal<(partition_alloc::internal::AllocFlags)16, (partition_alloc::internal::FreeFlags)6>::FreeWithSize(void*, unsigned long, void*) + 200 6 Electron Framework 0x00000001258ed394 electron::NotificationPresenter::~NotificationPresenter() + 72 7 Electron Framework 0x0000000125a0ee60 electron::NotificationPresenterMac::~NotificationPresenterMac() + 356 8 Electron Framework 0x0000000125a0ef00 electron::NotificationPresenterMac::~NotificationPresenterMac() + 12 9 Electron Framework 0x0000000125868dfc electron::ElectronBrowserClient::~ElectronBrowserClient() + 500 The dangling raw_ptr was released at: 0 Electron Framework 0x000000012cacd6e0 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x000000012cab6968 base::debug::StackTrace::StackTrace(unsigned long) + 168 2 Electron Framework 0x000000012cad3aec void base::allocator::(anonymous namespace)::DanglingRawPtrReleased<(base::features::DanglingPtrMode)0, (base::features::DanglingPtrType)0>(unsigned long) + 84 3 Electron Framework 0x000000012cb27fc8 base::internal::RawPtrBackupRefImpl<false>::ReleaseInternal(unsigned long) + 480 4 Electron Framework 0x00000001258b87c8 void std::__Cr::__destroy_at[abi:sqn240000]<base::raw_ptr<DraggableRegionProvider, (partition_alloc::internal::RawPtrTraits)0>>(base::raw_ptr<DraggableRegionProvider, (partition_alloc::internal::RawPtrTraits)0>*) + 136 5 Electron Framework 0x00000001258eda14 std::__Cr::__tree<base::raw_ptr<electron::Notification, (partition_alloc::internal::RawPtrTraits)0>, std::__Cr::less<base::raw_ptr<electron::Notification, (partition_alloc::internal::RawPtrTraits)0>>, std::__Cr::allocator<base::raw_ptr<electron::Notification, (partition_alloc::internal::RawPtrTraits)0>>>::__tree_deleter::operator()[abi:sqn240000](std::__Cr::__tree_node<base::raw_ptr<electron::Notification, (partition_alloc::internal::RawPtrTraits)0>, void*>*) + 52 6 Electron Framework 0x00000001258ed3d4 electron::NotificationPresenter::~NotificationPresenter() + 136 7 Electron Framework 0x0000000125a0ee60 electron::NotificationPresenterMac::~NotificationPresenterMac() + 356 8 Electron Framework 0x0000000125a0ef00 electron::NotificationPresenterMac::~NotificationPresenterMac() + 12 9 Electron Framework 0x0000000125868dfc electron::ElectronBrowserClient::~ElectronBrowserClient() + 500 * fix: clear Node environment before teardown Clear NodeBindings::uv_env_ before NodeService releases the node::Environment. Memory was freed at: 0 Electron Framework 0x0000000129b78940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x0000000129b63a00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x0000000129b7e86c base::allocator::(anonymous namespace)::DanglingRawPtrDetected(unsigned long) + 764 3 Electron Framework 0x0000000129c3c93c void partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)18>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)18)>::Type) + 8480 4 Electron Framework 0x0000000129c33390 void partition_alloc::PartitionRoot::FreeInUnknownRoot<(partition_alloc::internal::FreeFlags)18>(void*, partition_alloc::FreeHint<partition_alloc::internal::FreeFlags partition_alloc::internal::FreeHintFlags<partition_alloc::internal::FreeFlags>(partition_alloc::internal::FreeFlags)((partition_alloc::internal::FreeFlags)18)>::Type) + 1324 5 Electron Framework 0x0000000129c56ce8 allocator_shim::internal::PartitionAllocFunctionsInternal<(partition_alloc::internal::AllocFlags)16, (partition_alloc::internal::FreeFlags)2>::FreeWithSize(void*, unsigned long, void*) + 200 6 Electron Framework 0x0000000122c4bd24 node::FreeEnvironment(node::Environment*) + 248 7 Electron Framework 0x0000000122b3a74c _ZNSt4__Cr20__shared_ptr_pointerB9sqn240000IPN4node11EnvironmentEZN8electron12NodeBindings17CreateEnvironmentEPN2v87IsolateENS6_5LocalINS6_7ContextEEEPNS1_20MultiIsolatePlatformEmNS_6vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENSI_ISK_EEEESM_NS_8optionalIN4base17RepeatingCallbackIFvvEEEEEE3$_0NSI_IS2_EEE16__on_zero_sharedEv + 188 8 Electron Framework 0x0000000122b7ee40 electron::NodeService::~NodeService() + 416 9 Electron Framework 0x0000000122b7ef2c electron::NodeService::~NodeService() + 12 The dangling raw_ptr was released at: 0 Electron Framework 0x0000000129b78940 base::debug::CollectStackTrace(base::span<void const*, 18446744073709551615ul, void const**>) + 24 1 Electron Framework 0x0000000129b63a00 base::debug::StackTrace::StackTrace(unsigned long) + 128 2 Electron Framework 0x0000000129b7e934 void base::allocator::(anonymous namespace)::DanglingRawPtrReleased<(base::features::DanglingPtrMode)0, (base::features::DanglingPtrType)0>(unsigned long) + 84 3 Electron Framework 0x0000000129bd03b4 base::internal::RawPtrBackupRefImpl<false>::ReleaseInternal(unsigned long) + 480 4 Electron Framework 0x0000000122b34b94 electron::NodeBindings::~NodeBindings() + 372 5 Electron Framework 0x0000000122bde08c electron::NodeBindingsMac::~NodeBindingsMac() + 12 6 Electron Framework 0x0000000122b7edf8 electron::NodeService::~NodeService() + 344 7 Electron Framework 0x0000000122b7ef2c electron::NodeService::~NodeService() + 12 * fix: enable dangling raw_ptr checks * fix: avoid retaining isolate in PromiseBase Resolve PromiseHandle traced references with the currently entered isolate instead of retaining a raw pointer that can outlive IsolateHolder. Promise operations already require execution on their creation thread with the isolate entered. ``` gin::IsolateHolder::~IsolateHolder -> JavascriptEnvironment::~JavascriptEnvironment -> isolate free static Promise<void> destruction -> PromiseBase::~PromiseBase -> isolate_ raw_ptr release ``` * fix: annotate additional dangling raw pointers * fix(win): annotate additional dangling raw_ptr |
||
|
|
c33abcb2da |
chore: bump chromium to 156.0.8077.0 (main) (#54527)
* chore: bump chromium in DEPS to 156.0.8077.0 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * chore: update siso revision --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> |
||
|
|
069b0a9fe3 |
chore: bump chromium to 156.0.8076.0 (main) (#54318)
* chore: bump chromium in DEPS to 156.0.8073.0 * 8409748: Update RenderWidgetHostViewBase::host_ lifetime Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8409748 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8410048: [dcheck-to-check] Convert DCHECKs in content/browser/ [34/n] Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8410048 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8401889: [Win] Read GetLastError() right after CreateFile() in ProcessSingleton Upstream now reads GetLastError() inside the TRACE_EVENT0 scope, which is the same fix this patch carried, so drop that hunk. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8401889 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8293899: Android: Enable ThemeService for WebUI NTP Upstream moved the //chrome/browser/themes dependency from a per-platform conditional into the unconditional deps of the mixers target, so the patch now removes it from that list instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8293899 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8412026: [mac] Support video capture lock on macOS Keep the compositor unsuspended when the window is headless, visible, or has an active video capture lock. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8412026 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8404074: [posix] Don't call SetNonBlocking() inside DCHECK() in ProcessSingleton Upstream made the same change, so drop the hunk from this patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8404074 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8421647: media: Move GPU/graphics client utilities to media/gfx/ Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8421647 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8361191: [api] Add MicrotaskQueue::SetMicrotasksPolicy()/GetMicrotasksPolicy() V8 now exposes the per-queue microtasks policy on v8::MicrotaskQueue, so remove the patch that added it and switch node_util.cc to the upstream SetMicrotasksPolicy()/GetMicrotasksPolicy() names. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8361191 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: remove upstreamed patches Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8455783 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8455325 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8431509 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8402403 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8402402 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * chore: update siso revision * 8426326: Linux: Rename DarkModeManagerLinux to PortalSettingsLinux Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8426326 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8278613: Plumb navigation IDs to MIME handler streams Pass the navigation ID through StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent to the MIME handler stream manager, and only create the plugin response interceptor throttle for navigation requests, matching the upstream ChromeContentBrowserClient change. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8278613 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8403343: Bump clang revision The new clang package ships the raw_ptr plugin change from crrev.com/c/8358382, after which [chromium-containers] rejects T* template arguments in std::list, std::set and std::vector fields. Store raw_ptr<T> in those Electron containers instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8403343 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8362297: viz: Add `is_secure` flag to CopyOutputRequest and friends The new is_secure member brings VideoCaptureParams, together with the use_native_picker field this patch adds, over the chromium-style complexity threshold, so the implicit inline copy constructor is now rejected. Declare out-of-line copy and move constructors and assignment operators for the struct in the patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8362297 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8442576: Remove id from ChildProcessData Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8442576 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8421383: [RWS] Remove unused RWS cookie exclusion reason Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8421383 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8240331: Support targeting a network in NetworkService's WebSockets Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8240331 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8426064: Remove flag for restrict frame destinations to navigate The frame-destination check is now unconditional upstream, so drop the feature flag check in net.request. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8426064 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8292633: [atmemory] Add `blink::mojom::ScrollType` to the Autofill scroll callstack Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8292633 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8405125: FSA: rename UserAction to AccessTrigger and add programmatic triggers The former UserAction::kNone case is now split into AccessTrigger::kProgrammaticRead and kProgrammaticWrite; both keep the previous behavior of not granting access automatically and of replying to sensitive entry checks without prompting. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8405125 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8399046: Add chrome:// host and path mapping for component extensions ExtensionConfigMap::GetConfigProvider() now takes an Extension; use the new GetConfigProviderByExtensionId() for the id-based lookup. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8399046 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8445301: [Linux] Decouple //components/dbus from //ui/base and //net The //components/dbus component no longer depends on //components/dbus/menu, so depend on it directly for status_icon_linux_dbus.cc. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8445301 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8360557: [Extensions] Make generated features immutable FeatureProvider::AddFeature() no longer replaces an existing feature, so the entries Electron's feature files used to override core ones now fail a CHECK at startup. Drop the ones that duplicate the core definitions, or differ only in ChromeOS-only branches. Keep chrome.webstorePrivate unavailable by moving its delegated availability check into the core definition with a patch. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8360557 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8427384: Generate CDP TypeScript definitions directly from in-tree PDL files Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8427384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fixup! 8403343: Bump clang revision * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8397345: Move titlebar_config.h to chrome/browser/win The move switched the color mixers' Windows dependency from the narrow titlebar_config target to all of //chrome/browser/win, although the mixer uses nothing from it. On Windows that pulls //chrome/browser/profiles into Electron's link, where its ProfileKeyedServiceFactory collides with the one Electron provides for the spellchecker. Patch the unused dependency out. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8397345 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8403320: [WebUI] Disallow devtools:// scheme for WebUI data sources by default URL data sources are no longer served to devtools:// unless they opt in, so DevTools failed to load its frontend. Opt Electron's bundle data source in, and let its theme data source serve colors.css to devtools:// as Chrome's ThemeSource does. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8403320 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8394377: Migrate RefCountedDeleteOnSequence to start-from-one ref counting (4/4) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8394377 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 156.0.8075.0 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 8467669: [zoom] Key host-less zoom levels on the URL without its fragment Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8467669 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 156.0.8076.0 * 8468407: [gtk] Don't leave GDK_BACKEND set in the environment after GTK init Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8468407 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8457646: [snapshot] Include embedder string in version hash Upstream moved Version::Hash() out of line and now builds it with base::Hasher over the version number and embedder string. Fold the v8_version_hash_salt into that hasher the same way instead of carrying a separate FNV-1a helper and hash_combine() call. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8457646 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8459447: gin: Mark the stack-only helper classes STACK_ALLOCATED() gin::Dictionary is now STACK_ALLOCATED(), and the find-bad-constructs plugin conservatively treats any template instantiated with a stack-allocated type argument as stack-allocated too. Mark the two gin_helper::Promise<gin_helper::Dictionary> fields with STACK_ALLOCATED_IGNORE, since Promise<T> only names T as its resolve type and never stores one. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8459447 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8424587: mojo: Remove unused WrapPlatformFile and UnwrapPlatformFile helpers Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8424587 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fixup! 8403343: Bump clang revision notifications_ is now a std::set<raw_ptr<Notification>>, and libc++ has no heterogeneous set::erase, so erasing by key after Dismiss() built a temporary raw_ptr from the notification. On macOS Dismiss() has already destroyed it by then, so that took a BackupRefPtr reference on freed memory. Find it with the transparent comparator, which compares addresses without constructing a raw_ptr, and erase by iterator. Also drop NotifyIconHost::NotifyIcons, unused since notify_icons_ became a std::vector<raw_ptr<NotifyIcon>>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fixup! 8426064: Remove flag for restrict frame destinations to navigate Drop the network features include; its only use was the kRestrictFrameDestinationsToNavigate check this CL removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> |
||
|
|
c828823ba1 |
build: update PGO profiles (#54471)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
a21421ddf0 |
fix: localize the default action label on Linux notifications (#54366)
* fix: localize the default action label on Linux notifications libnotify notifications registered their default action with a hard-coded English "View" label. Use the translated "Show" string that macOS notifications already use. * test: expect the localized default action label in the dbus notification spec |
||
|
|
1c36d90659 |
chore: bump chromium to 155.0.8059.0 (main) (#53936)
* chore: bump chromium in DEPS to 155.0.8058.0 * 8373722: [macOS] Disclaim TCC responsibility for GPU process Upstream added IsCurrentProcessSelfResponsible() and a shared ResponsiblePidIfNotSelf() helper that call the private responsibility_get_pid_responsible_for_pid() API. Guard them for MAS builds too, where IsCurrentProcessSelfResponsible() reports true so the GPU process never tries to disclaim TCC responsibility. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8373722 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8372283: [OSCrypt] Remove OSCrypt.Mac.SuccessAfterPreviousError histogram and code Upstream inlined GetPasswordImpl() into KeychainPassword::GetPassword(); move the suffixed-account lookup and legacy-account migration there. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8372283 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364168: [crash] Add CrashReporterClient hooks for upload options, annotations Upstream added ShouldRateLimitUploads(), ShouldCompressUploads() and GetExtraProcessAnnotations(), which replace the hooks that crash_allow_setting_more_options.patch added. Remove the patch and override the upstream virtuals in ElectronCrashReporterClient instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364168 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364227: [usb] Defer UsbServiceImpl::GetDevices() until the first enumeration Removes chore_defer_usb_service_getdevices_request_until_usb_service_is.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364227 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364646: [views] Let FrameCaptionButton take an explicit icon color Upstream added FrameCaptionButton::SetIconColor(ui::ColorVariant), which replaces the SetButtonColor() that feat_enable_customizing_symbol_color_in_framecaptionbutton.patch added, and GetButtonColor() stays static. Remove the patch. Set the frame color first and then the explicit symbol color, since the icon color comes from whichever setter ran last. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364646 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8360632: [input] Keep a hidden hung renderer marked unresponsive Drop the RenderInputRouter and RenderWidgetHostImpl hunks from refactor_unfilter_unresponsive_events.patch now that this change is upstream; only the WebContentsImpl::RendererUnresponsive() filtering change remains. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8360632 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8363583: Static-assert that CSSPropertyEquality does not compare pointers with == Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8363583 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364228: [ozone/wayland] Tolerate a missing wl_seat in UpdateCursor() Removes fix_wayland_test_crash_on_teardown.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364228 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364745: [base] Report MoveFile()'s own error from ReplaceFile() on Windows Removes fix_don_t_read_a_stale_last-error_in_replacefile_on_windows.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364745 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8364645: [ozone/wayland] Fix a window stuck maximized after an early Maximize() Removes fix_wayland_window_stuck_maximized_after_early_maximize.patch. Upstream fixes the root cause (previously_maximized_ latching on a stateless configure), so the patch's Restore() workaround is no longer needed. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8364645 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8337991: [StatusIconLinuxDbus] Use unique D-Bus connection name instead of well-known name Upstream now registers every status icon under its connection's unique name, which fixes the missing Flatpak and Snap tray icon that fix_register_status_icon_with_unique_d-bus_name_when_owning_one.patch worked around. StatusNotifierWatcher implementations only drop an item once that name leaves the bus, so an icon created on the shared session bus would now linger after it is destroyed. Keep a reduced patch, fix_use_a_private_d-bus_connection_for_each_status_icon.patch, that always gives each status icon a private connection instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8337991 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8361192: [cppgc] Use _AddressOfReturnAddress() for StackStartMarker under MSVC Removes v8/cppgc_support_stackstartmarker_on_msvc.patch, which is now upstream. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8361192 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8381377: Roll Perfetto from 8665a1fa48ac to ced94af64d7e (2 revisions) The roll includes perfetto commit 5d6dd85f03 ("base: use intptr_t for ssize_t on Windows", https://github.com/google/perfetto/pull/7136), which upstreams define_ssize_t_to_be_intptr_t_to_match_libuv.patch. Remove the patch, keeping the perfetto target with an empty .patches so a later patch need not touch patches/config.json. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8381377 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update siso revision * chore: update patches * 8379633: Standardize mojom arguments for which bindings are generated Blink bindings are now opt-in via generate_blink, and disable_variants no longer exists, so drop it from our mojom() targets. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8379633 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8362279: Reland "[sandbox] Store CppHeapPointerHandles in EmbedderDataArray" JSObject embedder data slots now hold CppHeapPointerHandles and are visited through Serializer::ObjectSerializer::VisitCppHeapPointer(), whose DCHECK only expects API wrapper objects. JSPromise has an embedder slot too since Node.js and Electron build V8 with v8_promise_internal_field_count = 1, so node_mksnapshot hit the DCHECK while serializing the Node.js startup snapshot. Add a V8 patch that accepts every map that may have embedder fields. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8362279 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8355366: Remove base::Process from content::ChildProcessData BrowserChildProcessLaunchedAndConnected() now receives the process separately, and BrowserChildProcessHostIterator exposes it directly. UtilityProcessWrapper can no longer match BrowserChildProcessCrashed() and BrowserChildProcessKilled() on the pid, so it looks up its child process id when the process launches and matches on that instead. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8355366 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8263457: Add support for isolated browser restart Upstream removed BrowserMainLoop::SetResultCode(), which app.exit(code) used to make the browser process exit with an arbitrary code. Use its replacement, BrowserMainRunner::SetOverrideResultCode(), and patch out that method's check that codes are at or above content::RESULT_CODE_LAST_CODE, since app.exit() codes are chosen by the app. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8263457 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump chromium in DEPS to 155.0.8059.0 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 7957800: Harden RenderWidgetHostViewBase Teardown Upstream replaced the virtual RenderWidgetHostViewBase::Destroy() with a non-virtual DestroyOrDefer() that disconnects the view from its host and then calls the new pure-virtual DestroyImpl(), possibly deferred while input dispatch pins the view. Subclasses must also implement the new pure-virtual CleanUpHostObservers(). OffScreenRenderWidgetHostView now overrides DestroyImpl() and CleanUpHostObservers(). The latter removes the render frame metadata observer, calls ViewDestroyed() on the host, and drops the cached host pointer since the host may be deleted before a deferred DestroyImpl() runs. The DelegatedFrameHostClient callbacks are null-guarded accordingly, mirroring DelegatedFrameHostClientAura. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7957800 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8340933: Optimize FlexLayout and ProposedLayout allocation churn during resize Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8340933 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * 8365609: [metagen] Enable metagen instance types V8 now runs metagen by default, which loads the llvm-libclang package into the build's own Python. The Windows src cache is synced with host_os=linux, so Windows builders get no package at all. Have fix-sync re-fetch just that dep with a one-dep gclient sync, so gclient selects and extracts the object for the Windows host itself. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8365609 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 8354793: Remove dxil.dll from Windows builds and installer Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8354793 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fixup! 8365609: [metagen] Enable metagen instance types * chore: update patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> |
||
|
|
88833ddc7b |
build: read the macOS resource allowlist from the linked framework (#54233)
* build: read the macOS resource allowlist from the linked framework grit's --allowlist-support markers are __attribute__((used)), so on macOS every ui::AllowlistedResource<id> the framework references survives the link as a symbol (ICF folds the bodies, not the names). Read them back from the linked Electron Framework with llvm-nm - from the dSYM when the framework itself is stripped - instead of pseudo-linking its inputs, and hand the framework's resources to the bundle through bundle_deps so the locale repack can depend on the link without a cycle. That drops the linker_driver.py --collect-inputs-only mode and the tools/resources/ar.py archive handling from the Chromium patch; what is left is the one-line gcc_toolchain.gni assert for Linux, which is https://chromium-review.googlesource.com/c/chromium/src/+/8360559. * build: keep the resource allowlist arg permitted on macOS gcc_toolchain.gni declares enable_resource_allowlist_generation and grit keys --allowlist-support off it, so the assert there still has to admit mac for the markers to exist; only the linker_driver.py and ar.py changes go. * build: keep bundle-only deps off the Electron Framework link //chrome:packed_resources forwards to :packed_resources, which now reaches the framework link through :electron_resource_allowlist, so bundle_data left on the link (the crashpad helper, xibs, dylib copies) leaked into //chrome:chrome_framework and collided with its own Helpers entries at gn gen. Give the link only electron_lib and libnode and route everything that exists to populate the bundle through bundle_deps. * build: keep the allowlist check out of dist.zip's runtime deps GN's runtime-deps walk skips a shared library an action depends on directly but follows one reached through a group, so ordering electron_dist_zip after :electron_resource_allowlist_check via the runtime-deps group now pulled the framework link's closure (Squirrel.framework, libffmpeg.dylib, the unbundled framework binary) into dist.zip on macOS. Give dist_zip a build_deps that orders the zip action without joining the group whose runtime deps are zipped. |
||
|
|
826ffcf375 |
chore: remove dead code, unused chromium_src sources and orphaned files (#54229)
* build: remove unused and duplicated sources from chromium_src
- global_accelerator_listener{,_linux}.cc were compiled here and again by
the //ui/base/accelerators/global_accelerator_listener dep; keep the dep
(as a public_dep, shell/ includes its header) and drop the copies.
- native_window_tracker_aura duplicates //ui/native_window_tracker, which
is already linked; //ui/views/native_window_tracker.h no longer exists.
- chrome's platform_util{,_aura,_mac} were added for the colour chooser
in 2018 and nothing includes chrome/browser/platform_util.h any more.
- browser_theme_pack, custom_theme_supplier and window_frame_util.cc only
reference each other; theme_properties and window_frame_util.h stay.
- back_to_tab_label_button, skip_ad_label_button, resize_handle_button
and overlay_window_live_caption_button are never constructed on desktop
or sit entirely inside our #if 0 hunks.
- scoped_picture_in_picture_occlusion_observation, predictors_features
(+ its proto dep), exclusive_access_bubble_type.cc and the spellcheck
language policy handlers have no callers in anything Electron builds.
- delegated_source_list_capturer is only used by thumbnail_capturer_mac,
printing_service.cc only by pdf_to_emf_converter (Windows), and the
hang_crash_dump.cc Linux stub is never called.
- web_request_resource_type.{cc,h} moved upstream in June; the
enable_electron_extensions=false branch could not gn gen with it listed.
* refactor: remove unregistered browserAction/pageAction extension classes
browser_action.json is not part of the function registration target, so
the twelve BrowserAction*Function and seven PageAction*Function classes
were never instantiated, and the ExtensionActionAPI keyed service was
never built because nothing referenced its factory. Drop them together
with a few other extension leftovers that have no callers:
ElectronExtensionSystem::OnExtensionRegisteredWithRequestContexts,
ElectronExtensionsBrowserClient::SetAPIClientForTest and
ElectronExtensionsRendererClient::AllowPopup (its upstream virtual is
gone), and use extensions::util::AllowFileAccess instead of two local
copies of it.
* refactor: remove unreferenced C++ from shell/
None of these have a caller on any platform:
- OffScreenRenderWidgetHostView::AddGuestHostView/RemoveGuestHostView/
RemoveViewProxy and guest_host_views_ (never populated, so every loop
over it was dead too)
- FileSelectHelper::IsAcceptTypeValid/GetSanitizedFileName/
SetFileSelectListenerForTesting
- FileSystemAccessPermissionContext::OriginHasReadAccess/WriteAccess
- ElectronBrowserClient::GetSiteInstanceFromAffinity
- ElectronPermissionManager::HasPermissionRequestHandler
- api::BaseWindow::SetGTKDarkThemeEnabled and the NativeWindow virtual
behind it (NativeWindowViews keeps its own private helper)
- crash_reporter::IsCrashReporterEnabled/GetGlobalCrashKeys
- InspectableWebContents::GetDelegate
- NativeWindowObserver::WillCreatePopupWindow/WillNavigate
- WebRequest::RequestFilter's three-argument constructor
- declarations with no definition: ServiceWorkerContext::
StopWorkersForScope, WebContents::OnElectronBrowserConnectionError/
OnGetZoomLevel, NetworkContextService::CreateNetworkContextParams,
WindowsToastNotification::ShowInternal, ElectronApiServiceImpl::
ProcessPendingMessages
- NativeWindow::is_closed(), WebContentsZoomController::
persist_zoom_mode(), BrowserProcessImpl::CreateGlobalFeaturesForTesting()
- the Linux stubs for asar::Archive::HeaderIntegrity/RelativePath and the
non-mac Clipboard::ReadFindText stub (their callers are already
platform-guarded, so guard the declarations instead)
- the 'render-view-deleted' event, which existed for the removed remote
module's object registry
* refactor: remove unused gin_helper and converter code
- gin_helper::ErrorThrower::ThrowReferenceError/ThrowSyntaxError, the
zero-argument PromiseBase::Reject() and PromiseBase::RejectPromise had
no callers.
- CreateDataPropertyCallback and Dispatcher::DispatchToCallbackForProperty
were never instantiated.
- Converter<blink::mojom::Referrer> (Electron uses content::Referrer) and
Converter<blink::mojom::MenuItem::Type>::ToV8 had no users; drop the
full popup_menu.mojom.h include from content_converter.h and only pull
the ReferrerPolicy enum into blink_converter.
* refactor: remove native bindings and methods that JS never calls
- The electron_common_environment binding has had no caller since the
forwarded WebContents events moved native (#53975).
- Nothing requests the electron_browser_printing binding;
webContents.getPrintersAsync() calls GetPrinterListAsync() directly.
- features.isExtensionsEnabled(), the top-level executeInWorld/
exposeAPIInWorld exports on the context_bridge binding,
webFrameMain._fromIdIfExists/_fromFtnIdIfExists,
WebContents._getPreloadScript, webFrame._isEvalAllowed and
Menu._getUserAcceleratorAt are not used by lib/ or spec/.
- Protocol::IsProtocolHandled was installed on the prototype template and
then unconditionally replaced by the JS implementation in
lib/browser/api/protocol.ts, so the C++ copy could never run.
* chore: remove dead code and stale typings from lib/
- WebFrameMain.prototype._sendInternal, WebViewImpl.setupEventProperty/
on/onAttach, the 'setLayoutZoomLevelLimits' webview method (removed in
Electron 9) and WEB_VIEW_ATTRIBUTES.NAME had no callers.
- The Electron 20 sandbox-default deprecation log could never fire:
getLastWebPreferences() never contains 'preload' and always contains
'sandbox'.
- lib/browser/api/crash-reporter.ts only ships in the browser bundle, so
its process.type checks were constant.
- WebSQL was removed in Electron 31; drop enableWebSQL from the inherited
guest preferences and the docs, and the no-op 'webSQL' clearData type.
- Drop typings for things that no longer exist (ProcessType, ReplyChannel/
_replyChannel, the WebContents '-ipc-*' and '-window-visibility-change'
overloads, ElectronInternal.LoadURLOptions, Chrome.Tabs, NodeJS.Global
augmentations, Process.log/mainModule/_serviceStartupScript, the
document-start/end overloads, NetBinding.Net/net, App: Function,
Window.ELECTRON_*_SECURITY_WARNINGS, _awaitNextLoad) and the .oxlintrc
globs for lib/preload_realm and lib/sandboxed_renderer.
* chore: remove orphaned fixtures, scripts and CI leftovers
- spec/fixtures/release-notes/ (its spec left with the release scripts in
#52100), devtools-extensions/bad-manifest/, assets/osr.png,
pages/storage/web_sql.html, pages/history.html, module/hello-child.js,
esm/local.mjs and api/local-ai-handler/no-language-model.js are not
referenced by any spec.
- script/verify-chromedriver.py and script/run-if-exists.js lost their
last callers with the AppVeyor removal; script/lib/npm.py,
script/lib/native_tests.py, build/args/native_tests.gn, the pyyaml DEPS
entry and shell/browser/ui/{accelerator_util_unittests,run_all_unittests}.cc
are leftovers of the native test target removed in #40190.
- script/lib/git.py is_repo_root/get_repo_root and script/lib/utils.js
getCurrentBranch/handleGitCall have no callers.
- pipeline-electron-build-and-test-and-nan.yml is not referenced by any
workflow since #49072.
- Three spec/disabled-tests.json titles, one node-disabled-tests entry, a
wayland allowlist entry, a sysroots.json arch and two CODEOWNERS paths
named things that no longer exist; four docs/images files are unlinked.
|
||
|
|
5e090fd0f2 |
fix: reject V8 code caches written by a differently patched build (#54234)
* fix: reject V8 code caches written by a differently patched build
V8 keys JS code caches and serialized wasm modules on its version number
only. Release branches cherry-pick V8 fixes as patches without changing
that number, so an updated app kept deserializing wasm code written by the
previous release even when the patch had renumbered the builtins that code
calls into, and crashed or trapped as soon as the cached code ran.
* patches/v8: add a v8_version_hash_salt GN arg mixed into Version::Hash(),
and write the embedded blob hashes into the serialized wasm module header.
* build/args/all.gn: set the salt to a fingerprint of patches/v8, computed at
gn gen time with the patch files as regeneration dependencies.
* script/patches-hash.py: the fingerprint.
* build: fingerprint patches/v8 inside V8's gni instead of the args file
GN evaluates build args before it resolves script_executable, so an
exec_script() call in build/args/all.gn has no interpreter and fails on
Windows ("Could not execute interpreter"). Move the hashing into the V8
patch (gni/version_hash_salt.gni + tools/gen-version-hash-salt.py, driven
by a new v8_version_hash_salt_files arg) and have all.gn only list the
patch files.
|
||
|
|
8a6429e414 |
build: upgrade to TypeScript 7 (#54172)
TypeScript 7.0 is the native compiler and ships no JavaScript API. The earlier changes in this series already moved everything that transpiled on the fly (script/ and spec/) onto Node's own type stripping, so what is left here is the compiler swap itself: * typescript ^5.8.3 -> ^7.0.2. * build/bundle/typecheck.mjs spawns tsc instead of driving the compiler API (the rootDir/private-field diagnostics it used to filter out are handled by tsconfig.electron.json setting rootDir to the parent checkout instead). * tsconfig.json drops the removed baseUrl option and anchors the paths mapping explicitly; tsconfig.default_app.json moves off the removed "node" module resolution; `declare module NodeJS` becomes a namespace. * A few lib/, spec and docs snippets wrap Buffers for the stricter Buffer/ArrayBuffer typings that Blob now expects. Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
8d424eb34d |
build: run the TypeScript scripts under script/ with plain node (#54168)
ts-node was used as a CLI for a handful of TypeScript scripts under script/. Those now rely on the type stripping built into Node.js instead: - script/gen-filenames, check-patch-diff, run-clang-tidy and the release helpers (find-github-release, upload-to-github, github-token, types) are renamed to .mts and invoked with `node`. They use import.meta.dirname and explicit .mts / .js specifiers, and tsconfig.script.json moves to nodenext with verbatimModuleSyntax so tsc checks them the way Node runs them. - The documented minimum Node.js for building goes from 22.12 to 22.18, the first 22.x release with type stripping on by default. - script/codesign/gen-trust.ts and its trust.xml template are deleted; nothing has invoked them since generate-identity.sh switched to a user-scoped keychain in #50058. - oxfmt, oxlint, lint-staged and .gitattributes learn about .mts. ts-node itself stays for now because the spec runner still loads specs through its require hook. Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
7880c689d5 |
build: update PGO profiles (#54148)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
7128ee7576 |
build: bundle lib/ with rolldown instead of webpack (#54080)
* build: bundle lib/ with rolldown instead of webpack
Replace the webpack + ts-loader pipeline that builds Electron's internal
JavaScript bundles with a small rolldown driver (build/bundle/bundle.mjs).
- build/bundle/targets.mjs describes the seven bundles (browser, renderer,
worker, webview, isolated_renderer, node, utility) and the per-target
behaviour that used to live in one webpack config each.
- BUILDFLAG(...) folding, the `electron` aliases, the Promise/process/
Buffer/global providers and the profiling/try-catch wrappers are kept
with the same semantics. Node built-ins imported from lazily evaluated
modules stay lazy via a one line CommonJS shim so that load order
matches the old bundles.
- Type checking moves out of the bundling step into a single
electron_lib_typecheck action (build/bundle/typecheck.mjs) that every
bundle depends on, instead of running seven times.
- gen-filenames.ts asks bundle.mjs for the module graph directly and
emits a lib_typecheck_sources list for the new action.
- A few lib/ modules are adjusted for an ESM-first bundler: net.ts uses
a plain module.exports object, web-contents.ts keeps its session
side-effect import explicitly, and defineProperties caches the loaded
module so each electron.* getter keeps returning the same object.
Drops webpack, webpack-cli and ts-loader from devDependencies.
* chore: wrap comment for clang-format
* build: keep bundle declarations out of the wrapper's parameter scope
node_mksnapshot compiles the js2c bundles with Node's built-in module
parameters (exports, require, module, process, internalBinding,
primordials), and a hoisted top-level `const { internalBinding } = ...`
from lib/node redeclared one of them. Wrap the bundle body in an IIFE, as
the webpack output was.
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
7d3cf33e1a |
refactor: run sandboxed preload scripts without an Electron JavaScript bundle (#53974)
Sandboxed renderers and service worker preload realms ran a webpack bundle
(sandbox_bundle / preload_realm_bundle) that built the preload scripts'
`process` object and `require`, assembled the `electron` module from the
JavaScript API wrappers, registered the <webview> element and then compiled
and ran each preload script. With the API modules now provided by their
bindings, the rest moves to C++ (shell/renderer/preload_environment.cc):
- `process` is a native EventEmitter carrying the same properties as
before, plus getProcessMemoryInfo(); 'loaded', 'exit', 'document-start'
and 'document-end' are emitted on it directly.
- `require('electron')` returns a module object whose properties load their
binding on first access.
- Preload scripts are compiled with CreatePreloadScript() and called with
(require, process, exports, module, global); failures are logged and
reported as 'preload-error' as before.
The only JavaScript Electron still evaluates in a sandboxed renderer is the
<webview> element implementation, now its own `webview_bundle`, and only in
renderers that enable `webviewTag`. The `process` npm polyfill is no longer
needed.
|
||
|
|
5ef3e5d078 |
refactor: implement EventEmitter natively for sandboxed preload bundles (#53892)
* refactor: implement EventEmitter natively for sandboxed preload bundles Adds a C++ implementation of the `EventEmitter` class (shell/common/gin_helper/node_event_emitter.cc, exposed through the `electron_common_events` binding) and resolves `events` to it in the bundles that run without a Node.js environment, so `ipcRenderer`, `webFrame` and the sandboxed preload `process` object no longer pull the `events` npm package into every sandboxed renderer. The class provides the same instance API the `events` package did and nothing more: on/once/off/emit/addListener/removeListener/prependListener/ prependOnceListener/removeAllListeners/listeners/rawListeners/ listenerCount/eventNames/setMaxListeners/getMaxListeners, the 'newListener' and 'removeListener' events, the max-listener console warning and `EventEmitter.defaultMaxListeners`. As in lib/events.js the listener state lives in `_events` / `_eventsCount` / `_maxListeners` on the instance, so the methods are generic over their receiver and classes can extend it. A spec runs the same scenarios against Node's EventEmitter and this one and requires identical results. * perf: dispatch IPC messages to listeners without going through JS The native EventEmitter keeps `_events`, `_eventsCount` and `_maxListeners` in internal fields on real instances (still surfaced as the usual own data properties), caches its property keys, builds once() wrappers by binding one shared native function instead of minting a new function per call, and calls straight into its own C++ bodies for the internal `this.emit()` / `this.on()` / `this.removeListener()` calls when those methods are not overridden. It also exports EmitEvent(), and ipc_native::EmitIPCEvent() now builds the event object and emits on ipcRenderer / ipcRendererInternal from C++ instead of calling a JS `onMessage` trampoline that called `emit()`. In a renderer with Node.js integration the emitters are Node's and EmitEvent() calls their `emit` method. * perf: call multiple listeners for one event from a JS loop Calling N listeners through N v8::Function::Call() entries from C++ costs about four times per listener what a JIT-compiled loop does. When an event has more than one listener, hand the listener array to a one-line `for (...) Reflect.apply(listener, self, args)` function compiled once per context instead. The single-listener case is still one direct call from C++. Also pins the listener-throws semantics (later listeners skipped, emit rethrows) against Node's in the spec. * fix: handle object event names and large removeAllListeners in the native EventEmitter Deleting an event whose name is an arbitrary object asked v8::Object::Delete to convert it to a property key, which needs to run script and is not allowed there; convert it first. Emitting 'removeListener' for every listener of an event kept all the temporary handles of the loop alive until it finished; give each iteration its own HandleScope. * fix: address review comments on the native EventEmitter - removeListener() searches the listener array in place from the back instead of copying it first, so removing the newest listener (what once() wrappers and removeAllListeners() do) no longer costs a full copy each time. - The 'removeListener' event reports the originally registered function when a once() wrapper is removed from a multi-listener event, as events@3 did. - A once() wrapper is only marked fired after its removeListener() call succeeded, matching events@3's order. |
||
|
|
05f60b5068 |
refactor: remove Node.js shims from sandboxed preload scripts (#53891)
* refactor: remove Node.js shims from sandboxed preload scripts BREAKING CHANGE. Sandboxed preload scripts and service worker preload scripts no longer get the `events`, `timers` and `url` module shims from `require`, and are no longer run with `Buffer`, `setImmediate` and `clearImmediate` in scope. `require` only loads `electron`; `process` and `global` are still provided. These were npm browser polyfills compiled into the bundle that every sandboxed renderer evaluates, and made up about two thirds of it. With them gone the preload wrapper's parameter list is fixed again, so the code cache no longer needs to be keyed on the wrapper shape. * docs: tabulate the removed preload shims and their replacements |
||
|
|
9d6739045c |
chore: bump chromium to 155.0.8046.0 (main) (#53427)
* chore: bump chromium in DEPS to 155.0.8039.0 * chore: bump chromium in DEPS to 155.0.8040.0 * 8158519: Reland "Fix offset contours for concave corners" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8158519 Co-Authored-By: GitHub Copilot <copilot@github.com> * 8246240: views: Fix UAF in MenuController and simplify teardown Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8246240 Co-Authored-By: GitHub Copilot <copilot@github.com> * 8223163: [dcheck-to-check] Convert DCHECKs in content/browser/ [10/n] Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8223163 Co-Authored-By: GitHub Copilot <copilot@github.com> * chore: update patches * 8290608: Move update-rename tasks earlier in startup Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8290608 Co-Authored-By: GitHub Copilot <copilot@github.com> * chore: bump chromium in DEPS to 155.0.8042.0 * chore: bump chromium in DEPS to 155.0.8043.0 * chore: bump chromium in DEPS to 155.0.8044.0 * chore: bump chromium in DEPS to 155.0.8046.0 * chore: update siso revision * 8298520: [ExtensionTracker] Keep track of extension ids Upstream replaced the trailing `bool is_injected_extension_script` parameter of WebLocalFrame/LocalFrame::RequestExecuteScript and PausableScriptExecutor with `const String& script_injector_id`. Keep the Electron `raw_callback` parameter ahead of the new trailing parameter and update Electron's callers in electron_api_web_frame.cc to pass an empty WebString. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8298520 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8340629: [dcheck-to-check] Convert DCHECKs in content/browser/ [21/n] Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8340629 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: update patches * 8336255: [api] Remove non-CppGC v8::MicrotaskQueue implementation V8 removed the v8_cppgc_microtask_queue GN arg and the V8_CPPGC_MICROTASK_QUEUE define; v8::MicrotaskQueue is now always CppGC-managed and MicrotaskQueue::New() only returns a raw pointer. Drop the flag plumbing from BUILD.gn and generate-config-gypi.py, make the Node.js contextify code use the CppGC form unconditionally in v8_prepare_for_migrating_v8_microtaskqueue_to_cppgc.patch, and remove v8_propagate_v8_cppgc_microtask_queue_flag_to_common_gypi.patch since native addons no longer need a define to match the V8 ABI. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8336255 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8342150: Change GetProductInfo_ExportThunk to use trivially constructable param Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8342150 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8354524: [Extensions] Move dynamic resource handling to ExtensionConfigProvider ExtensionURLLoader now asks the extension's ExtensionConfigProvider for dynamic resources such as strings.m.js directly, so the IsDynamicComponentExtensionResource and GetDynamicResourceContent overrides no longer exist on ComponentExtensionResourceManager. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8354524 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8310116: Make fontconfig global config creation synchronous gfx::InitializeGlobalFontConfigAsync() was removed; fontconfig is now initialized synchronously on first use, so drop the eager call. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8310116 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8341194: Improve Reporting API crash reason attribution for hung renderers Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8341194 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * 8362702: [deps] Remove Rollup, Terser, and associated dependencies Refs https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/8362702 * 8283010: SeparateRendererBinary: Remove GetChildProcessSuffix on macOS Refs https://chromium-review.googlesource.com/c/chromium/src/+/8283010 Assisted-by: GPT-6 Astra * 8312453: Move windows i18n code into base:i18n target Refs https://chromium-review.googlesource.com/c/chromium/src/+/8312453 * 8313832: Use LanguageTag for preferred languages in windows Refs https://chromium-review.googlesource.com/c/chromium/src/+/8313832 * fixup! 8313832: Use LanguageTag for preferred languages in windows Refs https://chromium-review.googlesource.com/c/chromium/src/+/8313832 * chore: remove empty patches directory Skip-Lint: Merge left this directory empty * fixup! chore: remove empty patches directory Skip-Lint: Forgot to remove the config --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: GitHub Copilot <copilot@github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> |
||
|
|
59f0330233 |
build: run webpack in production mode, minify only release bundles (#53856)
* build: use webpack production mode for release bundles Release builds only enabled the minimizer; production mode adds numeric module ids, scope hoisting and unused-export removal (5-15% smaller js2c bundles). process.env.NODE_ENV is left untouched. * build: run webpack in production mode for all builds, minify only releases |
||
|
|
ddfd810a77 |
build: update PGO profiles (#53871)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
1cf98129e4 |
feat: capture __fastfail crashes on Windows via a WER helper module (#53802)
* feat: capture __fastfail crashes on Windows via a WER helper module Crashes raised through __fastfail (STATUS_STACK_BUFFER_OVERRUN: /GS failures, CFG violations, UCRT abort()) never reach crashpad's in-process exception filter, so they produced no minidump. Build electron_wer.dll, a Windows Error Reporting runtime exception helper wrapping crashpad's crashpad_wer_handler, ship it next to the executable, return its path from ElectronCrashReporterClient::GetWerRuntimeExceptionModule() so crashpad registers it in every process, and list it under the current user's RuntimeExceptionHelperModules key from crashReporter.start() so Windows will load it without installer changes. Closes #40363. * fix: keep WER active in libuv processes and scope helper pruning libuv's uv_init sets SEM_NOGPFAULTERRORBOX, which stops Windows Error Reporting from invoking runtime exception helpers, and Electron only cleared it in the browser process. Clear it in every process type (as Chromium does) and in ELECTRON_RUN_AS_NODE children after crashpad init, so __fastfail in Node-integrated renderers, utility processes and workers reaches electron_wer.dll; add a node-integrated renderer variant of the spec. Only prune stale RuntimeExceptionHelperModules entries that are siblings under this app's install root, so crashReporter.start() never probes other apps' (possibly remote) paths. * feat: look up the WER helper as <exe name>_wer.dll Name the helper after the executable so packagers that rename electron.exe rename the DLL alongside it (myapp.exe -> myapp_wer.dll); the GN output name is derived from electron_project_name and the docs say so. * fix: register the WER helper without probing the disk GetWerRuntimeExceptionModule() runs in sandboxed child processes too, where the PathExists() check fails and skipped registration (CI: the sandboxed renderer __fastfail spec got no dump while the unsandboxed one did). Match Chrome and return the path unconditionally; the browser still checks the file exists before listing it in the registry. * fix: let WER run for sandboxed child processes once crashpad is installed The sandbox job starts children with SEM_NOGPFAULTERRORBOX (JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION), so the WER helper was never invoked for a sandboxed renderer's __fastfail. Clear the flag in child processes right after crashpad initialization. * refactor: ship crashpad's crashpad_wer.dll as the WER helper Copy the upstream crashpad_wer loadable module to <exe name>_wer.dll instead of building a duplicate, keep crashpad_wer.dll itself out of dist.zip, and resolve the helper's directory from base::DIR_ASSETS (the executable's directory by default) so apps that version their resources can relocate it. |
||
|
|
c4755b50b4 |
build: remove dead Chromium patches and hunks (#53634)
* chore: remove dump_syms.patch It patches generate_breakpad_symbols.py, which Electron has not invoked since #19042. * chore: remove crashpad_pid_check.patch Its removal condition (crashpad initialized before the sandbox) was met in #23265; what remained disabled is crashpad's client PID verification on Windows. * chore: remove disable_compositor_recycling.patch Since #44628 macOS uses the views WebContentsView with a parent ui::Compositor, so the recyclable-compositor path this targeted is not taken; its remaining effect was suppressing DelegatedFrameHost::WasHidden. * chore: remove chore_provide_iswebcontentscreationoverridden_with_full_params.patch Nothing overrides IsWebContentsCreationOverridden or CreateCustomWebContents since #52472. * chore: remove fix_select_the_first_menu_item_when_opened_via_keyboard.patch Upstream selects the first item for keyboard-opened menus on Windows since M133 (https://chromium-review.googlesource.com/c/chromium/src/+/5868220) behind PlatformStyle::kAutoSelectFirstMenuItemFromKeyboard. * chore: remove revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch Nothing in Electron references the feature; backgroundThrottling: false and --disable-background-timer-throttling cover the use case. * chore: remove fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch Upstream fires the popup events for dynamically created menus since M150 (https://chromium-review.googlesource.com/c/chromium/src/+/7804599), and the hunk here was gated on a feature nothing enabled. * chore: remove build_disable_llvm_unroll-add-parallel-reductions_on_apple_targets.patch The miscompile was fixed by llvm/llvm-project#210957, which is in the bundled clang (llvmorg-24-init-3796). * chore: remove refactor_unfilter_unresponsive_events.patch web-contents.ts re-applied the same three conditions (not ignored, visible, renderer initialized) before emitting 'unresponsive', so the unfiltered notification was never observable. Let Chromium filter and emit directly. * chore: remove fix_disable_enable_resource_allowlist_generation_on_windows.patch The siso-incompatible link wrapper it worked around was reverted upstream (https://chromium-review.googlesource.com/c/chromium/src/+/8275653, in this Chromium), so set enable_resource_allowlist_generation from all.gn as intended. * chore: remove nan test_use_v8_version_check_instead_of_node_version_check.patch With Node 24 the upstream nodeVersion > 22 check already selects the same expectations, so the V8-version check changes nothing. * chore: remove nan fix_remove_deprecated_propertycallbackinfo_holder.patch V8 re-added PropertyCallbackInfo::Holder(), so nan's tests compile unchanged. * chore: remove reclient-configs fix_disable_compression_threshold.patch reproxy.cfg is not read under siso. * chore: remove reclient-configs build_on_windows_provide_clang_wrapper_as_toolchain_input.patch siso merges inputs and toolchain_inputs from the rewrapper cfg and passes the remote_wrapper itself, so the distinction no longer matters. * chore: remove reclient-configs fix_temporarily_use_toolchain_inputs_exclusively_instead_of_inputs.patch Same as the Windows one: a no-op under siso's merged input list, and the python cfgs it also touched have no consumer since Chromium dropped python remote actions. * chore: remove reclient-configs reland_mojo_use_large_worker_for_mojom_parser_action.patch The rewrapper_<os>_large.cfg consumer was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6325750. * chore: reduce fix_add_python_remote_wrapper.patch to the clang wrapper chmod Chromium removed python remote actions (https://chromium-review.googlesource.com/c/chromium/src/+/6289606), so the python wrapper and cfg hunks have no consumer; the exec bit on the generated clang_remote_wrapper is the part siso still relies on from macOS hosts. * chore: trim dead hunks from render_widget_host_view_mac.patch Nothing has implemented shouldIgnoreMouseEvent since #38404. * chore: trim dead hunks from desktop_media_list.patch The Update(callback, refresh_thumbnails) signature change is unused since #50960 moved DesktopCapturer to StartUpdating(). * chore: trim dead hunks from allow_in-process_windows_to_have_different_web_prefs.patch enable_websql has no reader (WebSQL is gone from Blink) and none of the added fields use base::FilePath, so drop the field and the three file_path includes/imports. * chore: trim dead hunks from chore_restore_some_deprecated_wrapper_utility_in_gin.patch gin::DeprecatedWrappable(Base), its Converter, internal::FromV8Impl and gin/wrapper_info.cc duplicate what shell/common/gin_helper already defines (including gin::DeprecatedWrapperInfo::From) and are not referenced; keep the DeprecatedWrapperInfo struct, the per-isolate template maps and the internal field setup that gin_helper relies on. * chore: trim dead hunks from refactor_expose_file_system_access_blocklist.patch Electron does not compile chrome_file_system_access_permission_context.cc, so the #if 0 blocks in it did nothing; keep the header refactor. * chore: trim dead hunks from feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch The show-hidden plumbing has had no caller since #51704 (showHiddenFiles is macOS/Windows only), and the portal file carried two unused includes, one of them into electron/. * chore: trim dead hunks from support_mixed_sandbox_with_zygote.patch The RendererSandboxedProcessLauncherDelegateWin hunk was guarded by USE_ZYGOTE, which is never set on Windows. * chore: trim dead hunks from chore_grandfather_in_electron_views_and_delegates.patch MenuBar and InspectableWebContentsView never construct the passkeys themselves (RootView and DevToolsWindowDelegate do it for them). * chore: trim dead hunks from web_contents.patch The RenderWidgetHostViewBase forward declaration was unused. * chore: trim dead hunks from boringssl feat_expose_several_extra_cipher_functions.patch cipher.h already declares EVP_aes_256_cfb128. * chore: trim dead hunks from the webrtc pipewire patch The capturer_failed_ assignment inside the if duplicated the unconditional one upstream added below it, and the description still listed two items that no longer correspond to any hunk; what remains is the X11 fallback, so name it that. * chore: update patches * chore: gn format build/args/all.gn * Revert "chore: remove refactor_unfilter_unresponsive_events.patch" This reverts commit |
||
|
|
e7cf6e26aa |
build: update PGO profiles (#53613)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
599010df47 |
build: run linux clang-tidy as remotely cached siso build steps (#53447)
* build: run linux clang-tidy as remotely cached siso build steps
Prototype for the linux-x64 leg. Instead of run-clang-tidy.ts walking
shell/ on the runner's own cores, generate one ninja step per translation
unit and let siso treat it like a compile: include-scan the inputs, look
the action up in the RBE cache, and execute misses on the worker pool.
- script/gen-clang-tidy-ninja.py writes out/<dir>/clang_tidy.ninja from
compile_commands.json: `run-clang-tidy-action.sh <clang++> <flags> -c
<src> -o <stamp>` per shell/ TU, with a gcc depfile so ninja/siso track
header deps.
- build/run-clang-tidy-action.sh runs clang-tidy with
--warnings-as-errors=* (so only clean results are cached), then
`clang -M` for the depfile, then touches the stamp.
- build/siso/main.star is build-tools' siso entry file plus an
`electron/clang-tidy` step rule (remote, clang-tidy/.clang-tidy files as
inputs); the tidy job points ELECTRON_BUILD_TOOLS_MAIN_STAR at it.
- The linux leg of the clang-tidy segment now does `e init --remote-build
siso`, gn gen with compile commands for //electron:*, generates the
ninja file and runs `e build -f clang_tidy.ninja electron_clang_tidy`.
It gets ELECTRON_RBE_JWT for that. mac and win legs are unchanged.
Measured against out/Testing on rbe.notgoma.com: 343 TUs, cold run all
remote in 115 s wall (150 CPU-min of work, bounded by the slowest TU),
fully cached rerun 2.3 s, and a planted finding fails the step with the
diagnostic and is not cached.
* build: tidy up the clang-tidy step generator and wrapper
* build: run macOS and Windows clang-tidy through siso too
- gen-clang-tidy-ninja.py understands clang-cl commands (drops /c, /Fo,
/Fd, /showIncludes) and emits `deps = msvc` for them, which is also what
tells siso to parse the command cl-style when scanning for #includes.
- run-clang-tidy-action.sh: for clang-cl, run clang-tidy in cl driver mode
and report headers via /showIncludes; when the host toolchain isn't
runnable (macOS binaries on the Linux workers) use the Linux one that
clang_remote_wrapper stages under Release+Asserts_linux.
- build/siso/main.star: off Linux, run the tidy step through
clang_remote_wrapper with the Linux clang and clang-tidy as inputs, like
the clang rules.
- The clang-tidy segment uses the siso path on every platform; on macOS it
first generates the reclient configs (which fetches the Linux clang) and
downloads the Linux clang-tidy package next to it.
* build: hand clang-tidy a one-entry compile db so clang-cl keeps a relative source path
clang-tidy appends an absolute source path to `-- <flags>` commands, and on the RBE workers that path starts with /worker, which the cl driver parses as a /w option ('no input files'). A compilation database entry keeps the command as written.
* build: upload siso metrics from the clang-tidy job
* build: install the macOS siso binary in the clang-tidy job
* build: one clang-tidy step per object, not per source file
A source built by several targets (electron_app and the helper app on macOS) has several compile commands with different flags; picking one by source path was order-dependent and cost two cache misses per run. Key steps on the object path instead.
* build: sync build/siso/main.star with the current build-tools pin
* build: use build-tools' clang-tidy siso rule
electron/build-tools#896 carries the electron/clang-tidy rule, so bump the build-tools pin to it and drop the in-repo copy of build-tools' main.star and the ELECTRON_BUILD_TOOLS_MAIN_STAR override. The pin bump also picks up electron/build-tools#895 (retry the initial depot_tools clone).
* build: set clang-tidy's header filter in .clang-tidy
Both clang-tidy entry points passed their own --header-filter. Set HeaderFilterRegex in .clang-tidy instead so they can't diverge. This clang-tidy reports header diagnostics when no filter is set, so the flags and the config change together.
* build: run gn gen from gen-clang-tidy-ninja.py
The steps are only right if compile_commands.json matches the out dir, so the generator now regenerates it instead of trusting an old one. Also say that the generator and the wrapper are CI plumbing, and what a local run needs.
* build: bump build-tools for nested .clang-tidy configs
Picks up electron/build-tools#897, which sends any .clang-tidy under electron/shell to the RBE worker and into the cache key.
|
||
|
|
acc98e634f |
build: pin the siso revision in build/siso_revision instead of fetching Chromium's DEPS in CI (#53450)
The build-siso job needs the siso commit that our pinned Chromium expects. It used to curl Chromium's DEPS from raw.githubusercontent.com on every run to find it, and that fetch has failed main several times (HTTP errors / TLS resets that took out all three siso jobs at once). The value only changes when Chromium rolls, so record it in the repo and stop fetching: - build/siso_revision holds the sha; pipeline-segment-build-siso reads it from a sparse checkout and no longer touches the network to resolve it. - script/gen-siso-revision.js derives it from the synced Chromium tree (src/DEPS siso_version). A gen_siso_revision gclient hook runs it after every sync, lint-staged runs it when DEPS changes, and gn-check runs it with --check so a roll that forgets to commit the file fails with a clear message. - The roller commit linter accepts "chore: update siso revision" (only that file), and the Chromium upgrade skill tells you to commit it after a successful sync, mirroring how filenames.libcxx.gni is handled. |
||
|
|
06078c2863 |
chore: bump chromium to 155.0.8038.2 (main) (#53399)
* chore: bump chromium in DEPS to 155.0.8038.2 * chore: update patches Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> * 8333808: Roll gn from 150a9d6ba0aa to a99d46a9d04c Need to run gn format files because https://gn.googlesource.com/gn.git/+/4cf50b377b8eb25042ce517d51ceee17d678e3ab landed as part of: Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8333808 --------- Signed-off-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> |
||
|
|
92d1a918d1 |
build: drop a pile of unused / replaceable dev dependencies (#52744)
* build: drop unused dev dependencies and the abstract-socket native module
Removes dependencies that nothing in the tree uses any more:
* sinon / @types/sinon: no spec imports them.
* check-for-leaks: only wired to `prepack`, and the root package is
private and never packed.
* null-loader: the only rule using it matched against an always-empty
`ignoredModules` list in the webpack config.
* @types/uuid: uuid ships its own types since well before the version
we depend on.
* q, coffeescript, mkdirp: each backed a single test of third-party
module behaviour. The `require` app-directory test now uses
dirty-chai (any module that only lives in spec/node_modules works,
it is exercising module.paths, not the module), and the mkdirp asar
test is replaced by a `fs.mkdirSync(..., { recursive: true })` case
next to the existing mkdirSync test.
Also drops abstract-socket. dbus-native only used it to connect to
`unix:abstract=` bus addresses, and Node.js has supported abstract
sockets natively via a leading NUL byte since 20.8, so dbus-native is
now patched to use net.createConnection instead. That lets us delete
the abstract-socket patch, its resolutions entry, the dependenciesMeta
`built` opt-in, the packageExtensions block in .yarnrc.yml and the
Linux-only `npm rebuild abstract-socket` step in the spec runner.
abstract-socket itself still appears in the lockfile as dbus-native's
optional dependency (patches cannot change resolution), but it is no
longer built or required by anything.
No-Verification-Needed: dependency, test and build-tooling changes only; no product source touched
* build: replace uuid, basic-auth and temp with Node.js built-ins
* uuid -> crypto.randomUUID() across the specs.
* basic-auth -> a small parseBasicAuth() helper in spec/lib/net-helpers,
used by the two specs that need to read Basic credentials.
* temp -> fs.mkdtempSync in release.ts and in the asar copyFile specs.
Also removes script/doc-only-change.js, whose last caller went away with
the AppVeyor configs.
No-Verification-Needed: spec, release-tooling and manifest changes only; no product source touched
* build: use webpack's BannerPlugin instead of wrapper-webpack-plugin
wrapper-webpack-plugin is a webpack 4 era plugin that still hooks the
deprecated optimizeChunkAssets hook. webpack 5's built-in BannerPlugin
can prepend a raw header and (with `footer: true`) append a raw footer,
and instances run in registration order, so the profiling wrapper and
the try/catch wrapper nest exactly as before. The only difference in the
emitted bundles is a newline between each wrapper and the bundle body.
No-Verification-Needed: webpack build config only; emitted bundle diffed against the previous plugin's output (whitespace-only), production output checked for nesting and syntax
* build: vendor the default app's octicons
The default app uses five icons and an 88 byte stylesheet out of
@primer/octicons, and pulling them out of node_modules was the only
place the GN build reached into node_modules for shipped content. Copy
the files (MIT licensed, notice included alongside) into
default_app/octicon so they are plain static sources like the rest of
the default app, and drop the dependency and the extra copy target. The
files end up at the same paths inside default_app.asar as before.
No-Verification-Needed: vendored files are byte-identical to the octicon files the existing build already ships at the same asar paths
* build: drop got and dedupe @electron/fiddle-core
The release scripts were the only direct users of got, and every call
was a plain GET/HEAD/POST that global fetch covers: HEAD requests use
`redirect: 'manual'` in place of `followRedirect: false`, and the
non-2xx handling that previously relied on `throwHttpErrors: false` now
checks `response.status` explicitly. The asset manifest in release.ts is
untouched.
got@11 was also still being kept alive by @electron/fiddle-core@1, which
the root package depended on while .github/workflows already used ^2.
Aligning the root on ^2 removes the second copy of fiddle-core and
@electron/get along with the whole got@11 dependency chain (41 packages).
fiddle-core 2 is ESM-only; the CommonJS spec runner loads it through
require(esm), which is available on the Node 22.21 CI uses and anything
newer than 22.12.
No-Verification-Needed: release tooling, spec runner and manifest changes only; no product source touched
* test: replace express in the autoUpdater specs with a small router
The two autoUpdater specs were the only users of express, and between
them they use `use()`, `get()` with one `:param` route, `res.status()`,
`res.send()`, `res.json()` and `res.download()`. spec/lib/http-server-
helpers.ts provides exactly that surface on top of node:http, with file
responses still going through `send` (what express uses internally) so
HEAD, Range and content-type behaviour towards the updaters is unchanged.
`send` is bumped to the 1.x line express 5 was already using, since 0.x
serves .msix files as application/octet-stream rather than
application/msix.
Removes express, @types/express and 43 transitive packages.
No-Verification-Needed: spec-only change; helper exercised over HTTP for GET/HEAD/Range/json/204/404 routing
* test: depend on resedit directly instead of @electron/packager
The asar integrity spec only used @electron/packager for its resedit
wrapper, and only the branch of that wrapper which embeds the integrity
resource on Windows. Do that directly with resedit (the library the
wrapper is built on), which is a dozen lines, and drop packager along
with the 24 signing/notarizing/downloading packages it brings in.
No-Verification-Needed: spec-only change; resource embedding round-tripped against a real PE locally
* test: replace the last temp usage in the protocol code cache spec
The `temp` package was dropped from the root package.json but
api-protocol-spec.ts still required it inline, so every test shard
that loads that file failed at spec-runner startup.
No-Verification-Needed: test-only change
|
||
|
|
bb599e5525 |
build: update PGO profiles (#53312)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
7164502799 |
chore: bump chromium to 154.0.8025.0 (main) (#53206)
* chore: bump chromium in DEPS to 154.0.8025.0 * chore: update patches * chore: run script/gen-hunspell-filenames.js Skip-Lint: updated hunspell filenames. * 8291469: Reland "Reland "Integrate chromium-bidi into chromedriver"" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8291469 * test: avoid HTML parsing in protocol performance test Measure protocol response throughput by consuming the payload with fetch instead of navigating to it as HTML. This avoids including HTML tokenizer overhead in the result. Chromium CL 8134094 added raw_ptr instrumentation to the HTML parser's LiteralBuffer pointers in testing builds, making the unrelated parser cost dominate this protocol throughput test. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8134094 Skip-Lint: deflake protocol spec * 8271930: ui: Remove ui::Layer::HasExternalContent() Guard the unused AutoPipSettingOverlayView integration behind GOOGLE_CHROME_BRANDING. Electron does not build the chrome specific settings view, and the updated control flow causes UBSan vptr instrumentation to emit a reference to its unavailable RTTI. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8271930 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: electron-claude[bot] <279139701+electron-claude[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> |
||
|
|
c3a1e5c4b7 |
chore: bump chromium to 154.0.8015.0 (main) (#52800)
* chore: bump chromium in DEPS to 153.0.8004.0 * chore: bump chromium in DEPS to 153.0.8005.0 * 8160324: Fix tab drag bouncing across Mac display boundaries Upstream added overrides of the private AppKit methods _setFrame:fromAdjustmentToScreen:anchorIfNeeded:animate: and _setFrameAfterMove: which call their super implementations, so they are wrapped in !IS_MAS_BUILD() guards like the other private API usage in this file. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8160324 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 8242309: Move BackgroundContents methods to BrowserWebContentsDelegate ShouldCreateBackgroundContents() moved off Browser to a free function taking a Profile; the patched call site now passes params.frame_name to the new form. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8242309 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 7960703: Defer spellcheck and custom dictionary initialization on startup Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7960703 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 8235138: Fix PaintController DCHECK crash on unbounded element deactivation Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8235138 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: update patches * 8218308: Reland "Roll libc++ from b16984ce99c7 to 97b436da4c33 (215 revisions)" The libc++ roll makes vector::empty() call size(), which does pointer arithmetic that requires a complete element type under the pointer-based vector layout. Upstream builds with the unstable ABI's size-based layout and doesn't hit this, but Electron pins the stable ABI (build_make_libcxx_abi_unstable_false_for_electron.patch), so vectors of forward-declared types now fail to compile where empty() is called: - extensions/common/value_counter.h: define is_empty() out of line where ValueCounter::Entry is complete - components/password_manager/core/browser/password_form_manager.cc: include passkey_credential.h - third_party/libaddressinput cpp/src/language.cc: include format_element.h (new libaddressinput patch target, since this repo had no existing patches) Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8218308 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 8229624: [CodeHealth] Remove the feature flag kDropInputEventsWhilePaintHolding Upstream removed the flag and made dropping browser-side input during paint-holding unconditional. Electron disables this feature because apps (and our specs) dispatch input via webContents.sendInputEvent() as soon as a load finishes, before the first frame is committed; without the opt-out those events are silently dropped (seen on this roll as timeouts in "open and load a new window from a link" and the <datalist> autofill keyboard specs). Carry a small partial revert that restores the feature and its check in RenderInputRouter::FilterInputEvent so the existing disable_features entry keeps working. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8229624 Co-Authored-By: Claude <noreply@anthropic.com> * chore: update libc++ filenames * 8234700: [api] Remove deprecated methods, pt.1 V8 dropped the transitional HolderV2()/GetPrototypeV2()/SetPrototypeV2() aliases; the plain names are canonical again. Point the nan patches back at PropertyCallbackInfo::Holder() and drop the now-unneeded fix_replace_deprecated_get_setprototype.patch. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/8234700 Co-Authored-By: Claude <noreply@anthropic.com> * 8103530: Custom handlers: tie extension-registered handlers to their extension The CL adds ProtocolHandlersManager::OnExtensionUnloaded(), which (like OnExtensionLoaded) CHECK_IS_TEST()s when the browser client has no ProtocolHandlerRegistry. Electron doesn't provide one yet, so unloading any extension now aborts the browser process. Extend chore_disable_protocol_handler_dcheck.patch to drop those two checks as well, matching what it already does for ProtocolHandlersSanityCheck(). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8103530 Co-Authored-By: Claude <noreply@anthropic.com> * chore: bump chromium in DEPS to 153.0.8007.0 * chore: bump chromium in DEPS to 153.0.8009.0 * chore: bump chromium in DEPS to 154.0.8011.0 * chore: bump chromium in DEPS to 154.0.8013.0 * chore: bump chromium in DEPS to 154.0.8014.0 * chore: bump chromium in DEPS to 154.0.8015.0 * 8247639: [macOS] Refresh screenshot exclusion after window resize Upstream moved the CGS capture-exclusion logic into an ApplyCaptureExclusion() helper and re-applies it on window resize. Moved the IS_MAS_BUILD guard (NSWindowSharing fallback) into the helper so all call sites stay MAS-safe. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8247639 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * 8254601: Ruff: reformat tools (part 2/3: gerrit .. origin_trials). Ref: https://chromium-review.googlesource.com/c/chromium/src/+/8254601 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * |
||
|
|
3966b7d5fb |
build: remove orphaned 32-bit PGO profile state files (#53163)
Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
6f5fc7a086 |
build: add electron_xcache host tool for cross-target V8 code caches (#53139)
* build: add electron_xcache host tool for cross-target V8 code caches Standalone executable that compiles a JS file and emits a V8 code cache keyed to whichever V8 startup snapshot blob it is given -- including the Node startup snapshot embedded in another OS/CPU's build of the same Electron version -- by creating its isolate from that blob with JavaScript execution disallowed. * build: ship electron_xcache as a linux release asset and cover it in spec Adds xcache.zip (stripped electron_xcache + icudtl.dat + licenses) to the linux testing/release build groups, moves it through the CI artifact staging, uploads it as xcache-<version>-linux-<arch>.zip on publish, and adds a spec that checks the tool's output is accepted by the running main process. * build: build and publish electron_xcache on every platform Portable file mapping for Windows, xcache.zip in the testing/release groups for all non-MAS builds, uploaded as xcache-<version>-<platform>-<arch>.zip, and the spec locates the binary and snapshot holder per platform. * build: escape strings in electron_xcache --json output |
||
|
|
688b80590f |
build: update PGO profiles (#53121)
* build: update linux-arm64 PGO profile * build: update linux-x64 PGO profile * build: update macos-arm64 PGO profile * build: update macos-x64 PGO profile * build: update v8-builtins PGO profile * build: update win-arm64 PGO profile * build: update win-x64 PGO profile --------- Co-authored-by: electron-pgo-updater[bot] <290827142+electron-pgo-updater[bot]@users.noreply.github.com> |
||
|
|
45d0c5bd8d |
build: update NMV to 150 (#53098)
Upstream PR: nodejs/node#65405 This needs to be merged before cutting the `45-x-y` release branch. |
||
|
|
e793d8c73a | ci: remove linker wrapper workaround on windows (#53067) | ||
|
|
cbe1975ac3 |
fix: enable v8_disallow_js_in_api_interrupts_is_checked (#52960)
* fix: enable v8_disallow_js_in_api_interrupts_is_checked * chore: reuse state tracking * chore: align with upstreamed patch |
||
|
|
d36eebfc2e |
build: trim the non-link overhead of macOS release builds (#52883)
* build: trim the non-link overhead of macOS release builds Four independent, low-risk changes aimed at the macOS release job, which today spends well over an hour outside the ThinLTO links themselves: * Zip Symbols: `tar --options xz:threads=0` does not actually multi-thread on macOS (Apple's liblzma emits a single block), so the ~7 GB of dSYMs were being compressed by one core at preset -6, ~30 minutes per job. Pipe the tar stream through the xz binary with -T0 instead (falling back to the tar options when xz is not on PATH), and use preset -3, which is ~5x faster than -6 for ~12% larger output. Same .tar.xz format. * siso: set SISO_EXPERIMENTS=no-fallback on macOS. When a remote compile exceeds siso's 2 minute client-side deadline (RBE queueing, an upload stall) siso re-runs it locally; on the 5-core / 14 GB runners a local ThinLTO compile takes 5-10 minutes and lands on the critical path (75 such fallbacks in a recent release build, 570 in a testing build). no-fallback retries remotely with a 4x longer deadline instead. * GN: thin_lto_enable_cache=false for macOS release builds. CI starts from a fresh out dir, so the ThinLTO cache is written (~100 GB across a release build's links) and never read, competing for IO with links that are already swapping. Local builds keep the default. * build-stats: hash object files on worker threads and only walk obj/ and <toolchain>/obj/. The previous recursive readdir of the whole out dir (~800k entries) plus single-threaded sha256 of ~6 GB took 2-3 minutes; this takes seconds. Objects outside those trees (SDK crt*.o, rust sysroot copies) are no longer counted, which does not affect the change rate metric since only files present in both snapshots are compared. No-Verification-Needed: CI config and build scripts only, no product code * build: use context managers for the tar|xz pipeline (pylint R1732) * build: read only the tail of siso.INFO in build-stats.mjs siso.INFO grows with the step count and a release build's already exceeds V8's maximum string length once a second toolchain is in the graph, which made build-stats.mjs fail with 'Invalid string length'. The stats line is at the end of the log, so read the last 16 MB instead of the whole file. * build: drop SISO_EXPERIMENTS=no-fallback on macOS Under RBE queue pressure a remote compile can stay EXECUTING past siso's deadline; with no-fallback siso retries (deduped onto the same running op) and then fails the build outright, which is worse than a slow local fallback for PR CI. Give remote compiles a longer deadline in build-tools' siso config instead and keep the fallback as the safety net. * build: link the macOS snapshot tools without ThinLTO in release builds (#52884) * build: link the macOS snapshot tools without ThinLTO in release builds In official builds v8_snapshot_toolchain is the target toolchain, so mksnapshot, node_mksnapshot, v8_context_snapshot_generator and the natives code-cache generator are each a full ThinLTO+PGO link of V8 (and Blink, and Node) with dsymutil. On the 5-core / 14 GB macOS CI runners those four links take 12 + 6 + 20 + 2 minutes (21 + 46 min on x64, where they also run under Rosetta), run serially through a link pool of depth 1, and page heavily (5-9 GB RSS each), all before the Electron Framework link can start. Their outputs are snapshot/code-cache data that does not depend on how optimized the tool binary is. Add //electron/build/toolchain/mac with variants of the mac toolchain that turn off ThinLTO, PGO and debug info (symbol_level=0, so the extra objects are small and dsymutil has nothing to link) and point macOS release builds' v8_snapshot_toolchain at them: clang_arm64_snapshot for arm64 and clang_x64_snapshot for x64 (still x64 so mksnapshot.zip keeps shipping an x64 mksnapshot). V8/Blink/Node compile a second time in that toolchain, but remotely and cacheably. Because the tools now live under $root_out_dir/<toolchain>/, mksnapshot.zip is flattened on macOS so its layout is unchanged (mksnapshot, v8_context_snapshot_generator, their dylibs and icudtl.dat at the root), and build/zip.py learns to apply PATHS_TO_SKIP relative to a toolchain dir and to drop duplicates when flattening. The resulting file set is identical to the default-toolchain one. Testing builds are unaffected (no LTO there, so nothing to gain from a second toolchain). No-Verification-Needed: build config and packaging script only * build: update build-tools for remote generators and longer remote compile deadlines (#52896) Picks up electron/build-tools#889 and #890: * siso runs the mojom, Blink bindings, grit strings and TypeScript/WebUI generators on RBE workers instead of locally (all hosts). On the 5-core macOS runners those steps are about a CPU-hour of python/node per release build, contending with siso's include scanning during the fetch phase; remotely they are also cached, so unchanged generators become cache hits on every host. * remote clang steps on macOS hosts get a 10 minute client-side deadline instead of 2 minutes, so ordinary RBE queueing no longer triggers the 5-10 minute local ThinLTO fallback compiles that land on the critical path (75 in one release build, 570 in a testing build). Local fallback stays as the safety net. |