mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
1 Commits
v35.0.0-ni
...
test/nativ
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d14b77c066 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,9 +1,6 @@
|
||||
# `git apply` and friends don't understand CRLF, even on windows. Force those
|
||||
# files to be checked out with LF endings even if core.autocrlf is true.
|
||||
*.patch text eol=lf
|
||||
DEPS text eol=lf
|
||||
yarn.lock text eol=lf
|
||||
script/zip_manifests/*.manifest text eol=lf
|
||||
patches/**/.patches merge=union
|
||||
|
||||
# Source code and markdown files should always use LF as line ending.
|
||||
|
||||
20
.github/actions/build-electron/action.yml
vendored
20
.github/actions/build-electron/action.yml
vendored
@@ -5,10 +5,10 @@ inputs:
|
||||
description: 'Target arch'
|
||||
required: true
|
||||
target-platform:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
description: 'Target platform'
|
||||
required: true
|
||||
artifact-platform:
|
||||
description: 'Artifact platform, should be linux, win, darwin or mas'
|
||||
description: 'Artifact platform, should be linux, darwin or mas'
|
||||
required: true
|
||||
step-suffix:
|
||||
description: 'Suffix for build steps'
|
||||
@@ -69,9 +69,9 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES -d explain
|
||||
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
|
||||
target_os=${{ inputs.target-platform == 'linux' && 'linux' || 'mac'}}
|
||||
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
||||
target_os="${target_os}_mas"
|
||||
fi
|
||||
@@ -82,7 +82,7 @@ runs:
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
# Remove unused args from mksnapshot_args
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
@@ -91,7 +91,7 @@ runs:
|
||||
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
||||
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
||||
|
||||
if [ "${{ inputs.target-platform }}" = "linux" ]; then
|
||||
if [ "`uname`" = "Linux" ]; then
|
||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
|
||||
@@ -105,13 +105,7 @@ runs:
|
||||
fi
|
||||
|
||||
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
cd out/Default
|
||||
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
||||
powershell Compress-Archive -update gen/v8/embedded.S mksnapshot.zip
|
||||
else
|
||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
||||
fi
|
||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
||||
- name: Generate Cross-Arch Snapshot (arm/arm64) ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ (inputs.target-arch == 'arm' || inputs.target-arch == 'arm64') && inputs.target-platform == 'linux' }}
|
||||
|
||||
70
.github/actions/checkout/action.yml
vendored
70
.github/actions/checkout/action.yml
vendored
@@ -5,10 +5,6 @@ inputs:
|
||||
description: 'Whether to generate and persist a SAS token for the item in the cache'
|
||||
required: false
|
||||
default: 'false'
|
||||
use-cache:
|
||||
description: 'Whether to persist the cache to the shared drive'
|
||||
required: false
|
||||
default: 'true'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -17,27 +13,31 @@ runs:
|
||||
run: |
|
||||
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
shell: bash
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Get Depot Tools
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ! -d depot_tools ]]; then
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
fi
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||
cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
shell: bash
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Generate DEPS Hash
|
||||
shell: bash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
echo "DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
echo "DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||
- name: Generate SAS Key
|
||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||
shell: bash
|
||||
@@ -54,23 +54,18 @@ runs:
|
||||
id: check-cache
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ inputs.use-cache }}" == "false" ]]; then
|
||||
echo "Not using cache this time..."
|
||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking for cache in: $cache_path"
|
||||
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
|
||||
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||
echo "Cache Does Not Exist for $DEPSHASH"
|
||||
else
|
||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
echo "Using cache key: $DEPSHASH"
|
||||
echo "Checking for cache in: $cache_path"
|
||||
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
|
||||
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||
echo "Cache Does Not Exist for $DEPSHASH"
|
||||
else
|
||||
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||
echo "Cache Already Exists for $DEPSHASH, Skipping.."
|
||||
fi
|
||||
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||
echo "Cache Already Exists for $DEPSHASH, Skipping.."
|
||||
fi
|
||||
- name: Check cross instance cache disk space
|
||||
if: steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true'
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
# if there is less than 20 GB free space then creating the cache might fail so exit early
|
||||
@@ -86,17 +81,13 @@ runs:
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
e d gclient config \
|
||||
gclient config \
|
||||
--name "src/electron" \
|
||||
--unmanaged \
|
||||
${GCLIENT_EXTRA_ARGS} \
|
||||
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
||||
|
||||
if [ "$TARGET_OS" != "" ]; then
|
||||
echo "target_os=['$TARGET_OS']" >> ./.gclient
|
||||
fi
|
||||
|
||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
|
||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags -vvvvv
|
||||
if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; then
|
||||
# Re-export all the patches to check if there were changes.
|
||||
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
|
||||
@@ -137,13 +128,13 @@ runs:
|
||||
# https://dawn-review.googlesource.com/c/dawn/+/83901
|
||||
# TODO: maybe better to always leave out */.git/HEAD file for all targets ?
|
||||
- name: Delete .git directories under src to free space
|
||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" -not -path "./electron/*" ) | xargs rm -rf
|
||||
- name: Minimize Cache Size for Upload
|
||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf src/android_webview
|
||||
@@ -154,12 +145,9 @@ runs:
|
||||
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
||||
rm -rf src/third_party/swift-toolchain
|
||||
rm -rf src/third_party/swiftshader/tests/regres/testlists
|
||||
cp src/electron/.github/actions/checkout/action.yml ./
|
||||
rm -rf src/electron
|
||||
mkdir -p src/electron/.github/actions/checkout
|
||||
mv action.yml src/electron/.github/actions/checkout
|
||||
- name: Compress Src Directory
|
||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
||||
@@ -167,7 +155,7 @@ runs:
|
||||
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||
- name: Persist Src Cache
|
||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
run: |
|
||||
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||
|
||||
11
.github/actions/install-build-tools/action.yml
vendored
11
.github/actions/install-build-tools/action.yml
vendored
@@ -6,15 +6,6 @@ runs:
|
||||
- name: Install Build Tools
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||
git config --global core.filemode false
|
||||
git config --global core.autocrlf false
|
||||
git config --global branch.autosetuprebase always
|
||||
fi
|
||||
export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
|
||||
export BUILD_TOOLS_SHA=eeb1a11392e4cec08fd926c93b31ab556dc0c23b
|
||||
npm i -g @electron/build-tools
|
||||
e auto-update disable
|
||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||
e d cipd.bat --version
|
||||
cp "C:\Python37\python.exe" "C:\Python37\python3.exe"
|
||||
fi
|
||||
|
||||
21
.github/actions/install-dependencies/action.yml
vendored
21
.github/actions/install-dependencies/action.yml
vendored
@@ -1,21 +0,0 @@
|
||||
name: 'Install Dependencies'
|
||||
description: 'Installs yarn depdencies using cache when available'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Get yarn cache directory path
|
||||
shell: bash
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(node src/electron/script/yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('src/electron/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install Dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile --prefer-offline
|
||||
2
.github/workflows/archaeologist-dig.yml
vendored
2
.github/workflows/archaeologist-dig.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
sha-file: .dig-old
|
||||
filename: electron.old.d.ts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b #v4.5.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
|
||||
with:
|
||||
name: artifacts
|
||||
path: electron/artifacts
|
||||
|
||||
138
.github/workflows/build.yml
vendored
138
.github/workflows/build.yml
vendored
@@ -18,11 +18,6 @@ on:
|
||||
description: 'Skip Linux builds'
|
||||
default: false
|
||||
required: false
|
||||
skip-windows:
|
||||
type: boolean
|
||||
description: 'Skip Windows builds'
|
||||
default: false
|
||||
required: false
|
||||
skip-lint:
|
||||
type: boolean
|
||||
description: 'Skip lint check'
|
||||
@@ -33,11 +28,7 @@ on:
|
||||
- main
|
||||
- '[1-9][0-9]-x-y'
|
||||
pull_request:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -50,8 +41,6 @@ jobs:
|
||||
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: filter
|
||||
with:
|
||||
@@ -109,7 +98,6 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Checkout & Sync & Save
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
@@ -136,68 +124,9 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Checkout & Sync & Save
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
|
||||
checkout-windows:
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
runs-on: electron-arc-linux-amd64-32core
|
||||
container:
|
||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||
volumes:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
env:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||
TARGET_OS: 'win'
|
||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||
outputs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Checkout & Sync & Save
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
|
||||
# GN Check Jobs
|
||||
macos-gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
needs: checkout-macos
|
||||
with:
|
||||
target-platform: macos
|
||||
target-archs: x64 arm64
|
||||
check-runs-on: macos-14
|
||||
gn-build-type: testing
|
||||
secrets: inherit
|
||||
|
||||
linux-gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
needs: checkout-linux
|
||||
with:
|
||||
target-platform: linux
|
||||
target-archs: x64 arm arm64
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
gn-build-type: testing
|
||||
secrets: inherit
|
||||
|
||||
windows-gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
needs: checkout-windows
|
||||
with:
|
||||
target-platform: win
|
||||
target-archs: x64 x86 arm64
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
gn-build-type: testing
|
||||
secrets: inherit
|
||||
|
||||
# Build Jobs - These cascade into testing jobs
|
||||
macos-x64:
|
||||
permissions:
|
||||
@@ -208,6 +137,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-13
|
||||
target-platform: macos
|
||||
target-arch: x64
|
||||
@@ -226,6 +156,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-14
|
||||
target-platform: macos
|
||||
target-arch: arm64
|
||||
@@ -244,6 +175,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -264,6 +196,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -285,6 +218,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
||||
@@ -305,6 +239,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -316,67 +251,10 @@ jobs:
|
||||
upload-to-storage: '0'
|
||||
secrets: inherit
|
||||
|
||||
windows-x64:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
test-runs-on: windows-latest
|
||||
target-platform: win
|
||||
target-arch: x64
|
||||
is-release: false
|
||||
gn-build-type: testing
|
||||
generate-symbols: false
|
||||
upload-to-storage: '0'
|
||||
secrets: inherit
|
||||
|
||||
windows-x86:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
test-runs-on: windows-latest
|
||||
target-platform: win
|
||||
target-arch: x86
|
||||
is-release: false
|
||||
gn-build-type: testing
|
||||
generate-symbols: false
|
||||
upload-to-storage: '0'
|
||||
secrets: inherit
|
||||
|
||||
windows-arm64:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-windows-amd64-16core
|
||||
test-runs-on: electron-hosted-windows-arm64-4core
|
||||
target-platform: win
|
||||
target-arch: arm64
|
||||
is-release: false
|
||||
gn-build-type: testing
|
||||
generate-symbols: false
|
||||
upload-to-storage: '0'
|
||||
secrets: inherit
|
||||
|
||||
gha-done:
|
||||
name: GitHub Actions Completed
|
||||
runs-on: ubuntu-latest
|
||||
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, windows-x64, windows-x86, windows-arm64]
|
||||
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64]
|
||||
if: always() && !contains(needs.*.result, 'failure')
|
||||
steps:
|
||||
- name: GitHub Actions Jobs Done
|
||||
|
||||
14
.github/workflows/config/gclient.diff
vendored
Normal file
14
.github/workflows/config/gclient.diff
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/gclient.py b/gclient.py
|
||||
index 59e2b4c5197928bdba1ef69bdbe637d7dfe471c1..b4bae5e48c83c84bd867187afaf40eed16e69851 100755
|
||||
--- a/gclient.py
|
||||
+++ b/gclient.py
|
||||
@@ -783,7 +783,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
||||
not condition or "non_git_source" not in condition):
|
||||
continue
|
||||
cipd_root = self.GetCipdRoot()
|
||||
- for package in dep_value.get('packages', []):
|
||||
+ packages = dep_value.get('packages', [])
|
||||
+ for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')):
|
||||
deps_to_add.append(
|
||||
CipdDependency(parent=self,
|
||||
name=name,
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
inputs:
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux.'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-arch:
|
||||
type: string
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -72,6 +76,16 @@ jobs:
|
||||
generate-symbols: ${{ inputs.generate-symbols }}
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
secrets: inherit
|
||||
test:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||
needs: build
|
||||
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
inputs:
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-arch:
|
||||
type: string
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -78,6 +82,16 @@ jobs:
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
is-asan: ${{ inputs.is-asan}}
|
||||
secrets: inherit
|
||||
gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
secrets: inherit
|
||||
test:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||
needs: build
|
||||
|
||||
@@ -24,9 +24,10 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Run TS/JS compile
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
5
.github/workflows/pipeline-electron-lint.yml
vendored
5
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -24,9 +24,10 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Setup third_party Depot Tools
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
type: string
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-arch:
|
||||
type: string
|
||||
@@ -69,14 +69,11 @@ env:
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
||||
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
|
||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || inputs.target-platform == 'win' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
jobs:
|
||||
build:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
runs-on: ${{ inputs.build-runs-on }}
|
||||
container: ${{ fromJSON(inputs.build-container) }}
|
||||
environment: ${{ inputs.environment }}
|
||||
@@ -84,14 +81,12 @@ jobs:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
steps:
|
||||
- name: Create src dir
|
||||
run: |
|
||||
mkdir src
|
||||
run: mkdir src
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Free up space (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/free-space-macos
|
||||
@@ -106,7 +101,9 @@ jobs:
|
||||
cache: yarn
|
||||
cache-dependency-path: src/electron/yarn.lock
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Install AZCopy
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: brew install azcopy
|
||||
@@ -140,13 +137,16 @@ jobs:
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
if [ "`uname`" = "Linux" ]; then
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
fi
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Generate DEPS Hash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
- name: Restore src cache via AZCopy
|
||||
@@ -155,17 +155,11 @@ jobs:
|
||||
- name: Restore src cache via AKS
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
- name: Checkout src via gclient sync
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: ./src/electron/.github/actions/checkout
|
||||
with:
|
||||
use-cache: 'false'
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
@@ -173,11 +167,11 @@ jobs:
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||
- name: Run Electron Only Hooks
|
||||
run: |
|
||||
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
||||
gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
||||
- name: Regenerate DEPS Hash
|
||||
run: |
|
||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js
|
||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
echo "DEPSHASH=$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Fix Sync (macOS)
|
||||
@@ -185,7 +179,7 @@ jobs:
|
||||
uses: ./src/electron/.github/actions/fix-sync-macos
|
||||
- name: Setup Number of Ninja Processes
|
||||
run: |
|
||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform == 'linux' && '300' || '200' }}" >> $GITHUB_ENV
|
||||
- name: Free up space (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/free-space-macos
|
||||
@@ -195,7 +189,7 @@ jobs:
|
||||
with:
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
|
||||
artifact-platform: ${{ inputs.target-platform == 'linux' && 'linux' || 'darwin' }}
|
||||
is-release: '${{ inputs.is-release }}'
|
||||
generate-symbols: '${{ inputs.generate-symbols }}'
|
||||
strip-binaries: '${{ inputs.strip-binaries }}'
|
||||
|
||||
@@ -5,11 +5,11 @@ on:
|
||||
inputs:
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-archs:
|
||||
target-arch:
|
||||
type: string
|
||||
description: 'Archs to check for, can be x64, x86, arm64 or arm space separated'
|
||||
description: 'Arch to build for, can be x64, arm64 or arm'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
@@ -25,30 +25,35 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
default: testing
|
||||
is-asan:
|
||||
description: 'Building the Address Sanitizer (ASan) Linux build'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: electron-gn-check-${{ inputs.target-platform }}-${{ github.ref }}
|
||||
group: electron-gn-check-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || (inputs.target-platform == 'linux' && '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' || '--custom-var=checkout_win=True') }}
|
||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
|
||||
jobs:
|
||||
gn-check:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
# TODO(codebytere): Change this to medium VM
|
||||
runs-on: ${{ inputs.check-runs-on }}
|
||||
container: ${{ fromJSON(inputs.check-container) }}
|
||||
env:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Cleanup disk space on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
shell: bash
|
||||
@@ -68,40 +73,58 @@ jobs:
|
||||
run: df -h
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Enable windows toolchain
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
- name: Init Build Tools
|
||||
run: |
|
||||
echo "ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN=1" >> $GITHUB_ENV
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
SEDOPTION="-i ''"
|
||||
fi
|
||||
|
||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||
sed $SEDOPTION '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
if [ "`uname`" = "Linux" ]; then
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
fi
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
- name: Set GN_EXTRA_ARGS for Linux
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
||||
GN_EXTRA_ARGS='build_tflite_with_xnnpack=false'
|
||||
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||
GN_EXTRA_ARGS='fatal_linker_warnings=false enable_linux_installer=false'
|
||||
fi
|
||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||
- name: Generate DEPS Hash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
- name: Restore src cache via AZCopy
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||
- name: Restore src cache via AKS
|
||||
if: ${{ inputs.target-platform == 'linux' || inputs.target-platform == 'win' }}
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
- name: Run Electron Only Hooks
|
||||
run: |
|
||||
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" > tmpgclient
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False,'install_sysroot':False,'checkout_win':True},'managed':False}]" > tmpgclient
|
||||
echo "target_os=['win']" >> tmpgclient
|
||||
fi
|
||||
e d gclient runhooks --gclientfile=tmpgclient
|
||||
|
||||
# Fix VS Toolchain
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
rm -rf src/third_party/depot_tools/win_toolchain/vs_files
|
||||
e d python3 src/build/vs_toolchain.py update --force
|
||||
fi
|
||||
gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
||||
- name: Regenerate DEPS Hash
|
||||
run: |
|
||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js
|
||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||
echo "DEPSHASH=$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Checkout Electron
|
||||
@@ -109,46 +132,30 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Default GN gen
|
||||
run: |
|
||||
cd src/electron
|
||||
git pack-refs
|
||||
- name: Run GN Check for ${{ inputs.target-archs }}
|
||||
cd ..
|
||||
|
||||
e build --only-gen
|
||||
- name: Run GN Check
|
||||
run: |
|
||||
for target_cpu in ${{ inputs.target-archs }}
|
||||
do
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu $target_cpu
|
||||
cd src
|
||||
export GN_EXTRA_ARGS="target_cpu=\"$target_cpu\""
|
||||
if [ "${{ inputs.target-platform }}" = "linux" ]; then
|
||||
if [ "$target_cpu" = "arm" ]; then
|
||||
export GN_EXTRA_ARGS="$GN_EXTRA_ARGS build_tflite_with_xnnpack=false"
|
||||
elif [ "$target_cpu" = "arm64" ]; then
|
||||
export GN_EXTRA_ARGS="$GN_EXTRA_ARGS fatal_linker_warnings=false enable_linux_installer=false"
|
||||
fi
|
||||
fi
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
export GN_EXTRA_ARGS="$GN_EXTRA_ARGS use_v8_context_snapshot=true target_os=\"win\""
|
||||
fi
|
||||
cd src
|
||||
gn check out/Default //electron:electron_lib
|
||||
gn check out/Default //electron:electron_app
|
||||
gn check out/Default //electron/shell/common:mojo
|
||||
gn check out/Default //electron/shell/common:plugin
|
||||
|
||||
e build --only-gen
|
||||
|
||||
e d gn check out/Default //electron:electron_lib
|
||||
e d gn check out/Default //electron:electron_app
|
||||
e d gn check out/Default //electron/shell/common:mojo
|
||||
e d gn check out/Default //electron/shell/common:plugin
|
||||
|
||||
# Check the hunspell filenames
|
||||
node electron/script/gen-hunspell-filenames.js --check
|
||||
node electron/script/gen-libc++-filenames.js --check
|
||||
cd ..
|
||||
done
|
||||
# Check the hunspell filenames
|
||||
node electron/script/gen-hunspell-filenames.js --check
|
||||
node electron/script/gen-libc++-filenames.js --check
|
||||
- name: Wait for active SSH sessions
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: |
|
||||
while [ -f /var/.ssh-lock ]
|
||||
do
|
||||
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
inputs:
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-arch:
|
||||
type: string
|
||||
@@ -41,44 +41,22 @@ env:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
runs-on: ${{ inputs.test-runs-on }}
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || (inputs.target-platform == 'win' && fromJSON('["win"]') || fromJSON('["linux"]')) }}
|
||||
shard: ${{ inputs.target-platform == 'linux' && fromJSON('[1, 2, 3]') || fromJSON('[1, 2]') }}
|
||||
build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || fromJSON('["linux"]') }}
|
||||
shard: ${{ inputs.target-platform == 'macos' && fromJSON('[1, 2]') || fromJSON('[1, 2, 3]') }}
|
||||
env:
|
||||
BUILD_TYPE: ${{ matrix.build-type }}
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
ARTIFACT_KEY: ${{ matrix.build-type }}_${{ inputs.target-arch }}
|
||||
steps:
|
||||
- name: Fix node20 on arm32 runners
|
||||
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
|
||||
if: ${{ inputs.target-arch == 'arm' }}
|
||||
run: |
|
||||
cp $(which node) /mnt/runner-externals/node20/bin/
|
||||
- name: Install Git on Windows arm64 runners
|
||||
if: ${{ inputs.target-arch == 'arm64' && inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||
choco install -y --no-progress git.install --params "'/GitAndUnixToolsOnPath'"
|
||||
choco install -y --no-progress git
|
||||
choco install -y --no-progress python --version 3.11.9
|
||||
choco install -y --no-progress visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
|
||||
echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
echo "C:\Python311" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
- name: Add TCC permissions on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
@@ -117,18 +95,24 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git config --global core.filemode false
|
||||
git config --global core.autocrlf false
|
||||
git config --global branch.autosetuprebase always
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||
sed -i '' '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
||||
else
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
fi
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
@@ -150,17 +134,7 @@ jobs:
|
||||
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
||||
- name: Restore Generated Artifacts
|
||||
run: ./src/electron/script/actions/restore-artifacts.sh
|
||||
- name: Unzip Dist, Mksnapshot & Chromedriver (win)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
cd src/out/Default
|
||||
Expand-Archive -Force dist.zip -DestinationPath ./
|
||||
Expand-Archive -Force chromedriver.zip -DestinationPath ./
|
||||
Expand-Archive -Force mksnapshot.zip -DestinationPath ./
|
||||
- name: Unzip Dist, Mksnapshot & Chromedriver (unix)
|
||||
if: ${{ inputs.target-platform != 'win' }}
|
||||
- name: Unzip Dist, Mksnapshot & Chromedriver
|
||||
run: |
|
||||
cd src/out/Default
|
||||
unzip -:o dist.zip
|
||||
@@ -184,24 +158,15 @@ jobs:
|
||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||
DISPLAY: ':99.0'
|
||||
NPM_CONFIG_MSVS_VERSION: '2022'
|
||||
run: |
|
||||
cd src/electron
|
||||
export ELECTRON_TEST_RESULTS_DIR=`pwd`/junit
|
||||
# Get which tests are on this shard
|
||||
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'linux' && 3 || 2 }})
|
||||
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 2 || 3 }})
|
||||
|
||||
# Run tests
|
||||
if [ "${{ inputs.target-platform }}" != "linux" ]; then
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
echo "About to start tests"
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
if [ "${{ inputs.target-arch }}" = "x86" ]; then
|
||||
export npm_config_arch="ia32"
|
||||
fi
|
||||
if [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
|
||||
fi
|
||||
fi
|
||||
node script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
||||
else
|
||||
chown :builduser .. && chmod g+w ..
|
||||
@@ -232,21 +197,19 @@ jobs:
|
||||
DD_CIVISIBILITY_LOGS_ENABLED: true
|
||||
DD_TAGS: "os.architecture:${{ inputs.target-arch }},os.family:${{ inputs.target-platform }},os.platform:${{ inputs.target-platform }},asan:${{ inputs.is-asan }}"
|
||||
run: |
|
||||
if ! [ -z $DD_API_KEY ] && [ -f src/electron/junit/test-results-main.xml ]; then
|
||||
export DATADOG_PATH=`node src/electron/script/yarn global bin`
|
||||
$DATADOG_PATH/datadog-ci junit upload src/electron/junit/test-results-main.xml
|
||||
if ! [ -z $DD_API_KEY ]; then
|
||||
datadog-ci junit upload src/electron/junit/test-results-main.xml
|
||||
fi
|
||||
if: always() && !cancelled()
|
||||
- name: Upload Test Artifacts
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
|
||||
with:
|
||||
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
|
||||
name: test_artifacts_${{ env.ARTIFACT_KEY }}
|
||||
path: src/electron/spec/artifacts
|
||||
if-no-files-found: ignore
|
||||
- name: Wait for active SSH sessions
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: |
|
||||
while [ -f /var/.ssh-lock ]
|
||||
do
|
||||
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
inputs:
|
||||
target-platform:
|
||||
type: string
|
||||
description: 'Platform to run on, can be macos, win or linux'
|
||||
description: 'Platform to run on, can be macos or linux'
|
||||
required: true
|
||||
target-arch:
|
||||
type: string
|
||||
@@ -49,20 +49,23 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
run: |
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
@@ -90,7 +93,6 @@ jobs:
|
||||
node electron/script/node-spec-runner.js --default --jUnitDir=junit
|
||||
- name: Wait for active SSH sessions
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: |
|
||||
while [ -f /var/.ssh-lock ]
|
||||
do
|
||||
@@ -110,20 +112,23 @@ jobs:
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
run: |
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
@@ -150,7 +155,6 @@ jobs:
|
||||
cd src
|
||||
node electron/script/nan-spec-runner.js
|
||||
- name: Wait for active SSH sessions
|
||||
shell: bash
|
||||
if: always() && !cancelled()
|
||||
run: |
|
||||
while [ -f /var/.ssh-lock ]
|
||||
|
||||
4
.github/workflows/scorecards.yml
vendored
4
.github/workflows/scorecards.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
|
||||
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
1
.github/workflows/update_appveyor_image.yml
vendored
1
.github/workflows/update_appveyor_image.yml
vendored
@@ -23,7 +23,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -48,6 +48,7 @@ ts-gen
|
||||
|
||||
# Used to accelerate CI builds
|
||||
.depshash
|
||||
.depshash-target
|
||||
|
||||
# Used to accelerate builds after sync
|
||||
patches/mtime-cache.json
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'133.0.6887.0',
|
||||
'133.0.6878.0',
|
||||
'node_version':
|
||||
'v22.9.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -187,12 +187,7 @@ for:
|
||||
7z a pdb.zip out\Default\*.pdb
|
||||
}
|
||||
- ps: |
|
||||
if ($env:TARGET_ARCH -eq 'ia32') {
|
||||
$env:MANIFEST_ARCH = "x86"
|
||||
} else {
|
||||
$env:MANIFEST_ARCH = $env:TARGET_ARCH
|
||||
}
|
||||
$manifest_file = "electron/script/zip_manifests/dist_zip.win.$env:MANIFEST_ARCH.manifest"
|
||||
$manifest_file = "electron/script/zip_manifests/dist_zip.win.$env:TARGET_ARCH.manifest"
|
||||
python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip $manifest_file
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Zip contains files not listed in the manifest $manifest_file"
|
||||
|
||||
@@ -59,7 +59,7 @@ def skip_path(dep, dist_zip, target_cpu):
|
||||
and dep == "snapshot_blob.bin"
|
||||
)
|
||||
)
|
||||
if should_skip and os.environ.get('ELECTRON_DEBUG_ZIP_SKIP') == '1':
|
||||
if should_skip:
|
||||
print("Skipping {}".format(dep))
|
||||
return should_skip
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<button id="clickme">Test Bluetooth</button>
|
||||
<button id="cancel">Cancel Bluetooth Request</button>
|
||||
|
||||
<p>Currently selected bluetooth device: <strong id="device-name"></strong></p>
|
||||
<p>Currently selected bluetooth device: <strong id="device-name""></strong></p>
|
||||
|
||||
<script src="./renderer.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -514,9 +514,9 @@ WebContents.prototype.canGoForward = function () {
|
||||
};
|
||||
|
||||
const canGoToOffsetDeprecated = deprecate.warnOnce('webContents.canGoToOffset', 'webContents.navigationHistory.canGoToOffset');
|
||||
WebContents.prototype.canGoToOffset = function (index: number) {
|
||||
WebContents.prototype.canGoToOffset = function () {
|
||||
canGoToOffsetDeprecated();
|
||||
return this._canGoToOffset(index);
|
||||
return this._canGoToOffset();
|
||||
};
|
||||
|
||||
const clearHistoryDeprecated = deprecate.warnOnce('webContents.clearHistory', 'webContents.navigationHistory.clear');
|
||||
|
||||
@@ -12,7 +12,7 @@ const Module = require('module') as NodeJS.ModuleInternal;
|
||||
const originalModuleLoad = Module._load;
|
||||
Module._load = function (request: string) {
|
||||
if (request === 'vm') {
|
||||
console.warn('The vm module of Node.js is unsupported in Electron\'s renderer process due to incompatibilities with the Blink rendering engine. Crashes are likely and avoiding the module is highly recommended. This module may be removed in a future release.');
|
||||
console.warn('The vm module of Node.js is deprecated in the renderer process and will be removed.');
|
||||
}
|
||||
return originalModuleLoad.apply(this, arguments as any);
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ export const windowSetup = (isWebView: boolean, isHiddenPage: boolean) => {
|
||||
|
||||
// But we do not support prompt().
|
||||
window.prompt = function () {
|
||||
throw new Error('prompt() is not supported.');
|
||||
throw new Error('prompt() is and will not be supported.');
|
||||
};
|
||||
if (contextIsolationEnabled) internalContextBridge.overrideGlobalValueFromIsolatedWorld(['prompt'], window.prompt);
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ index 7de8923518dbfb69fef62d7781f906b30cf62155..7a4310d6d8e85f07f0ae6c97726d909c
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index d601695f51322f3ccecfd31b623eabf8440fceaa..0eb0e88c495d6934345e067298305041ee3d9a8b 100644
|
||||
index 82870cda0593bdfa7434154bb7dfd5e1b00f6c4f..d3ad8a596b832af328d5e6bfeb5f36590574cc94 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1323,7 +1323,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1319,7 +1319,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index d601695f51322f3ccecfd31b623eabf8440fceaa..0eb0e88c495d6934345e067298305041
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2690,13 +2690,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2686,13 +2686,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,4 +136,3 @@ fix_software_compositing_infinite_loop.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
build_disable_thin_lto_mac.patch
|
||||
build_add_public_config_simdutf_config.patch
|
||||
reland_set_app_container_acls_reliably_on_out_directory.patch
|
||||
|
||||
@@ -23,7 +23,7 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 4bf834dc836e4238a98c5f9db216b0054ed7add1..fd2505d9e0608b1c2258e6596b1817835c37b36e 100644
|
||||
index 1412679cc093a678f19c2f60a633d9650efc27bb..c5ea7eefbbd1a68a613971208d961940af77a3a0 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4793,6 +4793,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
|
||||
@@ -116,7 +116,7 @@ index 083af135d890c2837e72c314e170e81931bd2a20..5245ea88441ef84c15b8052a9011ce70
|
||||
// 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 c1aebbc3db3e22e7e9391cb0eb2654a28a2052f4..77f2b8a03f92062fc9c07b04adb22d421127b73a 100644
|
||||
index 27fd589b2ea53ba9c65ca87c9ca0eb4362d0c735..ff69256c5ac5323ce1b94533af4dec785bca78bd 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2468,6 +2468,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -155,7 +155,7 @@ index c1aebbc3db3e22e7e9391cb0eb2654a28a2052f4..77f2b8a03f92062fc9c07b04adb22d42
|
||||
// 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 4f77ef1379390973fa912640a33a5033dc8db68f..12d4932d82df824e459a8a90b6f24222172618df 100644
|
||||
index c6059d2d02e295e8b4547a6fdaccf9381c7a77c2..738d51aa13e3a2cf2656a1bc613eda75c7ff1fca 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
|
||||
@@ -49,7 +49,7 @@ index 7e564e9970ef5abf51a212130a8cfb3ec590c5ff..af48a64ae405ffe7d89c8bc074f614ef
|
||||
// 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 0b2043673b01c7b47d85895e6133d1b73d941cad..91d67a69cddcb7ae4425b893f625e40975e665cc 100644
|
||||
index 7050a0229f064b3ec116ddd9d801655b025ab911..18bd846599b09ce040de377b6ff5e80b249928e8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -746,10 +746,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -33,10 +33,10 @@ index 3ea31014540b5679880a00e1a3ae8674b8858348..d8b18d03446b6aecad22ab778f6b512c
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 0e22dc99e59133363b5d56dc6fba9f603a6d9c67..59162df964cf90225010591a722ed8bd0e8269c6 100644
|
||||
index b25189748cf13c05bfcffd1063a651de5334bf88..557ff484615283fb6a9e76e495501e58671a9cf5 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4516,7 +4516,7 @@ static_library("browser") {
|
||||
@@ -4512,7 +4512,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index 0e22dc99e59133363b5d56dc6fba9f603a6d9c67..59162df964cf90225010591a722ed8bd
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 50bbabb107314333070aabaf78ca79e5f8fa801f..4e2255f209d6523359cb626f361742e70285b2ae 100644
|
||||
index 664601c3d14489d7b26090bba3c80d0b82e0372e..9299397d15a0af9c57a48d7dcf730d6b5851e8e0 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6887,9 +6887,12 @@ test("unit_tests") {
|
||||
@@ -6888,9 +6888,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index 50bbabb107314333070aabaf78ca79e5f8fa801f..4e2255f209d6523359cb626f361742e7
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -7823,6 +7826,10 @@ test("unit_tests") {
|
||||
@@ -7828,6 +7831,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index 50bbabb107314333070aabaf78ca79e5f8fa801f..4e2255f209d6523359cb626f361742e7
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -7875,7 +7882,6 @@ test("unit_tests") {
|
||||
@@ -7880,7 +7887,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -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 62105d810472187a8ddb71e57873d5084e7921a7..7b91ba71aadbf44ba76dd38ea2ca69ef16e48dc8 100644
|
||||
index 2bbcfef90f53cc92e248eee2e3fa1cd9f479b5ee..cef9a8b5029ca357b9447f764864c6b77af538f0 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9137,6 +9137,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9157,6 +9157,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,7 +21,7 @@ index 62105d810472187a8ddb71e57873d5084e7921a7..7b91ba71aadbf44ba76dd38ea2ca69ef
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index c87953ecbdbc1226134ae51bcb8acf3e627b6ca9..b056a3dad69316b919c058458ee9de3ad4a88147 100644
|
||||
index 4fe69ec3fa5507285dfd91619d65ca712383f4d2..e5e9771863573c0826111a724a1c38566ed3655e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4923,6 +4923,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -66,10 +66,10 @@ index 8e571dc1371cf2aa7c8354f0b4e492e0d030b485..c878169e7838849cbc23df2ed94ca65d
|
||||
|
||||
// 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 ff59226e8f953cd7cc5e9c95250187836d64764b..5338c3a292ff3c34ab33a64341b17d0c9948f7e7 100644
|
||||
index a2ceb54e4f39c1a28890f2b3593fe47608623910..b3d70e0201caa266a8e692d501e3977e39e2fb16 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -794,6 +794,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -789,6 +789,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +79,10 @@ index ff59226e8f953cd7cc5e9c95250187836d64764b..5338c3a292ff3c34ab33a64341b17d0c
|
||||
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 800f3314ecbdb8fe9d5ef8320ef952a3bcdf05d1..f2f7571b76542bd4c0d44750639e36b191cd5bd7 100644
|
||||
index 715e05418b01cbed51248cec77901b885ab3df7d..9b0f873353c957842f42284250a21a635b11f3cc 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -202,6 +202,7 @@ class NetworkService;
|
||||
@@ -200,6 +200,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +90,7 @@ index 800f3314ecbdb8fe9d5ef8320ef952a3bcdf05d1..f2f7571b76542bd4c0d44750639e36b1
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1356,6 +1357,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1354,6 +1355,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -148,10 +148,10 @@ index c0be779a4c1d89426c30261aff72ea55be900087..7413c1bef86f5e4633db7220c5de4de7
|
||||
// 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 5c4be625e42065c99e327ee6b60ee241eff75ac0..4bf834dc836e4238a98c5f9db216b0054ed7add1 100644
|
||||
index c9d6e7acd432682381a1131e05a3758589967f69..1412679cc093a678f19c2f60a633d9650efc27bb 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6862,6 +6862,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6846,6 +6846,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ 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 e878d103eb79cbb67878e7c6da369d355b45ac40..e49fd4b3278b4a25af30ecc522794847440d4c50 100644
|
||||
index 242054584563ad8d6a6117556998dc8b43cac1dd..7f42a4609ce1d1da017591f4f10eb1685e7ea67b 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4849,9 +4849,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -218,7 +218,7 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
|
||||
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 0b70b695a4d3990842f9c5909ef485b540d9be58..f0d92a18c0cdefd437086695e122c81ca9293ce5 100644
|
||||
index 70cb6b43f214c7f5210e99edc930428520f02b7c..9b9edea9eb076f29dd8349ee784e9b2c1ab5a71c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4818,8 +4818,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -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 74f2e51c7fa802e7afb30f4de8489efd7f081709..9af5efcacb38453d3f92a3c2d9a42ad8817ef6d5 100644
|
||||
index b1493e3a01b821fa4b9d803b24678728855df559..3191fc7cf201b59abfcf87cd796752423f9a3c00 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -793,6 +793,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -789,6 +789,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ index 74f2e51c7fa802e7afb30f4de8489efd7f081709..9af5efcacb38453d3f92a3c2d9a42ad8
|
||||
// Prompts should remain open and functional across tab switches.
|
||||
if (!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 ddfae2b85cb8823eeba88050d5378bfbbe133ab3..fa0a2cfe2cfeceab692bfe9d94d80192115dd8f8 100644
|
||||
index 882f245e04a3a45aaff54eac149eded07a892500..9388eb5a06b72cbd77f28c4212cbaf3c0e017e1f 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1024,6 +1024,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -1023,6 +1023,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// Requests a commit and forced redraw in the renderer compositor.
|
||||
void ForceRedrawForTesting();
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index 1dc14ea5d899cc17756911820ede80a4fa22df1d..f6160979def6f553e0e601e14830c498f05e52b1 100644
|
||||
index a0b2b43187e02321632a36fe9b388d903789603f..22962fe80da0550b2458289df3ad3eedb28e5709 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1448,6 +1448,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1433,6 +1433,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index 1dc14ea5d899cc17756911820ede80a4fa22df1d..f6160979def6f553e0e601e14830c498
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1497,6 +1498,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1482,6 +1483,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ 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 77f2b8a03f92062fc9c07b04adb22d421127b73a..ed07b4cee033ced8eee6aca4472cd1e2599e1956 100644
|
||||
index ff69256c5ac5323ce1b94533af4dec785bca78bd..3b2e9a5946d7c4407d453ee8012291885592f6e9 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -169,6 +169,7 @@
|
||||
|
||||
@@ -706,10 +706,10 @@ index b67f4f87d588386409a90cd49e8338272c6e0d51..c34a80ec8db1b868a7f387ea4a11d71d
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Whether or not to disclaim TCC responsibility for the process, defaults to
|
||||
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
|
||||
index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e20867d71 100644
|
||||
index 875cade81e6c0c33af043cea6ad0b93fd0e90cdb..20081605a724b52e89a03858b6b6e290c6ab34a1 100644
|
||||
--- a/sandbox/policy/win/sandbox_win.cc
|
||||
+++ b/sandbox/policy/win/sandbox_win.cc
|
||||
@@ -594,11 +594,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
@@ -608,11 +608,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
// command line flag.
|
||||
ResultCode LaunchWithoutSandbox(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -722,7 +722,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
// Network process runs in a job even when unsandboxed. This is to ensure it
|
||||
// does not outlive the browser, which could happen if there is a lot of I/O
|
||||
// on process shutdown, in which case TerminateProcess can fail. See
|
||||
@@ -890,7 +888,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
@@ -907,7 +905,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
// static
|
||||
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -731,7 +731,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
SandboxDelegate* delegate,
|
||||
TargetPolicy* policy) {
|
||||
const base::CommandLine& launcher_process_command_line =
|
||||
@@ -904,7 +902,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -921,7 +919,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
}
|
||||
|
||||
// Add any handles to be inherited to the policy.
|
||||
@@ -740,7 +740,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
policy->AddHandleToShare(handle);
|
||||
|
||||
if (!policy->GetConfig()->IsConfigured()) {
|
||||
@@ -919,6 +917,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -936,6 +934,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
|
||||
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
|
||||
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
|
||||
@@ -754,7 +754,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
#endif
|
||||
|
||||
if (!delegate->PreSpawnTarget(policy))
|
||||
@@ -930,7 +935,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -947,7 +952,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
// static
|
||||
ResultCode SandboxWin::StartSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
@@ -763,7 +763,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
SandboxDelegate* delegate,
|
||||
StartSandboxedProcessCallback result_callback) {
|
||||
SandboxLaunchTimer timer;
|
||||
@@ -940,7 +945,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -957,7 +962,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
*base::CommandLine::ForCurrentProcess())) {
|
||||
base::Process process;
|
||||
ResultCode result =
|
||||
@@ -772,7 +772,7 @@ index 617103850407d1affa2649a79f92aa26213f5496..8a029328e972262045f4069fb2edb67e
|
||||
DWORD last_error = GetLastError();
|
||||
std::move(result_callback).Run(std::move(process), last_error, result);
|
||||
return SBOX_ALL_OK;
|
||||
@@ -950,7 +955,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -967,7 +972,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
timer.OnPolicyCreated();
|
||||
|
||||
ResultCode result = GeneratePolicyForSandboxedProcess(
|
||||
|
||||
@@ -521,10 +521,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
|
||||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 977161762c67e126e182c24c5e8e7a3e7523dacb..1773488b3b5fce5e1c99f484988620edd8da9034 100644
|
||||
index 5e127e0652230081b60205691117c71ab56440d5..0b0449e21987e3d90b15b232eb1d26b45c4debfa 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -111,7 +111,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -101,7 +101,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
params->gpu_compositing, params->widget);
|
||||
auto output_surface = output_surface_provider->CreateOutputSurface(
|
||||
params->widget, params->gpu_compositing, display_client.get(),
|
||||
|
||||
@@ -28,10 +28,10 @@ index 23b29fe25bc463ff1d36aa502a27c4222595e7c5..c1ac6172c4cee72f64f42ca64d2db9c0
|
||||
|
||||
// Returns the http referrer of original request which initited this load.
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
|
||||
index 92ab7845b6e3f060de76fa023ec472c056e69d4b..aafd123ccd8faf630dffa304ec7825088155a15b 100644
|
||||
index abe9239b5863c0cac7623d121580de1f61e83232..3cd9fe38ca4017064d2e17a7d083a8bebbfab34c 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.h
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.h
|
||||
@@ -326,7 +326,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
|
||||
@@ -325,7 +325,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
|
||||
std::optional<scheduler::TaskAttributionId>
|
||||
soft_navigation_heuristics_task_id);
|
||||
|
||||
|
||||
@@ -112,10 +112,10 @@ index 5c4b8a05034f8defacbc13671fe9bc92f76ade5a..e7390e01f113755613f42d592b36108b
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index e73516e9f8716d2865ae6606a26fdd47f2aba00d..c6fa2051124fd3d11ab04fe5f2c35033fcf09f56 100644
|
||||
index c0be8ab2e57fbaf87e2761a290ec4179606d4aa9..e8ac75b21deb02c9b96aec8dda77d715394fcca8 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -634,6 +634,9 @@ URLLoader::URLLoader(
|
||||
@@ -613,6 +613,9 @@ URLLoader::URLLoader(
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunner::GetCurrentDefault()),
|
||||
per_factory_orb_state_(context.GetMutableOrbState()),
|
||||
@@ -125,7 +125,7 @@ index e73516e9f8716d2865ae6606a26fdd47f2aba00d..c6fa2051124fd3d11ab04fe5f2c35033
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
request_mode_(request.mode),
|
||||
request_credentials_mode_(request.credentials_mode),
|
||||
@@ -913,7 +916,7 @@ void URLLoader::ConfigureRequest(
|
||||
@@ -892,7 +895,7 @@ void URLLoader::ConfigureRequest(
|
||||
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ index e73516e9f8716d2865ae6606a26fdd47f2aba00d..c6fa2051124fd3d11ab04fe5f2c35033
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1923,6 +1926,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1887,6 +1890,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
|
||||
@@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
||||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a0da75dd0 100644
|
||||
index e9c7ab23a1e9c3eda0f4fb94bf3ef44de7de7ad3..21367db92b195c3883729c3f599694295928f03f 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -20,12 +20,16 @@
|
||||
@@ -77,7 +77,7 @@ index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a
|
||||
}
|
||||
|
||||
void FullscreenController::RunOrDeferUntilTransitionIsComplete(
|
||||
@@ -590,18 +600,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -585,18 +595,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
@@ -101,7 +101,7 @@ index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a
|
||||
if (option == TAB) {
|
||||
url = GetRequestingOrigin();
|
||||
tab_fullscreen_ = true;
|
||||
@@ -634,6 +643,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -629,6 +638,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
if (!extension_caused_fullscreen_.is_empty())
|
||||
url = extension_caused_fullscreen_;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a
|
||||
|
||||
fullscreen_start_time_ = base::TimeTicks::Now();
|
||||
if (option == BROWSER)
|
||||
@@ -654,6 +664,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -649,6 +659,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a
|
||||
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
|
||||
if (fullscreen_start_time_ && exclusive_access_tab()) {
|
||||
ukm::SourceId source_id =
|
||||
@@ -665,15 +676,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -660,15 +671,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
.Record(ukm::UkmRecorder::Get());
|
||||
fullscreen_start_time_.reset();
|
||||
}
|
||||
@@ -137,7 +137,7 @@ index 9e6611a53f8430f86ba4e6439e9a21446ce3332e..7d85ea70870c5064f6c0a6abd3ef091a
|
||||
exclusive_access_manager()->context()->ExitFullscreen();
|
||||
extension_caused_fullscreen_ = GURL();
|
||||
exclusive_access_manager()->UpdateBubble(base::NullCallback());
|
||||
@@ -735,8 +747,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
@@ -730,8 +742,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
void FullscreenController::RecordMetricsOnFullscreenApiRequested(
|
||||
content::RenderFrameHost* requesting_frame) {
|
||||
history::HistoryService* service =
|
||||
|
||||
@@ -9,7 +9,7 @@ ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin contains explicit
|
||||
exceptions to allow built-in non-standard schemes, but does not check
|
||||
for non-standard schemes registered by the embedder.
|
||||
|
||||
This patch adjusts the origin calculation for subframe non-standard schemes in
|
||||
This patch adjusts the origin calculation for non-standard schemes in
|
||||
- browser process at `NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo`
|
||||
- render process at `DocumentLoader::CalculateOrigin`
|
||||
|
||||
@@ -18,24 +18,19 @@ as `null` without any derivation. It is only in cases where there is a `initiato
|
||||
then the origin is derived from it, which is usually the case for renderer initiated
|
||||
navigations and iframes are no exceptions from this rule.
|
||||
|
||||
The patch should be removed in favor of either:
|
||||
- Remove support for non-standard custom schemes
|
||||
- Register non-standard custom schemes as websafe schemes and update
|
||||
CPSPI::CanAccessDataForOrigin to allow them for any navigation.
|
||||
- Update the callsite to use RFHI::CanCommitOriginAndUrl in upstream, previous
|
||||
effort to do this can be found at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index e919dcd7acf870e39709d7ac5afd356a8a2b94fa..ceed8afc60dd3d38ca722b79b93c6b1c1ee7fb76 100644
|
||||
index 8153ca434b396423ee36af27e8600be43e095c0f..8c1c72d7f3d4abef48bd0d3e632f427dec3ed88d 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10867,6 +10867,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10830,6 +10830,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
"blob");
|
||||
}
|
||||
|
||||
+ if (!IsInMainFrame() && !common_params().url.IsStandard()) {
|
||||
+ if (!common_params().url.IsStandard()) {
|
||||
+ return std::make_pair(url::Origin::Resolve(common_params().url,
|
||||
+ url::Origin()),
|
||||
+ "url_non_standard");
|
||||
@@ -45,10 +40,10 @@ index e919dcd7acf870e39709d7ac5afd356a8a2b94fa..ceed8afc60dd3d38ca722b79b93c6b1c
|
||||
// origin of |common_params.url| and/or |common_params.initiator_origin|.
|
||||
url::Origin resolved_origin = url::Origin::Resolve(
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
index ccc8243d90000c8da65486a00c4800ede3de66fe..8355f72ec1e2d3a50c21761e764ad6c0233a3b81 100644
|
||||
index fb11dcea26684440b7b08fe5ca4da619ac4ccb5c..bd3591e3d6f1ee66c31897cdfd1994510a8ebe52 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2309,6 +2309,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
@@ -2308,6 +2308,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
Document* owner_document) {
|
||||
scoped_refptr<SecurityOrigin> origin;
|
||||
@@ -59,7 +54,7 @@ index ccc8243d90000c8da65486a00c4800ede3de66fe..8355f72ec1e2d3a50c21761e764ad6c0
|
||||
StringBuilder debug_info_builder;
|
||||
// Whether the origin is newly created within this call, instead of copied
|
||||
// from an existing document's origin or from `origin_to_commit_`. If this is
|
||||
@@ -2362,6 +2366,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
@@ -2361,6 +2365,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
// the end of this function.
|
||||
origin = origin_to_commit_;
|
||||
debug_info_builder.Append("use_origin_to_commit");
|
||||
|
||||
@@ -87,10 +87,10 @@ index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f93
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 750a5c74404d7d96e65fce1d91d1e38d8621c1f2..e878d103eb79cbb67878e7c6da369d355b45ac40 100644
|
||||
index 3b2cb5075d3596b0fd71e898aeeac3b9ef3d1e65..242054584563ad8d6a6117556998dc8b43cac1dd 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9501,7 +9501,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -9508,7 +9508,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
|
||||
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index c877e1aff3216aaf881e35e704745be442c5ca69..9ac652e9b232fe2b2122da5db113bf67274c959b 100644
|
||||
index 4d89c3bf11f453f72489bb9b2531b51493792dce..6a1b01713fc94f47695e9e1a2874ced08bdfef0b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2052,9 +2052,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
@@ -2048,9 +2048,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
|
||||
// The resize message (which may not happen immediately) will carry with it
|
||||
// the screen info as well as the new size (if the screen has changed scale
|
||||
|
||||
@@ -64,10 +64,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 91d67a69cddcb7ae4425b893f625e40975e665cc..712f72bddbd7bae782b468659bc7e2b022f04281 100644
|
||||
index 18bd846599b09ce040de377b6ff5e80b249928e8..db003ba0be169e9db06e89c5166724343770305f 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3134,6 +3134,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3133,6 +3133,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -75,7 +75,7 @@ index 91d67a69cddcb7ae4425b893f625e40975e665cc..712f72bddbd7bae782b468659bc7e2b0
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -3166,7 +3167,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3165,7 +3166,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
script_state, std::move(script_sources), execute_script_policy,
|
||||
user_gesture, evaluation_timing, blocking_option, want_result_option,
|
||||
|
||||
@@ -20,10 +20,10 @@ index a0da3098c6391a9b07f40275cb09fb351fde9f7f..d5846a800b9a9097a6fa7cd097646ef3
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index f2f7571b76542bd4c0d44750639e36b191cd5bd7..44309e7bad6a23a3ceb28e3acf974edcf1b1a51d 100644
|
||||
index 9b0f873353c957842f42284250a21a635b11f3cc..2f469dc53342d2ad7ec57fd33b4c70854c820c73 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -343,6 +343,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -341,6 +341,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were
|
||||
replaced with clean ozone native implementations.
|
||||
|
||||
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
index ec79b3c8e3e434987f2f08d95c8567982a0c4368..d5e5f81b8c6ccae1822e8192b107eeff2d3a6dd9 100644
|
||||
index bc8ac7431f25d1fd6f026f8049d589cba01fa6fd..1bb0c95acf2df61975b1cc6423eb8514bb3488e4 100644
|
||||
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
@@ -193,6 +193,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
base::MessagePumpType::UI;
|
||||
properties->supports_vulkan_swap_chain = true;
|
||||
properties->skia_can_fall_back_to_x11 = true;
|
||||
|
||||
@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 123b5d982c3bca4ebd22b5e0e17b9d903969d7e1..0cacd08e17f8ab8c0e4951bcc4645cd7a3d2fea8 100644
|
||||
index 4d2d2e88d37e95a2b8ac0c1e0d7d1b0c1e8ad417..58a4b86746a345eeeca66969aec39791fb2d1a8c 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1027,6 +1027,7 @@ component("base") {
|
||||
@@ -560,10 +560,10 @@ index faddee802d6538c092ba96914184663ee57751c8..49238975848d58cd30727ec818bbac52
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index f22893989f09e40a8eb6a3df1d48d5438426c727..1212cd37acff7847ec4a7d3fb841426d5a77576d 100644
|
||||
index 00ac46d858b7f83e53b1817028baba13719f04fe..31c9a53d5c7f09a7326ef57753b4a49f0239a7f8 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -328,6 +328,7 @@ source_set("browser") {
|
||||
@@ -327,6 +327,7 @@ source_set("browser") {
|
||||
"//ui/strings:ax_strings",
|
||||
"//ui/touch_selection",
|
||||
"//v8:v8_version",
|
||||
@@ -773,7 +773,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index 817e8ecdc6b15177d4cfa5cf44ad5fb1a5346393..106977501728d3216ec6f0a47005bc86c156f605 100644
|
||||
index 4f0153bf27764fce04a56d2bce8f8e7a012d78f5..17955a2806d741905bc9507ea6d39fd012162d12 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -643,6 +643,7 @@ static_library("test_support") {
|
||||
@@ -800,7 +800,7 @@ index 817e8ecdc6b15177d4cfa5cf44ad5fb1a5346393..106977501728d3216ec6f0a47005bc86
|
||||
]
|
||||
|
||||
if (!(is_chromeos_ash && target_cpu == "arm64" && current_cpu == "arm")) {
|
||||
@@ -3245,6 +3248,7 @@ test("content_unittests") {
|
||||
@@ -3244,6 +3247,7 @@ test("content_unittests") {
|
||||
"//ui/latency:test_support",
|
||||
"//ui/shell_dialogs:shell_dialogs",
|
||||
"//ui/webui:test_support",
|
||||
@@ -1373,7 +1373,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
|
||||
|
||||
} // namespace sandbox
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index 407169fd5aab525cb249890d49a23ac301ab61d8..19ca594bf376344bcf27a17dab276271379a30e5 100644
|
||||
index 679005c0d241207646a7aabad5ce896bc5c56558..39547524d6e77954c949d4ac05bec1f9596162fd 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -409,6 +409,7 @@ component("core") {
|
||||
|
||||
@@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index fa95a56e761c7c0a1bf400392579e1c3f01d48d1..167462f298cafe0400d8326881c61e95ad1769d5 100644
|
||||
index 93fb45230ddedddf68bb879ab8dbddce2740ed22..302c4cbed8b158257b7dfde14f591ad6bc971641 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2116,7 +2116,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2113,7 +2113,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index fa95a56e761c7c0a1bf400392579e1c3f01d48d1..167462f298cafe0400d8326881c61e95
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2124,7 +2124,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2121,7 +2121,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -36,7 +36,7 @@ index a7742298af440bf9f6bcfceb7a07a90f19ae8283..9d59397f2bed400e5131691778965ec1
|
||||
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture;
|
||||
|
||||
diff --git a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
index 55756afa319d890d0776de40c0c747cccfcecf83..6291e6fad5dbcfebca4263147bed0cc85274d52f 100644
|
||||
index b27bcf13d3a5f7c8e85a677766718f4362467022..df1b2d697f7cce028d0d6d86190b3218b8f662a5 100644
|
||||
--- a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
+++ b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
|
||||
@@ -193,7 +193,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
|
||||
@@ -75,9 +75,9 @@ index 55756afa319d890d0776de40c0c747cccfcecf83..6291e6fad5dbcfebca4263147bed0cc8
|
||||
@@ -231,7 +248,7 @@ bool FrameResources::Initialize() {
|
||||
viz::GetSharedImageFormat(buffer_format);
|
||||
|
||||
shared_image_ =
|
||||
- context->CreateSharedImage(buffer_size_in_pixels, kBufferUsage, si_format,
|
||||
+ context->CreateSharedImage(buffer_size_in_pixels, buffer_usage, si_format,
|
||||
color_space_, kSharedImageUsage, sync_token_);
|
||||
shared_image_ = context->CreateSharedImage(
|
||||
- buffer_size_in_pixels, kBufferUsage, si_format, color_space_,
|
||||
+ buffer_size_in_pixels, buffer_usage, si_format, color_space_,
|
||||
kTopLeft_GrSurfaceOrigin, kPremul_SkAlphaType, kSharedImageUsage,
|
||||
sync_token_);
|
||||
if (!shared_image_) {
|
||||
DLOG(ERROR) << "Failed to allocate shared image for frame: coded_size="
|
||||
|
||||
@@ -10,7 +10,7 @@ an about:blank check to this area.
|
||||
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 90ed344e4714ea2f98feab48824e8273ea51d048..e9d0fb7ee9a2dc0241926e6d82bae8d6c11fc4d3 100644
|
||||
index 5394c89af750a7de2ec9b7762abbc43f6483d737..ffc85d4198cfb2427aaa699a9551fe29a335bb77 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
|
||||
@@ -860,10 +860,10 @@ index b8c803184f267d87696c4e72c3d993ff3b69d95b..7278dfae56305cc8669fc2240563450f
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 1212cd37acff7847ec4a7d3fb841426d5a77576d..a6fbe92d06d373ff9794035de88553b36f837e30 100644
|
||||
index 31c9a53d5c7f09a7326ef57753b4a49f0239a7f8..7e913765d72087d57165efe59bca70584f43c836 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -3044,8 +3044,9 @@ source_set("browser") {
|
||||
@@ -3041,8 +3041,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index dea7ba2237cea261fe0b526753e1a9c4e355e484..9e3bf5eca5e9ad99112069a28b7fb8c1
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 9af5efcacb38453d3f92a3c2d9a42ad8817ef6d5..c877e1aff3216aaf881e35e704745be442c5ca69 100644
|
||||
index 3191fc7cf201b59abfcf87cd796752423f9a3c00..4d89c3bf11f453f72489bb9b2531b51493792dce 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1986,6 +1986,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -1982,6 +1982,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_) {
|
||||
view_->UpdateCursor(cursor);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ index 9af5efcacb38453d3f92a3c2d9a42ad8817ef6d5..c877e1aff3216aaf881e35e704745be4
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index b056a3dad69316b919c058458ee9de3ad4a88147..0b70b695a4d3990842f9c5909ef485b540d9be58 100644
|
||||
index e5e9771863573c0826111a724a1c38566ed3655e..70cb6b43f214c7f5210e99edc930428520f02b7c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5647,6 +5647,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
|
||||
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index 98da84ea08da05a486651d188c3eb8d14a2002cf..4ce1c044cf70525bd9ab4fee5a94e55017313910 100644
|
||||
index 9b75260d27621f7174f8c47b108c175551319141..e4d63c2700d3079347279938e93eba4ba311a166 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -637,7 +637,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
|
||||
@@ -641,7 +641,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
|
||||
execution_context);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index 98da84ea08da05a486651d188c3eb8d14a2002cf..4ce1c044cf70525bd9ab4fee5a94e550
|
||||
v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Data> v8_host_defined_options,
|
||||
v8::Local<v8::Value> v8_referrer_resource_url,
|
||||
@@ -715,7 +717,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
||||
@@ -719,7 +721,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
|
||||
@@ -30,7 +30,7 @@ index 98da84ea08da05a486651d188c3eb8d14a2002cf..4ce1c044cf70525bd9ab4fee5a94e550
|
||||
v8::Local<v8::Module> module,
|
||||
v8::Local<v8::Object> meta) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
@@ -758,9 +760,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
|
||||
@@ -762,9 +764,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index 98da84ea08da05a486651d188c3eb8d14a2002cf..4ce1c044cf70525bd9ab4fee5a94e550
|
||||
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
// Set up garbage collection before setting up anything else as V8 may trigger
|
||||
// GCs during Blink setup.
|
||||
@@ -780,9 +779,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
@@ -784,9 +783,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
|
||||
isolate->SetSharedArrayBufferConstructorEnabledCallback(
|
||||
SharedArrayBufferConstructorEnabledCallback);
|
||||
|
||||
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index e49fd4b3278b4a25af30ecc522794847440d4c50..6e38f593dfc53387e1bf12606314e0cd31918962 100644
|
||||
index 7f42a4609ce1d1da017591f4f10eb1685e7ea67b..38d2200912410cbca6847387d637df505c2876aa 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9635,25 +9635,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -9642,25 +9642,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Smolen <ssmole@microsoft.com>
|
||||
Date: Tue, 10 Dec 2024 19:38:18 +0000
|
||||
Subject: [reland] Set app container ACLs reliably on out directory
|
||||
|
||||
This is a reland of:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/6068009
|
||||
|
||||
Reverted due to cross-compile failures. This cl adds host_os checks.
|
||||
|
||||
Original description:
|
||||
> Sandbox on Windows relies on AppContainer sandbox for certain sandboxes.
|
||||
> The AppContainer sandbox requires that files loaded in those processes
|
||||
> have the right security attributes (ACLs), or they will not be allowed
|
||||
> to load. We can set the security attributes for a local build using the
|
||||
> icacls tool, which currently runs when //sandbox/win:sandbox target is
|
||||
> built, ensuring it happens as part of building chrome.dll.
|
||||
>
|
||||
> The APIs used for ACL-ing by icacls are subject to race conditions when
|
||||
> files are generated in the folder while it's running, as is the case
|
||||
> with a chromium build for binaries such as component build dlls and
|
||||
> chrome_elf.dll.
|
||||
>
|
||||
> This change resolves the race condition by ensuring the ACL-ing step
|
||||
> will happen via a DEPS of each executable target by default, which
|
||||
> should guarantee that icacls finishes running before we link any
|
||||
> binaries which require it.
|
||||
|
||||
Bug: 379656387
|
||||
Change-Id: I45ee0d42934ab5cac4a24498f1f4ca9d0b3fb551
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6081378
|
||||
Reviewed-by: Dirk Pranke <dpranke@google.com>
|
||||
Commit-Queue: Stefan Smolen <ssmole@microsoft.com>
|
||||
Reviewed-by: Will Harris <wfh@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1394456}
|
||||
|
||||
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
|
||||
index 6f8cb29dbb18a144f572f4fb32633d7bec080eb7..d32152894f3483fe8e7cecc74e9b302f5649da2b 100644
|
||||
--- a/build/config/BUILD.gn
|
||||
+++ b/build/config/BUILD.gn
|
||||
@@ -272,12 +272,14 @@ group("common_deps_without_libcxx") {
|
||||
# debugging DLLs in all builds.
|
||||
data_deps = [ "//build/win:runtime_libs" ]
|
||||
|
||||
- # In order to ensure the ACLing is applied to every binary loaded in an
|
||||
- # app container sandbox, run the ACL step before any binary is built. We
|
||||
- # do this because the tool is subject to race conditions if a binary is
|
||||
- # placed in the out folder while it is running.
|
||||
- public_deps +=
|
||||
- [ "//build/config/win:maybe_set_appcontainer_acls($host_toolchain)" ]
|
||||
+ if (host_os == "win") {
|
||||
+ # In order to ensure the ACLing is applied to every binary loaded in an
|
||||
+ # app container sandbox, run the ACL step before any binary is built. We
|
||||
+ # do this because the tool is subject to race conditions if a binary is
|
||||
+ # placed in the out folder while it is running.
|
||||
+ public_deps +=
|
||||
+ [ "//build/config/win:maybe_set_appcontainer_acls($host_toolchain)" ]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
|
||||
index a75b2b09cf708ffb3d60a07cd31f78bc80075913..9928e76832cce20cead2531293d872b8af520336 100644
|
||||
--- a/build/config/win/BUILD.gn
|
||||
+++ b/build/config/win/BUILD.gn
|
||||
@@ -483,12 +483,12 @@ config("delayloads_not_for_child_dll") {
|
||||
# sandboxed processes in an app container when run from the out directory.
|
||||
group("maybe_set_appcontainer_acls") {
|
||||
# Exclude setting ACLs when build is not happening on chromium, or with a different toolchain.
|
||||
- if (build_with_chromium && current_cpu == target_cpu) {
|
||||
+ if (build_with_chromium && current_cpu == target_cpu && host_os == "win") {
|
||||
deps = [ ":set_appcontainer_acls" ]
|
||||
}
|
||||
}
|
||||
|
||||
-if (build_with_chromium && current_cpu == target_cpu) {
|
||||
+if (build_with_chromium && current_cpu == target_cpu && host_os == "win") {
|
||||
action("set_appcontainer_acls") {
|
||||
script = "//build/win/set_appcontainer_acls.py"
|
||||
stamp_file = "$target_out_dir/acls.stamp"
|
||||
@@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 2fb637bba3e00058f3433ae2f6da799d59a75543..9365d9ebfd47e3054fa4ff9679c0ee06cfac3855 100644
|
||||
index 7684afb6afe8efb19cec45ee37a134fedeaa2ea1..7a7ac5c40da4c3e2d426fa517903e9a976146897 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -634,6 +634,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
|
||||
@@ -24,7 +24,7 @@ index 2fb637bba3e00058f3433ae2f6da799d59a75543..9365d9ebfd47e3054fa4ff9679c0ee06
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 8377a897ff00c69e5b11e4775720d25465e6ec81..0b27be5b7d5824dbc5bbbfde813da263c453f20a 100644
|
||||
index bdd8712db25a50607999893fe78cd195023704cb..b9c57ea019cbf04c77116f12b9ae1e3abcb474d0 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -29,8 +29,11 @@
|
||||
@@ -39,7 +39,7 @@ index 8377a897ff00c69e5b11e4775720d25465e6ec81..0b27be5b7d5824dbc5bbbfde813da263
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/common/page_visibility_state.h"
|
||||
#include "content/public/common/widget_type.h"
|
||||
@@ -70,11 +73,13 @@ namespace content {
|
||||
@@ -70,9 +73,11 @@ namespace content {
|
||||
class DevicePosturePlatformProvider;
|
||||
class MouseWheelPhaseHandler;
|
||||
class RenderWidgetHostImpl;
|
||||
@@ -47,13 +47,11 @@ index 8377a897ff00c69e5b11e4775720d25465e6ec81..0b27be5b7d5824dbc5bbbfde813da263
|
||||
class ScopedViewTransitionResources;
|
||||
class TextInputManager;
|
||||
class TouchSelectionControllerClientManager;
|
||||
class TouchSelectionControllerInputObserver;
|
||||
class WebContentsAccessibility;
|
||||
+class WebContentsView;
|
||||
class WebContentsAccessibility;
|
||||
class DelegatedFrameHost;
|
||||
class SyntheticGestureTarget;
|
||||
|
||||
@@ -145,6 +150,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -144,6 +149,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
RenderWidgetHostViewBase* GetRootView() override;
|
||||
@@ -64,7 +62,7 @@ index 8377a897ff00c69e5b11e4775720d25465e6ec81..0b27be5b7d5824dbc5bbbfde813da263
|
||||
void OnAutoscrollStart() override;
|
||||
const viz::DisplayHitTestQueryMap& GetDisplayHitTestQuery() const override;
|
||||
|
||||
@@ -182,6 +191,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -181,6 +190,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
const gfx::Rect& keyboard_rect) override {}
|
||||
bool IsHTMLFormPopup() const override;
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index db991c27ab5d86058ba0d768f0523866231f3f4d..812286d8f020d5952eddd7c6c30de7bd39d8114b 100644
|
||||
index c848b7f8f765002d9839c327540d1da6abde9a70..5920255ae35e6e3d9c76b23fe4442d14bb0365d4 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1309,7 +1309,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1306,7 +1306,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 167462f298cafe0400d8326881c61e95ad1769d5..473e4b9ec54cfe6f9c644e7a1edccd54f19b801e 100644
|
||||
index 302c4cbed8b158257b7dfde14f591ad6bc971641..f4300e11c7dabb06fdd502cc96a83466e00d499f 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1764,6 +1764,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1761,6 +1761,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), IsJitDisabled());
|
||||
|
||||
@@ -9,7 +9,7 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f0d92a18c0cdefd437086695e122c81ca9293ce5..7c348b55b7316b8452dfb9fc43846544af9f04ed 100644
|
||||
index 9b9edea9eb076f29dd8349ee784e9b2c1ab5a71c..fadf531ed83a57f3aabea90945876448763afc8e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3789,6 +3789,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
|
||||
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 7b91ba71aadbf44ba76dd38ea2ca69ef16e48dc8..90ed344e4714ea2f98feab48824e8273ea51d048 100644
|
||||
index cef9a8b5029ca357b9447f764864c6b77af538f0..5394c89af750a7de2ec9b7762abbc43f6483d737 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8244,6 +8244,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -8264,6 +8264,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ index 7b91ba71aadbf44ba76dd38ea2ca69ef16e48dc8..90ed344e4714ea2f98feab48824e8273
|
||||
if (had_fullscreen_token && !GetView()->HasFocus())
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 7c348b55b7316b8452dfb9fc43846544af9f04ed..750a5c74404d7d96e65fce1d91d1e38d8621c1f2 100644
|
||||
index fadf531ed83a57f3aabea90945876448763afc8e..3b2cb5075d3596b0fd71e898aeeac3b9ef3d1e65 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4047,21 +4047,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
|
||||
@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
|
||||
patching legacy devtools code.
|
||||
|
||||
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
|
||||
index 002e42a9af04652fe711369001be0b83f01456ea..9598017c637afe337c0a2e761297a83f058689e2 100644
|
||||
index 77047833a0e1c0d43c7cccea5d8b6e4de1ad7d91..7a827dc1e4933bc26242af9efe233d9c41f95dab 100644
|
||||
--- a/front_end/entrypoints/main/MainImpl.ts
|
||||
+++ b/front_end/entrypoints/main/MainImpl.ts
|
||||
@@ -757,6 +757,8 @@ export class MainImpl {
|
||||
@@ -763,6 +763,8 @@ export class MainImpl {
|
||||
globalThis.Main = globalThis.Main || {};
|
||||
// @ts-ignore Exported for Tests.js
|
||||
globalThis.Main.Main = MainImpl;
|
||||
|
||||
@@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
|
||||
V8_INLINE static void* GetAlignedPointerFromInternalField(
|
||||
const BasicTracedReference<Object>& object, int index) {
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 311cd9f1c289c2c5aea234fab64ee200dd0c2a8d..af1f0f3ad6ad0f2f0e7cb0123f9cd1ad0d1c80cb 100644
|
||||
index 676c43e300648a24542bd49df118325227d507d9..d76e52da63748acfb37b31179b3428de77362413 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -6471,14 +6471,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
|
||||
@@ -6465,14 +6465,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
|
||||
i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
|
||||
}
|
||||
|
||||
|
||||
@@ -250,10 +250,10 @@ index dc27e91ad0da93a5b68053f132f219f95f641ca1..38ba1110da3f77df4681ccb0ebcee78d
|
||||
switch (c_signature->ReturnInfo().GetType()) {
|
||||
case CTypeInfo::Type::kVoid:
|
||||
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
||||
index 3898b51a1eab680c34102fea473f111cf8024b8b..0d6a0ef6516e25b2bb65b262b4d6495a268cd4d8 100644
|
||||
index 2b8639616427b557b9c00f328b069eb1dc6909c1..07661d03e99bb26dcd0be793932ba15319b7bec0 100644
|
||||
--- a/test/cctest/test-api.cc
|
||||
+++ b/test/cctest/test-api.cc
|
||||
@@ -29772,6 +29772,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
|
||||
@@ -29773,6 +29773,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ index 3898b51a1eab680c34102fea473f111cf8024b8b..0d6a0ef6516e25b2bb65b262b4d6495a
|
||||
void FastCallback2JSArray(v8::Local<v8::Object> receiver, int arg0,
|
||||
v8::Local<v8::Array> arg1) {
|
||||
Trivial* self = UnwrapTrivialObject(receiver);
|
||||
@@ -29789,10 +29799,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
|
||||
@@ -29790,10 +29800,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
|
||||
void FastCallback5DifferentArity(v8::Local<v8::Object> receiver, int arg0,
|
||||
v8::Local<v8::Array> arg1, float arg2) {}
|
||||
|
||||
@@ -374,7 +374,7 @@ index 3898b51a1eab680c34102fea473f111cf8024b8b..0d6a0ef6516e25b2bb65b262b4d6495a
|
||||
TEST(FastApiOverloadResolution) {
|
||||
#if !defined(V8_LITE_MODE) && defined(V8_ENABLE_TURBOFAN)
|
||||
if (i::v8_flags.jitless) return;
|
||||
@@ -29806,15 +29909,22 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29807,15 +29910,22 @@ TEST(FastApiOverloadResolution) {
|
||||
i::v8_flags.always_turbofan = false;
|
||||
i::FlagList::EnforceFlagImplications();
|
||||
|
||||
@@ -399,7 +399,7 @@ index 3898b51a1eab680c34102fea473f111cf8024b8b..0d6a0ef6516e25b2bb65b262b4d6495a
|
||||
|
||||
v8::CFunction scalar_callback =
|
||||
v8::CFunctionBuilder().Fn(FastCallback4Scalar).Build();
|
||||
@@ -29822,7 +29932,7 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29823,7 +29933,7 @@ TEST(FastApiOverloadResolution) {
|
||||
// Check that resolving when there is a scalar at the difference position
|
||||
// is not possible.
|
||||
CHECK_EQ(v8::CFunction::OverloadResolution::kImpossible,
|
||||
@@ -408,7 +408,7 @@ index 3898b51a1eab680c34102fea473f111cf8024b8b..0d6a0ef6516e25b2bb65b262b4d6495a
|
||||
|
||||
v8::CFunction diff_arity_callback =
|
||||
v8::CFunctionBuilder().Fn(FastCallback5DifferentArity).Build();
|
||||
@@ -29830,7 +29940,7 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29831,7 +29941,7 @@ TEST(FastApiOverloadResolution) {
|
||||
// Check that overload resolution between different number of arguments
|
||||
// is possible.
|
||||
CHECK_EQ(v8::CFunction::OverloadResolution::kAtCompileTime,
|
||||
|
||||
@@ -504,7 +504,7 @@ index 137e5c917cf7a56c89e70ed49d07e3134d1c8eac..00000000000000000000000000000000
|
||||
-assertEquals(1, fast_c_api.fast_call_count());
|
||||
-assertEquals(0, fast_c_api.slow_call_count());
|
||||
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
|
||||
index 93fe36a988be33f1eab1e814c8f0ad62bfbcbb53..632a8f4f0475076f82f66c73a29d92d3e9fc8c50 100644
|
||||
index 207322443192073f516787cbaf81e69c87d34a3c..2256e42324bdc91a4c92bfcfe9909c71f8e8533b 100644
|
||||
--- a/test/mjsunit/mjsunit.status
|
||||
+++ b/test/mjsunit/mjsunit.status
|
||||
@@ -757,7 +757,6 @@
|
||||
@@ -515,7 +515,7 @@ index 93fe36a988be33f1eab1e814c8f0ad62bfbcbb53..632a8f4f0475076f82f66c73a29d92d3
|
||||
'compiler/fast-api-interface-types': [SKIP],
|
||||
'compiler/regress-crbug-1201011': [SKIP],
|
||||
'compiler/regress-crbug-1201057': [SKIP],
|
||||
@@ -2358,7 +2357,6 @@
|
||||
@@ -2359,7 +2358,6 @@
|
||||
'regress/regress-1049982-2': [FAIL],
|
||||
# Maglev doesn't support fast API calls.
|
||||
'compiler/fast-api-annotations': [FAIL],
|
||||
|
||||
@@ -13,7 +13,7 @@ Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5979766
|
||||
This reverts commit c41f7a0ef99bd1c9752ee79923f634145ebc4153.
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index af1f0f3ad6ad0f2f0e7cb0123f9cd1ad0d1c80cb..b6a8bd3dfe53494502f13dbbfdfad1d79f621d40 100644
|
||||
index d76e52da63748acfb37b31179b3428de77362413..0b30c6568d1a38237f3629fb88a5c9cbf1650f98 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -1349,16 +1349,6 @@ Local<FunctionTemplate> FunctionTemplate::NewWithCFunctionOverloads(
|
||||
@@ -669,10 +669,10 @@ index f24cd884bf7810aaed5e58b2044c2770653266f1..d79f6c801d2562a3cd65597d79050791
|
||||
// There is one return in addition to the return value of the C function,
|
||||
// which indicates if a fast API call actually happened.
|
||||
diff --git a/src/compiler/turboshaft/operations.h b/src/compiler/turboshaft/operations.h
|
||||
index 1977d4d57a34781ae925d4f0ad0d09192b937dbe..d258f4b10f09b79c4aaf54ebff5e55cf8227aecc 100644
|
||||
index a26611708f2dd162e127d7a7c9af9135892d0b40..b04639190b239af92a2845886e5852080e6e454a 100644
|
||||
--- a/src/compiler/turboshaft/operations.h
|
||||
+++ b/src/compiler/turboshaft/operations.h
|
||||
@@ -6403,16 +6403,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
|
||||
@@ -6386,16 +6386,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
|
||||
};
|
||||
|
||||
struct FastApiCallParameters : public NON_EXPORTED_BASE(ZoneObject) {
|
||||
@@ -705,7 +705,7 @@ index 1977d4d57a34781ae925d4f0ad0d09192b937dbe..d258f4b10f09b79c4aaf54ebff5e55cf
|
||||
};
|
||||
|
||||
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
||||
index 2a1edc79d000801b21e89304eefc27d6ea6f4675..79b2e0b010609acbf0e0b8ac6835364a6448ff03 100644
|
||||
index 5ad805a11f7de73f06518ee3cf878ca492c0c652..2571f2800450cb8582198dc7cb7ef58311c52dae 100644
|
||||
--- a/src/compiler/wasm-compiler.cc
|
||||
+++ b/src/compiler/wasm-compiler.cc
|
||||
@@ -8356,13 +8356,19 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||
BUILD_TYPE="win"
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
if [ -z "$MAS_BUILD" ]; then
|
||||
BUILD_TYPE="darwin"
|
||||
else
|
||||
@@ -48,47 +46,23 @@ cp_if_exist() {
|
||||
move_src_dirs_if_exist() {
|
||||
mkdir src_artifacts
|
||||
|
||||
dirs=("src/out/Default/gen/node_headers" \
|
||||
"src/out/Default/overlapped-checker" \
|
||||
"src/out/Default/ffmpeg" \
|
||||
"src/out/Default/hunspell_dictionaries" \
|
||||
"src/third_party/electron_node" \
|
||||
"src/third_party/nan" \
|
||||
"src/cross-arch-snapshots" \
|
||||
"src/buildtools/mac" \
|
||||
"src/buildtools/third_party/libc++" \
|
||||
"src/buildtools/third_party/libc++abi" \
|
||||
"src/third_party/libc++" \
|
||||
"src/third_party/libc++abi" \
|
||||
"src/out/Default/obj/buildtools/third_party" \
|
||||
"src/v8/tools/builtins-pgo")
|
||||
|
||||
# Only do this for linux build type, this folder
|
||||
# exists for windows builds on linux hosts but we do
|
||||
# not need it
|
||||
if [ "$BUILD_TYPE" == "linux" ]; then
|
||||
dirs+=('src/build/linux')
|
||||
fi
|
||||
|
||||
# llvm-build is the host toolchain, for windows we need
|
||||
# a different toolchain so no point copying this one
|
||||
if [ "$BUILD_TYPE" != "win" ]; then
|
||||
dirs+=('src/third_party/llvm-build')
|
||||
fi
|
||||
|
||||
# On windows we should clean up two symlinks that aren't
|
||||
# compatible with the windows test runner
|
||||
if [ "$BUILD_TYPE" == "win" ]; then
|
||||
rm -f src/third_party/electron_node/tools/node_modules/eslint/node_modules/eslint
|
||||
rm -f src/third_party/electron_node/tools/node_modules/eslint/node_modules/.bin/eslint
|
||||
rm -f src/third_party/electron_node/out/tools/bin/python
|
||||
|
||||
# Also need to copy electron.lib to node.lib for native module testing purposes
|
||||
mkdir -p src/out/Default/gen/node_headers/Release
|
||||
cp src/out/Default/electron.lib src/out/Default/gen/node_headers/Release/node.lib
|
||||
fi
|
||||
|
||||
for dir in "${dirs[@]}"
|
||||
for dir in \
|
||||
src/out/Default/gen/node_headers \
|
||||
src/out/Default/overlapped-checker \
|
||||
src/out/Default/ffmpeg \
|
||||
src/out/Default/hunspell_dictionaries \
|
||||
src/third_party/electron_node \
|
||||
src/third_party/nan \
|
||||
src/cross-arch-snapshots \
|
||||
src/third_party/llvm-build \
|
||||
src/build/linux \
|
||||
src/buildtools/mac \
|
||||
src/buildtools/third_party/libc++ \
|
||||
src/buildtools/third_party/libc++abi \
|
||||
src/third_party/libc++ \
|
||||
src/third_party/libc++abi \
|
||||
src/out/Default/obj/buildtools/third_party \
|
||||
src/v8/tools/builtins-pgo
|
||||
do
|
||||
if [ -d "$dir" ]; then
|
||||
mkdir -p src_artifacts/$(dirname $dir)
|
||||
@@ -96,7 +70,7 @@ move_src_dirs_if_exist() {
|
||||
fi
|
||||
done
|
||||
|
||||
tar -C src_artifacts -cf src_artifacts.tar .
|
||||
tar -C src_artifacts -cf src_artifacts.tar ./
|
||||
|
||||
echo Storing src_artifacts.tar
|
||||
mv src_artifacts.tar $SRC_ARTIFACTS
|
||||
|
||||
@@ -2,19 +2,21 @@ const crypto = require('node:crypto');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
// Fallback to blow away old cache keys
|
||||
const FALLBACK_HASH_VERSION = 3;
|
||||
|
||||
// Per platform hash versions to bust the cache on different platforms
|
||||
const HASH_VERSIONS = {
|
||||
darwin: 4,
|
||||
darwin: 3,
|
||||
win32: 4,
|
||||
linux: 4
|
||||
linux: 3
|
||||
};
|
||||
|
||||
// Base files to hash
|
||||
const filesToHash = [
|
||||
path.resolve(__dirname, '../DEPS'),
|
||||
path.resolve(__dirname, '../yarn.lock'),
|
||||
path.resolve(__dirname, '../script/sysroots.json'),
|
||||
path.resolve(__dirname, '../.github/actions/checkout/action.yml')
|
||||
path.resolve(__dirname, '../script/sysroots.json')
|
||||
];
|
||||
|
||||
const addAllFiles = (dir) => {
|
||||
@@ -36,7 +38,7 @@ const hasher = crypto.createHash('SHA256');
|
||||
const addToHashAndLog = (s) => {
|
||||
return hasher.update(s);
|
||||
};
|
||||
addToHashAndLog(`HASH_VERSION:${HASH_VERSIONS[process.platform]}`);
|
||||
addToHashAndLog(`HASH_VERSION:${HASH_VERSIONS[process.platform] || FALLBACK_HASH_VERSION}`);
|
||||
for (const file of filesToHash) {
|
||||
hasher.update(fs.readFileSync(file));
|
||||
}
|
||||
@@ -45,5 +47,15 @@ for (const file of filesToHash) {
|
||||
const extraArgs = process.env.GCLIENT_EXTRA_ARGS || 'no_extra_args';
|
||||
addToHashAndLog(extraArgs);
|
||||
|
||||
const effectivePlatform = extraArgs.includes('host_os=mac') ? 'darwin' : process.platform;
|
||||
|
||||
// Write the hash to disk
|
||||
fs.writeFileSync(path.resolve(__dirname, '../.depshash'), hasher.digest('hex'));
|
||||
|
||||
let targetContent = `${effectivePlatform}\n${process.env.TARGET_ARCH}\n${process.env.GN_CONFIG}\n${undefined}\n${process.env.GN_EXTRA_ARGS}\n${process.env.GN_BUILDFLAG_ARGS}`;
|
||||
const argsDir = path.resolve(__dirname, '../build/args');
|
||||
for (const argFile of fs.readdirSync(argsDir).sort()) {
|
||||
targetContent += `\n${argFile}--${crypto.createHash('SHA1').update(fs.readFileSync(path.resolve(argsDir, argFile))).digest('hex')}`;
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.resolve(__dirname, '../.depshash-target'), targetContent);
|
||||
|
||||
@@ -31,9 +31,9 @@ async function main () {
|
||||
const outDir = utils.getOutDir({ shouldLog: true });
|
||||
const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
|
||||
const env = {
|
||||
npm_config_msvs_version: '2022',
|
||||
...process.env,
|
||||
npm_config_nodedir: nodeDir,
|
||||
npm_config_msvs_version: '2022',
|
||||
npm_config_arch: process.env.NPM_CONFIG_ARCH,
|
||||
npm_config_yes: 'true'
|
||||
};
|
||||
|
||||
@@ -17,8 +17,6 @@ const unknownFlags = [];
|
||||
const pass = chalk.green('✓');
|
||||
const fail = chalk.red('✗');
|
||||
|
||||
const FAILURE_STATUS_KEY = 'Electron_Spec_Runner_Failures';
|
||||
|
||||
const args = minimist(process.argv, {
|
||||
string: ['runners', 'target', 'electronVersion'],
|
||||
unknown: arg => unknownFlags.push(arg)
|
||||
@@ -158,36 +156,6 @@ async function runElectronTests () {
|
||||
}
|
||||
}
|
||||
|
||||
async function asyncSpawn (exe, runnerArgs) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let forceExitResult = 0;
|
||||
const child = childProcess.spawn(exe, runnerArgs, {
|
||||
cwd: path.resolve(__dirname, '../..')
|
||||
});
|
||||
child.stdout.pipe(process.stdout);
|
||||
child.stderr.pipe(process.stderr);
|
||||
if (process.env.ELECTRON_FORCE_TEST_SUITE_EXIT) {
|
||||
child.stdout.on('data', data => {
|
||||
const failureRE = RegExp(`${FAILURE_STATUS_KEY}: (\\d.*)`);
|
||||
const failures = data.toString().match(failureRE);
|
||||
if (failures) {
|
||||
forceExitResult = parseInt(failures[1], 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
child.on('error', error => reject(error));
|
||||
child.on('close', (status, signal) => {
|
||||
let returnStatus = 0;
|
||||
if (process.env.ELECTRON_FORCE_TEST_SUITE_EXIT) {
|
||||
returnStatus = forceExitResult;
|
||||
} else {
|
||||
returnStatus = status;
|
||||
}
|
||||
resolve({ status: returnStatus, signal });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function runTestUsingElectron (specDir, testName) {
|
||||
let exe;
|
||||
if (args.electronVersion) {
|
||||
@@ -201,7 +169,10 @@ async function runTestUsingElectron (specDir, testName) {
|
||||
runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe);
|
||||
exe = 'python3';
|
||||
}
|
||||
const { status, signal } = await asyncSpawn(exe, runnerArgs);
|
||||
const { status, signal } = childProcess.spawnSync(exe, runnerArgs, {
|
||||
cwd: path.resolve(__dirname, '../..'),
|
||||
stdio: 'inherit'
|
||||
});
|
||||
if (status !== 0) {
|
||||
if (status) {
|
||||
const textStatus = process.platform === 'win32' ? `0x${status.toString(16)}` : status.toString();
|
||||
@@ -220,9 +191,9 @@ async function runMainProcessElectronTests () {
|
||||
|
||||
async function installSpecModules (dir) {
|
||||
const env = {
|
||||
npm_config_msvs_version: '2022',
|
||||
...process.env,
|
||||
CXXFLAGS: process.env.CXXFLAGS,
|
||||
npm_config_msvs_version: '2022',
|
||||
npm_config_yes: 'true'
|
||||
};
|
||||
if (args.electronVersion) {
|
||||
|
||||
0
script/zip_manifests/dist_zip.win.arm64.manifest
Normal file → Executable file
0
script/zip_manifests/dist_zip.win.arm64.manifest
Normal file → Executable file
@@ -286,7 +286,7 @@ void DesktopCapturer::StartHandling(bool capture_window,
|
||||
capture_screen_ = false;
|
||||
capture_window_ = capture_window;
|
||||
window_capturer_ = std::make_unique<NativeDesktopMediaList>(
|
||||
DesktopMediaList::Type::kWindow, std::move(capturer), true, true);
|
||||
DesktopMediaList::Type::kWindow, std::move(capturer));
|
||||
window_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
|
||||
OnceCallback update_callback = base::BindOnce(
|
||||
@@ -322,7 +322,7 @@ void DesktopCapturer::StartHandling(bool capture_window,
|
||||
auto capturer = MakeWindowCapturer();
|
||||
if (capturer) {
|
||||
window_capturer_ = std::make_unique<NativeDesktopMediaList>(
|
||||
DesktopMediaList::Type::kWindow, std::move(capturer), true, true);
|
||||
DesktopMediaList::Type::kWindow, std::move(capturer));
|
||||
window_capturer_->SetThumbnailSize(thumbnail_size);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
window_capturer_->skip_next_refresh_ =
|
||||
|
||||
@@ -44,7 +44,7 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
||||
[notification_ setInformativeText:base::SysUTF16ToNSString(options.msg)];
|
||||
[notification_ setIdentifier:identifier];
|
||||
|
||||
if (electron::debug_notifications) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS")) {
|
||||
LOG(INFO) << "Notification created (" << [identifier UTF8String] << ")";
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void CocoaNotification::NotificationDismissed() {
|
||||
}
|
||||
|
||||
void CocoaNotification::LogAction(const char* action) {
|
||||
if (electron::debug_notifications && notification_) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS") && notification_) {
|
||||
NSString* identifier = [notification_ valueForKey:@"identifier"];
|
||||
DCHECK(identifier);
|
||||
LOG(INFO) << "Notification " << action << " (" << [identifier UTF8String]
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
didActivateNotification:(NSUserNotification*)notif {
|
||||
auto* notification = presenter_->GetNotification(notif);
|
||||
|
||||
if (electron::debug_notifications) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS")) {
|
||||
LOG(INFO) << "Notification activated (" << [notif.identifier UTF8String]
|
||||
<< ")";
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ CocoaNotification* NotificationPresenterMac::GetNotification(
|
||||
return native_notification;
|
||||
}
|
||||
|
||||
if (electron::debug_notifications) {
|
||||
if (getenv("ELECTRON_DEBUG_NOTIFICATIONS")) {
|
||||
LOG(INFO) << "Could not find notification for "
|
||||
<< [ns_notification.identifier UTF8String];
|
||||
}
|
||||
|
||||
@@ -4,15 +4,11 @@
|
||||
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
|
||||
#include "base/environment.h"
|
||||
#include "shell/browser/notifications/notification_delegate.h"
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
const bool debug_notifications =
|
||||
base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS");
|
||||
|
||||
NotificationOptions::NotificationOptions() = default;
|
||||
NotificationOptions::~NotificationOptions() = default;
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
namespace electron {
|
||||
|
||||
extern const bool debug_notifications;
|
||||
|
||||
class NotificationDelegate;
|
||||
class NotificationPresenter;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/environment.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/hash/md5.h"
|
||||
#include "base/logging.h"
|
||||
@@ -26,6 +27,10 @@ namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsDebuggingNotifications() {
|
||||
return base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS");
|
||||
}
|
||||
|
||||
bool SaveIconToPath(const SkBitmap& bitmap, const base::FilePath& path) {
|
||||
std::optional<std::vector<uint8_t>> png_data =
|
||||
gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false);
|
||||
@@ -45,7 +50,7 @@ std::unique_ptr<NotificationPresenter> NotificationPresenter::Create() {
|
||||
if (!presenter->Init())
|
||||
return {};
|
||||
|
||||
if (electron::debug_notifications)
|
||||
if (IsDebuggingNotifications())
|
||||
LOG(INFO) << "Successfully created Windows notifications presenter";
|
||||
|
||||
return presenter;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <shlobj.h>
|
||||
#include <wrl\wrappers\corewrappers.h>
|
||||
|
||||
#include "base/environment.h"
|
||||
#include "base/hash/hash.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/strcat.h"
|
||||
@@ -65,7 +66,7 @@ namespace {
|
||||
constexpr wchar_t kGroup[] = L"Notifications";
|
||||
|
||||
void DebugLog(std::string_view log_msg) {
|
||||
if (electron::debug_notifications)
|
||||
if (base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS"))
|
||||
LOG(INFO) << log_msg;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ std::vector<std::u16string> Clipboard::AvailableFormats(
|
||||
bool Clipboard::Has(const std::string& format_string,
|
||||
gin_helper::Arguments* args) {
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
ui::ClipboardFormatType format =
|
||||
ui::ClipboardFormatType::CustomPlatformType(format_string);
|
||||
ui::ClipboardFormatType format(
|
||||
ui::ClipboardFormatType::GetType(format_string));
|
||||
if (format.GetName().empty())
|
||||
format = ui::ClipboardFormatType::CustomPlatformType(format_string);
|
||||
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args),
|
||||
|
||||
@@ -24,6 +24,20 @@
|
||||
"action.setBadgeTextColor": {
|
||||
"channel": "stable"
|
||||
},
|
||||
"tabs": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension"],
|
||||
"contexts": ["privileged_extension"]
|
||||
},
|
||||
"tabs.executeScript": {
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"tabs.insertCSS": {
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"tabs.removeCSS": {
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"extension": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension"],
|
||||
@@ -45,6 +59,12 @@
|
||||
],
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"i18n": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension"],
|
||||
"contexts": ["privileged_extension", "unprivileged_extension", "content_script"],
|
||||
"disallow_for_service_workers": true
|
||||
},
|
||||
"mimeHandlerViewGuestInternal": {
|
||||
"internal": true,
|
||||
"contexts": "all",
|
||||
@@ -73,19 +93,5 @@
|
||||
"channel": "trunk",
|
||||
"dependencies": ["permission:scripting"],
|
||||
"contexts": ["content_script"]
|
||||
},
|
||||
"tabs": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension"],
|
||||
"contexts": ["privileged_extension"]
|
||||
},
|
||||
"tabs.executeScript": {
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"tabs.insertCSS": {
|
||||
"max_manifest_version": 2
|
||||
},
|
||||
"tabs.removeCSS": {
|
||||
"max_manifest_version": 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,7 +595,9 @@ bool Converter<scoped_refptr<network::ResourceRequestBody>>::FromV8(
|
||||
if (!type)
|
||||
return false;
|
||||
if (*type == "rawData") {
|
||||
(*out)->AppendBytes(std::move(*dict.Find("bytes")).TakeBlob());
|
||||
const base::Value::BlobStorage* bytes = dict.FindBlob("bytes");
|
||||
(*out)->AppendBytes(reinterpret_cast<const char*>(bytes->data()),
|
||||
base::checked_cast<int>(bytes->size()));
|
||||
} else if (*type == "file") {
|
||||
const std::string* file = dict.FindString("filePath");
|
||||
if (!file)
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace {
|
||||
|
||||
bool HasWordCharacters(const std::u16string& text, size_t index) {
|
||||
base_icu::UChar32 code;
|
||||
while (index < text.size() &&
|
||||
base::ReadUnicodeCharacter(text.c_str(), text.size(), &index, &code)) {
|
||||
++index;
|
||||
while (base::ReadUnicodeCharacter(text.c_str(), text.size(), &index, &code)) {
|
||||
UErrorCode error = U_ZERO_ERROR;
|
||||
if (uscript_getScript(code, &error) != USCRIPT_COMMON)
|
||||
return true;
|
||||
|
||||
@@ -239,7 +239,7 @@ void RendererClientBase::RenderThreadStarted() {
|
||||
true);
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_client_ = std::make_unique<ElectronExtensionsClient>();
|
||||
extensions_client_.reset(CreateExtensionsClient());
|
||||
extensions::ExtensionsClient::Set(extensions_client_.get());
|
||||
|
||||
extensions_renderer_client_ =
|
||||
@@ -565,6 +565,12 @@ v8::Local<v8::Context> RendererClientBase::GetContext(
|
||||
return frame->MainWorldScriptContext();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions::ExtensionsClient* RendererClientBase::CreateExtensionsClient() {
|
||||
return new ElectronExtensionsClient;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool RendererClientBase::IsWebViewFrame(
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const {
|
||||
|
||||
@@ -139,6 +139,13 @@ class RendererClientBase : public content::ContentRendererClient
|
||||
bool was_created_by_renderer,
|
||||
const url::Origin* outermost_origin) override;
|
||||
|
||||
protected:
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
// app_shell embedders may need custom extensions client interfaces.
|
||||
// This class takes ownership of the returned object.
|
||||
virtual extensions::ExtensionsClient* CreateExtensionsClient();
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
std::unique_ptr<extensions::ExtensionsClient> extensions_client_;
|
||||
|
||||
@@ -2159,10 +2159,6 @@ describe('default behavior', () => {
|
||||
serverUrl = (await listen(server)).url;
|
||||
});
|
||||
|
||||
after(() => {
|
||||
server.close();
|
||||
});
|
||||
|
||||
it('should emit a login event on app when a WebContents hits a 401', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.loadURL(serverUrl);
|
||||
|
||||
@@ -935,9 +935,6 @@ describe('BrowserWindow module', () => {
|
||||
});
|
||||
url = (await listen(server)).url;
|
||||
});
|
||||
after(() => {
|
||||
server.close();
|
||||
});
|
||||
it('for initial navigation, event order is consistent', async () => {
|
||||
const firedEvents: string[] = [];
|
||||
const expectedEventOrder = [
|
||||
|
||||
@@ -858,9 +858,6 @@ describe('session module', () => {
|
||||
res.end('authenticated');
|
||||
}
|
||||
});
|
||||
defer(() => {
|
||||
server.close();
|
||||
});
|
||||
const { port } = await listen(server);
|
||||
const fetch = (url: string) => new Promise((resolve, reject) => {
|
||||
const request = net.request({ url, session: ses });
|
||||
@@ -944,13 +941,6 @@ describe('session module', () => {
|
||||
};
|
||||
|
||||
describe('session.downloadURL', () => {
|
||||
let server: http.Server;
|
||||
afterEach(() => {
|
||||
if (server) {
|
||||
server.close();
|
||||
server = null as unknown as http.Server;
|
||||
}
|
||||
});
|
||||
it('can perform a download', async () => {
|
||||
const willDownload = once(session.defaultSession, 'will-download');
|
||||
session.defaultSession.downloadURL(`${url}:${port}`);
|
||||
@@ -961,7 +951,7 @@ describe('session module', () => {
|
||||
});
|
||||
|
||||
it('can perform a download with a valid auth header', async () => {
|
||||
server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
const { authorization } = req.headers;
|
||||
if (!authorization || authorization !== 'Basic i-am-an-auth-header') {
|
||||
res.statusCode = 401;
|
||||
@@ -1023,7 +1013,7 @@ describe('session module', () => {
|
||||
});
|
||||
|
||||
it('correctly handles a download with an invalid auth header', async () => {
|
||||
server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
const { authorization } = req.headers;
|
||||
if (!authorization || authorization !== 'Basic i-am-an-auth-header') {
|
||||
res.statusCode = 401;
|
||||
@@ -1067,13 +1057,6 @@ describe('session module', () => {
|
||||
});
|
||||
|
||||
describe('webContents.downloadURL', () => {
|
||||
let server: http.Server;
|
||||
afterEach(() => {
|
||||
if (server) {
|
||||
server.close();
|
||||
server = null as unknown as http.Server;
|
||||
}
|
||||
});
|
||||
it('can perform a download', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
const willDownload = once(w.webContents.session, 'will-download');
|
||||
@@ -1085,7 +1068,7 @@ describe('session module', () => {
|
||||
});
|
||||
|
||||
it('can perform a download with a valid auth header', async () => {
|
||||
server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
const { authorization } = req.headers;
|
||||
if (!authorization || authorization !== 'Basic i-am-an-auth-header') {
|
||||
res.statusCode = 401;
|
||||
@@ -1141,7 +1124,7 @@ describe('session module', () => {
|
||||
});
|
||||
|
||||
it('correctly handles a download and an invalid auth header', async () => {
|
||||
server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
const { authorization } = req.headers;
|
||||
if (!authorization || authorization !== 'Basic i-am-an-auth-header') {
|
||||
res.statusCode = 401;
|
||||
@@ -1332,9 +1315,6 @@ describe('session module', () => {
|
||||
send(req, req.url!, options)
|
||||
.on('error', (error: any) => { throw error; }).pipe(res);
|
||||
});
|
||||
defer(() => {
|
||||
rangeServer.close();
|
||||
});
|
||||
try {
|
||||
const { url } = await listen(rangeServer);
|
||||
const w = new BrowserWindow({ show: false });
|
||||
|
||||
@@ -3,7 +3,6 @@ import { BrowserWindow, app } from 'electron/main';
|
||||
|
||||
import { expect } from 'chai';
|
||||
|
||||
import { execSync } from 'node:child_process';
|
||||
import { once } from 'node:events';
|
||||
import * as fs from 'node:fs';
|
||||
import * as http from 'node:http';
|
||||
@@ -16,16 +15,6 @@ import { closeAllWindows } from './lib/window-helpers';
|
||||
describe('shell module', () => {
|
||||
describe('shell.openExternal()', () => {
|
||||
let envVars: Record<string, string | undefined> = {};
|
||||
let server: http.Server;
|
||||
|
||||
after(function () {
|
||||
this.timeout(60000);
|
||||
if (process.env.CI && process.platform === 'win32') {
|
||||
// Edge may cause issues with visibility tests, so make sure it is closed after testing.
|
||||
const killEdge = 'Get-Process | Where Name -Like "msedge" | Stop-Process';
|
||||
execSync(killEdge, { shell: 'powershell.exe' });
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
envVars = {
|
||||
@@ -42,12 +31,8 @@ describe('shell module', () => {
|
||||
process.env.BROWSER = envVars.browser;
|
||||
process.env.DISPLAY = envVars.display;
|
||||
}
|
||||
await closeAllWindows();
|
||||
if (server) {
|
||||
server.close();
|
||||
server = null as unknown as http.Server;
|
||||
}
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
async function urlOpened () {
|
||||
let url = 'http://127.0.0.1';
|
||||
@@ -65,7 +50,7 @@ describe('shell module', () => {
|
||||
const w = new BrowserWindow({ show: true });
|
||||
requestReceived = once(w, 'blur');
|
||||
} else {
|
||||
server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
res.end();
|
||||
});
|
||||
url = (await listen(server)).url;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { BrowserWindow, ipcMain, webContents, session, app, BrowserView, WebContents, BaseWindow, WebContentsView } from 'electron/main';
|
||||
|
||||
import { nativeInput } from '@smaddock/electron-native-utils';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import * as cp from 'node:child_process';
|
||||
@@ -13,7 +14,7 @@ import { setTimeout } from 'node:timers/promises';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import { ifdescribe, defer, waitUntil, listen, ifit } from './lib/spec-helpers';
|
||||
import { cleanupWebContents, closeAllWindows } from './lib/window-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
|
||||
const fixturesPath = path.resolve(__dirname, 'fixtures');
|
||||
const features = process._linkedBinding('electron_common_features');
|
||||
@@ -63,7 +64,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('fromFrame()', () => {
|
||||
afterEach(cleanupWebContents);
|
||||
it('returns WebContents for mainFrame', () => {
|
||||
const contents = (webContents as typeof ElectronInternal.WebContents).create();
|
||||
expect(webContents.fromFrame(contents.mainFrame)).to.equal(contents);
|
||||
@@ -86,7 +86,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('fromDevToolsTargetId()', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('returns WebContents for attached DevTools target', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
await w.loadURL('about:blank');
|
||||
@@ -105,10 +104,7 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('will-prevent-unload event', function () {
|
||||
afterEach(async () => {
|
||||
await closeAllWindows();
|
||||
await cleanupWebContents();
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
it('does not emit if beforeunload returns undefined in a BrowserWindow', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.webContents.once('will-prevent-unload', () => {
|
||||
@@ -310,13 +306,11 @@ describe('webContents module', () => {
|
||||
]);
|
||||
let w: BrowserWindow;
|
||||
|
||||
beforeEach(async () => {
|
||||
before(async () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false } });
|
||||
await w.loadURL('about:blank');
|
||||
});
|
||||
afterEach(async () => {
|
||||
await closeAllWindows();
|
||||
});
|
||||
after(closeAllWindows);
|
||||
|
||||
it('resolves the returned promise with the result', async () => {
|
||||
const result = await w.webContents.executeJavaScript(code);
|
||||
@@ -387,8 +381,6 @@ describe('webContents module', () => {
|
||||
await w.loadURL('about:blank');
|
||||
});
|
||||
|
||||
after(() => w.close());
|
||||
|
||||
it('resolves the returned promise with the result', async () => {
|
||||
await w.webContents.executeJavaScriptInIsolatedWorld(999, [{ code: 'window.X = 123' }]);
|
||||
const isolatedResult = await w.webContents.executeJavaScriptInIsolatedWorld(999, [{ code: 'window.X' }]);
|
||||
@@ -400,14 +392,6 @@ describe('webContents module', () => {
|
||||
|
||||
describe('loadURL() promise API', () => {
|
||||
let w: BrowserWindow;
|
||||
let s: http.Server;
|
||||
|
||||
afterEach(() => {
|
||||
if (s) {
|
||||
s.close();
|
||||
s = null as unknown as http.Server;
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
w = new BrowserWindow({ show: false });
|
||||
@@ -511,18 +495,19 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
it('rejects if the load is aborted', async () => {
|
||||
s = http.createServer(() => { /* never complete the request */ });
|
||||
const s = http.createServer(() => { /* never complete the request */ });
|
||||
const { port } = await listen(s);
|
||||
const p = expect(w.loadURL(`http://127.0.0.1:${port}`)).to.eventually.be.rejectedWith(Error, /ERR_ABORTED/);
|
||||
// load a different file before the first load completes, causing the
|
||||
// first load to be aborted.
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'base-page.html'));
|
||||
await p;
|
||||
s.close();
|
||||
});
|
||||
|
||||
it("doesn't reject when a subframe fails to load", async () => {
|
||||
let resp = null as unknown as http.ServerResponse;
|
||||
s = http.createServer((req, res) => {
|
||||
const s = http.createServer((req, res) => {
|
||||
res.writeHead(200, { 'Content-Type': 'text/html' });
|
||||
res.write('<iframe src="http://err.name.not.resolved"></iframe>');
|
||||
resp = res;
|
||||
@@ -540,11 +525,12 @@ describe('webContents module', () => {
|
||||
await p;
|
||||
resp.end();
|
||||
await main;
|
||||
s.close();
|
||||
});
|
||||
|
||||
it("doesn't resolve when a subframe loads", async () => {
|
||||
let resp = null as unknown as http.ServerResponse;
|
||||
s = http.createServer((req, res) => {
|
||||
const s = http.createServer((req, res) => {
|
||||
res.writeHead(200, { 'Content-Type': 'text/html' });
|
||||
res.write('<iframe src="about:blank"></iframe>');
|
||||
resp = res;
|
||||
@@ -563,6 +549,7 @@ describe('webContents module', () => {
|
||||
resp.destroy(); // cause the main request to fail
|
||||
await expect(main).to.eventually.be.rejected()
|
||||
.and.have.property('errno', -355); // ERR_INCOMPLETE_CHUNKED_ENCODING
|
||||
s.close();
|
||||
});
|
||||
|
||||
it('subsequent load failures reject each time', async () => {
|
||||
@@ -834,7 +821,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('isFocused() API', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('returns false when the window is hidden', async () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
await w.loadURL('about:blank');
|
||||
@@ -1192,7 +1178,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('startDrag({file, icon})', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('throws errors for a missing file or a missing/empty icon', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
expect(() => {
|
||||
@@ -1297,7 +1282,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('userAgent APIs', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('is not empty by default', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
const userAgent = w.webContents.getUserAgent();
|
||||
@@ -1328,7 +1312,6 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('audioMuted APIs', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('can set the audio mute level (functions)', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
|
||||
@@ -1544,9 +1527,6 @@ describe('webContents module', () => {
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
defer(() => {
|
||||
server.close();
|
||||
});
|
||||
listen(server).then(({ url }) => {
|
||||
const content = `<iframe src=${url}></iframe>`;
|
||||
w.webContents.on('did-frame-finish-load', (e, isMainFrame) => {
|
||||
@@ -1559,6 +1539,8 @@ describe('webContents module', () => {
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
} finally {
|
||||
server.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2042,13 +2024,12 @@ describe('webContents module', () => {
|
||||
return done();
|
||||
} catch (e) {
|
||||
return done(e);
|
||||
} finally {
|
||||
server.close();
|
||||
}
|
||||
}
|
||||
res.end('<a id="a" href="/should_have_referrer" target="_blank">link</a>');
|
||||
});
|
||||
defer(() => {
|
||||
server.close();
|
||||
});
|
||||
listen(server).then(({ url }) => {
|
||||
w.webContents.once('did-finish-load', () => {
|
||||
w.webContents.setWindowOpenHandler(details => {
|
||||
@@ -2075,9 +2056,6 @@ describe('webContents module', () => {
|
||||
}
|
||||
res.end('');
|
||||
});
|
||||
defer(() => {
|
||||
server.close();
|
||||
});
|
||||
listen(server).then(({ url }) => {
|
||||
w.webContents.once('did-finish-load', () => {
|
||||
w.webContents.setWindowOpenHandler(details => {
|
||||
@@ -2754,8 +2732,8 @@ describe('webContents module', () => {
|
||||
expect(params.y).to.be.a('number');
|
||||
});
|
||||
|
||||
// Skipping due to lack of native click support.
|
||||
it.skip('emits the correct number of times when right-clicked in page', async () => {
|
||||
// Native click only supported on macOS
|
||||
ifit(process.platform === 'darwin')('emits the correct number of times when right-clicked in page', async () => {
|
||||
const w = new BrowserWindow({ show: true });
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'base-page.html'));
|
||||
|
||||
@@ -2765,8 +2743,14 @@ describe('webContents module', () => {
|
||||
contextMenuEmitCount++;
|
||||
});
|
||||
|
||||
// TODO(samuelmaddock): Perform native right-click. We've tried then
|
||||
// dropped robotjs and nutjs so for now this is a manual test.
|
||||
const position = w.getPosition();
|
||||
const size = w.getSize();
|
||||
nativeInput.setMousePosition({
|
||||
x: position[0] + size[0] / 2,
|
||||
y: position[1] + size[1] / 2
|
||||
});
|
||||
await setTimeout(1000 / 60);
|
||||
nativeInput.click({ button: 'right' });
|
||||
|
||||
await once(w.webContents, 'context-menu');
|
||||
await setTimeout(100);
|
||||
@@ -2846,10 +2830,7 @@ describe('webContents module', () => {
|
||||
});
|
||||
|
||||
describe('close() method', () => {
|
||||
afterEach(async () => {
|
||||
await closeAllWindows();
|
||||
await cleanupWebContents();
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
it('closes when close() is called', async () => {
|
||||
const w = (webContents as typeof ElectronInternal.WebContents).create();
|
||||
|
||||
@@ -9,11 +9,7 @@ import { defer, ifdescribe, waitUntil } from './lib/spec-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
|
||||
describe('WebContentsView', () => {
|
||||
afterEach(async () => {
|
||||
await closeAllWindows();
|
||||
const existingWCS = webContents.getAllWebContents();
|
||||
existingWCS.forEach((contents) => contents.close());
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
it('can be instantiated with no arguments', () => {
|
||||
// eslint-disable-next-line no-new
|
||||
|
||||
@@ -495,9 +495,6 @@ describe('webFrameMain module', () => {
|
||||
|
||||
it('is not emitted upon cross-origin navigation', async () => {
|
||||
const server = await createServer();
|
||||
defer(() => {
|
||||
server.server.close();
|
||||
});
|
||||
|
||||
const w = new BrowserWindow({ show: false });
|
||||
await w.webContents.loadURL(server.url);
|
||||
|
||||
@@ -77,9 +77,8 @@ describe('webFrame module', () => {
|
||||
|
||||
describe('api', () => {
|
||||
let w: WebContents;
|
||||
let win: BrowserWindow;
|
||||
before(async () => {
|
||||
win = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false, nodeIntegration: true } });
|
||||
const win = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false, nodeIntegration: true } });
|
||||
await win.loadURL('data:text/html,<iframe name="test"></iframe>');
|
||||
w = win.webContents;
|
||||
await w.executeJavaScript(`
|
||||
@@ -90,11 +89,6 @@ describe('webFrame module', () => {
|
||||
`);
|
||||
});
|
||||
|
||||
after(() => {
|
||||
win.close();
|
||||
win = null as unknown as BrowserWindow;
|
||||
});
|
||||
|
||||
describe('top', () => {
|
||||
it('is self for top frame', async () => {
|
||||
const equal = await w.executeJavaScript('isSameWebFrame(webFrame.top, webFrame)');
|
||||
|
||||
@@ -589,12 +589,12 @@ describe('webRequest module', () => {
|
||||
it('can be proxyed', async () => {
|
||||
// Setup server.
|
||||
const reqHeaders : { [key: string] : any } = {};
|
||||
let server = http.createServer((req, res) => {
|
||||
const server = http.createServer((req, res) => {
|
||||
reqHeaders[req.url!] = req.headers;
|
||||
res.setHeader('foo1', 'bar1');
|
||||
res.end('ok');
|
||||
});
|
||||
let wss = new WebSocket.Server({ noServer: true });
|
||||
const wss = new WebSocket.Server({ noServer: true });
|
||||
wss.on('connection', function connection (ws) {
|
||||
ws.on('message', function incoming (message) {
|
||||
if (message === 'foo') {
|
||||
@@ -660,12 +660,9 @@ describe('webRequest module', () => {
|
||||
});
|
||||
|
||||
// Cleanup.
|
||||
defer(() => {
|
||||
after(() => {
|
||||
contents.destroy();
|
||||
server.close();
|
||||
server = null as unknown as http.Server;
|
||||
wss.close();
|
||||
wss = null as unknown as WebSocket.Server;
|
||||
ses.webRequest.onBeforeRequest(null);
|
||||
ses.webRequest.onBeforeSendHeaders(null);
|
||||
ses.webRequest.onHeadersReceived(null);
|
||||
|
||||
@@ -670,11 +670,8 @@ describe('chromium features', () => {
|
||||
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Escape' });
|
||||
await setTimeout(1000);
|
||||
await expect(waitUntil(async () => {
|
||||
return await w.webContents.executeJavaScript(
|
||||
'document.getElementById(\'favDialog\').open'
|
||||
);
|
||||
})).to.eventually.be.fulfilled();
|
||||
const openAfter1 = await w.webContents.executeJavaScript('document.getElementById(\'favDialog\').open');
|
||||
expect(openAfter1).to.be.true();
|
||||
expect(w.isFullScreen()).to.be.false();
|
||||
|
||||
// Test that with lock, with ESC:
|
||||
@@ -684,6 +681,7 @@ describe('chromium features', () => {
|
||||
await w.webContents.executeJavaScript(`
|
||||
document.body.requestFullscreen();
|
||||
`, true);
|
||||
|
||||
await enterFS2;
|
||||
|
||||
// Request keyboard lock after window has gone fullscreen
|
||||
@@ -698,12 +696,8 @@ describe('chromium features', () => {
|
||||
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Escape' });
|
||||
await setTimeout(1000);
|
||||
await expect(waitUntil(async () => {
|
||||
const openAfter2 = await w.webContents.executeJavaScript(
|
||||
'document.getElementById(\'favDialog\').open'
|
||||
);
|
||||
return (openAfter2 === false);
|
||||
})).to.eventually.be.fulfilled();
|
||||
const openAfter2 = await w.webContents.executeJavaScript('document.getElementById(\'favDialog\').open');
|
||||
expect(openAfter2).to.be.false();
|
||||
expect(w.isFullScreen()).to.be.true();
|
||||
});
|
||||
});
|
||||
@@ -2534,7 +2528,6 @@ describe('chromium features', () => {
|
||||
describe('websockets', () => {
|
||||
it('has user agent', async () => {
|
||||
const server = http.createServer();
|
||||
defer(() => server.close());
|
||||
const { port } = await listen(server);
|
||||
const wss = new ws.Server({ server });
|
||||
const finished = new Promise<string | undefined>((resolve, reject) => {
|
||||
@@ -2994,12 +2987,12 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
|
||||
"document.querySelector('iframe').contentWindow.postMessage('exitFullscreen', '*')"
|
||||
);
|
||||
|
||||
await expect(waitUntil(async () => {
|
||||
const width = await w.webContents.executeJavaScript(
|
||||
"document.querySelector('iframe').offsetWidth"
|
||||
);
|
||||
return width === 0;
|
||||
})).to.eventually.be.fulfilled();
|
||||
await setTimeout(500);
|
||||
|
||||
const width = await w.webContents.executeJavaScript(
|
||||
"document.querySelector('iframe').offsetWidth"
|
||||
);
|
||||
expect(width).to.equal(0);
|
||||
});
|
||||
|
||||
ifit(process.platform === 'darwin')('can fullscreen from out-of-process iframes (macOS)', async () => {
|
||||
@@ -3031,9 +3024,8 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
|
||||
await once(w, 'leave-full-screen');
|
||||
});
|
||||
|
||||
// TODO: Re-enable for windows on GitHub Actions,
|
||||
// fullscreen tests seem to hang on GHA specifically
|
||||
it('can fullscreen from in-process iframes', async () => {
|
||||
// TODO(jkleinsc) fix this flaky test on WOA
|
||||
ifit(process.platform !== 'win32' || process.arch !== 'arm64')('can fullscreen from in-process iframes', async () => {
|
||||
if (process.platform === 'darwin') await once(w, 'enter-full-screen');
|
||||
|
||||
const fullscreenChange = once(ipcMain, 'fullscreenChange');
|
||||
@@ -3708,6 +3700,13 @@ describe('navigator.usb', () => {
|
||||
});
|
||||
|
||||
await sesWin.loadFile(path.join(fixturesPath, 'pages', 'blank.html'));
|
||||
server = http.createServer((req, res) => {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.end('<body>');
|
||||
});
|
||||
|
||||
serverUrl = (await listen(server)).url;
|
||||
|
||||
const devices = await getDevices();
|
||||
expect(devices).to.be.an('array').that.is.empty();
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as path from 'node:path';
|
||||
|
||||
import { emittedNTimes, emittedUntil } from './lib/events-helpers';
|
||||
import { ifit, listen, waitUntil } from './lib/spec-helpers';
|
||||
import { closeAllWindows, closeWindow, cleanupWebContents } from './lib/window-helpers';
|
||||
import { closeAllWindows, closeWindow } from './lib/window-helpers';
|
||||
|
||||
const uuid = require('uuid');
|
||||
|
||||
@@ -23,7 +23,6 @@ describe('chrome extensions', () => {
|
||||
let server: http.Server;
|
||||
let url: string;
|
||||
let port: number;
|
||||
let wss: WebSocket.Server;
|
||||
before(async () => {
|
||||
server = http.createServer((req, res) => {
|
||||
if (req.url === '/cors') {
|
||||
@@ -32,7 +31,7 @@ describe('chrome extensions', () => {
|
||||
res.end(emptyPage);
|
||||
});
|
||||
|
||||
wss = new WebSocket.Server({ noServer: true });
|
||||
const wss = new WebSocket.Server({ noServer: true });
|
||||
wss.on('connection', function connection (ws) {
|
||||
ws.on('message', function incoming (message) {
|
||||
if (message === 'foo') {
|
||||
@@ -43,10 +42,8 @@ describe('chrome extensions', () => {
|
||||
|
||||
({ port, url } = await listen(server));
|
||||
});
|
||||
after(async () => {
|
||||
after(() => {
|
||||
server.close();
|
||||
wss.close();
|
||||
await cleanupWebContents();
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
afterEach(() => {
|
||||
@@ -286,10 +283,6 @@ describe('chrome extensions', () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { session: customSession, nodeIntegration: true, contextIsolation: false } });
|
||||
await w.loadURL(url);
|
||||
});
|
||||
afterEach(() => {
|
||||
w.close();
|
||||
w = null as unknown as BrowserWindow;
|
||||
});
|
||||
it('getAcceptLanguages()', async () => {
|
||||
const result = await exec('getAcceptLanguages');
|
||||
expect(result).to.be.an('array').and.deep.equal(['en-US', 'en']);
|
||||
@@ -315,10 +308,6 @@ describe('chrome extensions', () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { session: customSession, nodeIntegration: true, contextIsolation: false } });
|
||||
await w.loadURL(url);
|
||||
});
|
||||
afterEach(async () => {
|
||||
w.close();
|
||||
w = null as unknown as BrowserWindow;
|
||||
});
|
||||
it('getManifest()', async () => {
|
||||
const result = await exec('getManifest');
|
||||
expect(result).to.be.an('object').with.property('name', 'chrome-runtime');
|
||||
@@ -369,11 +358,6 @@ describe('chrome extensions', () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { session: customSession, sandbox: true, contextIsolation: true } });
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
w.close();
|
||||
w = null as unknown as BrowserWindow;
|
||||
});
|
||||
|
||||
describe('onBeforeRequest', () => {
|
||||
async function haveRejectedFetch () {
|
||||
try {
|
||||
@@ -442,7 +426,6 @@ describe('chrome extensions', () => {
|
||||
customSession = session.fromPartition(`persist:${uuid.v4()}`);
|
||||
await customSession.loadExtension(path.join(fixtures, 'extensions', 'chrome-api'));
|
||||
});
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
it('executeScript', async () => {
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { session: customSession, nodeIntegration: true } });
|
||||
@@ -509,7 +492,6 @@ describe('chrome extensions', () => {
|
||||
});
|
||||
|
||||
describe('background pages', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('loads a lazy background page when sending a message', async () => {
|
||||
const customSession = session.fromPartition(`persist:${uuid.v4()}`);
|
||||
await customSession.loadExtension(path.join(fixtures, 'extensions', 'lazy-background-page'));
|
||||
@@ -577,9 +559,8 @@ describe('chrome extensions', () => {
|
||||
|
||||
describe('devtools extensions', () => {
|
||||
let showPanelTimeoutId: any = null;
|
||||
afterEach(async () => {
|
||||
afterEach(() => {
|
||||
if (showPanelTimeoutId) clearTimeout(showPanelTimeoutId);
|
||||
await closeAllWindows();
|
||||
});
|
||||
const showLastDevToolsPanel = (w: BrowserWindow) => {
|
||||
w.webContents.once('devtools-opened', () => {
|
||||
@@ -714,14 +695,13 @@ describe('chrome extensions', () => {
|
||||
}
|
||||
});
|
||||
|
||||
({ port } = await listen(server));
|
||||
({ port, url } = await listen(server));
|
||||
|
||||
session.defaultSession.loadExtension(contentScript);
|
||||
});
|
||||
|
||||
after(() => {
|
||||
session.defaultSession.removeExtension('content-script-test');
|
||||
server.close();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -778,11 +758,10 @@ describe('chrome extensions', () => {
|
||||
});
|
||||
|
||||
describe('extension ui pages', () => {
|
||||
afterEach(async () => {
|
||||
afterEach(() => {
|
||||
for (const e of session.defaultSession.getAllExtensions()) {
|
||||
session.defaultSession.removeExtension(e.id);
|
||||
}
|
||||
await closeAllWindows();
|
||||
});
|
||||
|
||||
it('loads a ui page of an extension', async () => {
|
||||
@@ -803,7 +782,6 @@ describe('chrome extensions', () => {
|
||||
});
|
||||
|
||||
describe('manifest v3', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('registers background service worker', async () => {
|
||||
const customSession = session.fromPartition(`persist:${uuid.v4()}`);
|
||||
const registrationPromise = new Promise<string>(resolve => {
|
||||
@@ -1055,7 +1033,6 @@ describe('chrome extensions', () => {
|
||||
});
|
||||
|
||||
describe('get', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('returns tab properties', async () => {
|
||||
await w.loadURL(url);
|
||||
|
||||
@@ -1196,7 +1173,6 @@ describe('chrome extensions', () => {
|
||||
});
|
||||
|
||||
describe('query', () => {
|
||||
afterEach(closeAllWindows);
|
||||
it('can query for a tab with specific properties', async () => {
|
||||
await w.loadURL(url);
|
||||
|
||||
|
||||
6
spec/fixtures/pages/zoom-factor.html
vendored
6
spec/fixtures/pages/zoom-factor.html
vendored
@@ -1,10 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
if (typeof require !== 'undefined') {
|
||||
const {ipcRenderer, webFrame} = require('electron')
|
||||
ipcRenderer.send('webview-parent-zoom-level', webFrame.getZoomFactor(), webFrame.getZoomLevel())
|
||||
}
|
||||
const {ipcRenderer, webFrame} = require('electron')
|
||||
ipcRenderer.send('webview-parent-zoom-level', webFrame.getZoomFactor(), webFrame.getZoomLevel())
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user