mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
main
1292
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
02f35ce992 | docs: remove redundant shell requires in application menu tutorial (#55312) | ||
|
|
40ebdcc38d |
docs: fix code block line highlighting after docs reformats (#55097)
* docs: fix code block line highlighting after lint reformats Several highlighted code blocks in the IPC and preload tutorials had their line-highlight ranges drift when the docs code blocks were auto-formatted (the `import/order` blank line added in #42113, and the if/else collapse in #38260), so the highlights now land one line off from the code they were meant to call out. Update the ranges to point back at the originally highlighted code without changing the code blocks themselves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E * docs: fix code block line highlighting that drifted from content edits The Playwright examples in automated-testing.md lost a line when their two `require` statements were merged, leaving the highlights one line late, and the code signing examples replaced a two-line certificate option with a `windowsSign` object while keeping the old two-line ranges. Point the highlights back at the intended code and cover the whole `windowsSign` object. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
c37ca8bbfd |
docs: update tutorials for Electron Forge 8 (#54926)
Forge 8 moved `electron-forge import` into create-electron-app and made `electron-forge publish` a deprecated alias for `electron-forge release`. Update the packaging tutorial to import via create-electron-app and the publishing tutorial to use the release command. Claude-Session: https://claude.ai/code/session_01QrLq1PMBg8cho8fEt4vRG9 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 |
||
|
|
dc580b6529 |
docs: note that beta.1 waits for the Chromium roll (#54649)
* docs: note beta.1 waits for the Chromium roll The Releases WG moved alpha-to-beta promotion to release automation, gated on the release branch's Chromium reaching the version in Chrome's Beta channel. beta.1 is no longer a fixed date, so stop listing it as one of our solid release dates and note it can land a few days late. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 * docs: explain beta.1 delay without roll jargon Say plainly that beta.1 can be late when the release branch has not yet been updated to the Chromium Beta-channel version, instead of referring to "our Chromium roll" without explaining it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 * docs: link Chrome's Beta channel in release timeline Link to Chromium's release channel page and briefly explain that the Beta channel is where each Chrome version is tested for about four weeks before stable. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 * docs: clarify which release dates are fixed Replace "our solid release dates" with plain wording: alpha.1 and stable ship on the scheduled dates, while the prereleases in between, including beta.1, don't have fixed dates. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 * docs: tighten beta.1 timing note Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 * docs: use canonical Chrome release channels URL Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmPhpNhEFuPd7juZ3fc781 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
690ccdd890 | docs: fix offline installation cache key description (#53824) | ||
|
|
718c8a6425 |
docs: overhaul crash reporting documentation (#54280)
* docs: overhaul crash reporting documentation Add a Crash Reporting tutorial covering how Crashpad collects minidumps, setting up crashReporter, attaching context with globalExtra and per-process parameters, reacting to process-gone events, receiving uploads, symbolicating with Electron's published symbols, and hosted services. Correct the crashReporter API reference: value limit is 20320 bytes (not 127) and long keys emit a warning; rateLimit works on all platforms; ignoreSystemCrashHandler has no effect on Windows; compress: false is deprecated; getParameters() excludes globalExtra; getUploadedReports() also lists reports that were not uploaded; Node child processes have no process.crashReporter.start(); document ptype and _companyName in the payload; note MAS no-op behaviour; drop the archived mini-breakpad-server and Mozilla-only Socorro and move hosted services to the tutorial. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: trim implementation details from crash reporting docs Document behaviour rather than internals so the docs don't become an accidental API contract: drop the crash dumps directory layout and file naming, handler process details, Chromium-internal upload fields and query parameters, exact release asset names and the symbol server path format, and notes about behaviour from old Electron versions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: remove privacy section from crash reporting tutorial Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: recommend electron-minidump for symbolication Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: move default values to end of crashReporter option descriptions Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: address crash reporting review feedback Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i * docs: link crashReporter methods in MAS note Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFzbSEnmLgZoxGXgEKSH4i --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
ad3a896a52 |
build: check the formatting of docs code blocks with oxfmt (#54140)
* build: check the formatting of docs code blocks with oxfmt lint-roller 4 splits the old `lint-roller-markdown-standard` into an oxlint half and an oxfmt half. This wires up the second one: `lint:fmt-in-markdown` runs `lint-roller-markdown-oxfmt` over docs/ as part of `lint:docs`, using docs/.oxfmtrc.json, which matches the repo's .oxfmtrc.json except that docs snippets keep their semicolon-free style. `--fix` writes the formatted blocks back, and a block can opt out with `@noformat` in its info string. * docs: format code blocks with oxfmt Result of `lint-roller-markdown-oxfmt --fix` with docs/.oxfmtrc.json, plus the @ts-expect-error line anchors (and one Docusaurus highlight marker) that moved with the reformat. The Babel output sample in the ESM guide and the two excerpts of repo source in creating-api.md are marked @noformat, and the contentTracing example passes an async callback instead of wrapping an IIFE so that it does not need a leading semicolon. --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
5eefaea339 |
build: update @electron/lint-roller to 4.0.0 (#54139)
lint-roller 4 drops `lint-roller-markdown-standard` (and with it the
transitive eslint/standard dependency tree, roughly 1,900 lines of
yarn.lock) in favour of `lint-roller-markdown-oxlint`, which lints the JS
code blocks in docs/ with the repo's own oxlint and .oxlintrc.json. It
also makes `lint-roller-markdown-ts-check` work with TypeScript 6 and 7.
- `lint:js-in-markdown` now runs `lint-roller-markdown-oxlint`.
- `lint:docs-fiddles` ran the `standard` binary, which was only ever
installed as a dependency of lint-roller 3, so it now runs oxlint over
docs/fiddles instead. The dozen findings that surfaced (unused trailing
callback parameters, one `require('path')`, one stale eslint-disable
comment) are fixed in the fiddles, and the one tutorial that inlines an
affected fiddle is kept in sync.
- The `<!-- eslint-... -->` HTML comments in docs were directives for
lint-roller-markdown-standard and are removed, and the docs style guide
no longer points at standard-markdown.
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
236cf685a4 | docs: remove "boilerplates and clis" (#54105) | ||
|
|
2f64d2b3a4 |
docs: use json5 for bare object literal code blocks (#54107)
* docs: use json5 for bare object literal code blocks
Several docs code blocks contain only a bare object literal (an example
return value or options object) but are tagged as `js`. As JavaScript,
`{ key: value, ... }` on its own is a block statement, not an object, so
standard/ESLint reports "Parsing error: Unexpected token :" on most of
them; they only lint today because @electron/lint-roller special-cases
them with a regex that wraps orphan `{...}` blocks in parens before
linting. The blocks are valid JSON5, so tag them as such and drop the
`<!-- eslint-skip -->` comments that preceded them, which nothing in the
current tooling honors.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck
* docs: use json5 for bare array menu template blocks
The three menu template examples in docs/tutorial/menus.md are bare
array literals, not runnable JavaScript. Like the bare object literal
blocks in the previous commit, they are valid JSON5, so tag them as
such instead of `js`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck
* docs: use json5 for bare literal blocks nested in blockquotes
The radio menu item example in the `[!TIP]` blockquote in
docs/tutorial/menus.md is a bare array literal tagged `js`; it was
missed earlier because the fence is prefixed with `> `. It is valid
JSON5 (including the trailing `//` comment), so tag it json5 like the
other bare literal blocks.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBwKFgaRoEHjxoyGFpU6Ck
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
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 |
||
|
|
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. |
||
|
|
cea20e3ae3 |
fix: don't start an app instance when a helper is executed without --type (#53831)
* fix: don't start an app instance when a helper is executed without --type On macOS the helper executables link the same framework as the main binary, so executing one without a --type argument runs it as a browser process from inside the helper bundle. That is what child_process.fork() does when the runAsNode fuse is disabled: the fork wrapper points execPath at the helper and sets ELECTRON_RUN_AS_NODE, the fuse ignores the variable, and a second app instance starts whose GPU, network-service and renderer children then fail to launch because their helper paths are derived from the helper's own name. Make helper executables exit with EX_USAGE when no --type is present, matching Chrome's "Helper application requires --type" check, and make child_process.fork() throw when the runAsNode fuse is disabled instead of launching a process that cannot work. * fix: satisfy -Wunsafe-buffer-usage in the helper argv scan * chore: format |
||
|
|
157af051c8 |
chore: remove Discord links (#53828)
* chore: remove Discord links * chore: remove Discord link from README |
||
|
|
8cc20cf659 |
fix: check the sending frame for internal guest, window and reply IPCs (#53684)
* fix: check the sending frame for internal guest, window and reply IPCs * guest-view IPCs (attach/detach/call/property get/set) are honoured only from the frame that created the <webview>, not from any frame in the embedder WebContents * window.close() via the internal IPC is honoured only from the top-level document, and the renderer override is installed for the main frame only * replies to webContents.executeJavaScript()/insertCSS() and friends are accepted only from the main frame they were sent to * webContents.sendToFrame() only addresses frames that belong to that WebContents * the <webview> `ipc-message` event carries `frameOrigin` / `frameUrl` of the frame in the guest that sent it * process.getProcessMemoryInfo() reports the calling frame's own process * docs: validateSender example checks senderFrame.origin * docs: add API history PR reference * refactor: drop frameOrigin/frameUrl from the webview ipc-message event |
||
|
|
3c70ff8e2a |
fix: gate preload and worker Node integration on the creating frame (#53686)
* workers only get Node integration when the frame creating them has it (main frame, or nodeIntegrationInSubFrames); previously any same-process subframe's workers got it whenever nodeIntegrationInWorker was set (feat_plumb_node_integration_in_worker_through_workersettings.patch) * the "DevTools extension" preload exception applies only to extension documents hosted inside the DevTools front-end, not to any chrome-extension:// frame; browser-side startup-data push matches * specs for worker gating; docs and breaking-changes entries |
||
|
|
cec7670642 |
feat: add ELECTRON_DEBUG_DRAGGABLE_REGIONS debugging aid (#53598)
* feat: add ELECTRON_DEBUG_DRAGGABLE_REGIONS debugging aid When set in an unpackaged app, paints the draggable region each WebContents hit tests against as translucent rectangles in a click-through widget above the web contents, and logs region updates, their cost, and periodic hit-test summaries. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeVPx9L9YnfSk7an5fALZi * docs: mark ELECTRON_DEBUG_DRAGGABLE_REGIONS as experimental Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeVPx9L9YnfSk7an5fALZi * chore: trim comments in draggable region debugger Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeVPx9L9YnfSk7an5fALZi --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
6051d193aa |
docs: note that MenuItem badges are not displayed in Dock menus (#53227)
A badge on an item passed to dock.setMenu() is silently ignored, while the same item shows its badge in an application menu. Document this on the badge option and property, and in the Dock menu tutorial. Assisted-By: Claude Opus 5, Claude Fable 5, Claude Code |
||
|
|
06d90eb469 |
docs: explain process.defaultApp and open-url timing for deep links (#53145)
The deep links tutorial shows the process.defaultApp branch around app.setAsDefaultProtocolClient and a synchronous open-url listener on macOS, but never explains why either is written the way it is. Cold start argv handling on Windows/Linux was already documented in #49142; this fills in the two remaining gaps from #40173: - Why process.defaultApp matters: in dev (electron .), the OS launches the generic Electron executable, so the protocol has to be registered with an explicit execPath and script path or there'd be no way to know which app to load. - Why open-url must be registered synchronously on macOS: Browser::OpenURL (shell/browser/browser.cc) notifies observers immediately with no queueing, so a listener attached after an await can miss a cold-start deep link entirely. Fixes #40173 Assisted-By: Claude Sonnet 5, Claude Code |
||
|
|
7377022f03 |
feat: serve asar file descriptors, streams and copies from the archive (#52833)
* feat: serve asar file descriptors, streams and copies from the archive
fs.open/openSync/promises.open, fs.createReadStream, fs.copyFile/cp (and
their sync/promise variants) previously extracted a packed asar entry into a
temporary file first (Archive::CopyFileOut): a synchronous, main-thread copy of
the whole file on first access, a temp copy left behind for the life of the
process, and a cached copy that later opens with write flags could corrupt.
The wrapper now hands out real file descriptors duplicated from the archive's
retained handle and hooks the fs binding so every fd-based API (read/readv/
fstat/close/readFile(fd), ReadStream, FileHandle) reads straight out of the
archive. With ASAR integrity enabled, bytes are only ever served from a
block whose hash was just verified, and a violation terminates the process
synchronously instead of after the tampered data was already handed back.
Copies stream from the archive to the destination; opening a packed file for
writing fails with EACCES; fchmod/fchown/futimes on such descriptors are
refused. Only process.dlopen and child_process.execFile still need a real
path and keep using the temporary copy (now made read-only).
Also adds fs.opendir/readlink support for archives, makes fs.stat follow
archive symlinks (fs.cp dereference now works), returns BigIntStats when
asked, and gives original-fs its own pristine copy of the fs binding so it is
unaffected by these overrides.
* docs: note the asar file descriptor behavior change in breaking-changes
* fix: address review of the asar fd reader
- readv on a packed entry: a zero-length buffer no longer ends the clamped
read early; later buffers are still filled, like preadv.
- copyFile with COPYFILE_FICLONE_FORCE on an unpacked entry is passed to
native fs (which may reflink); only packed entries reject it with ENOTSUP.
- FileHandle#close() forgets the descriptor entry immediately instead of
waiting for the C++ handle's fd to be reset after the threadpool close, so
a real file that reuses the number in that window is never routed through
the archive reader.
- open() of a symbolic link to a directory reports EISDIR, not ENOENT.
- readlink and opendir honour name encodings other than 'buffer'.
- recursive readdir withFileTypes skips an unreadable archive entry instead
of dropping the rest of the listing.
* fix: keep the asar fs binding hooks working when Array's iterator is deleted
- Forward pass-through calls with Function#apply and index access instead of
spread / array destructuring, which need Array.prototype[Symbol.iterator]
(user code may delete it; parallel/test-require-delete-array-iterator).
- Use literal permission bits for the fake asar stats: the S_IRGRP/S_IROTH/
S_IX* constants do not exist on Windows, so the modes came out as 0600.
- Allow blocking around the chmod of a copied-out temp file; CopyFileOut is
also reached from the UI thread via WebContents.downloadURL().
* fix: report the executable bit from asar stat and drop stale fd entries
- Archive::Stat now exposes `executable`, so fs.stat/lstat of a packed
executable report 0755 like fs.fstat does; fs.cp no longer strips the bit
that copyFile preserved when it chmods the destination to the source mode.
- A descriptor for a packed entry can be closed without going through
fs.close (a native FileHandle built on it, e.g. http2's respondWithFile,
a FileHandle moved to a worker, or one closed on GC). Whenever fs hands out
a descriptor number (native pass-through open or a new archive-backed one),
any stale entry for that number is dropped first, so it can never capture
the new owner's reads, and its retained block is returned to the budget.
- Document http2stream.respondWithFile()/respondWithFD() among the APIs
that read the raw descriptor.
* fix: hand out a sentinel descriptor for packed asar entries, not the archive
The descriptor returned by open() for a packed entry used to be a dup of the
archive's own handle. Code that read it directly instead of through fs (a
native addon, a child's stdio, net.Socket({ fd }), http2's respondWithFile)
silently got bytes of the archive at the wrong offset, and a raw handle to
the archive escaped to user code.
Hand out a per-open dup of a write-only null device instead. It identifies
the entry to fs, which serves every read from the archive's retained handle
positionally as before, and it is useless to anything else: direct reads
fail with EBADF, the archive itself is never exposed, and a descriptor
closed behind our back can at worst misroute through fs, never leak archive
bytes. Writes, truncation and metadata changes through such a descriptor are
refused with EACCES rather than vanishing into the null device. copyFile and
the writeFile fast path read the entry without allocating a descriptor at
all.
* chore: clang-format electron_api_asar.cc
* fix: use libuv error numbers for asar fs errors
libuv's error numbers differ from POSIX errno on Windows (UV_EACCES is
-4092 there, not -13) and Node decodes `errno` through libuv's table, so the
hand-written errno values decoded as UNKNOWN on Windows. Take them from the
uv binding instead.
Also refuse writeFileSync's utf8 fast path when it is given a packed entry's
descriptor rather than a path.
|
||
|
|
37f44ca55d | feat: re-add app.setBadgeCount and win.setProgressBar for Linux (#52739) | ||
|
|
11b7555c25 |
fix: let custom V8 snapshots reach the main process again (#52872)
Since the main process started booting from the embedded Node.js startup snapshot (#51703), its context is deserialized from that blob, which was built on top of the stock snapshot_blob.bin at build time. Objects a custom snapshot puts into the default context -- electron-mksnapshot users, and the browser_v8_context_snapshot.bin the loadBrowserProcessSpecificV8Snapshot fuse selects -- therefore never showed up in the main process on native builds (mac arm64, linux x64, win x64), while cross-built targets, which ship without the Node snapshot, kept working. spec/fixtures/snapshot-items-available ("f is not defined") reproduces it, but CI only ran verify-mksnapshot.py with --create-snapshot-only since the GHA migration. Skip the embedded Node snapshot for the main process when the fuse is on or the loaded v8 context snapshot is not the one this build shipped, and bootstrap Node from scratch on the loaded blob as snapshot-less builds do. The check is a size + V8-blob-header comparison against constants that build/checksum_header.py now emits next to the existing SHA-256, so it costs nothing at startup. Re-add the full verify-mksnapshot.py run to one native test leg (linux x64). |
||
|
|
14bb846aa6 |
docs: remove self-closing syntax (#52494)
* docs: remove self-closing syntax Trailing slash on void elements has no effect and interacts badly with unquoted attribute values. Ref: - https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-in-void-element-start-tags-do-not-mark-the-start-tags-as-self-closing - https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-directly-preceded-by-unquoted-attribute-values * Markup fixes |
||
|
|
50bc1bd4fb | docs: clarify that only executables should be signed with entitlements (#51958) | ||
|
|
a42e0cf17b |
docs: document macOS APIs that require code signing (#52337)
Several macOS APIs (safeStorage, app.setLoginItemSettings, the cookieEncryption fuse, and autoUpdater) rely on OS-level Keychain access or Squirrel.Mac, which only behave correctly once the app is code signed (and, for login items, notarized). This wasn't documented anywhere, leading to confusion in issues like #45672, #43233, and #45088. Adds a central "macOS APIs that require code signing" section to the code-signing tutorial, and cross-links it from each affected API's docs. Fixes #45802 Assisted-By: Claude Sonnet 5, Claude Code |
||
|
|
6f286c36f1 |
docs: use Chromium over Chrome (#52426)
* docs: use Chromium over Chrome * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> |
||
|
|
5517a93dec |
feat!: remove 32-bit Windows (ia32) and Linux ARM (armv7l) builds (#51816)
* feat!: remove 32-bit Windows (ia32) and Linux ARM (armv7l) builds
Removes the linux-arm and windows-x86 build, test, and publish jobs from
CI, drops the 32-bit release artifacts from the release validation and
node headers upload scripts, and deletes the now-unused 32-bit zip
manifests. 64-bit (x64, arm64) builds are unaffected.
* tests: remove references to arm and ia32 in tests
* chore: remove 32 bit PGO profiles
* chore: remove additional references to 32-bit OSes
* docs: windows 10 is still supported for now
* docs: update breaking changes to clarify v43 is last 32-bit
* chore: remove no longer needed linux arm32 patch
* chore: update patch to remove linux arm32 logic
* Revert "build: use Yarn JsZipImpl for node-modules link to fix arm32 OOM (#51226)"
This reverts commit
|
||
|
|
d0c75f90ad |
feat: implement the Prompt API via localAIHandler (#50659)
* feat: implement the Prompt API via localAIHandler Assisted-by: Claude Opus 4.6 * docs: address review feedback * chore: refactor for cppgc managing api::UtilityProcessWrapper Changed in https://github.com/electron/electron/pull/50955/ * fix: prevent UAF with PromptResponder * chore: let setPromptAPIHandler return null to reject * fixup! chore: refactor for cppgc managing api::UtilityProcessWrapper * chore: use cppgc::WeakMember instead * chore: store pending BindAIManager calls until utility process calls setPromptAPIHandler Assisted-by: Claude Opus 4.6 * chore: remove localAIHandler.setPromptAPIHandler(null) * chore: protect against destroyed LanguageModel * chore: remove unused include * chore: drop upstreamed patch * chore: add missing includes * chore: reconcile upstream changes * chore: add patch to prevent dangling promise * test: add cleanup of utility processes * chore: remove upstreamed patch * refactor: rename LanguageModel to LanguageModelUtility * chore: provide frameToken and renderProcessId to Prompt API handler Assisted-by: Claude Opus 4.8 * chore: address code review feedback * fixup! chore: remove localAIHandler.setPromptAPIHandler(null) * chore: address Copilot code review * test: update test expectation * 7896445: [3/3] Pass download progress observers dynamically in WebPlatform APIs Refs https://chromium-review.googlesource.com/c/chromium/src/+/7896445 * chore: address code review feedback * chore: fix CHECK * 7876740: Implement Content Layer Echo for AISemanticEmbedder Refs https://chromium-review.googlesource.com/c/chromium/src/+/7876740 |
||
|
|
154d66f4ab |
feat: add save/restore window state API (#51510)
* feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: support for multimonitor tests (#47911) * test: support for multimonitor tests * fix: update yarn.lock file * test: support any resolution for new displays * test: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: enforce unique window names across BaseWindow and BrowserWindow * docs: update docs for name property * fix: linter issue with symbol --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: clear and restore window state (#47781) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * test: support for multimonitor tests * fix: update yarn.lock file * test: support any resolution for new displays * test: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: enforce unique window names across BaseWindow and BrowserWindow * docs: update docs for name property * fix: linter issue with symbol --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * test: multi monitor tests for save/restore window state (#48048) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: support for multimonitor tests * fix: update yarn.lock file * feat: support any resolution for new displays * feat: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * test: support for multimonitor tests * fix: update yarn.lock file * test: support any resolution for new displays * test: support display positioning * docs: multi-monitor tests * test: remove dummy test * fix: native-addon forceCleanup * docs: add forceCleanup description * test: add two basic multi-monitor tests * fix: find the closest display for non-overlapping saved bounds * test: windowStatePersistence multi-monitor tests * docs: add note on display APIs in CI * fix: remove duplicate destroy registration * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: enforce unique window names across BaseWindow and BrowserWindow * docs: update docs for name property * fix: linter issue with symbol --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * docs: remove inaccurate comment * fix: move expect blocks outside beforeEach * test: exclude macOS-x64 for now * test: remove invalid display test * test: remove invalid display test * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: support for multimonitor tests (#47911) * test: support for multimonitor tests * fix: update yarn.lock file * test: support any resolution for new displays * test: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: enforce unique window names across BaseWindow and BrowserWindow * docs: update docs for name property * fix: linter issue with symbol --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: clear and restore window state (#47781) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: restore window state * feat: flush display modes on show * refactor: move utility functions to common area * feat: clear window state * fix: wait for the prefs to update * test: clearWindowState extra test * test: refine clear window state tests * test: single monitor restore window tests chore: rebase on gsoc-2025 * refactor: refine clearWindowState test * fix: revert default_app back to original * docs: add comment linking AdjustBoundsToBeVisibleOnDisplay to Chromium code * fix: add correct permalink * refactor: ci friendly * fix: disable windowStatePersistence when no display * refactor: use reference instead pointer * fix: skip window state persistence for invalid/fake displays * refactor: better flag placement * test: add test to verify window state is not saved when no display * fix: restore display mode inside show() * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: clear sharedUserPath before and test * refactor: hasInvalidDisplay function * debug: add display info logging for CI * fix: do not save/restore when window is 0x0 * test: support for multimonitor tests (#47911) * test: support for multimonitor tests * fix: update yarn.lock file * test: support any resolution for new displays * test: support display positioning * docs: multi-monitor tests * test: remove dummy test * feat: enforce unique window names across BaseWindow and BrowserWindow (#47764) * feat: save window state (#47425) * feat: save/restore window state * cleanup * remove constructor option * refactor: apply suggestions from code review Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: forward declare prefservice * refactor: remove constructor option * refactor: save window state on move/resize instead of moved/resized * feat: resave window state after construction * test: add basic window save tests * test: add work area tests * test: asynchronous batching behavior * docs: add windowStateRestoreOptions to BaseWindowConstructorOptions * chore: move includes to main block * Update spec/api-browser-window-spec.ts Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * docs: update docs/api/structures/base-window-options.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: preserve original bounds during window state save in special modes * feat: save kiosk state in window preferences * chore: remove ts-expect-error * test: check hasCapturableScreen before running tests * test: remove multimonitor tests * test: add missing hasCapturableScreen checks before tests * docs: add blurb on saving mechanism * feat: add debounce window of 200ms to saveWindowState * docs: remove blurb until finalized * style: convert constants from snake_case to camelCase * refactor: initialize prefs_ only if window state is configured to be saved/restored * refactor: rename window states key * refactor: store in application-level Local State instead of browser context * refactor: switch to more accurate function names * fix: add dcheck for browser_process * fix: flush window state to avoid race condition * refactor: change stateId to name * refactor: change windowStateRestoreOptions to windowStatePersistence * Update docs/api/structures/base-window-options.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix: add warning when window state persistence enabled without window name * docs: lowercase capital B for consistency --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * feat: enforce unique window names across BaseWindow and BrowserWindow * docs: update docs for name property * fix: linter issue with symbol --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * test: remove invalid display test --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * feat: add 'restored-persisted-state' event to BaseWindow (#50516) * docs: add note on display APIs in CI * docs: remove inaccurate comment * test: set show to true * docs: restored-window-state event * feat: add 'restored-window-state' event to BaseWindow * test: add tests for 'restored-window-state' event emission * test: move createWindowAndSave * docs: differentiate between name and title * test: add checks for virtual display creation * docs: tutorial for windowStatePersistence * fix: ensure only single display before multi monitor tests * docs: better docs for virtual display addon * docs: better docs for virtual display addon * refactor: rename event restored-window-state to restored-persisted-state * refactor: rename BaseWindow.clearWindowState to clearPersistedState * docs: improve docs for name property and fix typos * build: run yarn install * fix: update base::Value::Dict -> base::DictValue * fix: add install script to virtual-display native addon The virtual-display fixture was missing an "install" script, so node-gyp never compiled it during `yarn install`. This caused "Cannot find module '../build/Release/virtual_display.node'" in CI. Also removed unused dependencies (bindings, @types/jest, node-gyp) to match the pattern of other native addon fixtures. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> * chore: fixup yarn.lock, lint * chore: fix build errors after rebase onto main Remove stale `#include "shell/browser/native_window_features.h"` (header was deleted in #51160) and add the required `animate` parameter to the `SetBounds` call in `RestoreBounds` (signature changed on main). * fix: rewrite virtual-display addon in Objective-C, removing Swift dependency The CI runner's Xcode 16.4 has a broken Swift toolchain where swift-frontend cannot load lib_CompilerSwiftIDEUtils.dylib. Since the addon only uses CoreGraphics private C/ObjC APIs (CGVirtualDisplay, CGVirtualDisplayDescriptor, etc.), rewrite the implementation entirely in Objective-C to eliminate the Swift compilation step. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * chore: remove nut-js dependent tests * test: fix macos display tests * Update docs/api/base-window.md Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/tutorial/window-state-persistence.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: defer is_being_restored reset and persisted-state-restored to display-mode callback Resetting is_being_restored_ synchronously at the end of RestoreWindowState let the deferred display-mode callback (kiosk/fullscreen/maximize) fire from Show() with the flag already false, so the resize/move events it produced scheduled DebouncedSaveWindowState and persisted transitional bounds over the user's saved bounds. Also rename the BaseWindow event to persisted-state-restored consistently across the C++ emit, tutorial, and spec, and move the 25s busy-loop spec into a spawned Electron fixture so the spec runner main thread isn't blocked. * test: bump main-thread-busy spec timeout to 60s Spawned Electron fixture sleeps 25s plus startup, exceeding mocha's 30s default. * fix: emit persisted-state-restored synchronously, not in deferred callback The previous fix moved NotifyWindowStateRestored() into the deferred display-mode callback to keep it ordered after the kiosk/fullscreen/ maximize change. But that callback only fires from Show() via FlushPendingDisplayMode(), so windows constructed with show: false (and restore_display_mode_ true, which is the default) never emitted the event - including the spec coverage. Restore the synchronous emit and keep the is_being_restored_ deferral, since only the flag reset needs to straddle the deferred resize/move events that schedule DebouncedSaveWindowState. * fix: tie window-state restore guard to display-mode transition lifecycle The is_being_restored_ guard was reset on the deferred display-mode callback invocation rather than the actual restoration lifecycle, which caused three defects: 1. A window created with show:false and destroyed before show() left the guard stuck true, so the close-time FlushWindowState save no-op'd and state changes made while hidden were dropped. 2. showInactive() never flushed the deferred display mode, so a persisted hidden window shown inactive did not re-apply saved fullscreen/ maximize/kiosk and left the guard stuck true. 3. On macOS the guard was reset synchronously after the async SetFullScreen/Maximize/SetKiosk calls, so a flush during the transition persisted transitional bounds over the saved state. Reset the guard from the NotifyWindowEnterFullScreen/NotifyWindowMaximize observers once the transition completes, drain a never-run callback in FlushWindowState, flush the pending display mode from ShowInactive on both backends, and skip saves while a fullscreen transition is in flight. --------- Co-authored-by: Nilay Arya <84241885+nilayarya@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Nilay Arya <nilay2014@gmail.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: George Xu <33054982+georgexu99@users.noreply.github.com> Co-authored-by: Sam Maddock <samuelmaddock@electronjs.org> Co-authored-by: George Xu <george.xu@slack-corp.com> |
||
|
|
03392c18a0 |
docs: fix Electron Fiddle documentation (#52011)
* Update introduction.md * Update introduction.md * Update docs/tutorial/introduction.md Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> --------- Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> |
||
|
|
1a5360cb74 |
docs: added documentation and a Fiddle for WCO breaking changes on Linux in Electron 43.x (#52018)
* docs: added documentation and a Fiddle for WCO changes on Linux in Electron 43 * review feedback |
||
|
|
675f9fc50b |
chore!: remove Unity service and Unity-specific APIs (#51649)
chore: remove Unity service and Unity-specific APIs |
||
|
|
b792786d06 |
docs: update Azure Artifact Signing and EV cert docs (#51624)
* docs: update Azure Artifact Signing and EV cert docs * fix link * Update docs/tutorial/code-signing.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de> |
||
|
|
9f25fc4e06 |
docs: fix @electron/osx-sign package name (#51254)
|
||
|
|
0866d39006 |
docs: update versioning references (#51030)
* docs: update versioning references * fixups |
||
|
|
cf2cc4d80f |
docs: mention pre-release installation (#51020)
* docs: pre-release installation * Update installation.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de> |
||
|
|
e7080835f1 |
docs: add destroy method to native addon tutorials to prevent hang on quit (#50561)
Native addons that hold persistent references to callbacks, emitters, and threadsafe functions prevent Electron from quitting cleanly since Electron 40.5.0 due to changes in Node.js shutdown behavior. This adds a `destroy()` method to all four native code tutorials (Swift macOS, Obj-C macOS, C++ Linux, C++ Win32) that releases these resources and must be called before app quit. The destroy method resets callback and emitter references and aborts the threadsafe function, allowing the addon's destructor to run properly. An [!IMPORTANT] note is added to each tutorial's JavaScript wrapper section explaining when and why to call destroy(). Fixes #50457 Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> |
||
|
|
4371a4dceb |
docs: add cold-start deep link handling example (#49142)
docs: handle cold-start deep links on Windows/Linux add a check for `process.argv` in the `app.whenReady()` callback to handle deep links when the application is cold-started on Windows and Linux. |
||
|
|
1828690467 |
fix: deprecate ELECTRON_SKIP_BINARY_DOWNLOAD env (#50406)
* fix: remove ELECTRON_SKIP_BINARY_DOWNLOAD it is redundant as of electron v42 its purpose was to skip the binary download for post install script but as of electron v42, post install script is gone and replaced with a lazy download it was also slated for removal in [this comment](https://github.com/electron/rfcs/pull/22#issuecomment-3387307743) * docs: remove ELECTRON_SKIP_BINARY_DOWNLOAD section the env is redundant as of electron v42 so docs don't have to mention it anymore * docs: add ELECTRON_SKIP_BINARY_DOWNLOAD to breaking changes |
||
|
|
4e6324e00b |
docs: remove postinstall lifecycle warning (#50359)
* docs: change postinstall lifecycle to changed from electron v42 * docs: remove postinstall lifecycle warning |
||
|
|
e86cd9da96 |
docs: fix markdown formatting in fuses.md (#50318)
* docs: fix markdown formatting in fuses.md * Use bulleted list (was being run together on one line) * Wrap ASCII diagram in code block * docs: apply suggestions from code review Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> * docs: fix misapplied suggestion --------- Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> |
||
|
|
313e501454 |
feat: add ELECTRON_INSTALL_ env vars (#49981)
* feat: add `ELECTRON_INSTALL_` env vars * add tip for available arches * clarify! * use `arm` instead of `armv7l` |
||
|
|
c4c6195341 |
docs: document Wayland frameless window shadow behaviour (#50193)
docs: update linux frameless window docs to account for hasShadow:false |
||
|
|
d4cbd6cd7d |
docs: fix ipc highlight lines (#50169)
Co-authored-by: Dilukshan <65407969+dilukshann7@users.noreply.github.com> |
||
|
|
62c8db561c | docs: remove release schedule in favor of https://releases.electronjs.org/schedule (#50094) | ||
|
|
d6fc627ba5 |
feat: replace deprecated NSUserNotifications with User Notifications (#47817)
* refactor: replace deprecated NSUserNotifications with User Notifications
Removes deprecated NSUserNotification API, now using User Notifications
It replaces API calls for generating, scheduling, and receiving native
macOS notifications with equivalent API calls from the new framework,
or functionally equivalent implementations.
To preserve the existing Notification module API, special handling was
required in certain cases:
- Dynamically declared notification actions
Typically, notification actions should be declared at app launch time
when using the User Notifications framework. However, this isn’t
compatible with Electron’s architecture. Instead, we dynamically
declare new notifications actions when necessary and carefully manage
the existing actions registered at runtime.
- Localizations for ‘Reply’ and ‘Show’ labels
New translation files are added and processed through GRIT to add
localizations for “Reply” and “Show” button labels which were
initially supplied by the NSUserNotification framework.
* Use NotificationImageRetainer pattern from //chrome
* build: fix lint
* build: update config to handle --translate-gender for pak files
* test: also sign on arm64
* fix: add error handling for scheduling notification
* docs: add details to breaking changes
* docs: clarify breaking change details
* docs: add details for notifications tutorial and API documentation
---------
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
|
||
|
|
19d0c072d5 |
feat: lazy electron download (#49328)
* feat: lazy electron download * better error messaging? * add breaking changes script doc * add binary download step to install instructions * respect no binary env var |
||
|
|
469b2af0c0 | chore: use relative links from docs/ to files outside of docs/ (#49605) | ||
|
|
8b05717661 |
docs: clarify ASAR integrity is supported in MAS builds (#49852)
* docs: clarify ASAR integrity is supported in MAS builds Add a note to the ASAR integrity documentation explicitly stating that this feature is fully supported and recommended in Mac App Store builds. While MAS-installed apps have system-level protections, ASAR integrity provides an additional security layer and is important for MAS builds distributed outside the Mac App Store. Slack thread: https://electronhq.slack.com/archives/CB6CG54DB/p1771449093872419?thread_ts=1771446183.473289&cid=CB6CG54DB https://claude.ai/code/session_01A97nfiqHUVxLNaQyHVXS7j * docs: clarify ASAR integrity support for MAS builds Updates the ASAR integrity documentation to explicitly mention that it is supported and recommended in Mac App Store builds. Clarifies that while MAS-installed apps have system-level protections (Resources folder owned by root), ASAR integrity is especially important when distributing MAS builds through other channels like direct download, since those installations won't have the read-only protections. https://claude.ai/code/session_012mBNZQW34h91NRcdFaLxNh --------- Co-authored-by: Claude <noreply@anthropic.com> |