Compare commits

..

31 Commits
42-x-y ... main

Author SHA1 Message Date
John Kleinschmidt
8e077a09f3 ci: only run auto close on PRs targeting main branch (#50357) 2026-03-19 00:19:25 +00:00
John Kleinschmidt
95f0d8156b ci: test linux 64k (#49961) 2026-03-18 19:14:49 -04:00
Noah Gregory
b881f86c8f fix: always call the original impl in swizzled mousedown impls (#50096)
fix: always call the original implementation in swizzled mousedown implementations
2026-03-18 17:54:43 -04:00
John Kleinschmidt
5959ecc3ee ci: auto close PRs that do not fill out the required template (#50348) 2026-03-18 17:52:03 -04:00
John Kleinschmidt
a6a44692dc chore: Respect HTTP(S) proxy env variable for Yarn (#50322)
Respect HTTP(S) proxy env variable for Yarn

Co-authored-by: Filip Mösner <filip.mosner@seznam.cz>
2026-03-18 17:13:05 -04:00
John Beutner
12ea28c23e fix: ensure WebContents::WasShown runs when window is shown (#49421)
Avoids a freeze when failing to enter fullscreen on macOS.
2026-03-18 12:34:11 -04:00
Kyle Cutler
ade684dc35 fix: correctly track BaseWindow::IsActive() on MacOS (#49460)
fix: correctly set IsActive() in BaseWindow on MacOS
2026-03-18 11:47:19 -04:00
electron-roller[bot]
4ec6923898 chore: bump chromium to 148.0.7738.0 (main) (#50323)
* chore: bump chromium in DEPS to 148.0.7738.0

* chore: fixup patch indices

* 7664509: Migrate ServiceWorkerInfo to ChildProcessId

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-03-18 11:45:24 -04:00
Ryan Zimmerman
e86cd9da96 docs: fix markdown formatting in fuses.md (#50318)
* docs: fix markdown formatting in fuses.md

* Use bulleted list (was being run together on one line)
* Wrap ASCII diagram in code block

* docs: apply suggestions from code review

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>

* docs: fix misapplied suggestion

---------

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-03-18 10:47:52 -04:00
reito
d6db1a27af feat: add nv12 osr format support. (#49799)
* feat: add nv12 osr output format.

* feat: add nv12 osr output format.
2026-03-17 17:14:01 -04:00
Shelley Vohr
76331f0564 refactor: replace CHILD_PLUGIN with CHILD_EMBEDDER_FIRST on macOS (#50278)
refactor: replace CHILD_PLUGIN with CHILD_EMBEDDER_FIRST on macOS

Chromium removed upstream support for child plugin processes without
library validation in https://crbug.com/461717105, which we patched
back via feat_restore_macos_child_plugin_process.patch.

Chromium's CHILD_EMBEDDER_FIRST mechanism already provides the right
extensibility point for this: values > CHILD_EMBEDDER_FIRST are reserved
for embedders and resolved via ContentBrowserClient::GetChildProcessSuffix().
Chrome itself uses this pattern for its Alerts helper process.

This commit replaces the Chromium patch with an Electron-native
implementation.
2026-03-17 14:41:15 -04:00
electron-roller[bot]
7cb6a737a9 chore: bump chromium to 148.0.7737.0 (main) (#50277)
* chore: bump chromium in DEPS to 148.0.7734.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 148.0.7736.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 148.0.7737.0

* chore: fixup patch indices

* 7666125: Migrate ServiceWorkerContext to ChildProcessId

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-03-17 13:30:32 -04:00
dependabot[bot]
3659b97563 build(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 (#50306)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3.0.2 to 4.0.1.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](de90cc6fb3...fbd0ab8f3e)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:30:14 -04:00
John Kleinschmidt
7d72eb809e ci: update test timeout to 60 minutes (#50305) 2026-03-17 10:06:42 -04:00
dependabot[bot]
8ba0ae7fa8 build(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 (#50309)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](70fc10c6e5...3e5f45b2cf)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  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-03-17 14:42:11 +01:00
David Sanders
36350d78d0 chore: add missing timers-shim.ts to filenames.auto.gni (#50311) 2026-03-17 09:46:15 +01:00
dependabot[bot]
9b80324d7f build(deps): bump github/codeql-action from 4.32.6 to 4.33.0 (#50308)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.6 to 4.33.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0d579ffd05...b1bff81932)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 22:15:03 -07:00
dependabot[bot]
a549c56faa build(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 (#50307)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.1.1 to 3.0.1.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](91efab103c...af78098f53)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 22:14:43 -07:00
Keeley Hammond
958278c273 feat: add id and groupId options to macOS notifications (#50097)
* feat: add custom `id` property to Notification API (macOS only)

* feat: add `groupId` property to Notification API (macOS). Notifications with the same groupId will be visually grouped together in Notification Center

* fix: move validation to construction time, add empty string check, remove setters

* docs: clarify id/group id properties, make instance properties read-only

* test: update tests to reflect read-only properties
2026-03-16 21:24:29 +01:00
Shelley Vohr
b7e9bbed0c fix: restore sdk_inputs cross-toolchain deps for macOS (#50297)
fix: restore sdk_inputs cross-toolchain deps for macOS

The change in CL:7652975 restricted sdk_inputs public_deps
to iOS only, to avoid setting up Xcode symlinks for the Linux
toolchain when cross-building chrome/linux on Mac. However, this
also broke cross-arch macOS builds (e.g. ffmpeg with target_cpu=x64)
where the mig target in the clang_arm64 toolchain depends on
sdk_inputs from the default clang_x64 toolchain.

Add target_os == \"mac\" alongside the existing iOS check to preserve
the original intent while restoring the cross-toolchain dependency
for macOS builds.
2026-03-16 20:12:38 +00:00
Justin Mayfield
eec3fe967e fix: user resizable transparent windows on win32 (#49428)
test: revert win32 frameless and transparent resizable expectations
2026-03-16 15:31:07 -04:00
David Sanders
01714757e3 ci: ignore test timeouts in audit (#50259) 2026-03-16 14:33:37 -04:00
Shelley Vohr
ffad67222d test: fix esm issue in node-spec-runner (#50289)
Chromium added a top-level package.json in CL:7485999 that sets
the type to module and breaks commonjs tests run via
node-spec-runner.js. This commit temporarily changes the type to
commonjs while running the tests, then changes it back to module when done.
2026-03-16 12:55:03 -04:00
ZHUO Xu
078586fab0 docs: update the example of webContents.setWindowOpenHandler to cla… (#49379)
docs: reorganize the comments for clarifying `webContents.setWindowOpenHandler` example
2026-03-16 12:12:52 -04:00
Noah Gregory
a561dd97a6 fix: add ASAR support to additional copy methods (#50226)
* fix: add ASAR support for additional copy methods

* test: add tests for ASAR support for additional copy messages
2026-03-16 14:36:48 +01:00
Shelley Vohr
b9cbcde600 build: remove redundant bits of ncrypto node patch (#50252)
build: remove redundant ncrypto node patch
2026-03-16 12:13:47 +01:00
electron-roller[bot]
36b0709942 chore: bump chromium to 148.0.7733.0 (main) (#50197)
* chore: bump chromium in DEPS to 147.0.7727.2

* chore: bump chromium in DEPS to 148.0.7728.0

* chore: bump chromium in DEPS to 148.0.7729.0

* chore: bump chromium in DEPS to 148.0.7730.0

* chore: bump chromium in DEPS to 148.0.7732.0

* chore: update WrappablePointerTag patch
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7641766

* chore: update custom protocol patch for removed code
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653454

* chore: update patches

* fix: cleanup removed CHILD_PLUGIN code
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653455

* fix: move from int to ChildProcessId
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7621912

* fix: update extensions CreateTab signature
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7644389

* fix: draggable hit region test interface update for mac windows
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7655245

* chore: bump chromium in DEPS to 148.0.7733.0

* feat: restore macos child plugin process
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7653455

* fixup! chore: merge main

* chore: update patches

* fix: replace clipboard IsFormatAvailable with async GetAllAvailableFormats
Refs https://chromium-review.googlesource.com/c/chromium/src/+/7631097

Async API pending RFC https://github.com/electron/rfcs/pull/19

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
2026-03-16 10:55:06 +01:00
Shelley Vohr
cf84efbbb9 fix: prefer browser runtime over node in DevTools HostRuntime detection (#50241)
Upstream DevTools' HostRuntime checks `IS_NODE` before `IS_BROWSER` when
selecting the platform runtime. In Electron, `process` is available in
renderer processes, so `IS_NODE` evaluates to `true` in the DevTools
context. This causes DevTools to dynamically import the Node.js platform
runtime, which uses `node:worker_threads`. DevTools Web Workers running
under the `devtools://` protocol cannot load Node.js built-in modules,
so the import fails and breaks features like the formatter worker.

Fix by swapping the check order to prefer `IS_BROWSER` when both are
true. This is safe because in pure Node.js environments (the only case
where the node runtime is needed), `window` and `self` are both
undefined, so `IS_BROWSER` is always `false` regardless of check order.
2026-03-16 10:29:35 +01:00
David Sanders
58cd1aba10 ci: fix unsupported major in release board automation (#50260) 2026-03-14 15:34:50 -07:00
dependabot[bot]
26a3a8679a build(deps-dev): bump folder-hash from 4.1.1 to 4.1.2 (#50258)
Bumps [folder-hash](https://github.com/marc136/node-folder-hash) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/marc136/node-folder-hash/releases)
- [Changelog](https://github.com/marc136/node-folder-hash/blob/v5/CHANGELOG.md)
- [Commits](https://github.com/marc136/node-folder-hash/compare/v4.1.1...v4.1.2)

---
updated-dependencies:
- dependency-name: folder-hash
  dependency-version: 4.1.2
  dependency-type: direct:development
  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-03-13 22:46:05 -07:00
John Kleinschmidt
a1e4c260ea ci: create PR triage project automation (#50248)
* ci: create PR triage project automation

* chore: use ubuntu-slim

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-03-14 02:35:29 +00:00
21 changed files with 359 additions and 34 deletions

View File

@@ -5,6 +5,8 @@ Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
NOTE: PRS submitted without this template will be automatically closed.
-->
#### Checklist

View File

@@ -26,7 +26,7 @@ jobs:
# Use dorny/paths-filter instead of the path filter under the on: pull_request: block
# so that the output can be used to conditionally run the apply-patches job, which lets
# the job be marked as a required status check (conditional skip counts as a success).
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |

View File

@@ -86,6 +86,7 @@ jobs:
!message.startsWith("Response status code does not indicate success") &&
!message.startsWith("The hosted runner lost communication with the server") &&
!message.startsWith("Dependabot encountered an error performing the update") &&
!message.startsWith("The action 'Run Electron Tests' has timed out") &&
!/Unable to make request/.test(message) &&
!/The requested URL returned error/.test(message),
)
@@ -154,7 +155,7 @@ jobs:
await core.summary.write();
- name: Send Slack message if errors
if: ${{ always() && steps.audit-errors.outputs.errorsFound && github.ref == 'refs/heads/main' }}
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
payload: |
link: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

View File

@@ -31,8 +31,8 @@ jobs:
else
echo "Not a release branch: $BRANCH_NAME"
fi
- name: Determine Unsupported Major Version
id: determine-unsupported-major
- name: Determine Next Unsupported Major Version
id: determine-next-unsupported-major
if: ${{ steps.check-major-version.outputs.MAJOR }}
env:
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
@@ -50,26 +50,27 @@ jobs:
# Find the oldest version where eolDate >= stableDate of the new major
# This gives us the oldest supported version when the new major goes stable
UNSUPPORTED_MAJOR=$(echo "$SCHEDULE" | jq -r --arg stableDate "$STABLE_DATE" '
NEXT_UNSUPPORTED_MAJOR=$(echo "$SCHEDULE" | jq -r --arg stableDate "$STABLE_DATE" '
[.[] | select(.eolDate != null and .eolDate >= $stableDate)] | sort_by(.version | split(".")[0] | tonumber) | first | .version | split(".")[0]
')
if [[ -z "$UNSUPPORTED_MAJOR" || "$UNSUPPORTED_MAJOR" == "null" ]]; then
if [[ -z "$NEXT_UNSUPPORTED_MAJOR" || "$NEXT_UNSUPPORTED_MAJOR" == "null" ]]; then
echo "Could not determine oldest supported version"
exit 1
fi
echo "SCHEDULE=$SCHEDULE" >> "$GITHUB_OUTPUT"
echo "UNSUPPORTED_MAJOR=$UNSUPPORTED_MAJOR" >> "$GITHUB_OUTPUT"
echo "NEXT_UNSUPPORTED_MAJOR=$NEXT_UNSUPPORTED_MAJOR" >> "$GITHUB_OUTPUT"
- name: New Release Branch Tasks
if: ${{ steps.check-major-version.outputs.MAJOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: electron/electron
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
UNSUPPORTED_MAJOR: ${{ steps.determine-unsupported-major.outputs.UNSUPPORTED_MAJOR }}
NEXT_UNSUPPORTED_MAJOR: ${{ steps.determine-next-unsupported-major.outputs.NEXT_UNSUPPORTED_MAJOR }}
run: |
PREVIOUS_MAJOR=$((MAJOR - 1))
UNSUPPORTED_MAJOR=$((NEXT_UNSUPPORTED_MAJOR - 1))
# Create new labels
gh label create $MAJOR-x-y --color 8d9ee8 || true
@@ -108,8 +109,8 @@ jobs:
id: generate-project-metadata
env:
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
UNSUPPORTED_MAJOR: ${{ steps.determine-unsupported-major.outputs.UNSUPPORTED_MAJOR }}
SCHEDULE: ${{ steps.determine-unsupported-major.outputs.SCHEDULE }}
NEXT_UNSUPPORTED_MAJOR: ${{ steps.determine-next-unsupported-major.outputs.NEXT_UNSUPPORTED_MAJOR }}
SCHEDULE: ${{ steps.determine-next-unsupported-major.outputs.SCHEDULE }}
with:
script: |
const schedule = JSON.parse(process.env.SCHEDULE)
@@ -144,7 +145,7 @@ jobs:
major,
"next-major": nextMajor,
"prev-major": prevMajor,
"ending-support-major": parseInt(process.env.UNSUPPORTED_MAJOR),
"ending-support-major": parseInt(process.env.NEXT_UNSUPPORTED_MAJOR),
"beta-date": betaDate,
"beta-prep-week": betaPrepWeek.toISOString().split('T')[0],
"beta-prep-week-end": betaPrepWeekEnd.toISOString().split('T')[0],

View File

@@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
@@ -365,6 +365,18 @@ jobs:
generate-symbols: false
upload-to-storage: '0'
secrets: inherit
test-linux-arm64-64k:
uses: ./.github/workflows/pipeline-segment-electron-test-64k.yml
permissions:
contents: read
issues: read
pull-requests: read
needs: [checkout-linux, linux-arm64]
with:
test-runs-on: ubuntu-22.04-arm
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
secrets: inherit
windows-x64:
permissions:

View File

@@ -126,7 +126,7 @@ jobs:
cd src/electron
git pack-refs
- name: Download Out Gen Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: out_gen_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src/out/${{ env.ELECTRON_OUT_DIR }}/gen

View File

@@ -0,0 +1,67 @@
name: Pipeline Segment - Electron Test on Linux ARM64 64k
on:
workflow_call:
inputs:
test-runs-on:
type: string
description: 'What host to run the tests on'
required: true
test-container:
type: string
description: 'JSON container information for aks runs-on'
required: false
default: '{"image":null}'
concurrency:
group: electron-test-linux-64k-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
permissions: {}
env:
ELECTRON_OUT_DIR: Default
jobs:
test-linux-arm64-64k:
env:
BUILD_TYPE: linux
TARGET_ARCH: arm64
defaults:
run:
shell: bash
runs-on: ${{ inputs.test-runs-on }}
permissions:
contents: read
issues: read
pull-requests: read
steps:
- name: Checkout Electron
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Download Generated Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: generated_artifacts_linux_arm64
path: ./generated_artifacts_linux_arm64
- name: Restore Generated Artifacts
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist
run: |
cd src/out/Default
unzip -:o dist.zip
- name: Run Electron Tests in QEMU 64k Container
shell: bash
env:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
DISPLAY: ':99.0'
run: |
container=$(echo '${{ inputs.test-container }}' | jq -r '.image')
src/electron/script/run-qemu-64k.sh --container $container --testfiles "`pwd`/src"

View File

@@ -173,12 +173,12 @@ jobs:
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
echo "IS_ASAN=true" >> $GITHUB_ENV
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}

View File

@@ -65,12 +65,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
@@ -121,12 +121,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}

55
.github/workflows/pr-template-check.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: PR Template Check
on:
pull_request_target:
types: [opened, edited]
branches:
- main
permissions: {}
jobs:
check-pr-template:
name: Check PR Template
runs-on: ubuntu-slim
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
sparse-checkout: .github/PULL_REQUEST_TEMPLATE.md
sparse-checkout-cone-mode: false
- name: Check for required sections
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const fs = require('fs');
const template = fs.readFileSync('.github/PULL_REQUEST_TEMPLATE.md', 'utf8');
const requiredSections = [...template.matchAll(/^(#{1,4} .+)$/gm)].map(
(m) => m[1],
);
if (requiredSections.length === 0) {
console.log('No heading sections found in PR template');
return;
}
const body = context.payload.pull_request.body || '';
const missingSections = requiredSections.filter(
(section) => !body.includes(section),
);
if (missingSections.length > 0) {
const list = missingSections.map((s) => `- \`${s}\``).join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `This PR was automatically closed because the PR template was not properly filled out. The following required sections are missing:\n\n${list}\n\nPlease update your PR description to include all required sections and reopen the PR.`,
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
}

View File

@@ -0,0 +1,37 @@
name: PR Triage Automation
on:
pull_request_target:
types: [synchronize, review_requested]
issue_comment:
types: [created]
permissions: {}
jobs:
set-needs-review:
name: Set status to Needs Review
if: >-
(github.event_name == 'pull_request_target' && github.event.action == 'synchronize')
|| (github.event_name == 'pull_request_target' && github.event.action == 'review_requested')
|| (github.event_name == 'issue_comment'
&& github.event.issue.pull_request
&& github.event.comment.user.login == github.event.issue.user.login)
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@e14e47722ed120360649d0789e25b9baece12725 # v2.0.0
id: generate-token
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Set status to Needs Review
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
with:
token: ${{ steps.generate-token.outputs.token }}
project-number: 118
field: Status
field-value: 🌀 Needs Review
fail-if-item-not-found: false

View File

@@ -14,7 +14,7 @@ jobs:
permissions: {}
steps:
- name: Trigger Slack workflow
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
webhook: ${{ secrets.BACKPORT_REQUESTED_SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger

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@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.29.5
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -94,6 +94,7 @@
The actual output pixel format and color space of the texture should refer to [`OffscreenSharedTexture`](../structures/offscreen-shared-texture.md) object in the `paint` event.
* `argb` - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
* `rgbaf16` - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
* `nv12` - The requested output texture format is 12bpp with Y plane followed by a 2x2 interleaved UV plane, with REC709 color space.
* `deviceScaleFactor` number (optional) _Experimental_ - The device scale factor of the offscreen rendering output. If not set, will use `1` as default.
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
the specified `preload` script in a separate JavaScript context. Defaults

View File

@@ -179,6 +179,7 @@ auto_filenames = {
"lib/common/define-properties.ts",
"lib/common/deprecate.ts",
"lib/common/ipc-messages.ts",
"lib/common/timers-shim.ts",
"lib/common/web-view-methods.ts",
"lib/common/webpack-globals-provider.ts",
"lib/renderer/api/context-bridge.ts",

View File

@@ -35,7 +35,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.6.0",
"events": "^3.2.0",
"folder-hash": "^4.1.1",
"folder-hash": "^4.1.2",
"got": "^11.8.5",
"husky": "^9.1.7",
"lint-staged": "^16.1.0",

44
script/qemu-init.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
echo "Mounting essential filesystems"
mount -t proc proc /proc
mount -t sysfs sys /sys
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
mkdir -p /dev/shm
mount -t tmpfs tmpfs /dev/shm
mount -t tmpfs tmpfs /tmp
chmod 1777 /tmp
mount -t tmpfs tmpfs /run
mkdir -p /run/dbus
mkdir -p /run/user/0
chmod 700 /run/user/0
mount -t tmpfs tmpfs /var/tmp
echo "Setting up hostname and machine-id for D-Bus"
echo "electron-test" > /etc/hostname
hostname electron-test
cat /proc/sys/kernel/random/uuid | tr -d '-' > /etc/machine-id
echo "Setting system clock"
date -s "$(cat /host-time)"
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export XDG_RUNTIME_DIR=/run/user/0
echo "Starting entrypoint"
echo "System: $(uname -s) $(uname -r) $(uname -m), page size: $(getconf PAGESIZE) bytes"
sudo chown -R builduser:builduser /home/builduser
ls -la /home/builduser/src/out/Default/electron
cd /home/builduser/src
runuser -u builduser -- xvfb-run out/Default/electron electron/spec/fixtures/apps/open-new-window-from-link
EXIT_CODE=$?
echo "Test execution finished with exit code $EXIT_CODE"
echo $EXIT_CODE > /exit-code
sync
echo "Powering off"
# poweroff -f bypasses the init system (this script IS pid 1) and
# directly invokes the reboot() syscall, causing QEMU to exit immediately.
poweroff -f

100
script/run-qemu-64k.sh Executable file
View File

@@ -0,0 +1,100 @@
#!/bin/sh
set -e
CONTAINER=""
TESTFILES=""
ARGS=""
while [ $# -gt 0 ]; do
case "$1" in
--container) CONTAINER="$2"; shift 2 ;;
--testfiles) TESTFILES="$2"; shift 2 ;;
--) shift; ARGS="$*"; break ;;
*) echo "Unknown option: $1"; exit 1 ;;
esac
done
if [ -z "$CONTAINER" ]; then
echo "Usage: $0 --container CONTAINER [-- ARGS...]"
exit 1
fi
echo "Installing QEMU system emulation and tools"
sudo apt-get update && sudo apt-get install -y qemu-system-arm binutils
KERNEL_URL="http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-image-unsigned-6.8.0-90-generic-64k_6.8.0-90.91_arm64.deb"
KERNEL_DIR=$(mktemp -d)
ROOTFS_DIR=$(mktemp -d)
# Download kernel and export container filesystem in parallel
echo "Downloading kernel and exporting container filesystem in parallel"
curl -fL "$KERNEL_URL" -o "$KERNEL_DIR/kernel.deb" &
CURL_PID=$!
CONTAINER_ID=$(docker create --platform linux/arm64 "$CONTAINER")
docker export "$CONTAINER_ID" | sudo tar -xf - -C "$ROOTFS_DIR"
docker rm -f "$CONTAINER_ID"
echo "Removing container image to free disk space"
docker rmi "$CONTAINER" || true
docker system prune -f || true
wait $CURL_PID
echo "Extracting kernel"
(cd "$KERNEL_DIR" && ar x kernel.deb && tar xf data.tar*)
VMLINUZ="$KERNEL_DIR/boot/vmlinuz-6.8.0-90-generic-64k"
if [ ! -f "$VMLINUZ" ]; then
echo "Error: Could not find kernel at $VMLINUZ"
exit 1
fi
sudo cp -r $TESTFILES "$ROOTFS_DIR/home/builduser"
echo "Storing test arguments and installing init script"
echo "$ARGS" > "$ROOTFS_DIR/test-args"
date -u '+%Y-%m-%d %H:%M:%S' > "$ROOTFS_DIR/host-time"
sudo cp "$TESTFILES/electron/script/qemu-init.sh" "$ROOTFS_DIR/init"
sudo chmod +x "$ROOTFS_DIR/init"
echo "Creating disk image with root filesystem"
df -h
DISK_IMG=$(mktemp)
truncate -s 10G "$DISK_IMG"
sudo mkfs.ext4 -q -d "$ROOTFS_DIR" "$DISK_IMG"
sudo rm -rf "$ROOTFS_DIR"
# Use KVM acceleration if available (ARM64 host can run 64K-page guest via KVM)
if [ -e /dev/kvm ] && [ -w /dev/kvm ]; then
echo "KVM available, using hardware acceleration"
ACCEL="-accel kvm -cpu host"
else
echo "KVM not available, using TCG emulation"
ACCEL="-accel tcg,thread=multi -cpu max,pauth-impdef=on"
fi
echo "Starting QEMU VM with 64K page size kernel"
timeout 1800 qemu-system-aarch64 \
-M virt \
$ACCEL \
-m 4096 \
-smp 2 \
-kernel "$VMLINUZ" \
-append "console=ttyAMA0 root=/dev/vda rw init=/init net.ifnames=0 panic=1" \
-drive file="$DISK_IMG",format=raw,if=virtio \
-virtfs local,path="$TESTFILES",mount_tag=testfiles,security_model=none,id=testfiles \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0 \
-nographic \
-no-reboot \
|| true
echo "Extracting test results from disk image"
MOUNT_DIR=$(mktemp -d)
sudo mount -o loop "$DISK_IMG" "$MOUNT_DIR"
if [ -f "$MOUNT_DIR/results.xml" ]; then
cp "$MOUNT_DIR/results.xml" .
fi
EXIT_CODE=$(cat "$MOUNT_DIR/exit-code" 2>/dev/null || echo 1)
sudo umount "$MOUNT_DIR"
exit $EXIT_CODE

View File

@@ -24,6 +24,8 @@ media::VideoPixelFormat GetTargetPixelFormatFromOption(
return media::PIXEL_FORMAT_ARGB;
} else if (pixel_format_option == "rgbaf16") {
return media::PIXEL_FORMAT_RGBAF16;
} else if (pixel_format_option == "nv12") {
return media::PIXEL_FORMAT_NV12;
}
// Use ARGB as default.

View File

@@ -31,6 +31,8 @@ std::string OsrVideoPixelFormatToString(media::VideoPixelFormat format) {
return "rgba";
case media::PIXEL_FORMAT_RGBAF16:
return "rgbaf16";
case media::PIXEL_FORMAT_NV12:
return "nv12";
default:
NOTREACHED();
}

View File

@@ -588,7 +588,7 @@ __metadata:
eslint-plugin-node: "npm:^11.1.0"
eslint-plugin-promise: "npm:^6.6.0"
events: "npm:^3.2.0"
folder-hash: "npm:^4.1.1"
folder-hash: "npm:^4.1.2"
got: "npm:^11.8.5"
husky: "npm:^9.1.7"
lint-staged: "npm:^16.1.0"
@@ -3416,7 +3416,7 @@ __metadata:
languageName: node
linkType: hard
"brace-expansion@npm:^2.0.1":
"brace-expansion@npm:^2.0.1, brace-expansion@npm:^2.0.2":
version: 2.0.2
resolution: "brace-expansion@npm:2.0.2"
dependencies:
@@ -6180,15 +6180,15 @@ __metadata:
languageName: node
linkType: hard
"folder-hash@npm:^4.1.1":
version: 4.1.1
resolution: "folder-hash@npm:4.1.1"
"folder-hash@npm:^4.1.2":
version: 4.1.2
resolution: "folder-hash@npm:4.1.2"
dependencies:
debug: "npm:4.4.0"
minimatch: "npm:7.4.6"
minimatch: "npm:7.4.9"
bin:
folder-hash: bin/folder-hash
checksum: 10c0/71597548cccda43c3d4bda940fd1277f63839a86322d66dec2aa883dce4f51c4c0a6e274d7cb30cfbf4df9897d7a5649a09257e5ffada2fa50cd3a2b09da5a32
checksum: 10c0/7c26f7322820cff61745e168ed7c0d3fe9f9afafe7157d01de5cb708effc66761c2f4d1eda59d2925661baaac2adb8a04a51d0d1f01f8003d7e275610ca3f452
languageName: node
linkType: hard
@@ -9256,12 +9256,12 @@ __metadata:
languageName: node
linkType: hard
"minimatch@npm:7.4.6":
version: 7.4.6
resolution: "minimatch@npm:7.4.6"
"minimatch@npm:7.4.9":
version: 7.4.9
resolution: "minimatch@npm:7.4.9"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/e587bf3d90542555a3d58aca94c549b72d58b0a66545dd00eef808d0d66e5d9a163d3084da7f874e83ca8cc47e91c670e6c6f6593a3e7bb27fcc0e6512e87c67
brace-expansion: "npm:^2.0.2"
checksum: 10c0/8d5406a9697edb9b7ea02697d58cabcb3d3a9a4a02caa1cf57b9ab5ae22c78b2945600661a78f91d1545f77521f97f3cb5f8cb066e58356a121b50e4e60ccdbe
languageName: node
linkType: hard