Compare commits

...

27 Commits

Author SHA1 Message Date
electron-roller[bot]
fdeb9387a1 chore: bump chromium in DEPS to 147.0.7694.0 2026-02-18 15:35:24 +00:00
electron-roller[bot]
f0dcf085a5 chore: bump chromium in DEPS to 147.0.7693.0 2026-02-17 19:25:50 +00:00
electron-roller[bot]
c98cf69f40 chore: bump chromium to 147.0.7687.0 (main) (#49782)
* chore: bump chromium in DEPS to 147.0.7683.0

* fix(patch): constant moved to header

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(patch): occlusion simplification upstream

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove upstreamed patches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: bump chromium in DEPS to 147.0.7685.0

* fix(patch): V1 Keychain removal

Upstream deleted the V1 Keychain API. Removed V1 hunks and adapted

keychain_password_mac.mm to use KeychainV2 APIs.

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7535923: Rename ozone buildflags

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7528398: [LNA] Rename PNA-named files to LNA-named files

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7534194: Convert some functions in ui::Clipboard to async

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7544580: [DevTools] Add command to restart Chrome to DevTools UI bindings

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: bump chromium in DEPS to 147.0.7687.0

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: incorporate learnings into claude skill

I asked Claude to reflect on our upgrade session, consider what it learned and should know in the future, and to update its skill documents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:25:21 -05:00
John Kleinschmidt
0da0c3a47e build: use spawn instead of spawnSync for build (#49774) 2026-02-17 13:24:19 -05:00
John Kleinschmidt
f19cfce430 chore: add Copilot CLI instructions (#49784)
chore: add copilot-instructions
2026-02-17 09:49:59 -05:00
dependabot[bot]
ca61f2d7df build(deps): bump actions-cool/issues-helper from 3.7.5 to 3.7.6 (#49813)
Bumps [actions-cool/issues-helper](https://github.com/actions-cool/issues-helper) from 3.7.5 to 3.7.6.
- [Release notes](https://github.com/actions-cool/issues-helper/releases)
- [Changelog](https://github.com/actions-cool/issues-helper/blob/main/CHANGELOG.md)
- [Commits](e2ff99831a...71b62d7da7)

---
updated-dependencies:
- dependency-name: actions-cool/issues-helper
  dependency-version: 3.7.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 11:24:20 +01:00
dependabot[bot]
1322bee878 build(deps): bump github/codeql-action from 4.32.2 to 4.32.3 (#49814)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.2 to 4.32.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](45cbd0c69e...9e907b5e64)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 11:24:06 +01:00
Samuel Attard
dda71a464c chore: add PR Notes section requirement to CLAUDE.md (#49816)
docs: add PR Notes section requirement to CLAUDE.md

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 01:02:52 -08:00
Shelley Vohr
a056c63fd8 fix: excise abort_report_np usage in MAS (#49726)
* fix: excise abort_report_np usage in MAS

* chore: fix it harder
2026-02-16 12:23:53 +01:00
reito
bf3eb098bd fix: missing shared texture docs (#49797) 2026-02-16 10:51:31 +01:00
Shelley Vohr
67cced1270 build: remove *.star files (#49796) 2026-02-16 10:49:39 +01:00
Shelley Vohr
eb29568e45 feat: introduce os_crypt_async in safeStorage (#49054)
* feat: support Freedesktop Secret Service OSCrypt client

Refs https://issues.chromium.org/issues/40086962
Refs https://issues.chromium.org/issues/447372315

* chore: rework to async interface

* refactor: allow customizing freedesktop config

* docs: add more async impl info

* refactor: reject when temporarily unavailable

* chore: feedback from review

* chore: push_back => emplace_back
2026-02-15 19:54:50 +01:00
Shelley Vohr
dcdbb0397e feat: allow defaulting to printer default page size (#49523)
Co-authored-by: Edvan de Matos <edvan.santos@querodelivery.com>
2026-02-13 07:40:14 -05:00
electron-roller[bot]
3a5f9e0a33 chore: bump node to v24.13.1 (main) (#49744)
* chore: bump node in DEPS to v24.13.1

* chore: fixup patches

refs:
* https://github.com/nodejs/node/pull/60425
* https://github.com/nodejs/node/pull/61270
* https://github.com/nodejs/node/pull/61044

* fix: generate_config_gypi needs to generate valid JSON

https://github.com/nodejs/node/pull/60794

* doc: align Buffer.concat documentation with behavior

https://github.com/nodejs/node/pull/60405

* src: fix off-thread cert loading in bundled cert mode

https://github.com/nodejs/node/pull/60764

* build: fix extraneous includes

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-13 09:48:05 +01:00
Keeley Hammond
f90e35cb45 chore: cherry-pick e045399a1ecb from chromium (#49788)
* chore: cherry-pick e045399a1ecb from chromium

* chore: update patch
2026-02-12 19:24:19 -08:00
Shelley Vohr
74fd10450f feat: improve Windows Toast actions support (#48132)
* feat: improve Windows Toast actions support

* fix: ensure MSIX compatibility

* test: add bad clsid format test
2026-02-12 17:25:20 -05:00
electron-roller[bot]
a65cfed500 chore: bump chromium to 146.0.7666.0 (main) (#49528)
* chore: bump chromium in DEPS to 146.0.7652.0

* fix(patch-conflict): update mas_avoid_private_macos_api_usage context for constrainFrameRect method

The upstream CL added a new constrainFrameRect:toScreen: method override to
NativeWidgetMacNSWindow as part of headless mode window zoom implementation.
The MAS patch's #endif for frameViewClassForStyleMask now correctly appears
after that method, since constrainFrameRect is a public API override that
doesn't need to be guarded.

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

* fix(patch-conflict): update printing.patch for base::DictValue rename

Updated printing.patch to use the new base::DictValue type name instead of
base::Value::Dict following Chromium's type renaming change. This affects
CompleteUpdatePrintSettings() signature and related code.

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

* fix(patch-conflict): update accessibility_ui patch for base::DictValue/ListValue rename

Updated adjust_accessibility_ui_for_electron.patch to use the new
base::DictValue and base::ListValue type names instead of base::Value::Dict
and base::Value::List following Chromium's type renaming change.

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

* chore: update patches

* 6625736: Rename DURABLE_STORAGE to PERSISTENT_STORAGE for consistency | https://chromium-review.googlesource.com/c/chromium/src/+/6625736

* chore: bump chromium in DEPS to 146.0.7653.0

* chore: update patches

* 7000847: add type tag to v8::External for gin_helper function templates

The upstream gin function templates now use v8::ExternalPointerTypeTag
for type safety when using v8::External. Updated Electron's forked
gin_helper function template to use the same kGinInternalCallbackHolderBaseTag
that Chromium's gin uses.

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

* fix(patch-update): extend V8 Object API deprecation patch for Node.js

Extended the existing patch to cover additional files that use
GetAlignedPointerFromInternalField and SetAlignedPointerInInternalField:
- src/stream_base-inl.h
- src/udp_wrap.cc
- src/js_udp_wrap.cc
- src/node_process_methods.cc
- src/node_snapshotable.cc
- src/base_object.cc

These APIs now require an EmbedderDataTypeTag parameter.

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/7087956

* 7000847: add type tag to v8::External calls in shared_texture

Updated v8::External::New and v8::External::Value calls to use the
kExternalPointerTypeTagDefault tag as required by the V8 API change
that deprecates the tagless versions.

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

* 7508687: use ChildProcessId for file permission APIs

The ChildProcessSecurityPolicy::CanReadFile and GrantReadFile APIs
now require ChildProcessId instead of int. Updated to use GetID()
instead of GetDeprecatedID() for these specific calls.

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

* 7000847: add type tag to v8::External calls in callback and osr_converter

The v8::External API now requires an EmbedderPointerTypeTag parameter
for both New() and Value() methods to improve V8 sandbox type safety.

Updated calls in:
- callback.cc: TranslatorHolder constructor and CallTranslator
- osr_converter.cc: OffscreenSharedTextureValue converter

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/7000847

* fixup! 7087956: [api] Promote deprecation of v8::Context and v8::Object API methods

Extended the Node.js patch to cover histogram.cc which also uses
SetAlignedPointerInInternalField and GetAlignedPointerFromInternalField
APIs that now require the EmbedderDataTypeTag parameter.

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/7087956

* chore: bump chromium in DEPS to 146.0.7655.0

* chore: update patches

* 7509043: update WebSpellingMarker type for API change

The upstream Chromium API changed - WebSpellingMarker was moved from a
nested type within WebTextCheckClient to a standalone type in the blink
namespace.

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

* 7498491: update process_id to use OriginatingProcess type

The upstream Chromium API changed - URLLoaderFactoryParams::process_id
was changed from an integer to a union type network::OriginatingProcess
that distinguishes between browser and renderer processes.

- For browser process requests, use OriginatingProcess::browser()
- For renderer process lookups, check !is_browser() and use
  renderer_process().value() to get the child_id

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

* 5710330: Add crash keys to debug NativeWidgetMacNSWindowBorderlessFrame exception | https://chromium-review.googlesource.com/c/chromium/src/+/5710330

5710330 added a new NSNextStepFrame interface extension and
implementations for NativeWidgetMacNSWindowTitledFrame and
NativeWidgetMacNSWindowBorderlessFrame. These use private macOS APIs
that are not available in Mac App Store builds.

* chore: update patches

* chore: bump chromium in DEPS to 146.0.7661.0

* chore: bump chromium in DEPS to 146.0.7663.0

* fix(patch-conflict): update accessibility_ui for string_view API change

Upstream removed redundant std::string(default_api_type) conversion as part
of a string_view optimization cleanup. Updated patch context to match.

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

* fix(patch-conflict): update service process launch options for sandbox API refactor

Upstream removed content/common/sandbox_init_win.cc and
content/public/common/sandbox_init_win.h, moving the functionality directly
into ChildProcessLauncherHelper. Updated patch to call
sandbox::policy::SandboxWin::StartSandboxedProcess directly with the
LaunchOptions pointer instead of going through the removed helper.

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

* fix(patch-conflict): update MAS safestorage for keychain API refactor

Upstream refactored KeychainPassword::GetPassword() to use a new
GetPasswordImpl() helper function with improved error tracking via
base::expected<std::string, OSStatus>. Adapted patch to use the new
GetPasswordImpl with the suffixed account name and handle migration
from legacy accounts through the new API.

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

* chore: update patches

* chore: bump chromium in DEPS to 146.0.7663.0

* fix: base::Value::Dict -> base::DictValue
https://chromium-review.googlesource.com/c/chromium/src/+/7513889

* fix: include new cookie exclusion reason
https://chromium-review.googlesource.com/c/chromium/src/+/7486527

* fix: enable libc++ ABI flag for trivially copyable std::vector<bool>

Required for changes introduced in the following CL
https://chromium-review.googlesource.com/c/chromium/src/+/7513653

* fixup! fix: base::Value::Dict -> base::DictValue https://chromium-review.googlesource.com/c/chromium/src/+/7513889

* fix: spellcheck not working in tests
https://chromium-review.googlesource.com/c/chromium/src/+/7452579

* fix: cookie test failing due to multiple rejection reasons
https://chromium-review.googlesource.com/c/chromium/src/+/7506629

* fix: macos sizing unmaximized window incorrectly
https://chromium-review.googlesource.com/c/chromium/src/+/7487666

Changes to headless mode caused the unmaximized window to subtract
the height of the menubar.

* fix: skip tests for incompatible BoringSSL ML-DSA crypto
https://boringssl-review.googlesource.com/c/boringssl/+/84929

* test: fix pseudonymization registration in utility process on Linux

Ref: 7486913: Pass pseudonymization salt via shared memory at process launch | https://chromium-review.googlesource.com/c/chromium/src/+/7486913

* fix: restore MAS patch-outs

Restores some `#if !IS_MAS_BUILD()` gates dropped in 773054ad59

* fixup! 7508687: use ChildProcessId for file permission APIs

* fixup! fix(patch-conflict): update MAS safestorage for keychain API refactor

* chore: add note about parallel upstream change

* fixup! Merge remote-tracking branch 'origin/main' into roller/chromium/main

* Revert "fixup! 7508687: use ChildProcessId for file permission APIs"

This reverts commit 05c43e4e5d.

The _impl version has the signature, but not the public interface. :oof:

* fixup! fix(patch-conflict): update MAS safestorage for keychain API refactor

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
2026-02-12 12:37:56 -05:00
Calvin
e9faa14cc0 test: drag region tests (#49266) 2026-02-12 01:50:02 -06:00
Niklas Wenzel
ce47542ccd feat: add support for long-animation-frame script attribution (#49706)
* feat: add support for `long-animation-frame` script attribution

* docs: document `AlwaysLogLOAFURL`

* chore: add test

* docs: adjust docs as per PR comment

* fix: test failures

* chore: simplify test

* fix: tests on Windows and Linux
2026-02-11 09:34:22 -08:00
dependabot[bot]
ff2df2c98a build(deps): bump diff from 3.5.0 to 3.5.1 in the npm_and_yarn group across 1 directory (#49666)
build(deps): bump diff in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [diff](https://github.com/kpdecker/jsdiff).


Updates `diff` from 3.5.0 to 3.5.1
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: diff
  dependency-version: 3.5.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 16:52:05 +01:00
John Kleinschmidt
0284b9afcc build: fixup attestation for release assets (#49732)
* build: fixup attestation for release assets

* Generate artifact attestation for generated artifacts

* set id-token for attestation

* Add artifact-metadata permission for attestation

* add permissions for testing attestations

* Revert "add permissions for testing attestations"

This reverts commit 0284bed175.

* Revert "set id-token for attestation"

This reverts commit 69a1b13a18.

* Revert "Generate artifact attestation for generated artifacts"

This reverts commit ee0536eceb.
2026-02-11 07:17:59 -05:00
David Sanders
52061b4c28 ci: add markdownlint problem matcher (#49751) 2026-02-11 13:17:29 +01:00
David Sanders
ec6d2fe549 build(dev-deps): update micromark-core-commonmark to 2.0.3 (#49749) 2026-02-11 13:11:58 +01:00
Ronald Eddy Jr
1c621cc982 docs: fix typos across documentation (#49734)
Fix 40 typos across 25 documentation files including misspellings,
missing words, doubled words, wrong words, and grammatical errors.
2026-02-11 12:45:46 +01:00
Shelley Vohr
57a6e43025 fix: revoke Read access after removing file via FileSystemAccess API (#49620)
Refs https://chromium-review.googlesource.com/6677249
2026-02-10 15:48:05 +01:00
dependabot[bot]
ef5b232e9f build(deps): bump github/codeql-action from 4.32.1 to 4.32.2 (#49735)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.1 to 4.32.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bc82e05fd...45cbd0c69e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 15:06:42 +01:00
Bug-Reaper
99fce5b6ca fix: address upstream Chromium shift to enable CoreAudio Tap API for audio capture used in electron's desktopCapturer (🍏 macOS). (#49717)
* fix: Enable CoreAudio Tap API for Audio Capture (🍏 macOS)

* fix: addressed markdown issue which caused pre-commit hook failure

🧑‍🔧 : Ref : https://github.com/electron/electron/pull/49717#issuecomment-3874660013

* fix: updated docs to cover `desktopCapturer` nuances with macOS

📝 : PR https://github.com/electron/electron/pull/49717
2026-02-10 15:06:21 +01:00
339 changed files with 4854 additions and 3369 deletions

View File

@@ -7,14 +7,13 @@ description: Guide for performing Chromium version upgrades in the Electron proj
## Summary
Run `e sync --3` repeatedly, fixing patch conflicts as they arise, until it succeeds. Then run `e patches all` and commit changes atomically.
Run `e sync --3` repeatedly, fixing patch conflicts as they arise, until it succeeds. Then export patches and commit changes atomically.
## Success Criteria
Phase One is complete when:
- `e sync --3` exits with code 0 (no patch failures)
- `e patches all` has been run to export all changes
- All changes are committed per the commit guidelines below
- All changes are committed per the commit guidelines
Do not stop until these criteria are met.
@@ -30,12 +29,18 @@ The `roller/chromium/main` branch is created by automation to update Electron's
- `patches/`: Patch files organized by target
- `docs/development/patches.md`: Patch system documentation
## Pre-flight Checks
Run these once at the start of each upgrade session:
1. **Clear rerere cache** (if enabled): `git rerere clear` in both the electron and `..` repos. Stale recorded resolutions from a prior attempt can silently apply wrong merges.
2. **Ensure pre-commit hooks are installed**: Check that `.git/hooks/pre-commit` exists. If not, run `yarn husky` to install it. The hook runs `lint-staged` which handles clang-format for C++ files.
## Workflow
1. Delete the `.git/rr-cache` in both the `electron` and `..` folder to ensure no accidental rerere replays occur from before this upgrade phase attempt started
2. Run `e sync --3` (the `--3` flag enables 3-way merge, always required)
3. If succeeds → skip to step 6
4. If patch fails:
1. Run `e sync --3` (the `--3` flag enables 3-way merge, always required)
2. If succeeds → skip to step 5
3. If patch fails:
- Identify target repo and patch from error output
- Analyze failure (see references/patch-analysis.md)
- Fix conflict in target repo's working directory
@@ -43,10 +48,8 @@ The `roller/chromium/main` branch is created by automation to update Electron's
- Repeat until all patches for that repo apply
- IMPORTANT: Once `git am --continue` succeeds you MUST run `e patches {target}` to export fixes
- Return to step 1
5. When `e sync --3` succeeds, run `e patches all`
6. **Read `references/phase-one-commit-guidelines.md` NOW**, then commit changes following those instructions exactly.
Before committing any Phase One changes, you MUST read `references/phase-one-commit-guidelines.md` and follow its instructions exactly.
4. When `e sync --3` succeeds, run `e patches all`
5. **Read `references/phase-one-commit-guidelines.md` NOW**, then commit changes following those instructions exactly.
## Commands Reference
@@ -56,6 +59,7 @@ Before committing any Phase One changes, you MUST read `references/phase-one-com
| `git am --continue` | Continue after resolving conflict (run in target repo) |
| `e patches {target}` | Export commits from target repo to patch files |
| `e patches all` | Export all patches from all targets |
| `e patches {target} --commit-updates` | Export patches and auto-commit trivial changes |
| `e patches --list-targets` | List targets and config paths |
## Patch System Mental Model
@@ -81,24 +85,20 @@ Fix existing patches 99% of the time rather than creating new ones.
2. **Never change TODO assignees**: `TODO(name)` must retain original name
3. **Update descriptions**: If upstream changed (e.g., `DCHECK``CHECK_IS_TEST`), update patch commit message to reflect current state
## Final Deliverable
After Phase One, write a summary of every change: what was fixed, why, reasoning, and Chromium CL links.
# Electron Chromium Upgrade: Phase Two
## Summary
Run `e build -k 999` repeatedly, fixing build issues as they arise, until it succeeds. Then run `e start --version` to validate Electron launches and commit changes atomically.
Run `e build -k 999 -- --quiet` repeatedly, fixing build issues as they arise, until it succeeds. Then run `e start --version` to validate Electron launches and commit changes atomically.
Run Phase Two immediately after Phase One is complete.
## Success Criteria
Phase Two is complete when:
- `e build -k 999` exits with code 0 (no build failures)
- `e build -k 999 -- --quiet` exits with code 0 (no build failures)
- `e start --version` has been run to check Electron launches
- All changes are committed per the commit guidelines below
- All changes are committed per the commit guidelines
Do not stop until these criteria are met. Do not delete code or features, never comment out code in order to take short cut. Make all existing code, logic and intention work.
@@ -112,8 +112,7 @@ The `roller/chromium/main` branch is created by automation to update Electron's
## Workflow
1. Run `e build -k 999` (the `-k 999` flag is a flag to ninja to say "do not stop until you find that many errors" it is an attempt to get as much error
context as possible for each time we run build)
1. Run `e build -k 999 -- --quiet` (the `--quiet` flag suppresses per-target status lines, showing only errors and the final result)
2. If succeeds → skip to step 6
3. If build fails:
- Identify underlying file in "electron" from the compilation error message
@@ -126,27 +125,17 @@ The `roller/chromium/main` branch is created by automation to update Electron's
4. **CRITICAL**: After ANY commit (especially patch commits), immediately run `git status` in the electron repo
- Look for other modified `.patch` files that only have index/hunk header changes
- These are dependent patches affected by your fix
- Commit them immediately with: `git commit -am "chore: update patch hunk headers"`
- This prevents losing track of necessary updates
- Commit them immediately with: `git commit -am "chore: update patches (trivial only)"`
5. Return to step 1
6. When `e build` succeeds, run `e start --version`
7. Check if you have any pending changes in the Chromium repo by running `git status`
- If you have changes follow the instructions below in "A. Patch Fixes" to correctly commit those modifications into the appropriate patch file
Before committing any Phase Two changes, you MUST read `references/phase-two-commit-guidelines.md` and follow its instructions exactly.
## Build Error Detection
When monitoring `e build -k 999` output, filter for errors using this regex pattern:
error:|FAILED:|fatal:|subcommand failed|build finished
The build output is extremely verbose. Filtering is essential to catch errors quickly.
## Commands Reference
| Command | Purpose |
|---------|---------|
| `e build -k 999` | Builds Electron and won't stop until either all targets attempted or 999 errors found |
| `e build -k 999 -- --quiet` | Build Electron, continue on errors, suppress status lines |
| `e build -t {target}.o` | Build just one specific target to verify a fix |
| `e start --version` | Validate Electron launches after successful build |
@@ -163,28 +152,21 @@ When the error is in a file that Electron patches (check with `grep -l "filename
git add <modified-file>
git commit --fixup=<original-patch-commit-hash>
GIT_SEQUENCE_EDITOR=: git rebase --autosquash --autostash -i <commit>^
3. Export the updated patch: e patches chromium
4. Commit the updated patch file in the electron repo following the `references/phase-one-commit-guidelines.md`, then commit changes following those instructions exactly. **READ THESE GUIDELINES BEFORE COMMITTING THESE CHANGES**
```
3. Export the updated patch: `e patches chromium`
4. Commit the updated patch file following `references/phase-one-commit-guidelines.md`.
To find the original patch commit to fixup: `git log --oneline | grep -i "keyword from patch name"`
The base commit for rebase is the Chromium commit before patches were applied. Find it by checking the `refs/patches/upstream-head` ref.
B. Electron Code Fixes (for files in shell/, electron/, etc.)
### B. Electron Code Fixes (for files in shell/, electron/, etc.)
When the error is in Electron's own source code:
1. Edit files directly in the electron repo
2. Commit directly (no patch export needed)
Dependent Patch Updates
IMPORTANT: When you modify a patch, other patches that apply to the same file may have their hunk headers invalidated. After committing a patch fix:
1. Run git status in the electron repo
2. Look for other modified .patch files with just index/hunk header changes
3. Commit these with: git commit -m "chore: update patch hunk headers"
# Critical: Read Before Committing
- Before ANY Phase One commits: Read `references/phase-one-commit-guidelines.md`
@@ -196,4 +178,4 @@ This skill has additional reference files in `references/`:
- phase-one-commit-guidelines.md - Commit format for Phase One
- phase-two-commit-guidelines.md - Commit format for Phase Two
Read these when referenced in the workflow steps.
Read these when referenced in the workflow steps.

View File

@@ -17,6 +17,56 @@
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/{CL_NUMBER}
```
## Critical: Resolve by Intent, Not by Mechanical Merge
When resolving a patch conflict, do NOT blindly preserve the patch's old code. Instead:
1. **Understand the upstream CL's full scope** — not just the conflicting hunk.
Run `git show <commit> --stat` and read diffs for all affected files.
Upstream may have removed structs, members, or methods that the patch
references in other hunks or files.
2. **Re-read the patch commit message** to understand its *intent* — what
behavior does it need to preserve or add?
3. **Implement the intent against the new upstream code.** If the patch's
purpose is "add a feature flag guard", add only the guard — don't also
restore old code inside the guard that upstream separately removed.
### Lesson: Upstream Removals Break Patch References
- **Trigger:** Patch conflict involves an upstream refactor (not just context drift)
- **Strategy:** After identifying the upstream CL, check its full diff for
removed types, members, and methods. If the patch's old code references
something removed, the resolution must use the new upstream mechanism.
- **Evidence:** An upstream CL removed a `HeadlessModeWindow` struct from a
header, but the conflict was only in a `.mm` file. Mechanically keeping the
patch's old line (`headless_mode_window_ = ...`) produced code referencing
a nonexistent type — caught only on review, not at patch-apply time.
### Lesson: Separate Patch Purpose from Patch Implementation
- **Trigger:** Conflict between "upstream simplified code" vs "patch has older code"
- **Strategy:** Identify the *minimal* change the patch needs. If the patch
wraps code in a conditional, only add the conditional — don't restore old
code that was inside the conditional but was separately cleaned up upstream.
- **Evidence:** An occlusion patch needed only a feature flag check, but the
old patch also contained a version check that upstream intentionally removed.
Mechanically preserving the old patch code re-added the removed check.
### Lesson: Finish the Adaptation at Conflict Time
- **Trigger:** A patch conflict involves an upstream API removal or replacement
- **Strategy:** When resolving the conflict, fully adapt the patch to use the
new API in the same commit. Don't remove the old code and leave behind stale
references that will "be fixed in Phase Two." Each patch fix commit should be
a complete resolution.
- **Evidence:** A safestorage patch conflicted because Chromium removed Keychain V1.
The conflict was resolved by removing V1 hunks, but the remaining code still
called V1 methods (`FindGenericPassword` with 3 args, `ItemDelete` with
`SecKeychainItemRef`). These should have been adapted to V2 APIs in the same
commit, not deferred.
## Common Failure Patterns
| Pattern | Cause | Solution |

View File

@@ -4,19 +4,65 @@ Only follow these instructions if there are uncommitted changes to `patches/` af
Ignore other instructions about making commit messages, our guidelines are CRITICALLY IMPORTANT and must be followed.
## Atomic Commits
## Each Commit Must Be Complete
For each fix made to a patch, create a separate commit:
When resolving a patch conflict, fully adapt the patch to the new upstream code in the same commit. If the upstream change removes an API the patch uses, update the patch to use the replacement API now — don't leave stale references knowing they'll need fixing later. The goal is that each commit represents a finished resolution, not a partial one that defers known work to a future phase.
## Commit Message Style
**Titles** follow the 60/80-character guideline: simple changes fit within 60 characters, otherwise the limit is 80 characters.
Always include a `Co-Authored-By` trailer identifying the AI model that assisted (e.g., `Co-Authored-By: <AI model attribution>`).
### Patch conflict fixes
Use `fix(patch):` prefix. The title should name the upstream change, not your response to it:
```
fix(patch-conflict): {concise title}
{Brief explanation, 1-2 paragraphs max}
fix(patch): {topic headline}
Ref: {Chromium CL link}
Co-Authored-By: <AI model attribution>
```
IMPORTANT: Ensure that any changes made to patch content as a result of a change in Chromium is committed individually. Each change should have it's own commit message and it's own REF.
Only add a description body if it provides clarity beyond the title. For straightforward context drift or simple API renames, the title + Ref is sufficient.
Examples:
- `fix(patch): constant moved to header`
- `fix(patch): headless mode refactor upstream`
- `fix(patch): V1 Keychain removal`
### Upstreamed patch removal
When patches are no longer needed (applied cleanly with "already applied" or confirmed upstreamed), group ALL removals into a single commit:
```
chore: remove upstreamed patch
```
or (if multiple):
```
chore: remove upstreamed patches
```
If the patch file did NOT contain a `Reviewed-on: https://chromium-review.googlesource.com/c/chromium/...` link, add a `Ref:` in the commit. If it did (i.e. cherry-picks), no `Ref:` is needed.
### Trivial patch updates
After all fix commits, stage remaining trivial changes (index, line numbers, context only):
```bash
git add patches
git commit -m "chore: update patches (trivial only)"
```
**Conflict resolution can produce trivial results.** A `git am` conflict doesn't always mean the patch content changed — context drift alone can cause a conflict. After resolving and exporting, inspect the patch diff: if only index hashes, line numbers, and context lines changed (not the patch's own `+`/`-` lines), it's trivial and belongs here, not in a `fix(patch):` commit.
## Atomic Commits
Each patch conflict fix gets its own commit with its own Ref.
IMPORTANT: Try really hard to find the CL reference per the instructions below. Each change you made should in theory have been in response to a change made in Chromium that you identified or can identify. Try for a while to identify and include the ref in the commit message. Do not give up easily.
@@ -30,23 +76,27 @@ Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/XXXXXXX
If no CL found after searching: `Ref: Unable to locate CL`
## Final Cleanup
## Example Commits
After all fix commits, stage remaining changes:
```bash
git add patches
git commit -m "chore: update patch hunk headers"
```
## Example Commit
### Patch conflict fix (simple — title is sufficient)
```
fix(patch-conflict): update web_contents_impl.cc context for navigation refactor
fix(patch): constant moved to header
The upstream navigation code was refactored to use NavigationRequest directly
instead of going through NavigationController. Updated surrounding context
to match new code structure.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7536483
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/1234567
```
Co-Authored-By: <AI model attribution>
```
### Patch conflict fix (complex — description adds value)
```
fix(patch): V1 Keychain removal
Upstream deleted the V1 Keychain API. Removed V1 hunks and adapted
keychain_password_mac.mm to use KeychainV2 APIs.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7540447
Co-Authored-By: <AI model attribution>
```

View File

@@ -4,41 +4,37 @@ Only follow these instructions if there are uncommitted changes in the Electron
Ignore other instructions about making commit messages, our guidelines are CRITICALLY IMPORTANT and must be followed.
## Commit Message Style
**Titles** follow the 60/80-character guideline: simple changes fit within 60 characters, otherwise the limit is 80 characters. Exception: upstream Chromium CL titles are used verbatim even if longer.
Always include a `Co-Authored-By` trailer identifying the AI model that assisted (e.g., `Co-Authored-By: <AI model attribution>`).
## Two Commit Types
### For Electron Source Changes (shell/, electron/, etc.)
```
{CL-Number}: {concise description of API change}
{Brief explanation of what upstream changed and how Electron was adapted}
{CL-Number}: {upstream CL's original title}
Ref: {Chromium CL link}
Co-Authored-By: <AI model attribution>
```
IMPORTANT: Ensure that any change made to electron as a result of a change in Chromium is committed individually. Each change should have it's own commit message and it's own REF. Logically grouped into commits that make sense rather than one giant commit.
Use the **upstream CL's original commit title** — do not paraphrase or rewrite it. To find it: `git log -1 --format=%s <chromium-commit-hash>`.
IMPORTANT: Try really hard to find the CL reference per the instructions below. Each change you made should in theory have been in response to a change made in Chromium that you identified or can identify. Try for a while to identify and include the ref in the commit message. Do not give up easily.
Only add a description body if it provides clarity beyond what the title already says (e.g., when Electron's adaptation is non-obvious). For simple renames, method additions, or straightforward API updates, the title + Ref link is sufficient.
You may include multiple "Ref" links if required.
Each change should have its own commit and its own Ref. Logically group into commits that make sense rather than one giant commit. You may include multiple "Ref" links if required.
For a CL link in the format `https://chromium-review.googlesource.com/c/chromium/src/+/2958369` the "CL-Number" is `2958369`
For a CL link in the format `https://chromium-review.googlesource.com/c/chromium/src/+/2958369` the "CL-Number" is `2958369`.
IMPORTANT: Try really hard to find the CL reference. Each change you made should in theory have been in response to a change in Chromium. Do not give up easily.
### For Patch Updates (patches/chromium/*.patch)
Use the same fixup workflow as Phase One:
1. Fix in Chromium source tree
2. Fixup commit + rebase
3. Export with `e patches chromium`
4. Commit the patch file:
```
fix(patch-update): {concise description}
{Brief explanation}
Ref: {Chromium CL link}
```
Use the same fixup workflow as Phase One and follow `references/phase-one-commit-guidelines.md` for the commit message format (`fix(patch):` prefix, topic style).
## Dependent Patch Header Updates
@@ -46,37 +42,43 @@ After any patch modification, check for other affected patches:
```bash
git status
# If other .patch files show as modified with only hunk header changes:
# If other .patch files show as modified with only index, line number, and context changes:
git add patches/
git commit -m "chore: update patch hunk headers"
git commit -m "chore: update patches (trivial only)"
```
## Finding CL References
Use git log or git blame on Chromium source files. Look for:
```
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/XXXXXXX
```
If no CL found after searching: Ref: Unable to locate CL
If no CL found after searching: `Ref: Unable to locate CL`
## Example Commits
### Electron Source Fix
### Electron Source Fix (simple — title is self-explanatory)
fix: update GetPlugins to GetPluginsAsync for API change
```
7535923: Rename ozone buildflags
The upstream Chromium API changed:
- Old: GetPlugins(callback) - took a callback
- New: GetPluginsAsync(callback) - async version takes a callback
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7535923
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/1234567
Co-Authored-By: <AI model attribution>
```
### Patch Fix
### Electron Source Fix (complex — description adds value)
fix(patch-conflict): update picture-in-picture for gesture handling refactor
```
7534194: Convert some functions in ui::Clipboard to async
Upstream added new gesture handling code that accesses live caption dialog.
The live caption functionality is disabled in Electron's patch, so wrapped
the new code in #if 0 guards to match existing pattern.
Adapted ExtractCustomPlatformNames calls to use RunLoop pattern
consistent with existing ReadImage implementation, since upstream
converted the API from synchronous return to callback-based.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7654321
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7534194
Co-Authored-By: <AI model attribution>
```

View File

@@ -15,7 +15,7 @@ runs:
git config --global core.preloadindex true
git config --global core.longpaths true
fi
export BUILD_TOOLS_SHA=4430e4a505e0f4fa2a41b707a10a36f780bbdd26
export BUILD_TOOLS_SHA=a0cc95a1884a631559bcca0c948465b725d9295a
npm i -g @electron/build-tools
# Update depot_tools to ensure python
e d update_depot_tools

122
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,122 @@
# Copilot Instructions for Electron
## Build System
Electron uses `@electron/build-tools` (`e` CLI). Install with `npm i -g @electron/build-tools`.
```bash
e sync # Fetch sources and apply patches
e build # Build Electron (GN + Ninja)
e build -k 999 # Build, continuing through errors
e start # Run built Electron
e start --version # Verify Electron launches
e test # Run full test suite
e debug # Run in debugger (lldb on macOS, gdb on Linux)
```
### Linting
```bash
npm run lint # Run all linters (JS, C++, Python, GN, docs)
npm run lint:js # JavaScript/TypeScript only
npm run lint:clang-format # C++ formatting only
npm run lint:cpp # C++ linting only
npm run lint:docs # Documentation only
```
### Running a Single Test
```bash
npm run test -- -g "pattern" # Run tests matching a regex pattern
# Example: npm run test -- -g "ipc"
```
### Running a Single Node.js Test
```bash
node script/node-spec-runner.js parallel/test-crypto-keygen
```
## Architecture
Electron embeds Chromium (rendering) and Node.js (backend) to enable desktop apps with web technologies. The parent directory (`../`) is the Chromium source tree.
### Process Model
Electron has two primary process types, mirroring Chromium:
- **Main process** (`shell/browser/` + `lib/browser/`): Controls app lifecycle, creates windows, system APIs
- **Renderer process** (`shell/renderer/` + `lib/renderer/`): Runs web content in BrowserWindows
### Native ↔ JavaScript Bridge
Each API is implemented as a C++/JS pair:
- C++ side: `shell/browser/api/electron_api_{name}.cc/.h` — uses `gin::Wrappable` and `ObjectTemplateBuilder`
- JS side: `lib/browser/api/{name}.ts` — exports the module, registered in `lib/browser/api/module-list.ts`
- Binding: `NODE_LINKED_BINDING_CONTEXT_AWARE(electron_browser_{name}, Initialize)` in C++ and registered in `shell/common/node_bindings.cc`
- Type declaration: `typings/internal-ambient.d.ts` maps `process._linkedBinding('electron_browser_{name}')`
### Patches System
Electron patches upstream dependencies (Chromium, Node.js, V8, etc.) rather than forking them. Patches live in `patches/` organized by target, with `patches/config.json` mapping directories to repos.
```text
patches/{target}/*.patch → [e sync] → target repo commits
← [e patches] ←
```
Key rules:
- Fix existing patches rather than creating new ones
- Preserve original authorship in TODO comments — never change `TODO(name)` assignees
- Each patch commit message must explain why the patch exists
- After modifying patches, run `e patches {target}` to export
When working on the `roller/chromium/main` branch for Chromium upgrades, use `e sync --3` for 3-way merge conflict resolution.
## Conventions
### File Naming
- JS/TS files: kebab-case (`file-name.ts`)
- C++ files: snake_case with `electron_api_` prefix (`electron_api_safe_storage.cc`)
- Test files: `api-{module-name}-spec.ts` in `spec/`
- Source file lists are maintained in `filenames.gni` (with platform-specific sections)
### JavaScript/TypeScript
- Semicolons required (`"semi": ["error", "always"]`)
- `const` and `let` only (no `var`)
- Arrow functions preferred
- Import order enforced: `@electron/internal``@electron``electron` → external → builtin → relative
- API naming: `PascalCase` for classes (`BrowserWindow`), `camelCase` for module APIs (`globalShortcut`)
- Prefer getters/setters over jQuery-style `.text([text])` patterns
### C++
- Follows Chromium coding style, enforced by `clang-format` and `clang-tidy`
- Uses Chromium abstractions (`base::`, `content::`, etc.)
- Header guards: `#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_{NAME}_H_`
- Platform-specific files: `_mac.mm`, `_win.cc`, `_linux.cc`
### Testing
- Framework: Mocha + Chai + Sinon
- Test helpers in `spec/lib/` (e.g., `spec-helpers.ts`, `window-helpers.ts`)
- Use `defer()` from spec-helpers for cleanup, `closeAllWindows()` for window teardown
- Tests import from `electron/main` or `electron/renderer`
### Documentation
- API docs in `docs/api/` as Markdown, parsed by `@electron/docs-parser` to generate `electron.d.ts`
- API history tracked via YAML blocks in HTML comments within doc files
- Docs must pass `npm run lint:docs`
### Build Configuration
- `BUILD.gn`: Main GN build config
- `buildflags/buildflags.gni`: Feature flags (PDF viewer, extensions, spellchecker)
- `build/args/`: Build argument profiles (`testing.gn`, `release.gn`, `all.gn`)
- `DEPS`: Dependency versions and checkout paths
- `chromium_src/`: Chromium source file overrides (compiled instead of originals)

View File

@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+)\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}

View File

@@ -75,7 +75,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Create comment
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3.7.5
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -146,7 +146,7 @@ jobs:
}
- name: Create unsupported major comment
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3.7.5
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -46,6 +46,7 @@ jobs:
publish-x64:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -65,6 +66,7 @@ jobs:
publish-arm:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -84,6 +86,7 @@ jobs:
publish-arm64:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write

View File

@@ -50,6 +50,7 @@ jobs:
publish-x64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -69,6 +70,7 @@ jobs:
publish-x64-mas:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -88,6 +90,7 @@ jobs:
publish-arm64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -107,6 +110,7 @@ jobs:
publish-arm64-mas:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write

View File

@@ -65,9 +65,11 @@ jobs:
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS
gclient sync --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]"
- name: Add ESLint problem matcher
- name: Add problem matchers
shell: bash
run: echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json"
run: |
echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json"
echo "::add-matcher::src/electron/.github/problem-matchers/markdownlint.json"
- name: Run Lint
shell: bash
run: |

View File

@@ -93,6 +93,7 @@ jobs:
shell: bash
runs-on: ${{ inputs.build-runs-on }}
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write

View File

@@ -56,7 +56,7 @@ jobs:
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Create comment
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3.7.5
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -51,6 +51,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@6bc82e05fd0ea64601dd4b465378bbcf57de0314 # v3.29.5
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -54,6 +54,7 @@ jobs:
publish-x64-win:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -72,6 +73,7 @@ jobs:
publish-arm64-win:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
@@ -90,6 +92,7 @@ jobs:
publish-x86-win:
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write

View File

@@ -596,6 +596,7 @@ source_set("electron_lib") {
use_libcxx_modules = false
deps += [
"//components/os_crypt/async/browser:keychain_key_provider",
"//components/os_crypt/common:keychain_password_mac",
"//components/remote_cocoa/app_shim",
"//components/remote_cocoa/browser",
@@ -658,6 +659,9 @@ source_set("electron_lib") {
":libnotify_loader",
"//build/config/linux/gtk",
"//components/crash/content/browser",
"//components/os_crypt/async/browser:freedesktop_secret_key_provider",
"//components/os_crypt/async/browser:posix_key_provider",
"//components/os_crypt/async/browser:secret_portal_key_provider",
"//dbus",
"//device/bluetooth",
"//third_party/crashpad/crashpad/client",
@@ -698,6 +702,7 @@ source_set("electron_lib") {
deps += [
"//components/app_launch_prefetch",
"//components/crash/core/app:crash_export_thunks",
"//components/os_crypt/async/browser:dpapi_key_provider",
"//third_party/libxml:xml_writer",
"//ui/wm",
"//ui/wm/public",

View File

@@ -155,6 +155,10 @@ e test # Run full test suite
When working on the `roller/chromium/main` branch to upgrade Chromium activate the "Electron Chromium Upgrade" skill.
## Pull Requests
PR bodies must always include a `Notes:` section as the **last line** of the body. This is a consumer-facing release note for Electron app developers — describe the user-visible fix or change, not internal implementation details. Use `Notes: none` if there is no user-facing change.
## Code Style
**C++:** Follows Chromium style, enforced by clang-format

4
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'146.0.7650.0',
'147.0.7694.0',
'node_version':
'v24.13.0',
'v24.13.1',
'nan_version':
'675cefebca42410733da8a454c8d9391fcebfbc2',
'squirrel.mac_version':

View File

@@ -1,21 +0,0 @@
# -*- bazel-starlark -*-
load("@builtin//struct.star", "module")
def __platform_properties(ctx):
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:d7cb1ab14a0f20aa669c23f22c15a9dead761dcac19f43985bf9dd5f41fbef3a"
return {
"default": {
"OSFamily": "Linux",
"container-image": container_image,
},
"large": {
"OSFamily": "Linux",
"container-image": container_image,
},
}
backend = module(
"backend",
platform_properties = __platform_properties,
)

View File

@@ -1,66 +0,0 @@
load("@builtin//encoding.star", "json")
load("@builtin//path.star", "path")
load("@builtin//runtime.star", "runtime")
load("@builtin//struct.star", "module")
load("@config//main.star", upstream_init = "init")
load("@config//win_sdk.star", "win_sdk")
load("@config//gn_logs.star", "gn_logs")
def init(ctx):
mod = upstream_init(ctx)
step_config = json.decode(mod.step_config)
# Buildbarn doesn't support input_root_absolute_path so disable that
for rule in step_config["rules"]:
input_root_absolute_path = rule.get("input_root_absolute_path", False)
if input_root_absolute_path:
rule.pop("input_root_absolute_path", None)
# Only wrap clang rules with a remote wrapper if not on Linux. These are currently only
# needed for X-Compile builds, which run on Windows and Mac.
if runtime.os != "linux":
for rule in step_config["rules"]:
if rule["name"].startswith("clang/") or rule["name"].startswith("clang-cl/"):
rule["remote_wrapper"] = "../../buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper"
if "inputs" not in rule:
rule["inputs"] = []
rule["inputs"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
rule["inputs"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
if "executables" not in step_config:
step_config["executables"] = []
step_config["executables"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
step_config["executables"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
if runtime.os == "darwin":
# Update platforms to match our default siso config instead of reclient configs.
step_config["platforms"].update({
"clang": step_config["platforms"]["default"],
"clang_large": step_config["platforms"]["default"],
})
if runtime.os == "windows":
# Add additional Windows SDK headers needed by Electron
win_toolchain_dir = win_sdk.toolchain_dir(ctx)
if win_toolchain_dir:
sdk_version = gn_logs.read(ctx).get("windows_sdk_version")
step_config["input_deps"][win_toolchain_dir + ":headers"].extend([
# third_party/electron_node/deps/uv/include/uv/win.h includes mswsock.h
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/mswsock.h"),
# third_party/electron_node/src/debug_utils.cc includes lm.h
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/Lm.h"),
])
# Update platforms to match our default siso config instead of reclient configs.
step_config["platforms"].update({
"clang-cl": step_config["platforms"]["default"],
"clang-cl_large": step_config["platforms"]["default"],
"lld-link": step_config["platforms"]["default"],
})
return module(
"config",
step_config = json.encode(step_config),
filegroups = mod.filegroups,
handlers = mod.handlers,
)

View File

@@ -633,7 +633,7 @@ Returns `string` - The current application directory.
Returns `string` - A path to a special directory or file associated with `name`. On
failure, an `Error` is thrown.
If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being called first, a default log directory will be created equivalent to calling `app.setAppLogsPath()` without a `path` parameter.
If `app.getPath('logs')` is called without calling `app.setAppLogsPath()` being called first, a default log directory will be created equivalent to calling `app.setAppLogsPath()` without a `path` parameter.
### `app.getFileIcon(path[, options])`
@@ -648,7 +648,7 @@ Returns `Promise<NativeImage>` - fulfilled with the app's icon, which is a [Nati
Fetches a path's associated icon.
On _Windows_, there a 2 kinds of icons:
On _Windows_, there are 2 kinds of icons:
* Icons associated with certain file extensions, like `.mp3`, `.png`, etc.
* Icons inside the file itself, like `.exe`, `.dll`, `.ico`.
@@ -764,7 +764,7 @@ app.getPreferredSystemLanguages() // ['fr-CA', 'en-US', 'zh-Hans-FI', 'es-419']
Both the available languages and regions and the possible return values differ between the two operating systems.
As can be seen with the example above, on Windows, it is possible that a preferred system language has no country code, and that one of the preferred system languages corresponds with the language used for the regional format. On macOS, the region serves more as a default country code: the user doesn't need to have Finnish as a preferred language to use Finland as the region,and the country code `FI` is used as the country code for preferred system languages that do not have associated countries in the language name.
As can be seen with the example above, on Windows, it is possible that a preferred system language has no country code, and that one of the preferred system languages corresponds with the language used for the regional format. On macOS, the region serves more as a default country code: the user doesn't need to have Finnish as a preferred language to use Finland as the region, and the country code `FI` is used as the country code for preferred system languages that do not have associated countries in the language name.
### `app.addRecentDocument(path)` _macOS_ _Windows_
@@ -1122,6 +1122,19 @@ Updates the current activity if its type matches `type`, merging the entries fro
Changes the [Application User Model ID][app-user-model-id] to `id`.
### `app.setToastActivatorCLSID(id)` _Windows_
* `id` string
Changes the [Toast Activator CLSID][toast-activator-clsid] to `id`. If one is not set via this method, it will be randomly generated for the app.
* The value must be a valid GUID/CLSID in one of the following forms:
* Canonical brace-wrapped: `{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}` (preferred)
* Canonical without braces: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` (braces will be added automatically)
* Hex digits are case-insensitive.
This method should be called early (before showing notifications) so the value is baked into the registration/shortcut. Supplying an empty string or an unparsable value throws and leaves the existing (or generated) CLSID unchanged. If this method is never called, a random CLSID is generated once per run and exposed via `app.toastActivatorCLSID`.
### `app.setActivationPolicy(policy)` _macOS_
* `policy` string - Can be 'regular', 'accessory', or 'prohibited'.
@@ -1226,7 +1239,7 @@ Returns `boolean` - whether hardware acceleration is currently enabled.
### `app.disableDomainBlockingFor3DAPIs()`
By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per
domain basis if the GPU processes crashes too frequently. This function
domain basis if the GPU process crashes too frequently. This function
disables that behavior.
This method can only be called before app is ready.
@@ -1704,8 +1717,13 @@ platforms) that allows you to perform actions on your app icon in the user's doc
A `boolean` property that returns `true` if the app is packaged, `false` otherwise. For many apps, this property can be used to distinguish development and production environments.
### `app.toastActivatorCLSID` _Windows_ _Readonly_
A `string` property that returns the app's [Toast Activator CLSID][toast-activator-clsid].
[tasks]:https://learn.microsoft.com/en-us/windows/win32/shell/taskbar-extensions#tasks
[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids
[toast-activator-clsid]: https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-toastactivatorclsid
[electron-forge]: https://www.electronforge.io/
[electron-packager]: https://github.com/electron/packager
[CFBundleURLTypes]: https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-102207-TPXREF115

View File

@@ -1049,7 +1049,7 @@ under this mode apps can choose to optimize their UI for tablets, such as
enlarging the titlebar and hiding titlebar buttons.
This API returns whether the window is in tablet mode, and the `resize` event
can be be used to listen to changes to tablet mode.
can be used to listen to changes to tablet mode.
#### `win.getMediaSourceId()`

View File

@@ -1165,7 +1165,7 @@ under this mode apps can choose to optimize their UI for tablets, such as
enlarging the titlebar and hiding titlebar buttons.
This API returns whether the window is in tablet mode, and the `resize` event
can be be used to listen to changes to tablet mode.
can be used to listen to changes to tablet mode.
#### `win.getMediaSourceId()`

View File

@@ -264,7 +264,7 @@ will not be allowed. The `finish` event is emitted just after the end operation.
Cancels an ongoing HTTP transaction. If the request has already emitted the
`close` event, the abort operation will have no effect. Otherwise an ongoing
event will emit `abort` and `close` events. Additionally, if there is an ongoing
response object,it will emit the `aborted` event.
response object, it will emit the `aborted` event.
#### `request.followRedirect()`

View File

@@ -5,7 +5,7 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) _Deprecated_ (non-sandboxed only)
> [!NOTE]
> Using the `clipoard` API from the renderer process is deprecated.
> Using the `clipboard` API from the renderer process is deprecated.
> [!IMPORTANT]
> If you want to call this API from a renderer process,

View File

@@ -172,7 +172,7 @@ Enables net log events to be saved and writes them to `path`.
Sets the verbosity of logging when used together with `--enable-logging`.
`N` should be one of [Chrome's LogSeverities][severities].
Note that two complimentary logging mechanisms in Chromium -- `LOG()`
Note that two complementary logging mechanisms in Chromium -- `LOG()`
and `VLOG()` -- are controlled by different switches. `--log-level`
controls `LOG()` messages, while `--v` and `--vmodule` control `VLOG()`
messages. So you may want to use a combination of these three switches
@@ -370,6 +370,13 @@ Keep in mind that standalone switches can sometimes be split into individual fea
Finally, you'll need to ensure that the version of Chromium in Electron matches the version of the browser you're using to cross-reference the switches.
### Chromium features relevant to Electron apps
* `AlwaysLogLOAFURL`: enables script attribution for
[`long-animation-frame`](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/Long_animation_frame_timing)
`PerformanceObserver` events for non-http(s), non-data, non-blob URLs (such as `file:` or custom
protocol URLs).
[app]: app.md
[append-switch]: command-line.md#commandlineappendswitchswitch-value
[debugging-main-process]: ../tutorial/debugging-main-process.md

View File

@@ -107,7 +107,7 @@ the response.
cookie and will not be retained between sessions.
* `sameSite` string (optional) - The [Same Site](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#SameSite_cookies) policy to apply to this cookie. Can be `unspecified`, `no_restriction`, `lax` or `strict`. Default is `lax`.
Returns `Promise<void>` - A promise which resolves when the cookie has been set
Returns `Promise<void>` - A promise which resolves when the cookie has been set.
Sets a cookie with `details`.
@@ -116,16 +116,16 @@ Sets a cookie with `details`.
* `url` string - The URL associated with the cookie.
* `name` string - The name of cookie to remove.
Returns `Promise<void>` - A promise which resolves when the cookie has been removed
Returns `Promise<void>` - A promise which resolves when the cookie has been removed.
Removes the cookies matching `url` and `name`
Removes the cookies matching `url` and `name`.
#### `cookies.flushStore()`
Returns `Promise<void>` - A promise which resolves when the cookie store has been flushed
Returns `Promise<void>` - A promise which resolves when the cookie store has been flushed.
Writes any unwritten cookies data to disk
Writes any unwritten cookies data to disk.
Cookies written by any method will not be written to disk immediately, but will be written every 30 seconds or 512 operations
Cookies written by any method will not be written to disk immediately, but will be written every 30 seconds or 512 operations.
Calling this method can cause the cookie to be written to disk immediately.

View File

@@ -49,7 +49,7 @@ Use the `system-ui` keyword to match the smoothness to the OS design language.
| Value: | `60%` | `0%` |
| Example: | ![A rectangle with round corners whose smoothness matches macOS](../images/corner-smoothing-example-60.svg) | ![A rectangle with round corners whose smoothness matches Windows and Linux](../images/corner-smoothing-example-0.svg) |
### Controlling availibility
### Controlling availability
This CSS rule can be disabled using the Blink feature flag `ElectronCSSCornerSmoothing`.

View File

@@ -94,18 +94,45 @@ The `desktopCapturer` module has the following methods:
Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`DesktopCapturerSource`](structures/desktop-capturer-source.md) objects, each `DesktopCapturerSource` represents a screen or an individual window that can be captured.
> [!NOTE]
> Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher,
> which can detected by [`systemPreferences.getMediaAccessStatus`][].
> * Capturing audio requires `NSAudioCaptureUsageDescription` Info.plist key on macOS 14.2 Sonoma and higher - [read more](#macos-versions-142-or-higher).
> * Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher, which can detected by [`systemPreferences.getMediaAccessStatus`][].
[`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia
[`systemPreferences.getMediaAccessStatus`]: system-preferences.md#systempreferencesgetmediaaccessstatusmediatype-windows-macos
## Caveats
### Linux
`desktopCapturer.getSources(options)` only returns a single source on Linux when using Pipewire.
PipeWire supports a single capture for both screens and windows. If you request the window and screen type, the selected source will be returned as a window capture.
`navigator.mediaDevices.getUserMedia` does not work on macOS for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this.
---
It is possible to circumvent this limitation by capturing system audio with another macOS app like Soundflower and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`.
### MacOS versions 14.2 or higher
`NSAudioCaptureUsageDescription` Info.plist key must be added in-order for audio to be captured by `desktopCapturer`. If instead you are running electron from another program like a terminal or IDE then that parent program must contain the Info.plist key.
This is in order to facillitate use of Apple's new [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps#Configure-the-sample-code-project) by Chromium.
> [!WARNING]
> Failure of `desktopCapturer` to start an audio stream due to `NSAudioCaptureUsageDescription` permission not present will still create a dead audio stream however no warnings or errors are displayed.
As of electron `v39.0.0-beta.4` Chromium [made Apple's new `CoreAudio Tap API` the default](https://source.chromium.org/chromium/chromium/src/+/ad17e8f8b93d5f34891b06085d373a668918255e) for desktop audio capture. There is no fallback to the older `Screen & System Audio Recording` permissions system even if [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps) stream creation fails.
If you need to continue using `Screen & System Audio Recording` permissions for `desktopCapturer` on macOS versions 14.2 and later, you can apply a chromium feature flag to force use of that older permissions system:
```js
// main.js (right beneath your require/import statments)
app.commandLine.appendSwitch('disable-features', 'MacCatapLoopbackAudioForScreenShare')
```
---
### MacOS versions 12.7.6 or lower
`navigator.mediaDevices.getUserMedia` does not work on macOS versions 12.7.6 and prior for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this. Only in macOS 13 and onwards does Apple provide APIs to capture desktop audio without the need for a signed kernel extension.
It is possible to circumvent this limitation by capturing system audio with another macOS app like [BlackHole](https://existential.audio/blackhole/) or [Soundflower](https://rogueamoeba.com/freebies/soundflower/) and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`.

View File

@@ -344,7 +344,7 @@ Displays a modal dialog that shows an error message.
This API can be called safely before the `ready` event the `app` module emits,
it is usually used to report errors in early stage of startup. If called
before the app `ready`event on Linux, the message will be emitted to stderr,
before the app `ready` event on Linux, the message will be emitted to stderr,
and no GUI dialog will appear.
### `dialog.showCertificateTrustDialog([window, ]options)` _macOS_ _Windows_

View File

@@ -34,7 +34,7 @@ Returns:
* `error` Error - Typically holds an error string identifying failure root cause.
Emitted when an error was encountered while streaming response data events. For
instance, if the server closes the underlying while the response is still
instance, if the server closes the underlying connection while the response is still
streaming, an `error` event will be emitted on the response object and a `close`
event will subsequently follow on the request object.

View File

@@ -39,7 +39,7 @@ indicate which letter should get a generated accelerator. For example, using
opens the associated menu. The indicated character in the button label then gets an
underline, and the `&` character is not displayed on the button label.
In order to escape the `&` character in an item name, add a proceeding `&`. For example, `&&File` would result in `&File` displayed on the button label.
In order to escape the `&` character in an item name, add a preceding `&`. For example, `&&File` would result in `&File` displayed on the button label.
Passing `null` will suppress the default menu. On Windows and Linux,
this has the additional effect of removing the menu bar from the window.

View File

@@ -83,4 +83,4 @@ Currently, Windows high contrast is the only system setting that triggers forced
### `nativeTheme.prefersReducedTransparency` _Readonly_
A `boolean` that indicates the whether the user has chosen via system accessibility settings to reduce transparency at the OS level.
A `boolean` that indicates whether the user has chosen via system accessibility settings to reduce transparency at the OS level.

View File

@@ -67,6 +67,22 @@ Emitted when the notification is shown to the user. Note that this event can be
multiple times as a notification can be shown multiple times through the
`show()` method.
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Title!',
subtitle: 'Subtitle!',
body: 'Body!'
})
n.on('show', () => console.log('Notification shown!'))
n.show()
})
```
#### Event: 'click'
Returns:
@@ -75,6 +91,22 @@ Returns:
Emitted when the notification is clicked by the user.
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Title!',
subtitle: 'Subtitle!',
body: 'Body!'
})
n.on('click', () => console.log('Notification clicked!'))
n.show()
})
```
#### Event: 'close'
Returns:
@@ -88,21 +120,85 @@ is closed.
On Windows, the `close` event can be emitted in one of three ways: programmatic dismissal with `notification.close()`, by the user closing the notification, or via system timeout. If a notification is in the Action Center after the initial `close` event is emitted, a call to `notification.close()` will remove the notification from the action center but the `close` event will not be emitted again.
#### Event: 'reply' _macOS_
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Title!',
subtitle: 'Subtitle!',
body: 'Body!'
})
n.on('close', () => console.log('Notification closed!'))
n.show()
})
```
#### Event: 'reply' _macOS_ _Windows_
Returns:
* `event` Event
* `reply` string - The string the user entered into the inline reply field.
* `details` Event\<\>
* `reply` string - The string the user entered into the inline reply field.
* `reply` string _Deprecated_
Emitted when the user clicks the "Reply" button on a notification with `hasReply: true`.
#### Event: 'action' _macOS_
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Send a Message',
body: 'Body Text',
hasReply: true,
replyPlaceholder: 'Message text...'
})
n.on('reply', (e, reply) => console.log(`User replied: ${reply}`))
n.on('click', () => console.log('Notification clicked'))
n.show()
})
```
#### Event: 'action' _macOS_ _Windows_
Returns:
* `event` Event
* `index` number - The index of the action that was activated.
* `details` Event\<\>
* `actionIndex` number - The index of the action that was activated.
* `selectionIndex` number _Windows_ - The index of the selected item, if one was chosen. -1 if none was chosen.
* `actionIndex` number _Deprecated_
* `selectionIndex` number _Windows_ _Deprecated_
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const items = ['One', 'Two', 'Three']
const n = new Notification({
title: 'Choose an Action!',
actions: [
{ type: 'button', text: 'Action 1' },
{ type: 'button', text: 'Action 2' },
{ type: 'selection', text: 'Apply', items }
]
})
n.on('click', () => console.log('Notification clicked'))
n.on('action', (e) => {
console.log(`User triggered action at index: ${e.actionIndex}`)
if (e.selectionIndex > -1) {
console.log(`User chose selection item '${items[e.selectionIndex]}'`)
}
})
n.show()
})
```
#### Event: 'failed' _Windows_
@@ -113,6 +209,22 @@ Returns:
Emitted when an error is encountered while creating and showing the native notification.
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Bad Action'
})
n.on('failed', (e, err) => {
console.log('Notification failed: ', err)
})
n.show()
})
```
### Instance Methods
Objects created with the `new Notification()` constructor have the following instance methods:
@@ -126,12 +238,42 @@ call this method before the OS will display it.
If the notification has been shown before, this method will dismiss the previously
shown notification and create a new one with identical properties.
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Title!',
subtitle: 'Subtitle!',
body: 'Body!'
})
n.show()
})
```
#### `notification.close()`
Dismisses the notification.
On Windows, calling `notification.close()` while the notification is visible on screen will dismiss the notification and remove it from the Action Center. If `notification.close()` is called after the notification is no longer visible on screen, calling `notification.close()` will try remove it from the Action Center.
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const n = new Notification({
title: 'Title!',
subtitle: 'Subtitle!',
body: 'Body!'
})
n.show()
setTimeout(() => n.close(), 5000)
})
```
### Instance Properties
#### `notification.title`

View File

@@ -99,13 +99,13 @@ property is used instead of the `--throw-deprecation` command line flag.
A `boolean` that controls whether or not deprecations printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for deprecations.
This property is instead of the `--trace-deprecation` command line flag.
This property is used instead of the `--trace-deprecation` command line flag.
### `process.traceProcessWarnings`
A `boolean` that controls whether or not process warnings printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for process warnings
(including deprecations). This property is instead of the `--trace-warnings` command
(including deprecations). This property is used instead of the `--trace-warnings` command
line flag.
### `process.type` _Readonly_

View File

@@ -7,21 +7,44 @@ Process: [Main](../glossary.md#main-process)
This module adds extra protection to data being stored on disk by using OS-provided cryptography systems. Current
security semantics for each platform are outlined below.
> [!NOTE]
> We recommend using the asynchronous API (`encryptStringAsync`/`decryptStringAsync`) over the synchronous API.
> The async API is non-blocking, supports key rotation, and handles temporary unavailability gracefully.
> The synchronous API may be deprecated in a future version of Electron.
## Platform-Specific Key Providers
### Synchronous API
* **macOS**: Encryption keys are stored for your app in [Keychain Access](https://support.apple.com/en-ca/guide/keychain-access/kyca1083/mac) in a way that prevents
other applications from loading them without user override. Therefore, content is protected from other users and other apps running in the same userspace.
* **Windows**: Encryption keys are generated via [DPAPI](https://learn.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata).
As per the Windows documentation: "Typically, only a user with the same logon credential as the user who encrypted the data can typically
decrypt the data". Therefore, content is protected from other users on the same machine, but not from other apps running in the
* **Windows**: Encryption keys are generated via [DPAPI](https://learn.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata). As per the Windows documentation: "Typically, only a user with the same logon credential as the user who encrypted the data can typically decrypt the data". Therefore, content is protected from other users on the same machine, but not from other apps running in the
same userspace.
* **Linux**: Encryption keys are generated and stored in a secret store that varies depending on your window manager and system setup. Options currently supported are `kwallet`, `kwallet5`, `kwallet6` and `gnome-libsecret`, but more may be available in future versions of Electron. As such, the
security semantics of content protected via the `safeStorage` API vary between window managers and secret stores.
* Note that not all Linux setups have an available secret store. If no secret store is available, items stored in using the `safeStorage` API will be unprotected
as they are encrypted via hardcoded plaintext password. You can detect when this happens when `safeStorage.getSelectedStorageBackend()` returns `basic_text`.
* Note that not all Linux setups have an available secret store. If no secret store is available, items stored in using the `safeStorage` API will be unprotected as they are encrypted via hardcoded plaintext password. You can detect when this happens when `safeStorage.getSelectedStorageBackend()` returns `basic_text`.
Note that on Mac, access to the system Keychain is required and
Note that on macOS, access to the system Keychain is required and
these calls can block the current thread to collect user input.
The same is true for Linux, if a password management tool is available.
### Asynchronous API
The asynchronous API uses pluggable key providers that vary by platform:
* **macOS**: Encryption keys are stored and retrieved from [Keychain Access](https://developer.apple.com/documentation/security/keychain-items). This provides the same security model as the synchronous API, protecting content from other users and other apps running in the same userspace.
* **Windows**: Encryption keys are protected via [DPAPI](https://learn.microsoft.com/en-us/windows/win32/api/dpapi). This provides the same security model as the synchronous API, protecting content from other users on the same machine but not from other apps running in the same userspace.
* **Linux**: Multiple key providers may be available depending on the desktop environment:
* [`org.freedesktop.portal.Secret`](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Secret.html): Uses the Portal Secret D-Bus interface to retrieve application-specific secrets. This is the preferred provider for sandboxed environments like Flatpak.
* [Secret Service API](https://specifications.freedesktop.org/secret-service/latest/): Uses the freedesktop.org Secret Service API (e.g., GNOME Keyring) for key storage.
* A fallback provider is used for environments without a secret service available.
Unlike the synchronous API, these operations are non-blocking and support additional features like key rotation (indicated by `shouldReEncrypt`) and temporary unavailability handling (indicated by `isTemporarilyUnavailable`).
## Events
The `safeStorage` module emits the following events:
## Methods
The `safeStorage` module has the following methods:
@@ -34,6 +57,10 @@ On Linux, returns true if the app has emitted the `ready` event and the secret k
On MacOS, returns true if Keychain is available.
On Windows, returns true once the app has emitted the `ready` event.
### `safeStorage.isAsyncEncryptionAvailable()`
Returns `Promise<Boolean>` - Whether encryption is available for asynchronous safeStorage operations.
### `safeStorage.encryptString(plainText)`
* `plainText` string
@@ -49,7 +76,21 @@ This function will throw an error if encryption fails.
Returns `string` - the decrypted string. Decrypts the encrypted buffer
obtained with `safeStorage.encryptString` back into a string.
This function will throw an error if decryption fails.
### `safeStorage.encryptStringAsync(plainText)`
* `plainText` string
Returns `Promise<Buffer>` - An array of bytes representing the encrypted string.
### `safeStorage.decryptStringAsync(encrypted)`
* `encrypted` Buffer
Returns `Promise<Object>` - Resolve with an object containing the following:
* `shouldReEncrypt` boolean - whether data that has just been returned from the decrypt operation should be
re-encrypted, as the key has been rotated or a new key is available that provides a different security level. If `true`, you should call `decryptStringAsync` again to receive the new decrypted string.
* `result` string - the decrypted string.
### `safeStorage.setUsePlainTextEncryption(usePlainText)`

View File

@@ -1216,7 +1216,7 @@ function createWindow () {
mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => {
bluetoothPinCallback = callback
// Send a IPC message to the renderer to prompt the user to confirm the pairing.
// Send an IPC message to the renderer to prompt the user to confirm the pairing.
// Note that this will require logic in the renderer to handle this message and
// display a prompt to the user.
mainWindow.webContents.send('bluetooth-pairing-request', details)
@@ -1264,7 +1264,7 @@ session.defaultSession.allowNTLMCredentialsForDomains('*')
Overrides the `userAgent` and `acceptLanguages` for this session.
The `acceptLanguages` must a comma separated ordered list of language codes, for
The `acceptLanguages` must be a comma separated ordered list of language codes, for
example `"en-US,fr,de,ko,zh-CN,ja"`.
This doesn't affect existing `WebContents`, and each `WebContents` can use

View File

@@ -7,7 +7,7 @@
* `depthPerComponent` number - The number of bits per color component.
* `detected` boolean - `true` if the display is detected by the system.
* `displayFrequency` number - The display refresh rate.
* `id` number - Unique identifier associated with the display. A value of of -1 means the display is invalid or the correct `id` is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop.
* `id` number - Unique identifier associated with the display. A value of -1 means the display is invalid or the correct `id` is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop.
* `internal` boolean - `true` for an internal display and `false` for an external display.
* `label` string - User-friendly label, determined by the platform.
* `maximumCursorSize` [Size](size.md) - Maximum cursor size in native pixels.

View File

@@ -1,13 +1,15 @@
# NotificationAction Object
* `type` string - The type of action, can be `button`.
* `type` string - The type of action, can be `button` or `selection`. `selection` is only supported on Windows.
* `text` string (optional) - The label for the given action.
* `items` string[] (optional) _Windows_ - The list of items for the `selection` action `type`.
## Platform / Action Support
| Action Type | Platform Support | Usage of `text` | Default `text` | Limitations |
|-------------|------------------|-----------------|----------------|-------------|
| `button` | macOS | Used as the label for the button | "Show" (or a localized string by system default if first of such `button`, otherwise empty) | Only the first one is used. If multiple are provided, those beyond the first will be listed as additional actions (displayed when mouse active over the action button). Any such action also is incompatible with `hasReply` and will be ignored if `hasReply` is `true`. |
| `button` | macOS, Windows | Used as the label for the button | "Show" on macOS (localized) if first `button`, otherwise empty; Windows uses provided `text` | macOS: Only the first one is used as primary; others shown as additional actions (hover). Incompatible with `hasReply` (beyond first ignored). |
| `selection` | Windows | Used as the label for the submit button for the selection menu | "Select" | Requires an `items` array property specifying option labels. Emits the `action` event with `(index, selectedIndex)` where `selectedIndex` is the chosen option (>= 0). Ignored on platforms that do not support selection actions. |
### Button support on macOS
@@ -15,6 +17,37 @@ In order for extra notification buttons to work on macOS your app must meet the
following criteria.
* App is signed
* App has it's `NSUserNotificationAlertStyle` set to `alert` in the `Info.plist`.
* App has its `NSUserNotificationAlertStyle` set to `alert` in the `Info.plist`.
If either of these requirements are not met the button won't appear.
### Selection support on Windows
To add a selection (combo box) style action, include an action with `type: 'selection'`, a `text` label for the submit button, and an `items` array of strings:
```js
const { Notification, app } = require('electron')
app.whenReady().then(() => {
const items = ['One', 'Two', 'Three']
const n = new Notification({
title: 'Choose an option',
actions: [{
type: 'selection',
text: 'Apply',
items
}]
})
n.on('action', (e) => {
console.log(`User triggered action at index: ${e.actionIndex}`)
if (e.selectionIndex > 0) {
console.log(`User chose selection item '${items[e.selectionIndex]}'`)
}
})
n.show()
})
```
When the user activates the selection action, the notification's `action` event will be emitted with two parameters: `actionIndex` (the action's index in the `actions` array) and `selectedIndex` (the zero-based index of the chosen item, or `-1` if unavailable). On non-Windows platforms selection actions are ignored.

View File

@@ -40,7 +40,7 @@
* `javascript` boolean (optional) - Enables JavaScript support. Default is `true`.
* `webSecurity` boolean (optional) - When `false`, it will disable the
same-origin policy (usually using testing websites by people), and set
`allowRunningInsecureContent` to `true` if this options has not been set
`allowRunningInsecureContent` to `true` if this option has not been set
by user. Default is `true`.
* `allowRunningInsecureContent` boolean (optional) - Allow an https page to run
JavaScript, CSS or plugins from http URLs. Default is `false`.

View File

@@ -383,7 +383,7 @@ Emitted after a server side redirect occurs during navigation. For example a 30
redirect.
This event cannot be prevented, if you want to prevent redirects you should
checkout out the `will-redirect` event above.
check out the `will-redirect` event above.
#### Event: 'did-navigate'
@@ -1465,7 +1465,7 @@ Ignore application menu shortcuts while this web contents is focused.
without a recognized 'action' value will result in a console error and have
the same effect as returning `{action: 'deny'}`.
Called before creating a window a new window is requested by the renderer, e.g.
Called before creating a window when a new window is requested by the renderer, e.g.
by `window.open()`, a link with `target="_blank"`, shift+clicking on a link, or
submitting a form with `<form target="_blank">`. See
[`window.open()`](window-open.md) for more details and how to use this in
@@ -1748,11 +1748,12 @@ Returns `Promise<PrinterInfo[]>` - Resolves with a [`PrinterInfo[]`](structures/
* `footer` string (optional) - string to be printed as page footer.
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A0`, `A1`, `A2`, `A3`,
`A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width`.
* `usePrinterDefaultPageSize` boolean (optional) - Whether to use a given printer's default page size. Default is `false`. Cannot be combined with `pageSize`. When `deviceName` is provided, uses the default page size of that specific printer. When `deviceName` is not provided, uses the default page size of the system's default printer. If the printer's default page size cannot be retrieved, falls back to A4 (210mm x 297mm).
* `callback` Function (optional)
* `success` boolean - Indicates success of the print call.
* `failureReason` string - Error description called back if the print fails.
When a custom `pageSize` is passed, Chromium attempts to validate platform specific minimum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems.
When a custom `pageSize` is passed, Chromium attempts to validate platform specific minimum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems. If a valid `pageSize` is not passed and `usePrinterDefaultPageSize` is `false`, an error will be thrown.
Prints window's web page. When `silent` is set to `true`, Electron will pick
the system's default printer if `deviceName` is empty and the default settings for printing.
@@ -2369,7 +2370,7 @@ instance that might own this `WebContents`.
#### `contents.devToolsWebContents` _Readonly_
A `WebContents | null` property that represents the of DevTools `WebContents` associated with a given `WebContents`.
A `WebContents | null` property that represents the DevTools `WebContents` associated with a given `WebContents`.
> [!NOTE]
> Users should never store this object because it may become `null`

View File

@@ -588,6 +588,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
* `footer` string (optional) - string to be printed as page footer.
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns.
* `usePrinterDefaultPageSize` boolean (optional) - Whether to use the system's default page size. Default is `false`. Cannot be combined with `pageSize`. When `deviceName` is provided, uses the default page size of that specific printer. When `deviceName` is not provided, uses the default page size of the system's default printer. If the printer's default page size cannot be retrieved, falls back to A4 (210mm x 297mm).
Returns `Promise<void>`

View File

@@ -76,6 +76,22 @@ webContents.setWindowOpenHandler((details) => {
})
```
### Behavior Changed: `NSAudioCaptureUsageDescription` should be included in your app's Info.plist file to use `desktopCapturer` (🍏 macOS ≥14.2)
Per [Chromium update](https://source.chromium.org/chromium/chromium/src/+/ad17e8f8b93d5f34891b06085d373a668918255e) which enables Apple's newer [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps#Configure-the-sample-code-project) by default, you now must have `NSAudioCaptureUsageDescription` defined in your `Info.plist` to use `desktopCapturer`.
Electron's `desktopCapturer` will create a dead audio stream if the new permission is absent however no errors or warnings will occur. This is partially a side-effect of Chromium not falling back to the older `Screen & System Audio Recording` permissions system if the new system fails.
To restore previous behavior:
```js
// main.js (right beneath your require/import statments)
app.commandLine.appendSwitch(
'disable-features',
'MacCatapLoopbackAudioForScreenShare'
)
```
### Behavior Changed: shared texture OSR `paint` event data structure
When using shared texture offscreen rendering feature, the `paint` event now emits a more structured object.
@@ -94,7 +110,7 @@ Users can force XWayland by passing `--ozone-platform=x11`.
### Removed: `ORIGINAL_XDG_CURRENT_DESKTOP` environment variable
Previously, Electron changed the value of `XDG_CURRENT_DESKTOP` internally to `Unity`, and stored the original name of the desktop session
in a separate variable. `XDG_CURRENT_DESKTOP` is no longer overriden and now reflects the actual desktop environment.
in a separate variable. `XDG_CURRENT_DESKTOP` is no longer overridden and now reflects the actual desktop environment.
### Removed: macOS 11 support
@@ -175,7 +191,7 @@ window is not currently visible.
`app.commandLine` was only meant to handle chromium switches (which aren't case-sensitive) and switches passed via `app.commandLine` will not be passed down to any of the child processes.
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
### Deprecated: `NativeImage.getBitmap()`
@@ -205,7 +221,7 @@ from upstream Chromium.
### Deprecated: `null` value for `session` property in `ProtocolResponse`
Previously, setting the ProtocolResponse.session property to `null`
Would create a random independent session. This is no longer supported.
would create a random independent session. This is no longer supported.
Using single-purpose sessions here is discouraged due to overhead costs;
however, old code that needs to preserve this behavior can emulate it by
@@ -216,7 +232,7 @@ and then using it in `ProtocolResponse.session`.
When calling `Session.clearStorageData(options)`, the `options.quota`
property is deprecated. Since the `syncable` type was removed, there
is only type left -- `'temporary'` -- so specifying it is unnecessary.
is only one type left -- `'temporary'` -- so specifying it is unnecessary.
### Deprecated: Extension methods and events on `session`
@@ -545,7 +561,7 @@ more information.
### Removed: The `--disable-color-correct-rendering` switch
This switch was never formally documented but it's removal is being noted here regardless. Chromium itself now has better support for color spaces so this flag should not be needed.
This switch was never formally documented but its removal is being noted here regardless. Chromium itself now has better support for color spaces so this flag should not be needed.
### Behavior Changed: `BrowserView.setAutoResize` behavior on macOS
@@ -1236,7 +1252,7 @@ more details.
### API Changed: `webContents.printToPDF()`
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changed in order to
address changes upstream that made our previous implementation untenable and rife with bugs.
**Arguments Changed**

View File

@@ -40,7 +40,7 @@ If you are on arm64 architecture, the build script may be pointing to the wrong
### Certificates fail to verify
installing [`certifi`](https://pypi.org/project/certifi/) will fix the following error:
Installing [`certifi`](https://pypi.org/project/certifi/) will fix the following error:
```sh
________ running 'python3 src/tools/clang/scripts/update.py' in '/Users/<user>/electron'

View File

@@ -28,7 +28,7 @@ with breakpoints inside Electron's source code.
format.
* **ProcMon**: The [free SysInternals tool][sys-internals] allows you to inspect
a processes parameters, file handles, and registry operations.
a process's parameters, file handles, and registry operations.
## Attaching to and Debugging Electron

View File

@@ -14,7 +14,7 @@ control via the [`DEPS`](https://github.com/electron/electron/blob/main/DEPS) fi
[initializing a local Electron checkout](./build-instructions-gn.md), Electron's source code is just one
of many nested folders within the project root.
The project contains a single `src` folder that corresponds a specific git checkout of
The project contains a single `src` folder that corresponds to a specific git checkout of
[Chromium's `src` folder](https://source.chromium.org/chromium/chromium/src). In addition, Electron's
repository code is contained in `src/electron` (with its own nested git repository), and other
Electron-specific third-party dependencies (e.g. [nan](https://github.com/nodejs/nan) or

View File

@@ -17,7 +17,7 @@ style, run `npm run lint`, which will run a variety of linting checks
against your changes depending on which areas of the code they touch.
Many of these checks are included as precommit hooks, so it's likely
you error would be caught at commit time.
your error would be caught at commit time.
## Unit Tests

View File

@@ -14,7 +14,7 @@ dependency tree from `node_modules`).
### ASAR integrity
ASAR integrity is an security feature that validates the contents of your app's
ASAR integrity is a security feature that validates the contents of your app's
ASAR archives at runtime. When enabled, your Electron app will verify the
header hash of its ASAR archive on runtime. If no hash is present or if there is a mismatch in the
hashes, the app will forcefully terminate.
@@ -137,9 +137,9 @@ See also: [code signing](#code-signing)
### OSR
OSR (offscreen rendering) can be used for loading heavy page in
OSR (offscreen rendering) can be used for loading a heavy page in
background and then displaying it after (it will be much faster).
It allows you to render page without showing it on screen.
It allows you to render a page without showing it on screen.
For more information, read the [Offscreen Rendering][] tutorial.

View File

@@ -210,7 +210,7 @@ const msiCreator = new MSICreator({
const supportBinaries = await msiCreator.create()
// 🆕 Step 2a: optionally sign support binaries if you
// sign you binaries as part of of your packaging script
// sign your binaries as part of your packaging script
for (const binary of supportBinaries) {
// Binaries are the new stub executable and optionally
// the Squirrel auto updater.

View File

@@ -200,7 +200,7 @@ macOS has a number of platform-specific menu roles available. Many of these map
* `recentDocuments` - The submenu is an "Open Recent" menu.
* `clearRecentDocuments` - Map to the [`clearRecentDocuments`](https://developer.apple.com/documentation/appkit/nsdocumentcontroller/clearrecentdocuments(_:)) action.
* `shareMenu` - The submenu is [share menu][ShareMenu]. The `sharingItem` property must also be set to indicate the item to share.
* `shareMenu` - The submenu is [share menu](../api/share-menu.md). The `sharingItem` property must also be set to indicate the item to share.
> [!IMPORTANT]
> When specifying a `role` on macOS, `label` and `accelerator` are the only

View File

@@ -30,7 +30,7 @@ If you want to focus on building a great product without debugging a weird quirk
Whatever provider or customer data you need to interact with, they will have probably thought of an integration path with the web. Depending on your technology choice, embedding a YouTube video either takes 30 seconds or requires you to hire a team devoted to streaming and hardware-accelerated video decoding. In the case of YouTube, using anything other than the provided players is actually against their terms and conditions, so youll likely embed a browser frame before you implement your own video streaming decoder.
There will be virtually no platform where your app cannot run if you build it with web technologies. Virtually all devices with a display—be that an ATM, a car infotainment system, a smart TV, a fridge, or a Nintendo Switch—come with means to display web technologies. The web is safe bet if you want to be cross-platform.
There will be virtually no platform where your app cannot run if you build it with web technologies. Virtually all devices with a display—be that an ATM, a car infotainment system, a smart TV, a fridge, or a Nintendo Switch—come with means to display web technologies. The web is a safe bet if you want to be cross-platform.
### Ubiquity
@@ -59,7 +59,7 @@ What does all of that mean for you, a developer, in practice?
### Stability, security, performance
Electron delivers the best experience on all target platforms (macOS, Windows, Linux) by bundling the latest version of Chromium, V8, and Node.js directly with the application binary. When it comes to running and rendering web content with upmost stability, security, and performance, we currently believe that stack to be “best in class”.
Electron delivers the best experience on all target platforms (macOS, Windows, Linux) by bundling the latest version of Chromium, V8, and Node.js directly with the application binary. When it comes to running and rendering web content with utmost stability, security, and performance, we currently believe that stack to be “best in class”.
#### Why bundle anything at all

View File

@@ -79,6 +79,8 @@ filenames = {
"shell/browser/notifications/win/notification_presenter_win.h",
"shell/browser/notifications/win/windows_toast_notification.cc",
"shell/browser/notifications/win/windows_toast_notification.h",
"shell/browser/notifications/win/windows_toast_activator.cc",
"shell/browser/notifications/win/windows_toast_activator.h",
"shell/browser/relauncher_win.cc",
"shell/browser/ui/certificate_trust_win.cc",
"shell/browser/ui/file_dialog_win.cc",
@@ -297,6 +299,7 @@ filenames = {
"shell/browser/api/electron_api_push_notifications.cc",
"shell/browser/api/electron_api_push_notifications.h",
"shell/browser/api/electron_api_safe_storage.cc",
"shell/browser/api/electron_api_safe_storage.h",
"shell/browser/api/electron_api_screen.cc",
"shell/browser/api/electron_api_screen.h",
"shell/browser/api/electron_api_service_worker_context.cc",

View File

@@ -1,3 +1,3 @@
const safeStorage = process._linkedBinding('electron_browser_safe_storage');
const { safeStorage } = process._linkedBinding('electron_browser_safe_storage');
module.exports = safeStorage;
export default safeStorage;

View File

@@ -263,7 +263,12 @@ WebContents.prototype.print = function (options: ElectronInternal.WebContentsPri
throw new TypeError('webContents.print(): Invalid print settings specified.');
}
const { pageSize } = options;
const { pageSize, usePrinterDefaultPageSize } = options;
if (usePrinterDefaultPageSize !== undefined && pageSize !== undefined) {
throw new Error('usePrinterDefaultPageSize cannot be combined with pageSize');
}
if (typeof pageSize === 'string' && PDFPageSizes[pageSize]) {
const mediaSize = PDFPageSizes[pageSize];
options.mediaSize = {

View File

@@ -12,6 +12,7 @@
"@electron/github-app-auth": "^3.2.0",
"@electron/lint-roller": "^3.2.0",
"@electron/typescript-definitions": "^9.1.5",
"@hurdlegroup/robotjs": "^0.12.3",
"@octokit/rest": "^20.1.2",
"@primer/octicons": "^10.0.0",
"@types/minimist": "^1.2.5",

View File

@@ -82,7 +82,7 @@ index feaf17c72cecb8099bc11ac10747fbad719ddca9..891a73f229e3f0838cb2fa99b8fb24fd
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index a86c18926e7798a3b0aae70c53870e03b5acd0ab..f4f27f9e803533d8db50d89e7a0125384a025a46 100644
index 40670234682ac00dec268dea43f0ee1e39e8684f..293fbc9faf01ea0ca4e58b0a65b14597fe4916a6 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);

View File

@@ -142,6 +142,5 @@ chore_disable_protocol_handler_dcheck.patch
fix_check_for_file_existence_before_setting_mtime.patch
fix_linux_tray_id.patch
expose_gtk_ui_platform_field.patch
fix_os_crypt_async_cookie_encryption.patch
patch_osr_control_screen_info.patch
graphite_handle_out_of_order_recording_errors.patch
refactor_allow_customizing_config_in_freedesktopsecretkeyprovider.patch

View File

@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 30cc1d4a179f9da59824cb98415baed8493fc843..2272eaa7e0e3306201e5e32226a0115f6f6636e5 100644
index 7265019647734154f64108efd7e6376b7a9fc1ba..398aaff3af5bff791f114e4023d0e07be86dd79a 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -272,6 +272,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -24,7 +24,7 @@ index 30cc1d4a179f9da59824cb98415baed8493fc843..2272eaa7e0e3306201e5e32226a0115f
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -381,7 +385,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -380,7 +384,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

View File

@@ -23,10 +23,10 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 79cc9552a5504b7fce8f8bf31b1cb2833b8cf1ef..9bcc65dd9017980e7846378dd0b6311f72d0909b 100644
index 757ee4f4e5862d8ebaf8279e3f9e8b950066a0e9..bc18237e7d68bb4c07f3488c9a23d072e2867ca5 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4755,6 +4755,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4756,6 +4756,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 79cc9552a5504b7fce8f8bf31b1cb2833b8cf1ef..9bcc65dd9017980e7846378dd0b6311f
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 6b58b8f00d16ce5a39e9d9879cf7cecdd5052e50..8adf1f8691fc36599f75cae18be9b8230cae1e20 100644
index 521b137f242c3feaa9e8ad29a0904597de70bd93..d2f9204e144f90290336e75d21119ef0f99a1d24 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -607,6 +607,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -606,6 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -79,10 +79,10 @@ index 851e792c6c6f26b6074ffe8b0ba39a5813fabacc..8bd06f4c155cc0ed8afaf89347f9fc97
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10fcbf5892a 100644
index 47dd48bd495f89f2dd3528053d9b6446df264c7c..ee43008b2bec7ea013cbbe7a782aa0a38e1acd02 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,10 +92,10 @@ index af2f7ec68180f69c2b39e674649e8b02dc3db77d..98f9870b985bc6eb889d6e76c021d10f
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a8ee9152d 100644
index 294c9ec4bfb788235be8047eb3174d7dcc97bdfb..6ab8ec1924a76f51d6e390d9457c596f9b0d8453 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -300,6 +300,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -301,6 +301,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
}
}
@@ -110,7 +110,7 @@ index 280505288771b91f4b14597413f6241783979832..e7a528015ce97b357f9308f4b33b533a
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c60fc1853c 100644
index e7b822d45d608a78009576c2a299201014dd93ec..54be144d5b24b369e12d551e6c15d2d85fa8b8c3 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,7 +123,7 @@ index c828e48b93ac7e57343c178650293cba853c6cba..ca3b04c157275bcddf4bdd237004b5c6
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 8b348b886bf912838903efcc007a560b6d3c20c1..1235c9d51d09b715296d8ae8072d3c99622e1bfd 100644
index 1122107b258e34e389eb5db2204c3c9d5782a688..3293587e03aab9104fd2baffd215782cc8266a6d 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -426,6 +426,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View File

@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index 7f22f02d2bc80abdb3be5191d55a1a6d00d1d0a7..8989fde2a7416100f238b0350fb7daf6e3944a70 100755
index f87d1ffc90ba5bd6da87a90c6dd904c01ae42e23..9987b33124cfec689502f991b92c0b05d0433106 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -355,6 +355,31 @@ SPECIAL_CASES = {

View File

@@ -8,7 +8,7 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index e104f4d7814b6f6a0e1f5cf49ae24d5571e30fb1..cc7e9064b21f8f2c45690454805901c0c56e2aa1 100644
index bafc8421e14071a926a48bee1958a44d266a9a0b..4463080e08f7a0635ef240794deae1ea8d90e148 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -244,6 +244,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,

View File

@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3b33c3777 100644
index 9b22efa07e43b60a8bd8bb6288792846709fae87..cf60a541720ffbcdaa5163d727a7761dcb30f131 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -48,6 +48,7 @@
@@ -21,19 +21,19 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_mode.h"
#include "ui/accessibility/ax_updates_and_events.h"
@@ -179,7 +180,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
@@ -179,7 +180,7 @@ base::DictValue BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
-#if !BUILDFLAG(IS_ANDROID)
+#if 0
base::Value::Dict BuildTargetDescriptor(BrowserWindowInterface* browser) {
base::Value::Dict target_data;
base::DictValue BuildTargetDescriptor(BrowserWindowInterface* browser) {
base::DictValue target_data;
target_data.Set(kSessionIdField, browser->GetSessionID().id());
@@ -226,7 +227,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
base::DictValue data;
- PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs();
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(current_context)->prefs();
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
@@ -51,7 +51,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
@@ -355,13 +356,13 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
base::ListValue browser_list;
-#if !BUILDFLAG(IS_ANDROID)
+#if 0
ForEachCurrentBrowserWindowInterfaceOrderedByActivation(
@@ -64,7 +64,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
data.Set(kBrowsersField, std::move(browser_list));
#if BUILDFLAG(IS_WIN)
@@ -848,7 +849,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
@@ -847,7 +848,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@@ -74,7 +74,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -902,7 +904,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -901,7 +903,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -84,7 +84,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -922,7 +925,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -921,7 +924,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AllowJavascript();
@@ -93,16 +93,16 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
std::vector<AXPropertyFilter> property_filters;
AddPropertyFilters(property_filters, allow, AXPropertyFilter::ALLOW);
AddPropertyFilters(property_filters, allow_empty,
@@ -949,7 +952,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -948,7 +951,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
if (found) {
return;
}
-#endif // !BUILDFLAG(IS_ANDROID)
+#endif
// No browser with the specified |session_id| was found.
base::Value::Dict result;
base::DictValue result;
result.Set(kSessionIdField, session_id);
@@ -992,11 +995,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -991,11 +994,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -119,7 +119,7 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
// Check to see if it is in the supported types list.
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
supported_types.end()) {
@@ -1066,10 +1071,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -1065,10 +1070,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
@@ -127,14 +127,14 @@ index 3a9f87d82212bfeab23b312a593fb855df344780..83b4a7fe7149f2b195e53fcb05f77da3
const std::string_view default_api_type =
std::string_view(ui::AXApiType::Type(ui::AXApiType::kBlink));
registry->RegisterStringPref(prefs::kShownAccessibilityApiType,
std::string(default_api_type));
default_api_type);
+ registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false);
+#endif
}
void AccessibilityUIMessageHandler::OnVisibilityChanged(
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83c1d1fa0a 100644
index 67f7e34271994ff66da2a3c3b90c2f02797c2d14..8f786bc00dc4a7cc775ca3ff3fca4da680272682 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
@@ -28,6 +28,8 @@ namespace content {
@@ -152,6 +152,6 @@ index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83
private:
+ friend class ElectronAccessibilityUIMessageHandler;
+
void ToggleAccessibilityForWebContents(const base::Value::List& args);
void SetGlobalFlag(const base::Value::List& args);
void SetGlobalString(const base::Value::List& args);
void ToggleAccessibilityForWebContents(const base::ListValue& args);
void SetGlobalFlag(const base::ListValue& args);
void SetGlobalString(const base::ListValue& args);

View File

@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index 14e6fd9b6d20fa18fc5b558f9a7bbf76f9fd4059..b12ce72835b2acd9099a4fad4308b5eee7963635 100644
index e74b8674d5cec49a510948b97f6e8b790c57e864..8f4f3787fc590fe6e4378546a656a8d51ae965a0 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
@@ -116,10 +116,10 @@ index 932658273154ef2e022358e493a8e7c00c86e732..57bbfb5cde62c9496c351c861880a189
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c877f3a221 100644
index af97dfb66e5b43bf5275d5f66cd95f7ee6289da8..d5d5a18a8d63cbb056cd4c3eca739f5d7bf1f26b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2530,6 +2530,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2515,6 +2515,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c8
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
!old_state->is_in_back_forward_cache;
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
@@ -4165,10 +4169,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -4188,10 +4192,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,10 +155,10 @@ index e47f324d52c0837eff24c592da0c51f0aaf47565..3642fb358bc92dcf523b589ac5fe07c8
// Do not throttle if the page should be painting.
bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950a080353a 100644
index 91e365742891468bac13f7a9e6de4d2c390c7e7c..9b6c8ebc91d2421fc71e5b2593f9f73ffa889223 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -446,6 +446,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -166,7 +166,7 @@ index e55ac3fc72ce5b4acebaa6705c6f7080f0ac8fd4..ff27ea4dc50d163aaa22513907960950
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -953,6 +954,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -956,6 +957,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -10,7 +10,7 @@ so we can remove this patch once we migrate our code to use
os_crypt async.
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
index 23aa391aaf380f87310fb295277809f8b105d6e8..bb308187837371ecfa2482affaf35ac7ed98c1f3 100644
index 3b1c34e213b0990b8f0823228a1a02c5bf0c7198..ea48241edef8eaf7bfc8285d7cbbea567d3a7cbb 100644
--- a/components/os_crypt/sync/BUILD.gn
+++ b/components/os_crypt/sync/BUILD.gn
@@ -10,6 +10,7 @@ import("//components/os_crypt/sync/features.gni")

View File

@@ -6,10 +6,10 @@ Subject: allow new privileges in unsandboxed child processes
This allows unsandboxed child process to launch setuid processes on Linux.
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index 75cafbe0dbd7d4b3dca4c8fe56e17cd836123588..8f551374e1ffc729081f7d50e73671313c641bb6 100644
index b6f5667c86c3e74807728aa2dbb61fee87e6156a..492a0822181aebbede38f7783a457b820ce4f8d1 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -64,6 +64,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -65,6 +65,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD());
}

View File

@@ -6,10 +6,10 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/menus/simple_menu_model.cc b/ui/menus/simple_menu_model.cc
index 1e43ac04035446ea68a6aa3b1b252f8bc9e22099..cdf45574fde7459019ecd57ad14b8fec5e04c8af 100644
index 156e5068000ceb89a096f51d358ae69a3f0cf5d8..4609ad44d0f75789070e28fa8e485a98cc60c11a 100644
--- a/ui/menus/simple_menu_model.cc
+++ b/ui/menus/simple_menu_model.cc
@@ -55,6 +55,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
@@ -57,6 +57,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
return std::u16string();
}
@@ -21,7 +21,7 @@ index 1e43ac04035446ea68a6aa3b1b252f8bc9e22099..cdf45574fde7459019ecd57ad14b8fec
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -348,6 +353,11 @@ void SimpleMenuModel::SetAcceleratorAt(size_t index,
@@ -350,6 +355,11 @@ void SimpleMenuModel::SetAcceleratorAt(size_t index,
MenuItemsChanged();
}
@@ -33,7 +33,7 @@ index 1e43ac04035446ea68a6aa3b1b252f8bc9e22099..cdf45574fde7459019ecd57ad14b8fec
void SimpleMenuModel::SetMinorText(size_t index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -454,6 +464,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
@@ -458,6 +468,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
return items_[ValidateItemIndex(index)].label;
}
@@ -47,7 +47,7 @@ index 1e43ac04035446ea68a6aa3b1b252f8bc9e22099..cdf45574fde7459019ecd57ad14b8fec
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/menus/simple_menu_model.h b/ui/menus/simple_menu_model.h
index 596663d62632e4331f8aad421298d1fcdc9ab05e..469778f0c13e6d3fd30023af9b19c4a4cb7969be 100644
index 8ddab95a135c34c8153dfe208104f0233e511093..59dc68ce7d69c10fe6f3b286c790da155e2d16f2 100644
--- a/ui/menus/simple_menu_model.h
+++ b/ui/menus/simple_menu_model.h
@@ -99,6 +99,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
@@ -68,7 +68,7 @@ index 596663d62632e4331f8aad421298d1fcdc9ab05e..469778f0c13e6d3fd30023af9b19c4a4
// Sets the minor text for the item at |index|.
void SetMinorText(size_t index, const std::u16string& minor_text);
@@ -274,6 +278,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
@@ -276,6 +280,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
int GetCommandIdAt(size_t index) const override;
std::u16string GetLabelAt(size_t index) const override;
@@ -76,7 +76,7 @@ index 596663d62632e4331f8aad421298d1fcdc9ab05e..469778f0c13e6d3fd30023af9b19c4a4
std::u16string GetMinorTextAt(size_t index) const override;
ImageModel GetMinorIconAt(size_t index) const override;
bool IsItemDynamicAt(size_t index) const override;
@@ -321,6 +326,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
@@ -324,6 +329,7 @@ class COMPONENT_EXPORT(UI_MENUS) SimpleMenuModel : public MenuModel {
ItemType type = TYPE_COMMAND;
std::u16string label;
ui::Accelerator accelerator;

View File

@@ -49,10 +49,10 @@ index ac5d88520a785e12b66ebd96c92c46319a08311c..5c582e4f249c28a5739da2da4e600ee2
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 85bb570db1d2d4fafa8d5ac449122225965b425a..d39312542b93c4c5eaf4580c2a8d20290cf82a89 100644
index 0be460ef929e13fc07e8114764dc5600edcce016..b9370cc9d15601cfccde02b28cdd92bfaf3208f9 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -768,10 +768,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -778,10 +778,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index 85bb570db1d2d4fafa8d5ac449122225965b425a..d39312542b93c4c5eaf4580c2a8d2029
if (!Client())
return false;
@@ -828,6 +824,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -838,6 +834,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 56408734b26428933a1fb8c04cee317c659feea7..0fa09a8d86241456293119edecf209f8d0790c0e 100644
index e14d2d0b5eaadb11b93ad9031f10706f9f8ed7df..9e033d3ffd9f733fedd0b5ac0af8ad4386f49ae4 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -133,6 +133,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(

View File

@@ -11,7 +11,7 @@ To accomplish this, we need to make simdutf's config public here
for use by third_party/electron_node.
diff --git a/third_party/simdutf/BUILD.gn b/third_party/simdutf/BUILD.gn
index 68f1ed4e012cff5e0abd64a153a329518860689d..eeb846525e58f038733318915a770bafa22cafc5 100644
index 05215d2610d5c4bed1381b6d3af39441bc1eb8c5..bbb3495511da95d56728eb092979bb1e5dd650c2 100644
--- a/third_party/simdutf/BUILD.gn
+++ b/third_party/simdutf/BUILD.gn
@@ -8,9 +8,14 @@ source_set("header") {

View File

@@ -10,10 +10,10 @@ Needed for:
2) //electron/shell/common:web_contents_utility
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index c4c12588a21bdb5502dd3c3ffec358278b802e34..85628d8898087895120575af6fc9e26e82e10f45 100644
index ab27fe9ec8680eee6ddde2975e16edc2f6468621..45d0d6f6da8ba72f243699a6f48187f38c85c390 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -362,6 +362,8 @@ mojom("interfaces") {
@@ -366,6 +366,8 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

View File

@@ -11,10 +11,10 @@ This patch can (and should) be removed when we can prevent those symbols
from being stripped in the release build.
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index c26e04c0556f7a5edf131ef42a375a71bf536da5..9028f13dfee04a33874a4d3d996cf223cc506928 100644
index cf363be5e8ecd7c64aa2c326de19192dc5844caa..fe88d3c2ae707e406af2e875de05d23f597688e6 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -90,7 +90,7 @@ declare_args() {
@@ -103,7 +103,7 @@ declare_args() {
# Chrome's clang. crbug.com/1033839
use_thin_lto =
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&

View File

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405afb5b389 100644
index 8aad429c56915e0e842d95e246ad4ae41b0d1588..a13c79ad0c8a2ce42679847eee5ec57d6041932b 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index f21010994e7e554c63f1bf24d5c09e9904e97bc9..ac151bbddafc76b92af9a7bce56bb405
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 996beedb7437f42b33ec5458d69403478e7840a5..464b75de67b41f3a947af2cb885e1aada0f5869d 100644
index 3d21780be1af55fc701a6b489d67a3244ca151f9..d39ba67ddbca3d0410ddf64866c4823d6a3e6ba8 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4769,7 +4769,7 @@ static_library("browser") {
@@ -4748,7 +4748,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index 996beedb7437f42b33ec5458d69403478e7840a5..464b75de67b41f3a947af2cb885e1aad
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9edced7a6 100644
index c48681f108485bd277e6545b2ebc50c1ff8d1b96..5889dc8886c4dd6ed335c38e63b5d7d27ad6bf8b 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7666,9 +7666,12 @@ test("unit_tests") {
@@ -7775,9 +7775,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8632,6 +8635,10 @@ test("unit_tests") {
@@ -8744,6 +8747,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index 78b828817d717e277daf2824b93da7538015cdfa..f09ea3eff2d1c5661b9d87a66d9920d9
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8689,7 +8696,6 @@ test("unit_tests") {
@@ -8801,7 +8808,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
everywhere, without having to import("//electron/.../flags.gni").
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 4174baa9c0e39b517ade66aab07123eaf9b58e47..9601a32e3b763bb6b84727be509f51326fa08233 100644
index 4375b08443820cfb945826f4ad5a121291727448..7e7bc7b83590370ac6d14661910279f347e93ad2 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {

View File

@@ -3,15 +3,22 @@ From: Charles Kerr <charles@charleskerr.com>
Date: Tue, 22 Mar 2022 16:24:44 -0500
Subject: build: make libcxx_abi_unstable false for electron
https://nornagon.medium.com/a-libc-odyssey-973e51649063
The libc++ C++ standard library uses ABI versioning to control binary
compatibility. ABI version 2 (Chromium's default) enables various
optimizations that break compatibility with system libc++, while ABI
version 1 maintains compatibility needed for native Node.js modules.
See also https://github.com/electron/electron/issues/45810#issuecomment-2691417213.
References:
* https://nornagon.medium.com/a-libc-odyssey-973e51649063
* https://github.com/electron/electron/issues/45810#issuecomment-2691417213.
* https://libcxx.llvm.org/ABIGuarantees.html
* third_party/libc++/src/include/__configuration/abi.h
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ecba6a65c4 100644
index 3cd0af88fd13613216464d31d04e26dbb8f61343..218cfaf258ebc55e4d332c67abd02b5b1ad2ba19 100644
--- a/buildtools/third_party/libc++/__config_site
+++ b/buildtools/third_party/libc++/__config_site
@@ -18,7 +18,9 @@
@@ -18,7 +18,11 @@
// _LIBCPP_ABI_NAMESPACE to a shorter value.
#define _LIBCPP_ABI_NAMESPACE __Cr
@@ -19,6 +26,8 @@ index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ec
+#define _LIBCPP_ABI_VERSION 1
+#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_ARRAY
+#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW
+#define _LIBCPP_ABI_TRIVIALLY_COPYABLE_BIT_ITERATOR
+#define _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
#define _LIBCPP_ABI_FORCE_ITANIUM 0
#define _LIBCPP_ABI_FORCE_MICROSOFT 0

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 7b8b10f561b9e9b1fe480f0dbdfcabbe795745e2..528b2ef70453b904c630fd657e8dffff8c7c642d 100644
index b24a969b257b3854a6e49ec16a7cd7ca74e11036..b0bb049e9b52827152b89826d185b8b8fbac39aa 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9981,6 +9981,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9998,6 +9998,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index 7b8b10f561b9e9b1fe480f0dbdfcabbe795745e2..528b2ef70453b904c630fd657e8dffff
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e62fffd0c 100644
index 2639400b52df75164f2e3a0eeb9b2ff73c4dd285..e1bc262366e11ddccfa3942b9becb786ac06eba9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5346,6 +5346,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5360,6 +5360,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.initially_hidden = renderer_started_hidden;
create_params.initial_popup_url = params.target_url;
@@ -35,7 +35,7 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e
// Even though all codepaths leading here are in response to a renderer
// trying to open a new window, if the new window ends up in a different
// browsing instance, then the RenderViewHost, RenderWidgetHost,
@@ -5398,6 +5402,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5412,6 +5416,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// Sets the newly created WebContents WindowOpenDisposition.
new_contents_impl->original_window_open_disposition_ = params.disposition;
@@ -48,7 +48,7 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -5439,12 +5449,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5453,12 +5463,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -62,10 +62,10 @@ index 75ce3e0027b111c7e29d4c602521512dbf6b68ac..2138c00b6e732dc826df07ac66fd7f8e
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 4c55f0abf8df5a3408f3f90d444ceff3c23ee1bc..72bdb5b5a4c2c21a7192b34bb293bd23bafaf50c 100644
index ecfe129905639e9b7a5ed973017539cfaec9c2af..39308fa42e57b2dfba91aaa6f33d1a0bea3273ae 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -648,6 +648,10 @@ struct CreateNewWindowParams {
@@ -651,6 +651,10 @@ struct CreateNewWindowParams {
pending_associated_remote<blink.mojom.Widget> widget;
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
@@ -77,10 +77,10 @@ index 4c55f0abf8df5a3408f3f90d444ceff3c23ee1bc..72bdb5b5a4c2c21a7192b34bb293bd23
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index f40acd79dd69dffa922ecf147a19ff658f6f26c9..57f55937e634d2988d86b1cca95f3f056e518f32 100644
index 368d4b51b5b50ce5f48a1371ca5f69d053cdf014..715facf2ec1d8f1dfd8bfe1949481ab21c784611 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -872,6 +872,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -868,6 +868,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -90,7 +90,7 @@ index f40acd79dd69dffa922ecf147a19ff658f6f26c9..57f55937e634d2988d86b1cca95f3f05
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 84cafee582dee5d49e1b95d7b90e838dbdf86c8a..ef0171853547a4172f2bd933abb043963923390b 100644
index aff5ce9518500bb655b5e7ae33ecde29d0b0c014..27a3ec60ef7e1fef85a4b5be1e7e519d11a711d3 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -205,6 +205,7 @@ class NetworkService;
@@ -101,7 +101,7 @@ index 84cafee582dee5d49e1b95d7b90e838dbdf86c8a..ef0171853547a4172f2bd933abb04396
} // namespace network
namespace sandbox {
@@ -1456,6 +1457,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1450,6 +1451,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -133,7 +133,7 @@ index 509256e4c327806f9a24eab69c1d4e84581767ce..f8f3996cbd00c06bec2962a54488b2d8
WebContents* source,
const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b080e40be3 100644
index ea862108a0f83a4aa966046ba15a8ca6757261ee..8fd2a5d359dd883754316095f66a83e8e255926c 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,6 +18,7 @@
@@ -170,12 +170,12 @@ index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b0
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f0103098d2f4d1915d8c8f3481fe077ae562edbb..79cc9552a5504b7fce8f8bf31b1cb2833b8cf1ef 100644
index dd17c9c1d3d17736ca7ec934977069cdb7ed30b8..757ee4f4e5862d8ebaf8279e3f9e8b950066a0e9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6826,6 +6826,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -6848,6 +6848,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
params->started_by_ad =
GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack();
+ params->raw_features = features.raw_features.Utf8(
+ WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD);
@@ -224,10 +224,10 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..2060e04795ba8e7a923fd0fe3485b8c5
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index fdd1d6e1ee68b824df2de6e0ba97669151cf63d9..da2a47bdb8f78abfe37b845e1c3751806df3acba 100644
index 6b6397f2dd6c5dbb832d540464192c2ad73d3c16..979eb77e66ba2ad6d7f89851d183e2036b027674 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2335,6 +2335,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2339,6 +2339,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index 1e90af1c4a66df7f3acce570fbfb0d3b15d66195..21d4dabc8275aacf7a6252dd5861127a0bb661e0 100644
index 2e51e5ac21e2ee4b94944c2c39f788e51e82f489..285e151fc1cf2ae0768fa71c5620dfdda48e1115 100644
--- a/.gitignore
+++ b/.gitignore
@@ -227,6 +227,7 @@ vs-chromium-project.txt
@@ -229,6 +229,7 @@ vs-chromium-project.txt
/data
/delegate_execute
/device/serial/device_serial_mojo.xml

View File

@@ -8,10 +8,10 @@ electron objects that extend gin::Wrappable and gets
allocated on the cpp heap
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
index 573bcb2e56068a2ade6d8ab28964b077487874fd..acb0c0b44f6530e49b32ea7602c25d498ae4f210 100644
index c29e8554933994ff56ccea394af34e17c4e9fc2c..42512541b36ceb353483a29eca2c858b9628854b 100644
--- a/gin/public/wrappable_pointer_tags.h
+++ b/gin/public/wrappable_pointer_tags.h
@@ -74,7 +74,19 @@ enum WrappablePointerTag : uint16_t {
@@ -76,7 +76,19 @@ enum WrappablePointerTag : uint16_t {
kTextInputControllerBindings, // content::TextInputControllerBindings
kWebAXObjectProxy, // content::WebAXObjectProxy
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler

View File

@@ -34,10 +34,10 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415
virtual void DidClearWindowObject() {}
virtual void DidChangeScrollOffset() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 9bcc65dd9017980e7846378dd0b6311f72d0909b..d3000974f71cf6fbb4b4015c938e7f301e656b02 100644
index bc18237e7d68bb4c07f3488c9a23d072e2867ca5..cb942a969388291ac1177838970d8e233a6695fb 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4761,10 +4761,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
@@ -4762,10 +4762,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
observer.DidInstallConditionalFeatures(context, world_id);
}
@@ -52,10 +52,10 @@ index 9bcc65dd9017980e7846378dd0b6311f72d0909b..d3000974f71cf6fbb4b4015c938e7f30
void RenderFrameImpl::DidChangeScrollOffset() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 8adf1f8691fc36599f75cae18be9b8230cae1e20..08ae7506cdb6c5d9996f77d1199234a0120b53d2 100644
index d2f9204e144f90290336e75d21119ef0f99a1d24..fb6ab632e5326370eae23a4e665a9216cd4e93b7 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -609,7 +609,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -608,7 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl
int world_id) override;
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
int world_id) override;
@@ -103,7 +103,7 @@ index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf
void WillInitializeWorkerContext() override;
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2838cea12 100644
index 095ba031a645e9972e831d60880bcae98d7b5cd5..ef7b9416f6c2afcecb987b59c17cc0763a61730c 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -614,6 +614,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
@@ -115,7 +115,7 @@ index 39166de2b27c44a4502a89a3b175eebbec8ee0e9..33ae3f465865aecfcb7d3b0244d57ad2
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c9988b069b2 100644
index f5786a8e321d08b9e1cd008f797d5a4bcac791db..9e71d645ac1cb5c52a102f9f4ab539715b30d546 100644
--- a/extensions/renderer/dispatcher.h
+++ b/extensions/renderer/dispatcher.h
@@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver,
@@ -127,10 +127,10 @@ index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c99
int64_t service_worker_version_id,
const GURL& service_worker_scope,
diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc
index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb27e54244 100644
index 89515878024756de8263622e054e50a9ad284232..f1e94fd2583d18641ab91d9d598ad94a4fd607e0 100644
--- a/extensions/renderer/extension_frame_helper.cc
+++ b/extensions/renderer/extension_frame_helper.cc
@@ -439,6 +439,7 @@ void ExtensionFrameHelper::DidCreateScriptContext(
@@ -450,6 +450,7 @@ void ExtensionFrameHelper::DidCreateScriptContext(
}
void ExtensionFrameHelper::WillReleaseScriptContext(
@@ -139,10 +139,10 @@ index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb
int32_t world_id) {
extension_dispatcher_->WillReleaseScriptContext(
diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h
index e16f370211ba014f778e7b9021b83988a5d27661..a79b20fe95050d6e92615711988384deea3fa1e0 100644
index b74b195e3d8a31156d3677ca2d3de6c6237813f6..1334f5f9e307f4f1a730cf04d772633522491241 100644
--- a/extensions/renderer/extension_frame_helper.h
+++ b/extensions/renderer/extension_frame_helper.h
@@ -188,7 +188,8 @@ class ExtensionFrameHelper
@@ -197,7 +197,8 @@ class ExtensionFrameHelper
blink::WebDocumentLoader* document_loader) override;
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override;
@@ -200,10 +200,10 @@ index 8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41..85ae42670cc038e18e4a0ea05e3de25c
->ContextWillBeDestroyed(script_state_);
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c78f4c2ebc 100644
index ee43008b2bec7ea013cbbe7a782aa0a38e1acd02..2352aeaad71be960729e74305ed665583b15ed70 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -310,7 +310,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -313,7 +313,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
int32_t world_id) = 0;
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -214,10 +214,10 @@ index 98f9870b985bc6eb889d6e76c021d10fcbf5892a..dd4e9908f51e08bdc546d2248b70b4c7
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b01359d00f638 100644
index 6ab8ec1924a76f51d6e390d9457c596f9b0d8453..42f6281a44de055e964acbfbf20041ffa1fca592 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -308,10 +308,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
@@ -309,10 +309,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
}
void LocalFrameClientImpl::WillReleaseScriptContext(
@@ -231,7 +231,7 @@ index e7a528015ce97b357f9308f4b33b533a8ee9152d..4bc9b7ede3aa2af867146d9ec98b0135
}
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c312fd55183 100644
index 54be144d5b24b369e12d551e6c15d2d85fa8b8c3..0ddb1e0730618bba73e54c2618930355fcf6dc19 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -82,7 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -245,7 +245,7 @@ index ca3b04c157275bcddf4bdd237004b5c60fc1853c..19d9c726e4e2ab2dc9ff2102c1087c31
// Returns true if we should allow register V8 extensions to be added.
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 1235c9d51d09b715296d8ae8072d3c99622e1bfd..915de939cb4e8a5d42c17a39861b4de35b4c58b1 100644
index 3293587e03aab9104fd2baffd215782cc8266a6d..853a06d570f5d87f7f5e4cdd663bad4ac8a4fe06 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -428,7 +428,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View File

@@ -10,10 +10,10 @@ Subject: chore: "grandfather in" Electron Views and Delegates
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
diff --git a/ui/views/view.h b/ui/views/view.h
index b7d13fff1f53e2ce3e53d2d5e97a442627962cd8..295249a582c77b70abf78313439b0100fed0c2ce 100644
index d410372741fbe404a37ada06118c351a9480e564..3c81a2dc067789a58cc9e9d3b8cad783bc66827d 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -77,6 +77,19 @@ class ArcNotificationContentView;
@@ -78,6 +78,19 @@ class ArcNotificationContentView;
class WideFrameView;
} // namespace ash
@@ -33,7 +33,7 @@ index b7d13fff1f53e2ce3e53d2d5e97a442627962cd8..295249a582c77b70abf78313439b0100
namespace exo {
class ShellSurfaceBase;
}
@@ -308,6 +321,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -309,6 +322,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public:
class OwnedByClientPassKey {
private:

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3bd153a542 100644
index b53745dd0a4011fb15ab16d61f9a6effd5c03598..185520358c4839834d34b584de0e60d34afe01fc 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -133,6 +133,7 @@ class KeyStorageLinux;
@@ -18,7 +18,7 @@ index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3b
class Profile;
class ProfileImpl;
class ScopedAllowBlockingForProfile;
@@ -282,6 +283,9 @@ class BackendImpl;
@@ -285,6 +286,9 @@ class BackendImpl;
class InFlightIO;
bool CleanupDirectorySync(const base::FilePath&);
} // namespace disk_cache
@@ -28,7 +28,7 @@ index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3b
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -580,6 +584,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -583,6 +587,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index 6f000c21239c85de00733ccaef02feeabdf994de..c91dec8e89141526e2f125c270805a3b
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
#if BUILDFLAG(IS_WIN)
@@ -625,6 +630,7 @@ class BASE_EXPORT ScopedAllowBlocking {
@@ -628,6 +633,7 @@ class BASE_EXPORT ScopedAllowBlocking {
friend class cronet::CronetPrefsManager;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;

View File

@@ -34,10 +34,10 @@ index cc3f9bc9383f8272a5cd95b1f2ac56529d86e493..5ca29b84cdaf42ef516ef819ae32b230
class ScrollEvent;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index b2f7bbc51484d8db4c69de05d36398866b170721..b37df4100eac1263f874dc5bff9e29eea64c1c0a 100644
index 1e0c7aa8a17ca62eda9bee3444668e032a1c928f..8fe4ef2a5699fdf1a895a2981f5cc7312070fbc2 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1378,6 +1378,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
@@ -1380,6 +1380,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
return background_paint_brush_;
}
@@ -61,10 +61,10 @@ index b65ced55f997d5064b9d9338190567f8c264fce8..e8acd2828ed05deefa335ce2bb461f0c
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93199c3716 100644
index a553dc21818bdfc91790f9991749c9fcdb1aa208..fd21436484c851acfe0027cfc475ebef5e642d64 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3271,15 +3271,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3267,15 +3267,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
}
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.
@@ -86,7 +86,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93
return 0;
}
}
@@ -3302,6 +3306,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3298,6 +3302,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
// handle alt-space, or in the frame itself.
is_right_mouse_pressed_on_caption_ = false;
ReleaseCapture();
@@ -94,7 +94,7 @@ index 196a4bd514ac8cfb071f6b6211221cd8465bd725..5bf619a30b7ae95c0369f472e4062b93
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
// expect screen coordinates.
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
@@ -3309,7 +3314,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3305,7 +3310,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
w_param = static_cast<WPARAM>(SendMessage(
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
if (w_param == HTCAPTION || w_param == HTSYSMENU) {

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index aa42c0a3815cb28387ee57dcfe1fc30a7b6500f1..fc5c7782035bb4d0b9d673cb125062f47cd98a14 100644
index 0e4fb92136e7ee014dd390142bb4c38349c3ed6b..4248fe3b201b9b62ab7c3bfc07658f116e974867 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5317,7 +5317,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5331,7 +5331,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above.

View File

@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 7fff40908c71615cdacec33f4238e31c4b2ee6a4..241f1f0eedeedd2d6dc1675e8b69e007c2122b81 100644
index edcbf7effafbf0f0c8a613ed05a259f4996c1690..74c40adbfae086fab9c1e29f4f494e52221c3f01 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -224,7 +224,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

View File

@@ -43,10 +43,10 @@ index 21d5ab99800c0830cc31ec4ebb24e3f05cd904d8..3f8f514519d6e4a0abe3690f5df35de8
// When the enterprise policy is not set, use finch/feature flag choice.
return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfXfaSupport);
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
index d7150c5f576f141cac2755c32dfb8e763675ff7b..ace4033f0257e3da62e7ebaf1a98b177c9e1e49b 100644
index 32cc3ee248d7bc488b91aa44504f057da1b1471c..cb5ae8612b29f222d452df9e2354e67cd14e8999 100644
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -248,10 +248,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
@@ -255,10 +255,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
#if BUILDFLAG(ENABLE_PDF_INK2)
bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) {
@@ -100,7 +100,7 @@ index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd
ProfileSelection ProfileSelections::GetProfileSelection(
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index c063b296c7ff808342e5437a53fbcef6d7534342..9f3329d098a74316ddc2f04d8d470674d756ceba 100644
index cf9cf84da456314804083c902859a0965425479f..779bdd17641c1808ff2c707b3de5f6c9b331ca2d 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -20,8 +20,10 @@

View File

@@ -35,7 +35,7 @@ index 231e3595f218aeebe28d0b13ce6182e7a4d6f4e1..609bd205d1cd0404cab3471765bef8b0
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index 7f99bf8c0c79de2cb8a812a7bfe8b4255697444a..d39aee929900cca756a6293b782a44228725f6fc 100644
index 33edb0a90d886dd44956046e03fcc182a0f6bc8e..5b5edd3da3d9f7a248ea3affd195c36bfd64a38e 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -80,8 +80,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -80,10 +80,10 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd197456585 100644
index 7c9f086470c13c782563f6ebaeea26277f1838c1..d8f1178cada860357a074b14f27287dd7ebab965 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2377,7 +2377,8 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2351,7 +2351,8 @@ bool Browser::IsWebContentsCreationOverridden(
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
const std::string& frame_name,
@@ -93,7 +93,7 @@ index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd1
if (HasActorTask(profile(), opener)) {
// If an ExecutionEngine is acting on the opener, prevent it from creating a
// new WebContents. We'll instead force the navigation to happen in the same
@@ -2390,7 +2391,7 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2364,7 +2365,7 @@ bool Browser::IsWebContentsCreationOverridden(
return (window_container_type ==
content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url,
@@ -103,10 +103,10 @@ index 6fc340e394bb6e7f757d4a0464589bd0d843371c..d3cf90a4a709138a7c99ca3cd7eebbd1
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 3bbf1f6bfcc654ee750862153e37fe2836b4514c..d8859df2113171bf7f2e86dce653e2d258961de3 100644
index bc5483d1f30f50927ac8af011edc783767d94896..e533b1624814fe7140f89d0d7c6c2e51284a803e 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -936,8 +936,7 @@ class Browser : public TabStripModelObserver,
@@ -932,8 +932,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -145,7 +145,7 @@ index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 3bbd4e568ba99245622a96f0801d2b6cd203025f..1e0b7d16b33daed980961dd49c667a3b254c186f 100644
index 592ac3bba77571d4bd2f08e43a6acaaeee59611f..2c7f23ef9cd474230a2a2a773c53bbeff169d2ab 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -104,8 +104,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -223,10 +223,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 76855246e19933850dc5b79c65c816a2690dd229..a6197d7c8ec5e1c27c74372e478b87aadd7ba7a7 100644
index 2f431d36474a3f7798bc1ec04b4a0f681d12d49b..796dbccf85c2ffaa5e0ec921596beec59e9b7444 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5282,8 +5282,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5296,8 +5296,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ &&
delegate_->IsWebContentsCreationOverridden(
opener, source_site_instance, params.window_container_type,
@@ -251,7 +251,7 @@ index f8f3996cbd00c06bec2962a54488b2d8f1666530..fde24980f7eefd2696a9094bdb977879
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index a6f0447b6ede476162f555d951f346b080e40be3..58f34bc33426136d2040f241f2cb5928dc19fb2d 100644
index 8fd2a5d359dd883754316095f66a83e8e255926c..832394b10f3ff5879c002b49d9eeb3479c9f002a 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -380,8 +380,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -265,7 +265,7 @@ index a6f0447b6ede476162f555d951f346b080e40be3..58f34bc33426136d2040f241f2cb5928
// Allow delegate to creates a custom WebContents when
// WebContents::CreateNewWindow() is called. This function is only called
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc
index af80323215e2cb6ff7bdb802f8da4bdbe0067f71..187816751bde435e9c622921c457873d4b3172cd 100644
index 1c9720ba470c559b24d0605b5906e1eded998841..fc6fd8264e83d1dfc8409fbcd7ad81d4c918091a 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -153,8 +153,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden(
@@ -279,7 +279,7 @@ index af80323215e2cb6ff7bdb802f8da4bdbe0067f71..187816751bde435e9c622921c457873d
return true;
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35b9408a12 100644
index 8c43b222e21277d6c8ebc07f8b2f0f23c2ad259c..1be43223eb9c2f4e2d877d6748d08d29c0b9c86a 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
@@ -10,6 +10,7 @@
@@ -301,10 +301,10 @@ index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 0ab40dfd23d1071212c4d30d01fa8e7755458d4a..f032127a94c52beb3f509d6ea84c7e55f21084e2 100644
index 77a96d11dd5ee2bae9d4de8057698ad04bad1167..442b2f83e3288fbfad7035ecbbe9d905f1117501 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -263,8 +263,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -261,8 +261,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -315,7 +315,7 @@ index 0ab40dfd23d1071212c4d30d01fa8e7755458d4a..f032127a94c52beb3f509d6ea84c7e55
// This method handles opening links from within the guest. Since this guest
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f99f1f4adf 100644
index d86fc00d6c58a11ef2503d307a8b4416af866419..d469bf55fa6046acdda173e21331458512c1810b 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -74,8 +74,7 @@ class ExtensionOptionsGuest
@@ -329,10 +329,10 @@ index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f9
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 23705fa50cf79865b68d8352f6ec72444ca5233e..efa5e78ed92464a6d47319f7b2087555d683bd8c 100644
index 49727adaa1c78d0f3704dcac866c1d4a8afe9474..edfd99c2ebeff77b9aa446be61b76fadceef89ec 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -424,8 +424,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -423,8 +423,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -343,7 +343,7 @@ index 23705fa50cf79865b68d8352f6ec72444ca5233e..efa5e78ed92464a6d47319f7b2087555
return true;
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a8ac8cd20 100644
index f6ca86c34c83b8bba4b73f5c0d8ed4bef39fd9b9..4bf187eabf9f923b779b4188e4d1f95b5877e694 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -187,8 +187,7 @@ class MimeHandlerViewGuest
@@ -357,7 +357,7 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 8f212198f6542ce3d1c4843e2029b3c21bb3b368..a54b9a842badf38db25d0c79659ff7ff03cef3d2 100644
index 3b50b6b3616ead57de44d309a306db09dce82c65..c709f13b7c0bac9f41cac745678aaee04c1caf46 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -585,8 +585,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -385,10 +385,10 @@ index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d1
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index f45f822c20bfdc46cb0904ae01fa22ca1e024642..55660b44fb2e53d16c434bba40ffd031de20c021 100644
index ae616fa9c352413e23fb509b3e12e0e4fab5a094..0efa65f7d4346cfe78d2f27ba55a0526202315ff 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -208,8 +208,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -232,8 +232,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -399,7 +399,7 @@ index f45f822c20bfdc46cb0904ae01fa22ca1e024642..55660b44fb2e53d16c434bba40ffd031
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index f56882565de72fa9ab660b4a8d86f08c7392becd..439586a03288822bab8f5f21d0c38b678ed52fb6 100644
index 20555af0857f1e8ea8227d71245fb95c5e95679a..a6df69bc877046214bf693ceff3c60036e8767ed 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -489,8 +489,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(

View File

@@ -9,7 +9,7 @@ Electron when a session is non persistent we do not initialize the
ExtensionSystem, so this check is not relevant for Electron.
diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
index 748c4012338c3e53fce1ea66d1cb95e8f397e901..c4c229ff10fb72d6098070378aa92661c211e97d 100644
index 78e82a70e4a5d323f25d4d90eac1c5e4f070d24d..f7ab8718503695217d398f2ee7c2b37ab4320341 100644
--- a/extensions/browser/script_injection_tracker.cc
+++ b/extensions/browser/script_injection_tracker.cc
@@ -176,7 +176,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(

View File

@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 304e7a9379b012367dae26b425e5cbb3f56ba99e..736deda278d5cdc5f7a149429fc5b9a51dbb63a2 100644
index 81e2e8bbae7c2d8c5ef6c4fad5121121317901ca..3c7722778d909d35ab268c81fd406f0870502fd4 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -276,8 +276,13 @@ void AsanProcessInfoCB(const char* reason,
@@ -277,8 +277,13 @@ void AsanProcessInfoCB(const char* reason,
}
#endif // defined(ADDRESS_SANITIZER)
@@ -25,7 +25,7 @@ index 304e7a9379b012367dae26b425e5cbb3f56ba99e..736deda278d5cdc5f7a149429fc5b9a5
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -945,7 +950,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -954,7 +959,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
if (delegate_->ShouldLoadV8Snapshot(process_type)) {
@@ -79,10 +79,10 @@ index 8c318a31454c57b0e8db3770a36c45be427f053c..6f809c9672448ed9797e3c9da492ad2c
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 3b0e038918a175c70beb91e0c5d816aed2e6f181..8d3e00535b6bec4068b07ded8f19f18c48da3769 100644
index 6b7dffe9c65ee04787a0dbc39d8d055c4daf0582..e63c8e92e3d8ae1ff0bec37e614ca8ed989b21e4 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -643,8 +643,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -646,8 +646,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@@ -92,7 +92,7 @@ index 3b0e038918a175c70beb91e0c5d816aed2e6f181..8d3e00535b6bec4068b07ded8f19f18c
if (g_mapped_snapshot) {
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
// files in a process.
@@ -653,10 +652,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -656,10 +655,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624a2874bb6 100644
index f52e7bf0cfcba6ee161b027e2bf449a8dbafbe43..a616f78127e9aa7dc4ac28c0a1362abedd0a7e00 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1930,6 +1930,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1956,6 +1956,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1949,9 +1969,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1975,9 +1995,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index 2906184ac12cca4dd82447364becdd16ccdaa6e6..97535e9f1052952aa1061af88e6be624
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1959,9 +1977,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1985,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -82,7 +82,7 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
const Source& GetSource(int index) const override;
DesktopMediaList::Type GetMediaListType() const override;
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 3be638f1032815d39634b5725031d7f3124e1ad2..fce3e30bc736ac72a42d24956d4abf9f49c8fc41 100644
index 7c72345e20589fe078169426d9b5b5a0ae81bae8..2c86b75c43651bd78d5ff7eeb54aa366ee3228bc 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(

View File

@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 082c24657917671fbee8f755786285af66640a92..d506230061f3bc969cc3cf9b998ec0321a44a1d2 100644
index c4ada35c3ca32ce06ffc57577af7bc4c45c98579..9f345d0da8bcc8f2818f71347a2eab7675ad544a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -559,7 +559,11 @@
@@ -573,7 +573,11 @@
}
host()->WasHidden();

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 93fe27d2e7cf5cf78d30685e50f25715ddefd66e..b092a09cada3f289cb13ed4352b6da8cb7ff154a 100644
index 5f820ecdcb99e57d1d51cd28fff7874f9ba58e23..1455aa5083f8eef7bf9644a1cc522db3e67b0227 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -846,6 +846,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -848,6 +848,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -21,10 +21,10 @@ index 93fe27d2e7cf5cf78d30685e50f25715ddefd66e..b092a09cada3f289cb13ed4352b6da8c
// Prompts should remain open and functional across tab switches.
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index bffb574713aaefb61c7204b5d859f1d7c77b2192..889c9f3549fdc71171c830e17595bee6f21eb9e8 100644
index bd0f3ec2116a137d2a24e81e6bf0b5854a47f2f9..e1585de8fad7b11174d51666e7dce681f39b0815 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1039,6 +1039,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -1042,6 +1042,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
base::TimeDelta GetHungRendererDelayForTesting();

View File

@@ -16,23 +16,22 @@ amount of chromium code that needs to be changed for Electron
as well as keeps these storage areas limited to a bounded
size meanwhile giving application developers more space to work with.
diff --git a/components/services/storage/dom_storage/dom_storage_constants.cc b/components/services/storage/dom_storage/dom_storage_constants.cc
index aa5edd1d07d97bee4912b14996ff804351240e94..8334b7eb6a3293c068f5234508f8dca780ccb262 100644
--- a/components/services/storage/dom_storage/dom_storage_constants.cc
+++ b/components/services/storage/dom_storage/dom_storage_constants.cc
@@ -6,7 +6,9 @@
diff --git a/components/services/storage/dom_storage/dom_storage_constants.h b/components/services/storage/dom_storage/dom_storage_constants.h
index 9d9a8aeab2343942a88ee882e21191719bee019f..9f58743e0bb79e3e10095a6a1adc543846022f3b 100644
--- a/components/services/storage/dom_storage/dom_storage_constants.h
+++ b/components/services/storage/dom_storage/dom_storage_constants.h
@@ -11,7 +11,8 @@ namespace storage {
namespace storage {
-const size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
// The quota for each storage area.
// This value is enforced by clients and by the storage service.
-inline constexpr size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
+// Electron's dom_storage_limits.patch increased this value from 10MiB to 100MiB
+const size_t kPerStorageAreaQuota = 100 * 1024 * 1024;
+
const size_t kPerStorageAreaOverQuotaAllowance = 100 * 1024;
+inline constexpr size_t kPerStorageAreaQuota = 100 * 1024 * 1024;
} // namespace storage
// In the storage service we allow some overage to
// accommodate concurrent writes from different clients
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
index 332be0811d86c7a265f440ab7719460160a22617..e3382d843599ef6017e0ac557919b3a41809f17d 100644
index 2552cc9cfab2c54caf584b14944324b92ae22171..f6e9a4a998f13d55b4d213a8bae2d50b090f138a 100644
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom
+++ b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
@@ -50,7 +50,8 @@ struct KeyValue {

View File

@@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d36398866b170721 100644
index 3a02cb67eb114efdfe796de8e544e05f6559ddae..1e0c7aa8a17ca62eda9bee3444668e032a1c928f 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -617,7 +617,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -19,10 +19,10 @@ index 4467ed08afa4d56059775b4786ba2907884e2f28..b2f7bbc51484d8db4c69de05d3639886
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index b4d4bf43a45bc08970c9c2857da9adafd28da410..88010fe24109d006ff2e1a37f39c0db8e2be1c4f 100644
index 9735afc8efad7d1ef841574af30db3a8937b69ca..ad1dceef2209f312e3fdec6c7f7bc2b05c93b297 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1062,8 +1062,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -1046,8 +1046,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

View File

@@ -21,7 +21,7 @@ index 8c32005730153251e93516340e4baa500d777178..ff444dc689542a909ec5aada39816931
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
#endif
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
index d3ea23dc328ae05f26a51fbe791a69d80dfbcffe..52ced989b595d472e3ac143f35cb6cecc75fdf47 100644
index fe339f6a069064ec92bddd5df9df96f84d13bd9a..41bc93d602c6558620ec728ac8207dedbabdd407 100644
--- a/gin/v8_platform.cc
+++ b/gin/v8_platform.cc
@@ -222,6 +222,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {

View File

@@ -10,7 +10,7 @@ This patch should be proposed upstream.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global"
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 71eaed03a15ba2ab5bae874daecfb0e95ac7c64d..12915abc0ba658b87b3a867e308f1b81cad61a17 100644
index eb6d5e0d2789b5f688a2a5bb634a2857529be862..97978ddb03dedaf0e8277a9ce33cf1b720d2eb52 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -9,6 +9,7 @@

View File

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb27113285 100644
index 81f99ddf906bc1767f3d79ac303c0f7cdd31dd65..b83e4c4c2eddb9fc276fffb77bb115e2721b1684 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1875,6 +1875,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1879,6 +1879,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,7 +51,7 @@ index 40ed5ee64f8588a7373128adc0bc640d3b1d32f0..53cee001783f11a6364e66e4845c95eb
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 4395ddd300e876bf5fdb02d23cd401276c29e07d..ab9bb1d559e7761165b98f7c08e29a5b0d1a4aa6 100644
index c78ef874c575c7fdff5cc068fc34e7ce0231737e..5613c4db90ba5e0263d5c9ead2638cd38eccccde 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -321,6 +321,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index 4395ddd300e876bf5fdb02d23cd401276c29e07d..ab9bb1d559e7761165b98f7c08e29a5b
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a3d10568f 100644
index 8f2f1cc4f4df6ce8c00a65d6b8c008a896800fd7..b843412396f17bc094fa5a5dcf4ab3a11ef7d00d 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1268,6 +1268,9 @@ interface NetworkContext {
@@ -1276,6 +1276,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
array<MatchedNetworkConditions> conditions);
@@ -77,7 +77,7 @@ index 160d18eba4101efab2dae444d09947f650079003..b78bde54c454a986ae8b2ed68bf0cf5a
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 195b237d37a8cf6739d83d87c79a67eb9f0a6bac..6381265ccba02b96b5d153585d576b7ed62b75af 100644
index 8ce978e789227dd5fcd4117f40996bba7504e537..91c98d895024b01e3b527d7e1e07c629bef4d420 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -156,6 +156,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 3642fb358bc92dcf523b589ac5fe07c877f3a221..eaf48d7c193d881ce8414bffdb708efb286d25aa 100644
index d5d5a18a8d63cbb056cd4c3eca739f5d7bf1f26b..693df80c3859c1bcb54b6791eee852f5817d734b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -1918,6 +1918,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1903,6 +1903,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View File

@@ -13,7 +13,7 @@ app.requestSingleInstanceLock API so that users can pass in a JSON
object for the second instance to send to the first instance.
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 2748dd196fe1f56357348a204e24f0b8a28b97dd..5800dd00b47c657d9e6766f3fc5a30654cffffa6 100644
index f076d0f783e2c0f6b5444002f756001adf2729bd..a03d99f929e2d354cdba969567d781561656261d 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -18,7 +18,8 @@
@@ -65,7 +65,7 @@ index 2748dd196fe1f56357348a204e24f0b8a28b97dd..5800dd00b47c657d9e6766f3fc5a3065
#if BUILDFLAG(IS_WIN)
bool EscapeVirtualization(const base::FilePath& user_data_dir);
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
index 73aa4cb9652870b0bff4684d7c72ae7dbd852db8..b55c942a8ccb326e4898172a7b4f6c0aa3183a0b 100644
index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..0c423610fc2c5514693d33b527088cf839a404f2 100644
--- a/chrome/browser/process_singleton_posix.cc
+++ b/chrome/browser/process_singleton_posix.cc
@@ -619,6 +619,7 @@ class ProcessSingleton::LinuxWatcher

View File

@@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation
IsValid is not exposed despite being commented as for embedders, this exposes something that works for us.
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 8d3e00535b6bec4068b07ded8f19f18c48da3769..2a7c146fc549d563f187797feb8b190b64234b30 100644
index e63c8e92e3d8ae1ff0bec37e614ca8ed989b21e4..743b785e7effe57b8c55fd2e6d779353226f807e 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {

Some files were not shown because too many files have changed in this diff Show More