mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
75 Commits
ci/docs-on
...
patch-meta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52e4d773c8 | ||
|
|
d3a1965cf2 | ||
|
|
6e2be00f0f | ||
|
|
497b5a68a4 | ||
|
|
715808ecbe | ||
|
|
01cab978f7 | ||
|
|
7cb1552614 | ||
|
|
49c37b4daa | ||
|
|
37a115b8fd | ||
|
|
e7e29ea876 | ||
|
|
b40a4befd4 | ||
|
|
61a7303531 | ||
|
|
6f9cd718c4 | ||
|
|
a95180e080 | ||
|
|
d4a5fdc8fc | ||
|
|
3a7c6dd4a5 | ||
|
|
26e886c517 | ||
|
|
26a473db98 | ||
|
|
6661457cdf | ||
|
|
b51e82c5fb | ||
|
|
235fdc41f6 | ||
|
|
6bbbc1232e | ||
|
|
49335805d5 | ||
|
|
b27e721f69 | ||
|
|
1fda08b8c8 | ||
|
|
19256a07dd | ||
|
|
f62d7254c4 | ||
|
|
c7aa0b537d | ||
|
|
048d620701 | ||
|
|
15cdae1cf0 | ||
|
|
bac383c219 | ||
|
|
49eb165ef9 | ||
|
|
a468ed7f10 | ||
|
|
5444738721 | ||
|
|
a6959ca97b | ||
|
|
45353ae38c | ||
|
|
f702327dce | ||
|
|
fda3a3d493 | ||
|
|
dae5dad167 | ||
|
|
940ebb6c7a | ||
|
|
793565e4be | ||
|
|
1f322ebce3 | ||
|
|
f009e077f2 | ||
|
|
fed73040e2 | ||
|
|
828fd59a72 | ||
|
|
e892840975 | ||
|
|
7373173e44 | ||
|
|
5d5e672f17 | ||
|
|
e39943bf45 | ||
|
|
f331606e07 | ||
|
|
cca55117e4 | ||
|
|
bf29d2f0bd | ||
|
|
fea1a2a987 | ||
|
|
a51c56aca9 | ||
|
|
89f25e6af3 | ||
|
|
e0db4046b2 | ||
|
|
3b9130d815 | ||
|
|
52ed4646d9 | ||
|
|
68098c317f | ||
|
|
52e0307cc1 | ||
|
|
7fffe77909 | ||
|
|
3ccb1bc0a8 | ||
|
|
0917ed5f6f | ||
|
|
a67aad0f50 | ||
|
|
ceb6d28fd3 | ||
|
|
e12ab6708e | ||
|
|
6101025368 | ||
|
|
97b0280ad4 | ||
|
|
1044fe675d | ||
|
|
42af60cc7e | ||
|
|
cadba11088 | ||
|
|
8aeee3f714 | ||
|
|
dd54e84a58 | ||
|
|
d4b7d9e9cf | ||
|
|
83a5ba1e2c |
72
.github/actions/build-electron/action.yml
vendored
72
.github/actions/build-electron/action.yml
vendored
@@ -17,9 +17,6 @@ inputs:
|
||||
is-release:
|
||||
description: 'Is release build'
|
||||
required: true
|
||||
strip-binaries:
|
||||
description: 'Strip binaries (Linux only)'
|
||||
required: false
|
||||
generate-symbols:
|
||||
description: 'Generate symbols'
|
||||
required: true
|
||||
@@ -63,22 +60,14 @@ runs:
|
||||
sudo launchctl limit maxfiles 65536 200000
|
||||
fi
|
||||
|
||||
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
|
||||
NINJA_SUMMARIZE_BUILD=1 e build
|
||||
cp out/Default/.ninja_log out/electron_ninja_log
|
||||
node electron/script/check-symlinks.js
|
||||
- name: Strip Electron Binaries ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.strip-binaries == 'true' }}
|
||||
run: |
|
||||
cd src
|
||||
electron/script/copy-debug-symbols.py --target-cpu="${{ inputs.target-arch }}" --out-dir=out/Default/debug --compress
|
||||
electron/script/strip-binaries.py --target-cpu="${{ inputs.target-arch }}" --verbose
|
||||
electron/script/add-debug-link.py --target-cpu="${{ inputs.target-arch }}" --debug-dir=out/Default/debug
|
||||
- name: Build Electron dist.zip ${{ inputs.step-suffix }}
|
||||
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
|
||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
|
||||
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
||||
@@ -90,7 +79,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_mksnapshot
|
||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
# Remove unused args from mksnapshot_args
|
||||
SEDOPTION="-i"
|
||||
@@ -100,20 +89,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 [ "${{ 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
|
||||
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator
|
||||
else
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
|
||||
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
|
||||
fi
|
||||
fi
|
||||
|
||||
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_mksnapshot_zip
|
||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||
cd out/Default
|
||||
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
||||
@@ -147,7 +123,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e build --target electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:electron_chromedriver
|
||||
e build --target electron:electron_chromedriver_zip
|
||||
|
||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||
@@ -198,24 +174,24 @@ runs:
|
||||
electron/script/zip-symbols.py -b $BUILD_PATH
|
||||
fi
|
||||
- name: Generate FFMpeg ${{ inputs.step-suffix }}
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
run: |
|
||||
cd src
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
|
||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
|
||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
|
||||
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
e build --target electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:hunspell_dictionaries_zip
|
||||
- name: Generate Libcxx ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
|
||||
run: |
|
||||
e build --target electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxx_headers_zip
|
||||
e build --target electron:libcxxabi_headers_zip
|
||||
e build --target electron:libcxx_objects_zip
|
||||
- name: Remove Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::remove-matcher owner=clang::"
|
||||
@@ -238,7 +214,29 @@ runs:
|
||||
echo 'Uploading Electron release distribution to GitHub releases'
|
||||
script/release/uploaders/upload.py --verbose
|
||||
fi
|
||||
- name: Generate siso report
|
||||
if: ${{ inputs.target-platform != 'win' && !cancelled() }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd src
|
||||
e d siso report -C out/Default > siso_report.txt
|
||||
SISO_REPORT_PATH=$(grep -o '/.*siso-report-[^ ]*' siso_report.txt)
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $GITHUB_ENV
|
||||
cat siso_report.txt
|
||||
echo "SISO REPORT AT $SISO_REPORT_PATH"
|
||||
- name: Generate siso report (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' && !cancelled() }}
|
||||
shell: powershell
|
||||
run: |
|
||||
cd src
|
||||
e d siso report -C out\Default > siso_report.txt
|
||||
$SISO_REPORT_PATH = Get-Content "siso_report.txt" | Select-String "report file:\s*(.+)" | ForEach-Object {
|
||||
$_.Matches.Groups[1].Value.Trim()
|
||||
}
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH"
|
||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $env:GITHUB_ENV
|
||||
- name: Generate Artifact Key
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ inputs.is-asan }}" = "true" ]; then
|
||||
@@ -250,9 +248,11 @@ runs:
|
||||
# The current generated_artifacts_<< artifact.key >> name was taken from CircleCI
|
||||
# to ensure we don't break anything, but we may be able to improve that.
|
||||
- name: Move all Generated Artifacts to Upload Folder ${{ inputs.step-suffix }}
|
||||
if: always() && !cancelled()
|
||||
shell: bash
|
||||
run: ./src/electron/script/actions/move-artifacts.sh
|
||||
- name: Upload Generated Artifacts ${{ inputs.step-suffix }}
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
with:
|
||||
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
||||
|
||||
1
.github/actions/checkout/action.yml
vendored
1
.github/actions/checkout/action.yml
vendored
@@ -172,7 +172,6 @@ runs:
|
||||
run: |
|
||||
rm -rf src/android_webview
|
||||
rm -rf src/ios/chrome
|
||||
rm -rf src/third_party/blink/web_tests
|
||||
rm -rf src/third_party/blink/perf_tests
|
||||
rm -rf src/chrome/test/data/xr/webvr_info
|
||||
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
||||
|
||||
17
.github/actions/cipd-install/action.yml
vendored
17
.github/actions/cipd-install/action.yml
vendored
@@ -14,6 +14,9 @@ inputs:
|
||||
description: 'Target platform, should be linux, win, macos'
|
||||
package:
|
||||
description: 'Package to install'
|
||||
dependency-version:
|
||||
description: 'Version of the dependency to install'
|
||||
default: ''
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -22,15 +25,23 @@ runs:
|
||||
run : |
|
||||
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
|
||||
- name: Create ensure file for ${{ inputs.dependency }}
|
||||
if: ${{ inputs.dependency-version == '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo '${{ inputs.package }}' `e d gclient getdep --deps-file=${{ inputs.deps-file }} -r '${{ inputs.installation-dir }}:${{ inputs.package }}'` > ${{ inputs.dependency }}_ensure_file
|
||||
cat ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
|
||||
- name: Create ensure file for ${{ inputs.dependency }} from dependency-version
|
||||
if: ${{ inputs.dependency-version != '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }} on macOS"
|
||||
echo '${{ inputs.package }} ${{ inputs.dependency-version }}' > ${{ inputs.dependency }}_ensure_file
|
||||
cat ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
|
||||
if: ${{ inputs.target-platform != 'win' }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "ensuring ${{ inputs.dependency }}"
|
||||
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
|
||||
- name: CIPD installation of ${{ inputs.dependency }} (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
|
||||
16
.github/actions/fix-sync/action.yml
vendored
16
.github/actions/fix-sync/action.yml
vendored
@@ -20,6 +20,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fix llvm toolchain
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/llvm-build
|
||||
@@ -27,6 +28,7 @@ runs:
|
||||
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681
|
||||
python3 src/tools/clang/scripts/update.py --package objdump
|
||||
- name: Fix esbuild
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
|
||||
@@ -36,6 +38,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/esbuild/${platform}
|
||||
- name: Fix rustc
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
rm -rf src/third_party/rust-toolchain
|
||||
@@ -59,6 +62,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: gn/gn/windows-amd64
|
||||
- name: Fix reclient
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: reclient
|
||||
@@ -67,6 +71,7 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/rbe/client/${platform}
|
||||
- name: Configure reclient configs
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
||||
@@ -84,6 +89,7 @@ runs:
|
||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||
fi
|
||||
- name: Fix ninja
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: ninja
|
||||
@@ -92,10 +98,20 @@ runs:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: infra/3pp/tools/ninja/${platform}
|
||||
- name: Set ninja in path
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
||||
- name: Fix siso
|
||||
uses: ./src/electron/.github/actions/cipd-install
|
||||
with:
|
||||
dependency: siso
|
||||
deps-file: src/DEPS
|
||||
installation-dir: src/third_party/siso/cipd
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
package: build/siso/${platform}
|
||||
- name: Fixup angle git
|
||||
if: ${{ inputs.target-platform != 'linux' }}
|
||||
shell: bash
|
||||
run : |
|
||||
cd src/third_party/angle
|
||||
|
||||
@@ -13,8 +13,9 @@ runs:
|
||||
git config --global core.fscache true
|
||||
git config --global core.longpaths true
|
||||
git config --global core.preloadindex true
|
||||
git config --global core.longpaths true
|
||||
fi
|
||||
export BUILD_TOOLS_SHA=274cba0474f0d1e4e6adbb66c1da48556cb0add5
|
||||
export BUILD_TOOLS_SHA=c13f4bdb50e65da46a4703f8f882079dd21fd99e
|
||||
npm i -g @electron/build-tools
|
||||
# Update depot_tools to ensure python
|
||||
e d update_depot_tools
|
||||
|
||||
@@ -97,7 +97,7 @@ runs:
|
||||
|
||||
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
||||
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
||||
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld x $src_cache -o"$TEMP_DIR_PATH"
|
||||
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld20 x $src_cache -o"$TEMP_DIR_PATH"
|
||||
|
||||
- name: Move Src Cache (Windows)
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
|
||||
2
.github/workflows/archaeologist-dig.yml
vendored
2
.github/workflows/archaeologist-dig.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
- name: Setting Up Dig Site
|
||||
|
||||
2
.github/workflows/audit-branch-ci.yml
vendored
2
.github/workflows/audit-branch-ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
||||
with:
|
||||
node-version: 22.17.x
|
||||
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
|
||||
|
||||
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -86,11 +86,11 @@ jobs:
|
||||
|
||||
# Docs Only Jobs
|
||||
docs-only:
|
||||
needs: setup
|
||||
needs: [setup, checkout-linux]
|
||||
if: ${{ needs.setup.outputs.docs-only == 'true' }}
|
||||
uses: ./.github/workflows/pipeline-electron-docs-only.yml
|
||||
with:
|
||||
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
||||
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"]}'
|
||||
secrets: inherit
|
||||
|
||||
# Checkout Jobs
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
|
||||
checkout-linux:
|
||||
needs: setup
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-linux}}
|
||||
if: ${{ !inputs.skip-linux}}
|
||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
container:
|
||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||
@@ -196,6 +196,7 @@ jobs:
|
||||
linux-gn-check:
|
||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
target-platform: linux
|
||||
target-archs: x64 arm arm64
|
||||
@@ -225,7 +226,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
test-runs-on: macos-13
|
||||
test-runs-on: macos-15-large
|
||||
target-platform: macos
|
||||
target-arch: x64
|
||||
is-release: false
|
||||
@@ -244,7 +245,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
test-runs-on: macos-14
|
||||
test-runs-on: macos-15
|
||||
target-platform: macos
|
||||
target-arch: arm64
|
||||
is-release: false
|
||||
@@ -261,6 +262,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
||||
@@ -281,6 +283,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
||||
@@ -302,6 +305,7 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-arm64-4core
|
||||
@@ -322,9 +326,10 @@ jobs:
|
||||
pull-requests: read
|
||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||
needs: checkout-linux
|
||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
||||
test-runs-on: electron-arc-centralus-linux-arm64-4core
|
||||
test-runs-on: ubuntu-22.04-arm
|
||||
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"}'
|
||||
target-platform: linux
|
||||
@@ -383,7 +388,7 @@ jobs:
|
||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||
with:
|
||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
||||
test-runs-on: electron-hosted-windows-arm64-4core
|
||||
test-runs-on: windows-11-arm
|
||||
target-platform: win
|
||||
target-arch: arm64
|
||||
is-release: false
|
||||
|
||||
3
.github/workflows/linux-publish.yml
vendored
3
.github/workflows/linux-publish.yml
vendored
@@ -50,7 +50,6 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -66,7 +65,6 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -82,6 +80,5 @@ jobs:
|
||||
is-release: true
|
||||
gn-build-type: release
|
||||
generate-symbols: true
|
||||
strip-binaries: true
|
||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -12,6 +12,9 @@ concurrency:
|
||||
group: electron-docs-only-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GCLIENT_EXTRA_ARGS: --custom-var=checkout_arm=True --custom-var=checkout_arm64=True
|
||||
|
||||
jobs:
|
||||
docs-only:
|
||||
name: Docs Only Compile
|
||||
@@ -19,6 +22,22 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Generate DEPS Hash
|
||||
run: |
|
||||
node src/electron/script/generate-deps-hash.js
|
||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||
- name: Restore src cache via AKS
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
with:
|
||||
target-platform: linux
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
|
||||
@@ -48,11 +48,6 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
default: '0'
|
||||
strip-binaries:
|
||||
description: 'Strip the binaries before release (Linux only)'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
is-asan:
|
||||
description: 'Building the Address Sanitizer (ASan) Linux build'
|
||||
required: false
|
||||
@@ -118,7 +113,7 @@ jobs:
|
||||
run: df -h
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
cache: yarn
|
||||
@@ -176,7 +171,7 @@ jobs:
|
||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG: true
|
||||
- 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 }}
|
||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --remote-build siso
|
||||
- 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}]"
|
||||
@@ -186,9 +181,6 @@ jobs:
|
||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Setup Number of Ninja Processes
|
||||
run: |
|
||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||
- name: Free up space (macOS)
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: ./src/electron/.github/actions/free-space-macos
|
||||
@@ -201,7 +193,6 @@ jobs:
|
||||
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
|
||||
is-release: '${{ inputs.is-release }}'
|
||||
generate-symbols: '${{ inputs.generate-symbols }}'
|
||||
strip-binaries: '${{ inputs.strip-binaries }}'
|
||||
upload-to-storage: '${{ inputs.upload-to-storage }}'
|
||||
is-asan: '${{ inputs.is-asan }}'
|
||||
- name: Set GN_EXTRA_ARGS for MAS Build
|
||||
|
||||
@@ -68,29 +68,15 @@ jobs:
|
||||
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
|
||||
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
|
||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
|
||||
with:
|
||||
node-version: 20.19.x
|
||||
- name: Add TCC permissions on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
|
||||
configure_user_tccdb () {
|
||||
local values=$1
|
||||
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
|
||||
@@ -111,11 +97,12 @@ jobs:
|
||||
"'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceCamera','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceBluetoothAlways','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||
"'kTCCServiceScreenCapture','/bin/bash',1,2,3,1,NULL,NULL,NULL,'UNUSED',NULL,0,$epochdate"
|
||||
)
|
||||
for values in "${userValuesArray[@]}"; do
|
||||
# Sonoma and higher have a few extra values
|
||||
# Ref: https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-tccdb-macos.sh
|
||||
if [ "$OSTYPE" = "darwin23" ]; then
|
||||
if [ "$OSTYPE" = "darwin23" ] || [ "$OSTYPE" = "darwin24" ]; then
|
||||
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
configure_sys_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||
else
|
||||
@@ -126,12 +113,21 @@ jobs:
|
||||
- name: Turn off the unexpectedly quit dialog on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: defaults write com.apple.CrashReporter DialogType server
|
||||
- name: Set xcode to 16.4
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Turn off screenshot nag on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
|
||||
src/electron/script/actions/screencapture-nag-remover.sh -a $(which bash)
|
||||
src/electron/script/actions/screencapture-nag-remover.sh -a /opt/hca/hosted-compute-agent
|
||||
- name: Setup SSH Debugging
|
||||
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh || env.ACTIONS_STEP_DEBUG == 'true') }}
|
||||
uses: ./src/electron/.github/actions/ssh-debug
|
||||
@@ -156,6 +152,7 @@ jobs:
|
||||
git config --global core.fscache true
|
||||
git config --global core.longpaths true
|
||||
git config --global core.preloadindex true
|
||||
git config --global core.longpaths true
|
||||
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
|
||||
@@ -196,12 +193,12 @@ jobs:
|
||||
unzip -:o dist.zip
|
||||
unzip -:o chromedriver.zip
|
||||
unzip -:o mksnapshot.zip
|
||||
- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
||||
if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
||||
run: |
|
||||
sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||
cd src/electron
|
||||
./script/codesign/generate-identity.sh
|
||||
#- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
||||
# if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
||||
# run: |
|
||||
# sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||
# cd src/electron
|
||||
# ./script/codesign/generate-identity.sh
|
||||
- name: Install Datadog CLI
|
||||
run: |
|
||||
cd src/electron
|
||||
@@ -231,7 +228,7 @@ jobs:
|
||||
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
|
||||
fi
|
||||
fi
|
||||
node script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
||||
node script/yarn test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
|
||||
else
|
||||
chown :builduser .. && chmod g+w ..
|
||||
chown -R :builduser . && chmod -R g+w .
|
||||
|
||||
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
@@ -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@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.29.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
.github/workflows/semantic.yml
vendored
2
.github/workflows/semantic.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: semantic-pull-request
|
||||
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
|
||||
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
101
BUILD.gn
101
BUILD.gn
@@ -44,6 +44,7 @@ if (is_mac) {
|
||||
|
||||
if (is_linux) {
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//electron/build/linux/strip_binary.gni")
|
||||
import("//tools/generate_stubs/rules.gni")
|
||||
|
||||
pkg_config("gio_unix") {
|
||||
@@ -654,6 +655,7 @@ source_set("electron_lib") {
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gtk:gtk_config",
|
||||
"//ui/linux:display_server_utils",
|
||||
"//ui/linux:linux_ui",
|
||||
"//ui/linux:linux_ui_factory",
|
||||
"//ui/wm",
|
||||
@@ -686,7 +688,7 @@ source_set("electron_lib") {
|
||||
deps += [
|
||||
"//components/app_launch_prefetch",
|
||||
"//components/crash/core/app:crash_export_thunks",
|
||||
"//ui/native_theme:native_theme_browser",
|
||||
"//third_party/libxml:xml_writer",
|
||||
"//ui/wm",
|
||||
"//ui/wm/public",
|
||||
]
|
||||
@@ -1425,6 +1427,18 @@ dist_zip("electron_dist_zip") {
|
||||
":licenses",
|
||||
]
|
||||
if (is_linux) {
|
||||
if (is_official_build) {
|
||||
data_deps += [
|
||||
":strip_chrome_crashpad_handler",
|
||||
":strip_chrome_sandbox",
|
||||
":strip_electron_binary",
|
||||
":strip_libEGL_shlib",
|
||||
":strip_libGLESv2_shlib",
|
||||
":strip_libffmpeg_shlib",
|
||||
":strip_libvk_swiftshader_shlib",
|
||||
]
|
||||
}
|
||||
|
||||
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
|
||||
}
|
||||
deps = data_deps
|
||||
@@ -1470,6 +1484,16 @@ group("electron_mksnapshot") {
|
||||
|
||||
dist_zip("electron_mksnapshot_zip") {
|
||||
data_deps = mksnapshot_deps
|
||||
if (is_linux && is_official_build) {
|
||||
data_deps += [
|
||||
":strip_libEGL_shlib",
|
||||
":strip_libGLESv2_shlib",
|
||||
":strip_libffmpeg_shlib",
|
||||
":strip_libvk_swiftshader_shlib",
|
||||
":strip_mksnapshot_binary",
|
||||
":strip_v8_context_snapshot_generator_binary",
|
||||
]
|
||||
}
|
||||
deps = data_deps
|
||||
outputs = [ "$root_build_dir/mksnapshot.zip" ]
|
||||
}
|
||||
@@ -1594,3 +1618,78 @@ group("copy_node_headers") {
|
||||
group("node_headers") {
|
||||
public_deps = [ ":tar_node_headers" ]
|
||||
}
|
||||
|
||||
if (is_linux && is_official_build) {
|
||||
strip_binary("strip_electron_binary") {
|
||||
binary_input = "$root_out_dir/$electron_project_name"
|
||||
symbol_output = "$root_out_dir/debug/$electron_project_name.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ ":electron_app" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_chrome_crashpad_handler") {
|
||||
binary_input = "$root_out_dir/chrome_crashpad_handler"
|
||||
symbol_output = "$root_out_dir/debug/chrome_crashpad_handler.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_chrome_sandbox") {
|
||||
binary_input = "$root_out_dir/chrome_sandbox"
|
||||
symbol_output = "$root_out_dir/debug/chrome-sandbox.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//sandbox/linux:chrome_sandbox" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libEGL_shlib") {
|
||||
binary_input = "$root_out_dir/libEGL.so"
|
||||
symbol_output = "$root_out_dir/debug/libEGL.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/angle:libEGL" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libGLESv2_shlib") {
|
||||
binary_input = "$root_out_dir/libGLESv2.so"
|
||||
symbol_output = "$root_out_dir/debug/libGLESv2.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/angle:libGLESv2" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libffmpeg_shlib") {
|
||||
binary_input = "$root_out_dir/libffmpeg.so"
|
||||
symbol_output = "$root_out_dir/debug/libffmpeg.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/ffmpeg" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_libvk_swiftshader_shlib") {
|
||||
binary_input = "$root_out_dir/libvk_swiftshader.so"
|
||||
symbol_output = "$root_out_dir/debug/libvk_swiftshader.so.debug"
|
||||
compress_debug_sections = true
|
||||
deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ]
|
||||
}
|
||||
|
||||
strip_binary("strip_mksnapshot_binary") {
|
||||
_binary_path = rebase_path(
|
||||
get_label_info(
|
||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
"root_out_dir") + "/mksnapshot",
|
||||
root_build_dir)
|
||||
binary_input = "$root_out_dir/$_binary_path"
|
||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
compress_debug_sections = true
|
||||
deps = mksnapshot_deps
|
||||
}
|
||||
|
||||
strip_binary("strip_v8_context_snapshot_generator_binary") {
|
||||
_binary_path = rebase_path(
|
||||
get_label_info(
|
||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
||||
"root_out_dir") + "/v8_context_snapshot_generator",
|
||||
root_build_dir)
|
||||
binary_input = "$root_out_dir/$_binary_path"
|
||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
||||
compress_debug_sections = true
|
||||
deps = mksnapshot_deps
|
||||
}
|
||||
}
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'141.0.7350.0',
|
||||
'142.0.7417.0',
|
||||
'node_version':
|
||||
'v22.18.0',
|
||||
'v22.19.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||
node_module_version = 139
|
||||
node_module_version = 140
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -70,6 +70,8 @@ v8_expose_public_symbols = true
|
||||
# sensitive content by enterprise users.
|
||||
enterprise_cloud_content_analysis = false
|
||||
|
||||
# Disable siso until we are ready to use it.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/6638830
|
||||
use_siso = false
|
||||
# We don't use anything from here, and it causes target collisions
|
||||
enable_linux_installer = false
|
||||
|
||||
# Disable "Save to Drive" feature in PDF viewer
|
||||
enable_pdf_save_to_drive = false
|
||||
|
||||
@@ -12,7 +12,7 @@ TEMPLATE_H = """
|
||||
|
||||
namespace electron::snapshot_checksum {
|
||||
|
||||
const std::string kChecksum = "{checksum}";
|
||||
inline constexpr std::string_view kChecksum = "{checksum}";
|
||||
|
||||
} // namespace electron::snapshot_checksum
|
||||
|
||||
|
||||
70
build/linux/strip_binary.gni
Normal file
70
build/linux/strip_binary.gni
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright 2021 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.gni;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
||||
# The notable difference is it has an option to compress the debug sections
|
||||
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
# Extracts symbols from a binary into a symbol file.
|
||||
#
|
||||
# Args:
|
||||
# binary_input: Path to the binary containing symbols to extract, e.g.:
|
||||
# "$root_out_dir/chrome"
|
||||
# symbol_output: Desired output file for symbols, e.g.:
|
||||
# "$root_out_dir/chrome.debug"
|
||||
# stripped_binary_output: Desired output file for stripped file, e.g.:
|
||||
# "$root_out_dir/chrome.stripped"
|
||||
# compress_debug_sections: If true, compress the extracted debug sections
|
||||
template("strip_binary") {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"deps",
|
||||
"testonly",
|
||||
])
|
||||
action("${target_name}") {
|
||||
llvm_strip_binary = "${clang_base_path}/bin/llvm-strip"
|
||||
llvm_objcopy_binary = "${clang_base_path}/bin/llvm-objcopy"
|
||||
script = "//electron/build/linux/strip_binary.py"
|
||||
|
||||
if (defined(invoker.stripped_binary_output)) {
|
||||
stripped_binary_output = invoker.stripped_binary_output
|
||||
} else {
|
||||
stripped_binary_output = invoker.binary_input + ".stripped"
|
||||
}
|
||||
if (defined(invoker.symbol_output)) {
|
||||
symbol_output = invoker.symbol_output
|
||||
} else {
|
||||
symbol_output = invoker.binary_input + ".debug"
|
||||
}
|
||||
|
||||
inputs = [
|
||||
invoker.binary_input,
|
||||
llvm_strip_binary,
|
||||
llvm_objcopy_binary,
|
||||
]
|
||||
outputs = [
|
||||
symbol_output,
|
||||
stripped_binary_output,
|
||||
]
|
||||
args = [
|
||||
"--llvm-strip-binary-path",
|
||||
rebase_path(llvm_strip_binary, root_build_dir),
|
||||
"--llvm-objcopy-binary-path",
|
||||
rebase_path(llvm_objcopy_binary, root_build_dir),
|
||||
"--symbol-output",
|
||||
rebase_path(symbol_output, root_build_dir),
|
||||
"--stripped-binary-output",
|
||||
rebase_path(stripped_binary_output, root_build_dir),
|
||||
"--binary-input",
|
||||
rebase_path(invoker.binary_input, root_build_dir),
|
||||
]
|
||||
|
||||
if (defined(invoker.compress_debug_sections) &&
|
||||
invoker.compress_debug_sections) {
|
||||
args += [ "--compress-debug-sections" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
63
build/linux/strip_binary.py
Normal file
63
build/linux/strip_binary.py
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright 2021 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.py;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
||||
# The notable difference is it has an option to compress the debug sections
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.")
|
||||
parser.add_argument("--llvm-strip-binary-path",
|
||||
help="Path to llvm-strip executable.")
|
||||
parser.add_argument("--llvm-objcopy-binary-path",
|
||||
required=True,
|
||||
help="Path to llvm-objcopy executable.")
|
||||
parser.add_argument("--binary-input", help="Input ELF binary.")
|
||||
parser.add_argument("--symbol-output",
|
||||
help="File to write extracted debug info (.debug).")
|
||||
parser.add_argument("--compress-debug-sections",
|
||||
action="store_true",
|
||||
help="Compress extracted debug info.")
|
||||
parser.add_argument("--stripped-binary-output",
|
||||
help="File to write stripped binary.")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Replicate the behavior of:
|
||||
# eu-strip <binary_input> -o <stripped_binary_output> -f <symbol_output>
|
||||
|
||||
objcopy_args = [
|
||||
"--only-keep-debug",
|
||||
args.binary_input,
|
||||
args.symbol_output,
|
||||
]
|
||||
|
||||
if args.compress_debug_sections:
|
||||
objcopy_args.insert(0, "--compress-debug-sections")
|
||||
|
||||
subprocess.check_output([args.llvm_objcopy_binary_path] + objcopy_args)
|
||||
subprocess.check_output([
|
||||
args.llvm_strip_binary_path,
|
||||
"--strip-debug",
|
||||
"--strip-unneeded",
|
||||
"-o",
|
||||
args.stripped_binary_output,
|
||||
args.binary_input,
|
||||
])
|
||||
subprocess.check_output([
|
||||
args.llvm_objcopy_binary_path,
|
||||
f"--add-gnu-debuglink={args.symbol_output}",
|
||||
args.stripped_binary_output,
|
||||
])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -3,7 +3,7 @@
|
||||
load("@builtin//struct.star", "module")
|
||||
|
||||
def __platform_properties(ctx):
|
||||
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:ef35d347f4a4a2d32b76fd908e66e96f59bf8ba7379fd5626548244c45343b2b"
|
||||
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:d7cb1ab14a0f20aa669c23f22c15a9dead761dcac19f43985bf9dd5f41fbef3a"
|
||||
return {
|
||||
"default": {
|
||||
"OSFamily": "Linux",
|
||||
|
||||
66
build/siso/main.star
Normal file
66
build/siso/main.star
Normal file
@@ -0,0 +1,66 @@
|
||||
load("@builtin//encoding.star", "json")
|
||||
load("@builtin//path.star", "path")
|
||||
load("@builtin//runtime.star", "runtime")
|
||||
load("@builtin//struct.star", "module")
|
||||
load("@config//main.star", upstream_init = "init")
|
||||
load("@config//win_sdk.star", "win_sdk")
|
||||
load("@config//gn_logs.star", "gn_logs")
|
||||
|
||||
def init(ctx):
|
||||
mod = upstream_init(ctx)
|
||||
step_config = json.decode(mod.step_config)
|
||||
|
||||
# Buildbarn doesn't support input_root_absolute_path so disable that
|
||||
for rule in step_config["rules"]:
|
||||
input_root_absolute_path = rule.get("input_root_absolute_path", False)
|
||||
if input_root_absolute_path:
|
||||
rule.pop("input_root_absolute_path", None)
|
||||
|
||||
# Only wrap clang rules with a remote wrapper if not on Linux. These are currently only
|
||||
# needed for X-Compile builds, which run on Windows and Mac.
|
||||
if runtime.os != "linux":
|
||||
for rule in step_config["rules"]:
|
||||
if rule["name"].startswith("clang/") or rule["name"].startswith("clang-cl/"):
|
||||
rule["remote_wrapper"] = "../../buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper"
|
||||
if "inputs" not in rule:
|
||||
rule["inputs"] = []
|
||||
rule["inputs"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
||||
rule["inputs"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
||||
|
||||
if "executables" not in step_config:
|
||||
step_config["executables"] = []
|
||||
step_config["executables"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
||||
step_config["executables"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
||||
|
||||
if runtime.os == "darwin":
|
||||
# Update platforms to match our default siso config instead of reclient configs.
|
||||
step_config["platforms"].update({
|
||||
"clang": step_config["platforms"]["default"],
|
||||
"clang_large": step_config["platforms"]["default"],
|
||||
})
|
||||
|
||||
if runtime.os == "windows":
|
||||
# Add additional Windows SDK headers needed by Electron
|
||||
win_toolchain_dir = win_sdk.toolchain_dir(ctx)
|
||||
if win_toolchain_dir:
|
||||
sdk_version = gn_logs.read(ctx).get("windows_sdk_version")
|
||||
step_config["input_deps"][win_toolchain_dir + ":headers"].extend([
|
||||
# third_party/electron_node/deps/uv/include/uv/win.h includes mswsock.h
|
||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/mswsock.h"),
|
||||
# third_party/electron_node/src/debug_utils.cc includes lm.h
|
||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/Lm.h"),
|
||||
])
|
||||
|
||||
# Update platforms to match our default siso config instead of reclient configs.
|
||||
step_config["platforms"].update({
|
||||
"clang-cl": step_config["platforms"]["default"],
|
||||
"clang-cl_large": step_config["platforms"]["default"],
|
||||
"lld-link": step_config["platforms"]["default"],
|
||||
})
|
||||
|
||||
return module(
|
||||
"config",
|
||||
step_config = json.encode(step_config),
|
||||
filegroups = mod.filegroups,
|
||||
handlers = mod.handlers,
|
||||
)
|
||||
12
build/zip.py
12
build/zip.py
@@ -41,6 +41,8 @@ PATHS_TO_SKIP = [
|
||||
'resources/inspector',
|
||||
'gen/third_party/devtools-frontend/src',
|
||||
'gen/ui/webui',
|
||||
# Skip because these get zipped separately in script/zip-symbols.py
|
||||
'debug',
|
||||
]
|
||||
|
||||
def skip_path(dep, dist_zip, target_cpu):
|
||||
@@ -80,6 +82,11 @@ def main(argv):
|
||||
dep = dep.strip()
|
||||
if not skip_path(dep, dist_zip, target_cpu):
|
||||
dist_files.add(dep)
|
||||
# On Linux, filter out any files which have a .stripped companion
|
||||
if sys.platform == 'linux':
|
||||
dist_files = {
|
||||
dep for dep in dist_files if f"{dep.removeprefix('./')}.stripped" not in dist_files
|
||||
}
|
||||
if sys.platform == 'darwin' and not should_flatten:
|
||||
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
|
||||
else:
|
||||
@@ -96,10 +103,13 @@ def main(argv):
|
||||
dirname = os.path.dirname(dep)
|
||||
arcname = (
|
||||
os.path.join(dirname, 'chrome-sandbox')
|
||||
if basename == 'chrome_sandbox'
|
||||
if basename.removesuffix('.stripped') == 'chrome_sandbox'
|
||||
else dep
|
||||
)
|
||||
name_to_write = arcname
|
||||
# On Linux, strip the .stripped suffix from the name before zipping
|
||||
if sys.platform == 'linux':
|
||||
name_to_write = name_to_write.removesuffix('.stripped')
|
||||
if should_flatten:
|
||||
if flatten_relative_to:
|
||||
if name_to_write.startswith(flatten_relative_to):
|
||||
|
||||
@@ -23,6 +23,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/browser_process.h",
|
||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
|
||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
|
||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.cc",
|
||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.h",
|
||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
|
||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
|
||||
"//chrome/browser/devtools/devtools_eye_dropper.cc",
|
||||
|
||||
@@ -1570,11 +1570,18 @@ events.
|
||||
|
||||
Prevents the window contents from being captured by other apps.
|
||||
|
||||
On macOS it sets the NSWindow's [`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc) to [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
|
||||
On Windows it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
|
||||
On Windows, it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
|
||||
For Windows 10 version 2004 and up the window will be removed from capture entirely,
|
||||
older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
|
||||
|
||||
On macOS, it sets the `NSWindow`'s
|
||||
[`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc)
|
||||
to
|
||||
[`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
|
||||
Unfortunately, due to an intentional change in macOS, newer Mac applications that use
|
||||
`ScreenCaptureKit` will capture your window despite `win.setContentProtection(true)`.
|
||||
See [here](https://github.com/electron/electron/issues/48258#issuecomment-3269893618).
|
||||
|
||||
#### `win.isContentProtected()` _macOS_ _Windows_
|
||||
|
||||
Returns `boolean` - whether or not content protection is currently enabled.
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
On Linux, there is also a `selection` clipboard. To manipulate it
|
||||
you need to pass `selection` to each method:
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ Field trials to be forcefully enabled or disabled.
|
||||
|
||||
For example: `WebRTC-Audio-Red-For-Opus/Enabled/`
|
||||
|
||||
### --host-rules=`rules`
|
||||
### --host-rules=`rules` _Deprecated_
|
||||
|
||||
A comma-separated list of `rules` that control how hostnames are mapped.
|
||||
|
||||
@@ -104,9 +104,23 @@ These mappings apply to the endpoint host in a net request (the TCP connect
|
||||
and host resolver in a direct connection, and the `CONNECT` in an HTTP proxy
|
||||
connection, and the endpoint host in a `SOCKS` proxy connection).
|
||||
|
||||
**Deprecated:** Use the `--host-resolver-rules` switch instead.
|
||||
|
||||
### --host-resolver-rules=`rules`
|
||||
|
||||
Like `--host-rules` but these `rules` only apply to the host resolver.
|
||||
A comma-separated list of `rules` that control how hostnames are mapped.
|
||||
|
||||
For example:
|
||||
|
||||
* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1
|
||||
* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to
|
||||
"proxy".
|
||||
* `MAP test.com [::1]:77` Forces "test.com" to resolve to IPv6 loopback. Will
|
||||
also force the port of the resulting socket address to be 77.
|
||||
* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for
|
||||
"www.google.com".
|
||||
|
||||
These `rules` only apply to the host resolver.
|
||||
|
||||
### --ignore-certificate-errors
|
||||
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
The following is an example of setting up Electron to automatically submit
|
||||
crash reports to a remote server:
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ changes:
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
The `ipcRenderer` module is an [EventEmitter][event-emitter]. It provides a few
|
||||
methods so you can send synchronous and asynchronous messages from the render
|
||||
process (web page) to the main process. You can also receive replies from the
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# MenuItem
|
||||
|
||||
## Class: MenuItem
|
||||
|
||||
> Add items to native application menus and context menus.
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
The `nativeImage` module provides a unified interface for manipulating
|
||||
system images. These can be handy if you want to provide multiple scaled
|
||||
versions of the same icon or take advantage of macOS [template images][template-image].
|
||||
|
||||
@@ -211,6 +211,10 @@ Returns `Object`:
|
||||
system.
|
||||
* `free` Integer - The total amount of memory not being used by applications or disk
|
||||
cache.
|
||||
* `fileBacked` Integer _macOS_ - The amount of memory that currently has been paged out to storage.
|
||||
Includes memory for file caches, network buffers, and other system services.
|
||||
* `purgeable` Integer _macOS_ - The amount of memory that is marked as "purgeable". The system can reclaim it
|
||||
if memory pressure increases.
|
||||
* `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in Kilobytes available to the
|
||||
system.
|
||||
* `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in Kilobytes available to the
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
# ServiceWorkerMain
|
||||
## Class: ServiceWorkerMain
|
||||
|
||||
> An instance of a Service Worker representing a version of a script for a given scope.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
## Class: ServiceWorkerMain
|
||||
|
||||
Process: [Main](../glossary.md#main-process)<br />
|
||||
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._
|
||||
|
||||
|
||||
@@ -939,14 +939,18 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `deprecated-sync-clipboard-read` _Deprecated_ - Request access to run `document.execCommand("paste")`
|
||||
* `fileSystem` - Access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
* `securityOrigin` string (optional) - The security origin of the `media` check.
|
||||
* `mediaType` string (optional) - The type of media access being requested, can be `video`,
|
||||
`audio` or `unknown`
|
||||
`audio` or `unknown`.
|
||||
* `requestingUrl` string (optional) - The last URL the requesting frame loaded. This is not provided for cross-origin sub frames making permission checks.
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame.
|
||||
* `filePath` string (optional) - The path of a `fileSystem` request.
|
||||
* `isDirectory` boolean (optional) - Whether a `fileSystem` request is a directory.
|
||||
* `fileAccessType` string (optional) - The access type of a `fileSystem` request. Can be `writable` or `readable`.
|
||||
|
||||
Sets the handler which can be used to respond to permission checks for the `session`.
|
||||
Returning `true` will allow the permission and `false` will reject it. Please note that
|
||||
@@ -968,6 +972,9 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
|
||||
})
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `isMainFrame` will always be `false` for a `fileSystem` request as a result of Chromium limitations.
|
||||
|
||||
#### `ses.setDisplayMediaRequestHandler(handler[, opts])`
|
||||
|
||||
* `handler` Function | null
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
`webFrame` export of the Electron module is an instance of the `WebFrame`
|
||||
class representing the current frame. Sub-frames can be retrieved by
|
||||
certain properties and methods (e.g. `webFrame.firstChild`).
|
||||
@@ -139,7 +145,7 @@ by its key, which is returned from `webFrame.insertCSS(css)`.
|
||||
|
||||
Inserts `text` to the focused element.
|
||||
|
||||
### `webFrame.executeJavaScript(code[, userGesture, callback])`
|
||||
### `webFrame.executeJavaScript(code[, userGesture][, callback])`
|
||||
|
||||
* `code` string
|
||||
* `userGesture` boolean (optional) - Default is `false`.
|
||||
@@ -160,7 +166,7 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
|
||||
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
|
||||
this limitation.
|
||||
|
||||
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture, callback])`
|
||||
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture][, callback])`
|
||||
|
||||
* `worldId` Integer - The ID of the world to run the javascript
|
||||
in, `0` is the default main world (where content runs), `999` is the
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you want to call this API from a renderer process with context isolation enabled,
|
||||
> place the API call in your preload script and
|
||||
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
|
||||
> [`contextBridge`](context-bridge.md) API.
|
||||
|
||||
## Methods
|
||||
|
||||
The `webUtils` module has the following methods:
|
||||
@@ -17,11 +23,27 @@ Returns `string` - The file system path that this `File` object points to. In th
|
||||
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
|
||||
|
||||
```js @ts-nocheck
|
||||
// Before
|
||||
const oldPath = document.querySelector('input').files[0].path
|
||||
|
||||
// After
|
||||
const { webUtils } = require('electron')
|
||||
|
||||
const newPath = webUtils.getPathForFile(document.querySelector('input').files[0])
|
||||
// Before (renderer)
|
||||
const oldPath = document.querySelector('input[type=file]').files[0].path
|
||||
```
|
||||
|
||||
```js @ts-nocheck
|
||||
// After
|
||||
|
||||
// Renderer:
|
||||
|
||||
const file = document.querySelector('input[type=file]').files[0]
|
||||
electronApi.doSomethingWithFile(file)
|
||||
|
||||
// Preload script:
|
||||
|
||||
const { contextBridge, webUtils } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('electronApi', {
|
||||
doSomethingWithFile (file) {
|
||||
const path = webUtils.getPathForFile(file)
|
||||
// Do something with the path, e.g., send it over IPC to the main process.
|
||||
// It's best not to expose the full file path to the web content if possible.
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
@@ -39,8 +39,8 @@ consider using `webContents.setWindowOpenHandler` to customize the
|
||||
BrowserWindow creation.
|
||||
|
||||
A subset of [`WebPreferences`](structures/web-preferences.md) can be set directly,
|
||||
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `preload`,
|
||||
`javascript`, `contextIsolation`, and `webviewTag`.
|
||||
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `javascript`,
|
||||
`contextIsolation`, and `webviewTag`.
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -14,44 +14,11 @@ This document uses the following convention to categorize breaking changes:
|
||||
|
||||
## Planned Breaking API Changes (39.0)
|
||||
|
||||
### Removed: `ELECTRON_OZONE_PLATFORM_HINT` evironment variable
|
||||
### Deprecated: `--host-rules` command line switch
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426) in Electron 38.
|
||||
Chromium is deprecating the `--host-rules` switch.
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
## Planned Breaking API Changes (38.0)
|
||||
|
||||
### Deprecated: `ELECTRON_OZONE_PLATFORM_HINT` environment variable
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426).
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
This environment variable will be [removed soon](https://chromium-review.googlesource.com/c/chromium/src/+/6819616).
|
||||
|
||||
### Removed: macOS 11 support
|
||||
|
||||
macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/6594615).
|
||||
|
||||
Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey)
|
||||
or later will be required to run Electron v38.0.0 and higher.
|
||||
|
||||
### Removed: `plugin-crashed` event
|
||||
|
||||
The `plugin-crashed` event has been removed from `webContents`.
|
||||
|
||||
### Deprecated: `webFrame.routingId` property
|
||||
|
||||
The `routingId` property will be removed from `webFrame` objects.
|
||||
|
||||
You should use `webFrame.frameToken` instead.
|
||||
|
||||
### Deprecated: `webFrame.findFrameByRoutingId(routingId)`
|
||||
|
||||
The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
|
||||
|
||||
You should use `webFrame.findFrameByToken(frameToken)` instead.
|
||||
You should use `--host-resolver-rules` instead.
|
||||
|
||||
### Behavior Changed: window.open popups are always resizable
|
||||
|
||||
@@ -76,6 +43,37 @@ When using shared texture offscreen rendering feature, the `paint` event now emi
|
||||
It moves the `sharedTextureHandle`, `planes`, `modifier` into a unified `handle` property.
|
||||
See [here](https://www.electronjs.org/docs/latest/api/structures/offscreen-shared-texture) for more details.
|
||||
|
||||
## Planned Breaking API Changes (38.0)
|
||||
|
||||
### Removed: `ELECTRON_OZONE_PLATFORM_HINT` environment variable
|
||||
|
||||
The default value of the `--ozone-plaftform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426).
|
||||
|
||||
You should use the `XDG_SESSION_TYPE=wayland` environment variable instead to use Wayland.
|
||||
|
||||
### Removed: macOS 11 support
|
||||
|
||||
macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/6594615).
|
||||
|
||||
Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey)
|
||||
or later will be required to run Electron v38.0.0 and higher.
|
||||
|
||||
### Removed: `plugin-crashed` event
|
||||
|
||||
The `plugin-crashed` event has been removed from `webContents`.
|
||||
|
||||
### Deprecated: `webFrame.routingId` property
|
||||
|
||||
The `routingId` property will be removed from `webFrame` objects.
|
||||
|
||||
You should use `webFrame.frameToken` instead.
|
||||
|
||||
### Deprecated: `webFrame.findFrameByRoutingId(routingId)`
|
||||
|
||||
The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
|
||||
|
||||
You should use `webFrame.findFrameByToken(frameToken)` instead.
|
||||
|
||||
## Planned Breaking API Changes (37.0)
|
||||
|
||||
### Utility Process unhandled rejection behavior change
|
||||
|
||||
@@ -191,12 +191,6 @@ $ ./out/Testing/electron
|
||||
|
||||
### Packaging
|
||||
|
||||
On linux, first strip the debugging and symbol information:
|
||||
|
||||
```sh
|
||||
$ electron/script/strip-binaries.py -d out/Release
|
||||
```
|
||||
|
||||
To package the electron build as a distributable zip file:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -64,13 +64,10 @@ flipFuses(
|
||||
)
|
||||
```
|
||||
|
||||
:::tip Fuses in Electron Forge
|
||||
|
||||
With Electron Forge, you can configure your app's fuses with
|
||||
[@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
|
||||
in your Forge configuration file.
|
||||
|
||||
:::
|
||||
> [!TIP]
|
||||
> With Electron Forge, you can configure your app's fuses with
|
||||
> [@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
|
||||
> in your Forge configuration file.
|
||||
|
||||
## Providing the header hash
|
||||
|
||||
@@ -109,7 +106,7 @@ Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of th
|
||||
The `@electron/asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value
|
||||
(e.g. using the [`node:crypto`](https://nodejs.org/api/crypto.html) module).
|
||||
|
||||
### Windows
|
||||
#### Windows
|
||||
|
||||
When packaging for Windows, you must populate a valid [resource](https://learn.microsoft.com/en-us/windows/win32/menurc/resources)
|
||||
entry of type `Integrity` and name `ElectronAsar`. The value of this resource should be a JSON encoded dictionary
|
||||
@@ -125,9 +122,6 @@ in the form included below:
|
||||
]
|
||||
```
|
||||
|
||||
:::info
|
||||
|
||||
For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
|
||||
in the Electron Packager code.
|
||||
|
||||
:::
|
||||
> [!NOTE]
|
||||
> For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
|
||||
> in the Electron Packager code.
|
||||
|
||||
@@ -9,10 +9,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | TBD | ✅ |
|
||||
| 39.0.0 | 2025-Sep-04 | 2025-Oct-01 | 2025-Oct-28 | 2026-May-05 | M142 | TBD | ✅ |
|
||||
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | v22.18 | ✅ |
|
||||
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |
|
||||
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | ✅ |
|
||||
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | ✅ |
|
||||
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | 🚫 |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
|
||||
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | 🚫 |
|
||||
|
||||
@@ -629,8 +629,6 @@ filenames = {
|
||||
"shell/common/gin_converters/usb_device_info_converter.h",
|
||||
"shell/common/gin_converters/value_converter.cc",
|
||||
"shell/common/gin_converters/value_converter.h",
|
||||
"shell/common/gin_helper/arguments.cc",
|
||||
"shell/common/gin_helper/arguments.h",
|
||||
"shell/common/gin_helper/callback.cc",
|
||||
"shell/common/gin_helper/callback.h",
|
||||
"shell/common/gin_helper/cleaned_up_at_exit.cc",
|
||||
|
||||
@@ -1034,14 +1034,12 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__fwd/get.h",
|
||||
"//third_party/libc++/src/include/__fwd/ios.h",
|
||||
"//third_party/libc++/src/include/__fwd/istream.h",
|
||||
"//third_party/libc++/src/include/__fwd/map.h",
|
||||
"//third_party/libc++/src/include/__fwd/mdspan.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory_resource.h",
|
||||
"//third_party/libc++/src/include/__fwd/ostream.h",
|
||||
"//third_party/libc++/src/include/__fwd/pair.h",
|
||||
"//third_party/libc++/src/include/__fwd/queue.h",
|
||||
"//third_party/libc++/src/include/__fwd/set.h",
|
||||
"//third_party/libc++/src/include/__fwd/span.h",
|
||||
"//third_party/libc++/src/include/__fwd/sstream.h",
|
||||
"//third_party/libc++/src/include/__fwd/stack.h",
|
||||
@@ -1367,7 +1365,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__tree",
|
||||
"//third_party/libc++/src/include/__tuple/find_index.h",
|
||||
"//third_party/libc++/src/include/__tuple/ignore.h",
|
||||
"//third_party/libc++/src/include/__tuple/make_tuple_types.h",
|
||||
"//third_party/libc++/src/include/__tuple/sfinae_helpers.h",
|
||||
"//third_party/libc++/src/include/__tuple/tuple_element.h",
|
||||
"//third_party/libc++/src/include/__tuple/tuple_like.h",
|
||||
@@ -1381,7 +1378,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/aligned_storage.h",
|
||||
"//third_party/libc++/src/include/__type_traits/aligned_union.h",
|
||||
"//third_party/libc++/src/include/__type_traits/alignment_of.h",
|
||||
"//third_party/libc++/src/include/__type_traits/can_extract_key.h",
|
||||
"//third_party/libc++/src/include/__type_traits/common_reference.h",
|
||||
"//third_party/libc++/src/include/__type_traits/common_type.h",
|
||||
"//third_party/libc++/src/include/__type_traits/conditional.h",
|
||||
@@ -1462,6 +1458,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_relocatable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unbounded_array.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_union.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unqualified.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unsigned.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_valid_expansion.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_void.h",
|
||||
@@ -1501,6 +1498,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__utility/cmp.h",
|
||||
"//third_party/libc++/src/include/__utility/convert_to_integral.h",
|
||||
"//third_party/libc++/src/include/__utility/declval.h",
|
||||
"//third_party/libc++/src/include/__utility/default_three_way_comparator.h",
|
||||
"//third_party/libc++/src/include/__utility/element_count.h",
|
||||
"//third_party/libc++/src/include/__utility/empty.h",
|
||||
"//third_party/libc++/src/include/__utility/exception_guard.h",
|
||||
@@ -1511,6 +1509,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__utility/integer_sequence.h",
|
||||
"//third_party/libc++/src/include/__utility/is_pointer_in_range.h",
|
||||
"//third_party/libc++/src/include/__utility/is_valid_range.h",
|
||||
"//third_party/libc++/src/include/__utility/lazy_synth_three_way_comparator.h",
|
||||
"//third_party/libc++/src/include/__utility/move.h",
|
||||
"//third_party/libc++/src/include/__utility/no_destroy.h",
|
||||
"//third_party/libc++/src/include/__utility/pair.h",
|
||||
@@ -1522,6 +1521,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__utility/small_buffer.h",
|
||||
"//third_party/libc++/src/include/__utility/swap.h",
|
||||
"//third_party/libc++/src/include/__utility/to_underlying.h",
|
||||
"//third_party/libc++/src/include/__utility/try_key_extraction.h",
|
||||
"//third_party/libc++/src/include/__utility/unreachable.h",
|
||||
"//third_party/libc++/src/include/__variant/monostate.h",
|
||||
"//third_party/libc++/src/include/__vector/comparison.h",
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { Menu } from 'electron/main';
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const bindings = process._linkedBinding('electron_browser_app');
|
||||
const commandLine = process._linkedBinding('electron_common_command_line');
|
||||
const { app } = bindings;
|
||||
|
||||
Object.setPrototypeOf(app, EventEmitter.prototype);
|
||||
|
||||
// Only one app object permitted.
|
||||
export default app;
|
||||
|
||||
|
||||
@@ -199,7 +199,14 @@ BrowserWindow.prototype.setBackgroundThrottling = function (allowed: boolean) {
|
||||
};
|
||||
|
||||
BrowserWindow.prototype.addBrowserView = function (browserView: BrowserView) {
|
||||
if (browserView.ownerWindow) { browserView.ownerWindow.removeBrowserView(browserView); }
|
||||
if (this._browserViews.includes(browserView)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const ownerWindow = browserView.ownerWindow;
|
||||
if (ownerWindow && ownerWindow !== this) {
|
||||
ownerWindow.removeBrowserView(browserView);
|
||||
}
|
||||
this.contentView.addChildView(browserView.webContentsView);
|
||||
browserView.ownerWindow = this;
|
||||
browserView.webContents._setOwnerWindow(this);
|
||||
|
||||
@@ -882,7 +882,7 @@ export function create (options = {}): Electron.WebContents {
|
||||
return new (WebContents as any)(options);
|
||||
}
|
||||
|
||||
export function fromId (id: string) {
|
||||
export function fromId (id: number) {
|
||||
return binding.fromId(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/node": "^22.7.7",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/stream-json": "^1.7.7",
|
||||
"@types/stream-json": "^1.7.8",
|
||||
"@types/temp": "^0.9.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
||||
"@typescript-eslint/parser": "^8.7.0",
|
||||
"@xmldom/xmldom": "^0.8.11",
|
||||
"buffer": "^6.0.3",
|
||||
"chalk": "^4.1.0",
|
||||
"check-for-leaks": "^1.2.1",
|
||||
@@ -45,7 +46,7 @@
|
||||
"remark-cli": "^12.0.1",
|
||||
"remark-preset-lint-markdown-style-guide": "^6.0.1",
|
||||
"semver": "^7.6.3",
|
||||
"stream-json": "^1.8.0",
|
||||
"stream-json": "^1.9.1",
|
||||
"tap-xunit": "^2.4.1",
|
||||
"temp": "^0.9.4",
|
||||
"timers-browserify": "1.4.2",
|
||||
|
||||
1
patches/angle/.patches
Normal file
1
patches/angle/.patches
Normal file
@@ -0,0 +1 @@
|
||||
cherry-pick-2f564f1ca07b.patch
|
||||
123
patches/angle/cherry-pick-2f564f1ca07b.patch
Normal file
123
patches/angle/cherry-pick-2f564f1ca07b.patch
Normal file
@@ -0,0 +1,123 @@
|
||||
From 2f564f1ca07b1d2668d8639d98ea5ad51cc9cd35 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Mentovai <mark@chromium.org>
|
||||
Date: Tue, 16 Sep 2025 16:46:36 -0400
|
||||
Subject: [PATCH] mac: handle Metal toolchain being unbundled from Xcode 26
|
||||
|
||||
The Metal toolchain was formerly part of Xcode, but in Xcode 26, it has
|
||||
been unbundled and is now a separate install. Attempting to use the
|
||||
Metal toolchain without installing it results in a build error, such as:
|
||||
|
||||
error: error: cannot execute tool 'metal' due to missing Metal
|
||||
Toolchain; use: xcodebuild -downloadComponent MetalToolchain
|
||||
|
||||
By running the suggested command, the Metal toolchain can be installed,
|
||||
but the existing angle build does not know how to find it correctly.
|
||||
|
||||
For system Xcode installations, tools from the Metal toolchain (`metal`
|
||||
and `metallib`) can be run via `xcrun`. This construct should work
|
||||
equally well for older Xcode versions, for situations where it’s still
|
||||
in use.
|
||||
|
||||
For the hermetic toolchain, we’ll continue splicing the Metal toolchain
|
||||
into the location it had previously been avialable (see
|
||||
https://chromium-review.googlesource.com/c/6950738), although this is
|
||||
subject to change in the future.
|
||||
|
||||
Bug: chromium:423933062, chromium:445400016
|
||||
Change-Id: I139eca51938f7cecfec9b90fd488947160ef4ec9
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6955000
|
||||
Auto-Submit: Mark Mentovai <mark@chromium.org>
|
||||
Commit-Queue: Mark Mentovai <mark@chromium.org>
|
||||
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
||||
---
|
||||
|
||||
diff --git a/src/libANGLE/renderer/metal/BUILD.gn b/src/libANGLE/renderer/metal/BUILD.gn
|
||||
index 96e9ee8..50ac42a 100644
|
||||
--- a/src/libANGLE/renderer/metal/BUILD.gn
|
||||
+++ b/src/libANGLE/renderer/metal/BUILD.gn
|
||||
@@ -24,20 +24,56 @@
|
||||
}
|
||||
|
||||
if (metal_internal_shader_compilation_supported) {
|
||||
+ template("run_metal_tool") {
|
||||
+ action(target_name) {
|
||||
+ forward_variables_from(invoker,
|
||||
+ [
|
||||
+ "deps",
|
||||
+ "sources",
|
||||
+ "outputs",
|
||||
+ "metal_tool",
|
||||
+ ])
|
||||
+ script = "shaders/metal_wrapper.py"
|
||||
+ if (use_system_xcode) {
|
||||
+ # System Xcode: run metal and metallib via xcrun. Since Xcode 26.0, the
|
||||
+ # Metal toolchain has been unbundled from Xcode, and must be installed
|
||||
+ # separately by running `xcodebuild -downloadComponent MetalToolchain`.
|
||||
+ # There is a vestigial metal executable in mac_bin_path, but it’s
|
||||
+ # incapable of running successfuly without the
|
||||
+ # rest of the Metal toolchain surrounding it. `xcrun` is able to find
|
||||
+ # and run the correct Metal toolchain when properly installed.
|
||||
+ #
|
||||
+ # If you’re using system Xcode and your build fails with this message:
|
||||
+ # error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain
|
||||
+ # then do what the error message suggests, and then retry your build.
|
||||
+ args = [
|
||||
+ "xcrun",
|
||||
+ metal_tool,
|
||||
+ ]
|
||||
+ } else {
|
||||
+ # Hermetic Xcode: at least for now, the Metal toolchain is
|
||||
+ # “spliced” into the location in the hermetic toolchain where it lived
|
||||
+ # before Xcode 26.0, so it can be run directly from there.
|
||||
+ args = [ mac_bin_path + metal_tool ]
|
||||
+ }
|
||||
+
|
||||
+ args += invoker.args
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
_metal_internal_shaders_air_file =
|
||||
"$root_gen_dir/angle/mtl_internal_shaders_autogen.air"
|
||||
|
||||
- action("angle_metal_internal_shaders_to_air") {
|
||||
- script = "shaders/metal_wrapper.py"
|
||||
-
|
||||
- outputs = [ _metal_internal_shaders_air_file ]
|
||||
-
|
||||
+ run_metal_tool("angle_metal_internal_shaders_to_air") {
|
||||
_metal_internal_shaders_metal_source =
|
||||
"shaders/mtl_internal_shaders_autogen.metal"
|
||||
sources = [ _metal_internal_shaders_metal_source ]
|
||||
|
||||
+ outputs = [ _metal_internal_shaders_air_file ]
|
||||
+
|
||||
+ metal_tool = "metal"
|
||||
+
|
||||
args = [
|
||||
- mac_bin_path + "metal",
|
||||
"-c",
|
||||
rebase_path(_metal_internal_shaders_metal_source, root_build_dir),
|
||||
"-o",
|
||||
@@ -60,17 +96,16 @@
|
||||
_metal_internal_shaders_metallib_file =
|
||||
"$root_gen_dir/angle/mtl_internal_shaders_autogen.metallib"
|
||||
|
||||
- action("angle_metal_internal_shaders_to_mtllib") {
|
||||
- script = "shaders/metal_wrapper.py"
|
||||
-
|
||||
- outputs = [ _metal_internal_shaders_metallib_file ]
|
||||
+ run_metal_tool("angle_metal_internal_shaders_to_mtllib") {
|
||||
+ deps = [ ":angle_metal_internal_shaders_to_air" ]
|
||||
|
||||
sources = [ _metal_internal_shaders_air_file ]
|
||||
|
||||
- deps = [ ":angle_metal_internal_shaders_to_air" ]
|
||||
+ outputs = [ _metal_internal_shaders_metallib_file ]
|
||||
+
|
||||
+ metal_tool = "metallib"
|
||||
|
||||
args = [
|
||||
- mac_bin_path + "metallib",
|
||||
rebase_path(_metal_internal_shaders_air_file, root_build_dir),
|
||||
"-o",
|
||||
rebase_path(_metal_internal_shaders_metallib_file, root_build_dir),
|
||||
@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
|
||||
module.
|
||||
|
||||
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
|
||||
index 431214277314941c5ec031f03ad09e7f22800983..4cc48bbc3f8434876f35767c1a9f01d27388be99 100644
|
||||
index 345c94f6e26e88aac77b9feb92bd8d6665234981..8ef2ab8987da63f321d1dbb79f2eded8b8209bfc 100644
|
||||
--- a/crypto/digest/digest_extra.cc
|
||||
+++ b/crypto/digest/digest_extra.cc
|
||||
@@ -46,6 +46,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
@@ -47,6 +47,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
|
||||
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
|
||||
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
|
||||
@@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b
|
||||
|
||||
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
|
||||
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
|
||||
index 710c6e6d110378d1db10d8c2ae57b2d844c603b9..dbb1e0cd5e9480d1ac7a86cbca6fae29d6a8dca4 100644
|
||||
index b604aba00c1c6cea8002b6dc298ea5fe979589b1..1c123aa1dca09ae60c31be2a6dab9a64748eac17 100644
|
||||
--- a/include/openssl/digest.h
|
||||
+++ b/include/openssl/digest.h
|
||||
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
|
||||
|
||||
@@ -28,7 +28,7 @@ RC2 Ciphers: rc2-40-cbc
|
||||
It's unclear whether this would be accepted upstream. We should try regardless.
|
||||
|
||||
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
|
||||
index 2622dc78d1da236862312f55bc0a40f26116486e..ac7aff6518ad5c2a0e48bd91d60a1f825851b634 100644
|
||||
index 6513df01c4b3e4d33fc6b521d9aae78ec5499e73..52eb7fea420e3d81d274fd5c1e21e4da0229687f 100644
|
||||
--- a/crypto/cipher/get_cipher.cc
|
||||
+++ b/crypto/cipher/get_cipher.cc
|
||||
@@ -31,6 +31,7 @@ static const struct {
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f8431434e42 100644
|
||||
index 2e0db357135d54bc416bc94f4e3849267932c3b4..35f0430b5d1c1ed1676ea7a9e7e94e820126607b 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1206,7 +1206,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1211,7 +1211,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index aa8ef8a0c53978021b675e1d909c3f78045dbb7b..61794458f7a7a849d48a225533ef4f84
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2567,13 +2567,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2602,13 +2602,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,9 +132,13 @@ chore_grandfather_in_electron_views_and_delegates.patch
|
||||
refactor_patch_electron_permissiontypes_into_blink.patch
|
||||
revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch
|
||||
build_partial_revert_mac_fullscreen_top_chrome_mouse_events.patch
|
||||
revert_update_siso-chromium_image.patch
|
||||
build_set_mac_sdk_minimum_to_10.patch
|
||||
fix_add_macos_memory_query_fallback_to_avoid_crash.patch
|
||||
fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch
|
||||
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
|
||||
feat_add_support_for_embedder_snapshot_validation.patch
|
||||
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
|
||||
chore_add_electron_objects_to_wrappablepointertag.patch
|
||||
chore_expose_isolate_parameter_in_script_lifecycle_observers.patch
|
||||
revert_partial_remove_unused_prehandlemouseevent.patch
|
||||
allow_electron_to_depend_on_components_os_crypt_sync.patch
|
||||
disable_nsautofillheuristiccontroller_on_macos_26.patch
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc9823ab51e5 100644
|
||||
index a827f072e72d76dd52378cca4368932a4b2f4f3d..cc1b6cca3009e876f84f48df942df02fddd91e80 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -271,6 +271,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -273,6 +273,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuLogMessageManager::GetInstance()->InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 6f8e8dd8e7ddb9e3d4c142493f249f616520d613..f89b2e5b846b3b96c99dea2a3b49bc98
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -380,7 +384,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -382,7 +386,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
#endif
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e90be3d39b 100644
|
||||
index 284da783658bec333be748941784d43b13f6f244..18714ce8fc27c8d56c5deac27ba335078c452d0a 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
@@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index c26cff0adef977617b10bbaa7c0c13cf5e6e91d3..f9c7af85af33572a88956bf1bc9765e9
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 7dc7f4d0ae5c553e757ca2df68a9f6121b009778..5ef55881665aae1190336ddd686de7f0f9fc6a4e 100644
|
||||
index a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c..f337d61906651359eeb5228c112ad948f4f7a752 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4676,6 +4676,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4678,6 +4678,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 7dc7f4d0ae5c553e757ca2df68a9f6121b009778..5ef55881665aae1190336ddd686de7f0
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa56dbfa2dc 100644
|
||||
index 2950a6f600aab24226ef59acabddc74c9b67cac8..f0f4335aa815ea50dbf9b720b41e4eb31f27fb90 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index 5456a50df5f75509c22afa47034afbb624303a75..bbd1edd567aee984001288901581dfa5
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index 5c1c325d1e4037b0b413c3519e963c5f0210086a..994dd3118dfa43816db60e5dfb61c00bf366e92d 100644
|
||||
index 101e727b3a97bc764315eb694dc3975f9a408f9c..52e8828d8fffaba8ab05436cb4d727595f18238a 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -662,6 +662,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -661,6 +661,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 36baf908d3be8aed44ff60b8de2cffe2eee15efe..8d73ddb12013ce195026b9f63050cf33
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d2691fac2b7 100644
|
||||
index b02b60ff5f6650332c54ecc66f6fdb274b737aa7..1aacf6f66b543a4ede6ab5d885143dd4a0821e8a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index 114cbd9c806572b664b9d9af75955231fa68cc50..03a0b2f762a2d9677212c89e63bb2d26
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 081c8fabbcc514e47ff33d7e07a5eac3d112a518..e3fab574523a4b63069587b2fcaf30267fddf7c4 100644
|
||||
index fcc0928abbc454281b022e0451d993651ecba42f..16066fe34ee0335a0dabe00b6890e5844349c0b5 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -81,6 +81,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
|
||||
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index 0b457d0742b24381718092d6af11f396fda30436..e1619eeeb8f29e6745da282a33a3464ec97aefb0 100644
|
||||
index 2d612b3a8ceb61f02fbd96023140bc2c702db589..bb5b17fc884b78aa65c3885e11309a9c50f8e786 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -236,6 +236,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
|
||||
@@ -246,6 +246,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ index 0b457d0742b24381718092d6af11f396fda30436..e1619eeeb8f29e6745da282a33a3464e
|
||||
objects_.clear();
|
||||
raw_objects_.clear();
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
index 939a99b2a086d5373f82fe96da73dabe02f6f9d8..fccc200b1b11076c8fcffde071a53598ffba9a12 100644
|
||||
index 8c2be540757856a3e704764fe56003205b24812f..e31fbc01f68c0e92284a72298cac878d7247e7fb 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
@@ -91,6 +91,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
// This is only used to write custom format data.
|
||||
void WriteData(std::u16string_view format, mojo_base::BigBuffer data);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ accessing Blink internals. Its inverse, which already exists, is used in
|
||||
Android WebView.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_message_port_converter.h b/third_party/blink/public/web/web_message_port_converter.h
|
||||
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e7521cb71b8 100644
|
||||
index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..cdf9bca3df292531831b6df0077ba211a29548aa 100644
|
||||
--- a/third_party/blink/public/web/web_message_port_converter.h
|
||||
+++ b/third_party/blink/public/web/web_message_port_converter.h
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -19,18 +19,20 @@ index e7c4464f1b5aa19cbe441d94d88c949798ccb1e3..bd804d509ad5f3581154c6ede8653e75
|
||||
} // namespace v8
|
||||
|
||||
namespace blink {
|
||||
@@ -25,6 +26,9 @@ class BLINK_EXPORT WebMessagePortConverter {
|
||||
@@ -25,6 +26,11 @@ class BLINK_EXPORT WebMessagePortConverter {
|
||||
// neutered, it will return nullopt.
|
||||
static std::optional<MessagePortChannel>
|
||||
DisentangleAndExtractMessagePortChannel(v8::Isolate*, v8::Local<v8::Value>);
|
||||
+
|
||||
+ BLINK_EXPORT static v8::Local<v8::Value>
|
||||
+ EntangleAndInjectMessagePortChannel(v8::Local<v8::Context>, MessagePortChannel);
|
||||
+ EntangleAndInjectMessagePortChannel(v8::Isolate*,
|
||||
+ v8::Local<v8::Context>,
|
||||
+ MessagePortChannel);
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_message_port_converter.cc b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef732225d6 100644
|
||||
index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..bbd3c968027549b89087d9a4394f575d84213eba 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -41,19 +43,20 @@ index 3270da19f73077b1fab7522144b9f3d52d9f6a5a..e6c5764c54a18b31223ac8c5b8f2d6ef
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_message_port.h"
|
||||
#include "third_party/blink/renderer/core/messaging/message_port.h"
|
||||
|
||||
@@ -21,4 +22,15 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
|
||||
@@ -21,4 +22,16 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
|
||||
return port->Disentangle();
|
||||
}
|
||||
|
||||
+v8::Local<v8::Value>
|
||||
+WebMessagePortConverter::EntangleAndInjectMessagePortChannel(
|
||||
+ v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
+ MessagePortChannel port_channel) {
|
||||
+ auto* execution_context = ToExecutionContext(context);
|
||||
+ CHECK(execution_context);
|
||||
+ auto* port = MakeGarbageCollected<MessagePort>(*execution_context);
|
||||
+ port->Entangle(std::move(port_channel));
|
||||
+ return port->ToV8(context->GetIsolate(), context->Global());
|
||||
+ return port->ToV8(isolate, context->Global());
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
|
||||
@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
|
||||
WindowList.
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aabbba621cb 100644
|
||||
index 8f425bd66fac7b36cee201c3e23c126dd14edf07..6216ad30ed15f11501e1d154258862f57941969e 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -19,9 +19,9 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
#include "content/public/browser/web_ui_data_source.h"
|
||||
+#include "electron/shell/browser/electron_browser_context.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/ax_mode.h"
|
||||
#include "ui/accessibility/ax_updates_and_events.h"
|
||||
#include "ui/accessibility/platform/ax_platform.h"
|
||||
@@ -173,7 +174,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
@@ -178,7 +179,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
rvh->GetRoutingID(), accessibility_mode);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
|
||||
base::Value::Dict target_data;
|
||||
target_data.Set(kSessionIdField, browser->session_id().id());
|
||||
@@ -197,7 +198,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -224,7 +225,7 @@ void HandleAccessibilityRequestCallback(
|
||||
auto& browser_accessibility_state =
|
||||
*content::BrowserAccessibilityState::GetInstance();
|
||||
base::Value::Dict data;
|
||||
@@ -39,7 +39,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
|
||||
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
|
||||
bool web = mode.has_mode(ui::AXMode::kWebContents);
|
||||
@@ -258,7 +259,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -285,7 +286,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kIsScreenReaderActive, is_screen_reader_active);
|
||||
|
||||
std::string pref_api_type =
|
||||
@@ -48,7 +48,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
bool pref_api_type_supported = false;
|
||||
|
||||
std::vector<ui::AXApiType::Type> supported_api_types =
|
||||
@@ -326,11 +327,11 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -353,11 +354,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(page_list));
|
||||
|
||||
base::Value::List browser_list;
|
||||
@@ -61,8 +61,8 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
+#endif
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
std::string json_string;
|
||||
@@ -804,7 +805,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -844,7 +845,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
const std::string value = CheckJSValue(data.FindString(kValueField));
|
||||
|
||||
if (string_name == kApiTypeField) {
|
||||
@@ -72,7 +72,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
pref->SetString(prefs::kShownAccessibilityApiType, value);
|
||||
}
|
||||
}
|
||||
@@ -858,7 +860,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
@@ -898,7 +900,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -82,7 +82,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
std::string accessibility_contents =
|
||||
@@ -885,6 +888,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -925,6 +928,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -90,7 +90,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
base::Value::Dict result = BuildTargetDescriptor(browser);
|
||||
@@ -897,6 +901,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -937,6 +941,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
base::Value::Dict result;
|
||||
@@ -940,11 +945,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
@@ -980,11 +985,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
}
|
||||
|
||||
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
|
||||
@@ -115,7 +115,7 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
// Check to see if it is in the supported types list.
|
||||
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
|
||||
supported_types.end()) {
|
||||
@@ -1014,8 +1021,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
@@ -1054,10 +1061,13 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -127,11 +127,13 @@ index 20ba6b8fa6a7d5edf8ebab80ec15ece93d750000..6c42d825e520982c7fcac52cf3aa8aab
|
||||
+ registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void AccessibilityUIMessageHandler::OnVisibilityChanged(
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7f1648148 100644
|
||||
index 4b9d7df73c901c57c14693e9f24a51694ecd375f..93e1c9a79d88c8b4c57b244c9eec1e83c1d1fa0a 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
@@ -27,6 +27,8 @@ namespace content {
|
||||
@@ -28,6 +28,8 @@ namespace content {
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
@@ -140,7 +142,7 @@ index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7
|
||||
namespace user_prefs {
|
||||
class PrefRegistrySyncable;
|
||||
} // namespace user_prefs
|
||||
@@ -77,6 +79,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
@@ -79,6 +81,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler,
|
||||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,11 +6,11 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
index d321fe74be7af24d1246224d7a28c9dede3635b2..af2cb60c42863b1fdad487c28d544b7a7dade805 100644
|
||||
index 318031e17f212b0e9a651dcc0e86e16af957ed8e..e68dcdc8039217ec59a60ef02c27b4f80f661d2a 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -167,6 +167,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
(network::mojom::AttributionSupport support),
|
||||
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
(std::optional<blink::NoiseToken> canvas_noise_token),
|
||||
(override));
|
||||
|
||||
+ MOCK_METHOD(
|
||||
@@ -23,10 +23,10 @@ index d321fe74be7af24d1246224d7a28c9dede3635b2..af2cb60c42863b1fdad487c28d544b7a
|
||||
return receiver_.BindNewEndpointAndPassDedicatedRemote();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 87c448c04f8f164f7b2dca6f21a8ea9cc26db163..e88cfee7ad8495e7733c85efc8d21ad2aef26db0 100644
|
||||
index 270750b9180a8ddab4f3cd2508fd398e07bf6377..20b2ae081a3710443ec919f1487dfbfe8f15de11 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -773,6 +773,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -785,6 +785,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 7944fe64e0da112fc670358b75506bb199bb5e4a..0e3c16c6af2a078943e9f39808134ab2
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index b14f5bc3f023c512a066ce9ec9f681c96b1fafc4..b930145db575eb8c4e84297ddd610bd90fb5d3a8 100644
|
||||
index e95a313945397c6eff5514932ce15c5d4b6a8e1f..edb2638deb85dfd37651a00d4c370e51d94fcc6a 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -580,8 +580,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -578,8 +578,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
|
||||
// which updates `visibility_`, unless the host is hidden. Make sure no update
|
||||
// is needed.
|
||||
@@ -66,10 +66,10 @@ index b14f5bc3f023c512a066ce9ec9f681c96b1fafc4..b930145db575eb8c4e84297ddd610bd9
|
||||
|
||||
void RenderWidgetHostViewAura::EnsurePlatformVisibility(
|
||||
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
|
||||
index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb19389b72203b 100644
|
||||
index a599bc306198de0e172134ce4623b32b8fcd72fa..4960c518d49f98b39873d166597bfb4b5619ee02 100644
|
||||
--- a/content/public/browser/render_view_host.h
|
||||
+++ b/content/public/browser/render_view_host.h
|
||||
@@ -75,6 +75,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
@@ -74,6 +74,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
virtual void WriteIntoTrace(
|
||||
perfetto::TracedProto<TraceProto> context) const = 0;
|
||||
|
||||
@@ -80,34 +80,34 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
|
||||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
|
||||
index 3f4fdfcdf2f701a394e182bd61baf226338ef7f8..f2faa1225e8ca6abb190e6f7a0775545fa3f785d 100644
|
||||
index 82ae7ab6279427e492ead6d1d386608eb9d3d844..2b79149bfcc0de968ffb45e310d697c5393f0d43 100644
|
||||
--- a/content/test/test_page_broadcast.h
|
||||
+++ b/content/test/test_page_broadcast.h
|
||||
@@ -51,6 +51,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
network::mojom::AttributionSupport support) override;
|
||||
void UpdateColorProviders(
|
||||
@@ -53,6 +53,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
const blink::ColorProviderColorMaps& color_provider_colors) override;
|
||||
void UpdateCanvasNoiseToken(
|
||||
std::optional<blink::NoiseToken> canvas_noise_token) override;
|
||||
+ void SetSchedulerThrottling(bool allowed) override {}
|
||||
|
||||
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
|
||||
};
|
||||
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
|
||||
index b6a4e3609af1f090f1f845d77fa0589e5b178d8a..989b2cf76ce88614b57e75ce2fcace101225f43e 100644
|
||||
index e7be05ec6dc5f517b4a6f849a262d12dc6c1ca3d..5f4f425c77c8aadf269edfaec658a8d2ad74b2cd 100644
|
||||
--- a/third_party/blink/public/mojom/page/page.mojom
|
||||
+++ b/third_party/blink/public/mojom/page/page.mojom
|
||||
@@ -175,4 +175,7 @@ interface PageBroadcast {
|
||||
// 2. The ColorProvider associated with the WebContents changes as a result
|
||||
// of theme changes.
|
||||
UpdateColorProviders(ColorProviderColorMaps color_provider_colors);
|
||||
@@ -182,4 +182,7 @@ interface PageBroadcast {
|
||||
// the noise token at ReadyToCommit time and update blink::WebViews that
|
||||
// were made at request time.
|
||||
UpdateCanvasNoiseToken(blink.mojom.NoiseToken? canvas_noise_token);
|
||||
+
|
||||
+ // Whether to enable the Renderer scheduler background throttling.
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index c8d27cfee8ef3fe244291f4667b59df1037c359b..92ed53a689991ec8eca9572bf2f7a212acfc4a38 100644
|
||||
index 9c0fe6ad62872f05cfb1179b4b979139008976d2..6aca43e61ef7f1caea74c30e5c3ce4496d4c4188 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -360,6 +360,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -366,6 +366,7 @@ class BLINK_EXPORT WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -116,10 +116,10 @@ index c8d27cfee8ef3fe244291f4667b59df1037c359b..92ed53a689991ec8eca9572bf2f7a212
|
||||
// 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 b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835dd692581 100644
|
||||
index cd57d63a452cb4444d5d0b11b06c65c5bc11f5f1..68a102327e22302587f7cc402cb26ef2f02b261e 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2485,6 +2485,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2504,6 +2504,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835
|
||||
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
|
||||
!old_state->is_in_back_forward_cache;
|
||||
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
|
||||
@@ -3986,10 +3990,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -4012,10 +4016,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,10 +155,10 @@ index b0a8c14c845a69c72ab823af1eccad22b27f1ad6..6ba55d345d4b18c9c76e26a8a1eb3835
|
||||
// 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 5c8a5d7f9b675a460740643fc26d778a08ef7112..2ebae3e0a5b76eb9551d286af1ed64e1e58b9de4 100644
|
||||
index 7879bd064e9ef324e12b5c2f522f9c8a4fa29ad5..950df20815a607b678e0e67a19d22d37b579b85d 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -445,6 +445,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -166,7 +166,7 @@ index 5c8a5d7f9b675a460740643fc26d778a08ef7112..2ebae3e0a5b76eb9551d286af1ed64e1
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -935,6 +936,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -943,6 +944,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@electronjs.org>
|
||||
Date: Mon, 15 Sep 2025 15:52:55 -0400
|
||||
Subject: Allow electron to depend on components/os_crypt/sync.
|
||||
|
||||
This is necessary after
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/6944749
|
||||
landed. That CL notes that "new code should use os_crypt async",
|
||||
so we can remove this patch once we migrate our code to use
|
||||
os_crypt async.
|
||||
|
||||
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
|
||||
index 81fc444043b67858371142075f98ad9aff162fc3..7ab1c6d1422e19afa603d9b3eeeb30044fb9c7b3 100644
|
||||
--- a/components/os_crypt/sync/BUILD.gn
|
||||
+++ b/components/os_crypt/sync/BUILD.gn
|
||||
@@ -10,6 +10,7 @@ import("//components/os_crypt/sync/features.gni")
|
||||
component("sync") {
|
||||
# New code should use os_crypt async.
|
||||
visibility = [
|
||||
+ "//electron:*",
|
||||
"//chrome/browser",
|
||||
"//chrome/browser/prefs:impl",
|
||||
"//chrome/browser/ui",
|
||||
@@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on
|
||||
process-level command line switches, as before.
|
||||
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index e66a1b104fbcb6ac81b745a28588a994533745ff..08abd32cebf89d434bf60b4fd420430e88540adc 100644
|
||||
index c0362530043cdaffc008d0c90d55cb9522db1557..3eb37d797feccdbb2a9d4b4f26e222b6f837b802 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -32,7 +32,7 @@ index e66a1b104fbcb6ac81b745a28588a994533745ff..08abd32cebf89d434bf60b4fd420430e
|
||||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b90875b82819c 100644
|
||||
index 30572628d5d221e58159391f6bfd8e01525291bd..6020cce84810b9515298b65880091ebb97559688 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -43,7 +43,7 @@ index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b9087
|
||||
#include "build/build_config.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -462,6 +463,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -464,6 +465,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
bool increment_local_surface_id_for_mainframe_same_doc_navigation = true;
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
@@ -64,7 +64,7 @@ index 39eefd4970a93bef42487d51e9c0bdfd76a001a0..a76da90ca59e07ad57ae85ee765b9087
|
||||
// chrome, except for the cases where it would require lots of extra work for
|
||||
// the embedder to use the same default value.
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index 36e04a5f887fd9102b3d74a4230132ecee780c1b..8e53242f1be83920ca64c95c31aa674e04d2bb81 100644
|
||||
index ccba9b7353c87d2e2bced7770920c976865c0d65..4d93ef8c1976cf533c32bc9c17dbf6b81f2b59c6 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -129,7 +129,7 @@ index 36e04a5f887fd9102b3d74a4230132ecee780c1b..8e53242f1be83920ca64c95c31aa674e
|
||||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index dd6185b0eacf942d902505ac23bf88059bf2786a..f3f1c71f241db0a90144909971412009e5510b6e 100644
|
||||
index 9827715ad3cd306a0ec18fb6b2936ecf8677af21..66cbaf3a5b19a38295cad04d0e978de417984370 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -8,9 +8,11 @@ import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df233b75e2 100644
|
||||
index cdb5b9246087b5678cf6a0f2713f6238dafc13de..7efbe7524c5ddd3785fff0e2d8901f931f024f48 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df
|
||||
// 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 f23c955831d9acda8e115e418b0b0f9a29e52d58..dfcc54b3834ca173707bcf97bfa2d72a64638044 100644
|
||||
index 72f642cb098bb6bbb445b49823663a7deb316842..902f472c8c52dd4fe52f46fbb97034b041153f65 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -738,10 +738,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -751,10 +751,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index f23c955831d9acda8e115e418b0b0f9a29e52d58..dfcc54b3834ca173707bcf97bfa2d72a
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -795,6 +791,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -808,6 +804,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 2213c498dc7dc4560b23bb53e19d6e957dea712d..154a18226ff02089e9b8c46823ccd49ba6f6471f 100644
|
||||
index 67b5911d7815b47aafe1df1030c96a903e495df1..4813b0dc361219ad30a7e745a7906fa396c3950c 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -122,6 +122,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
@@ -128,6 +128,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
perfetto::Category("drm"),
|
||||
perfetto::Category("drmcursor"),
|
||||
perfetto::Category("dwrite"),
|
||||
|
||||
@@ -11,10 +11,10 @@ To accomplish this, we need to make simdutf's config public here
|
||||
for use by third_party/electron_node.
|
||||
|
||||
diff --git a/third_party/simdutf/BUILD.gn b/third_party/simdutf/BUILD.gn
|
||||
index 5fbce38841f04dad38f202f529ae84c609c6a8de..9f5ef9bceade8e30bbd2be616b9143e9708fefd8 100644
|
||||
index 68f1ed4e012cff5e0abd64a153a329518860689d..eeb846525e58f038733318915a770bafa22cafc5 100644
|
||||
--- a/third_party/simdutf/BUILD.gn
|
||||
+++ b/third_party/simdutf/BUILD.gn
|
||||
@@ -6,9 +6,14 @@ source_set("header") {
|
||||
@@ -8,9 +8,14 @@ source_set("header") {
|
||||
sources = [ "simdutf.h" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ Needed for:
|
||||
2) //electron/shell/common:web_contents_utility
|
||||
|
||||
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
|
||||
index 981abc2963aaaa8f4cf283cdc0807907500b65eb..4be2f078f0c9890d0bcca635a82711386abae077 100644
|
||||
index 8e91c465c68bec818253820ecaeeb7c3feb180a2..fea8bb9f87c007775a2bb6e1abe1ec498a8b19b4 100644
|
||||
--- a/content/public/common/BUILD.gn
|
||||
+++ b/content/public/common/BUILD.gn
|
||||
@@ -382,6 +382,8 @@ mojom("interfaces") {
|
||||
@@ -371,6 +371,8 @@ mojom("interfaces") {
|
||||
"//content/common/*",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common:mojom_blink",
|
||||
|
||||
@@ -11,15 +11,15 @@ This patch can (and should) be removed when we can prevent those symbols
|
||||
from being stripped in the release build.
|
||||
|
||||
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
|
||||
index babd5a12fa7fbe263e1ecd6d269a2965a3024bbe..cf116f19c4031e3bec6c82125761ebbcb32c5c79 100644
|
||||
index 21bd22896d7bca4d4a133677286f7f8ad1b224f2..53654e4467fa4ae57ce42bd971b1be3a11654aaf 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -88,7 +88,7 @@ declare_args() {
|
||||
# have the same LLVM revisions as us, making bitcode useless to them.
|
||||
@@ -85,7 +85,7 @@ declare_args() {
|
||||
# Chrome's clang. crbug.com/1033839
|
||||
use_thin_lto =
|
||||
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
|
||||
- (is_linux || is_win || is_mac ||
|
||||
+ (is_linux || is_win ||
|
||||
(is_ios && use_lld && !is_cronet_build) ||
|
||||
- (is_linux || is_win || is_mac || (is_ios && use_lld) ||
|
||||
+ (is_linux || is_win || (is_ios && use_lld) ||
|
||||
(is_android && target_os != "chromeos") ||
|
||||
(is_chromeos && is_chromeos_device)))
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ index e648bb4ed2ff72441faa8773e449e0b6174f5af5..fd2c1d3ac575d10de7d5c09e4418d172
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 0aa7413be9e1aecbf24c32a0759a65b0e331f97d..cc444cfd073846696ed8b4ebc532db2b01d4ee6d 100644
|
||||
index 790764062094479f25b33a0dfa3e143472e0a077..a9997872138b2d58d279103e4cac3c92f2091f0a 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4760,7 +4760,7 @@ static_library("browser") {
|
||||
@@ -4807,7 +4807,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index 0aa7413be9e1aecbf24c32a0759a65b0e331f97d..cc444cfd073846696ed8b4ebc532db2b
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fdd411e769 100644
|
||||
index 8bcc85cfd507f23c9651ea0a006fd6464ecd134f..92e88e0c8f764a779d7c899b423b589a0302b4bd 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7464,9 +7464,12 @@ test("unit_tests") {
|
||||
@@ -7516,9 +7516,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fd
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8397,6 +8400,10 @@ test("unit_tests") {
|
||||
@@ -8430,6 +8433,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index eaad9e99e531da40b0b5bd93f496b5181a6536fd..62a05362da8a56717a478c9955d3d0fd
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8453,7 +8460,6 @@ test("unit_tests") {
|
||||
@@ -8486,7 +8493,6 @@ test("unit_tests") {
|
||||
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
|
||||
everywhere, without having to import("//electron/.../flags.gni").
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 5af795411d1ddf92238abdf27e649f33951cf6b2..9c11c173d70408f54c1c18ae4306e01a4558aef7 100644
|
||||
index 24a1d143954ae05ae0b79b0994b76ef9218fb848..5c9b2ed8ba48a1056560ca1cd1d5b976aee4815c 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
|
||||
nan tests
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
|
||||
index 27be83a4f2517fe2023a1ebb990b6e8bbed18f7f..886f02b8831fbb9276749dcd49c7245c47dfadb2 100644
|
||||
index 7dcefd2bceb209c6e74445259fac00e3e2280ff7..3a233d2e9dafc2093ead8f9c9104d06fe6176252 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -851,6 +851,7 @@ target(libcxx_target_type, "libc++") {
|
||||
@@ -841,6 +841,7 @@ target(libcxx_target_type, "libc++") {
|
||||
# need to explicitly depend on libc++.
|
||||
visibility = [
|
||||
"//build/config:common_deps",
|
||||
|
||||
@@ -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 27ea41fb7d0134dc2e9bc2f2a7c7d85ef5ce61a3..3735d7ed0d719f8957c80030aee86f169ddbf69e 100644
|
||||
index 25bc5fd2f2158b95a7d6dff6a9a30c967c052149..ff0406154e44a3b12ec732e836fc1e65dadfd326 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9817,6 +9817,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9826,6 +9826,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index 27ea41fb7d0134dc2e9bc2f2a7c7d85ef5ce61a3..3735d7ed0d719f8957c80030aee86f16
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25833fcb6a 100644
|
||||
index 29597a3a6f01fcff65de5624e583b03a1e34dd6f..6c067803c35a4e98ec99df6e28015f3b36e67e4f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5316,6 +5316,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5319,6 +5319,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
create_params.initially_hidden = renderer_started_hidden;
|
||||
create_params.initial_popup_url = params.target_url;
|
||||
|
||||
@@ -35,7 +35,7 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
// Even though all codepaths leading here are in response to a renderer
|
||||
// trying to open a new window, if the new window ends up in a different
|
||||
// browsing instance, then the RenderViewHost, RenderWidgetHost,
|
||||
@@ -5371,6 +5375,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5373,6 +5377,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// Sets the newly created WebContents WindowOpenDisposition.
|
||||
new_contents_impl->original_window_open_disposition_ = params.disposition;
|
||||
|
||||
@@ -48,7 +48,7 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -5412,12 +5422,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5414,12 +5424,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ index 50aa090d971e4043a9a1067ee2c6e20d21c867f4..32927697a917281fa92bdf829a8f8a25
|
||||
new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(), params.disposition,
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index fc433c5802ecb880f3f144f09c3d318814672213..6a1e1f2cfc60451bb097b3625245fbfb3f0d12a4 100644
|
||||
index 15a83f61ed4e31ba34cbc19995cd9d68b1599f1d..9cf9fefad46a6c2ead4085adc76e0c07369f641a 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -657,6 +657,10 @@ struct CreateNewWindowParams {
|
||||
@@ -662,6 +662,10 @@ struct CreateNewWindowParams {
|
||||
pending_associated_remote<blink.mojom.Widget> widget;
|
||||
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
|
||||
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
|
||||
@@ -77,10 +77,10 @@ index fc433c5802ecb880f3f144f09c3d318814672213..6a1e1f2cfc60451bb097b3625245fbfb
|
||||
|
||||
// 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 689203b138adf10a27c47dea61d3fe352df80b1e..2988ef70882ed30105d888491feb88db429c85ca 100644
|
||||
index 9d950e48dca63c6ec6899674cdfa98b1b4847542..fd15151cbe0c67164f07a730668f9b5ad0af2f40 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -867,6 +867,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -885,6 +885,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -90,10 +90,10 @@ index 689203b138adf10a27c47dea61d3fe352df80b1e..2988ef70882ed30105d888491feb88db
|
||||
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 ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580a573fba0 100644
|
||||
index 6dbfa4f14a5a610b49e58193f50d7337c998e7e1..f93858d6cb4cb89075e9ed7ee50f4e86df37c279 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -199,6 +199,7 @@ class NetworkService;
|
||||
@@ -201,6 +201,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -101,7 +101,7 @@ index ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1435,6 +1436,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1458,6 +1459,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -111,10 +111,10 @@ index ff5eca7750ef324cd036251affc0263f230710bb..f9372f547ef0d5914ba53b75aba44580
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943f06978ad 100644
|
||||
index 87e310a5473bec20b1326f3202cf2bf603227c04..968cddc769e2bf0bb56359b36bc03cbce6539da1 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -32,6 +32,17 @@ namespace content {
|
||||
@@ -34,6 +34,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
@@ -133,7 +133,7 @@ index ca92e2ddf78d8f386b5ab23a09876d3b44e21334..33be50ce93dd998df5244f9ade391943
|
||||
WebContents* source,
|
||||
const OpenURLParams& params,
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d 100644
|
||||
index 16ce42f605513b641cc2ac07e34bfe3a017c5a7a..23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -152,7 +152,7 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
|
||||
#include "content/public/common/window_container_type.mojom-forward.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
||||
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
|
||||
@@ -384,6 +386,16 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -388,6 +390,16 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const StoragePartitionConfig& partition_config,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
@@ -170,10 +170,10 @@ index a4b8c5f950549e018c0d09522ff8890a1a774966..6c4c6265c26f5304b8f77d7fc5a4fad5
|
||||
// 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 01099351f93a2c1c2ed77e75c5bfb9d18f0f9495..7dc7f4d0ae5c553e757ca2df68a9f6121b009778 100644
|
||||
index 12047149fcd73050b5ee6645fa269153daf1836f..a0aa3ec64b54b99508d1ba9cd52e2fe0e53ed56c 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6770,6 +6770,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6776,6 +6776,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -232,10 +232,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 23a95863dc888a9ffb4b09c2b034665ef1186f7c..558f6afcdf8faa91744ac2143a03de88c0965366 100644
|
||||
index 68ab3d483fe60671de50ec8952a0f71f103e4ad3..7ea5e45c08d7af439cf3eec041391ed7902ec865 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2354,6 +2354,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2333,6 +2333,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 92a2addc902f74544df918229537d2a450ad8cbd..4e19bc4e7f83da466f02faaa20ed221f83aacf80 100644
|
||||
index 5eb6e4d1815a7a56c7fff1d6f095e6c7e8127b84..808d897ba80abb9cced32a02cb7026305afe0dd2 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -225,6 +225,7 @@ vs-chromium-project.txt
|
||||
@@ -226,6 +226,7 @@ vs-chromium-project.txt
|
||||
/data
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
@@ -18,10 +18,10 @@ index 92a2addc902f74544df918229537d2a450ad8cbd..4e19bc4e7f83da466f02faaa20ed221f
|
||||
/google_apis/gcm/gcm.xml
|
||||
/googleurl
|
||||
diff --git a/third_party/.gitignore b/third_party/.gitignore
|
||||
index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de1614826d39 100644
|
||||
index 21adf9c5bd1887e765659a81192338de49028c71..1e64aca78c8609dd9de22d023622f14f58489364 100644
|
||||
--- a/third_party/.gitignore
|
||||
+++ b/third_party/.gitignore
|
||||
@@ -46,7 +46,9 @@
|
||||
@@ -45,7 +45,9 @@
|
||||
/directxsdk
|
||||
/dragonbox/src
|
||||
/edk2
|
||||
@@ -31,7 +31,7 @@ index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de16
|
||||
/espresso/lib/
|
||||
/eyesfree/src
|
||||
/fast_float/src
|
||||
@@ -94,6 +96,7 @@
|
||||
@@ -93,6 +95,7 @@
|
||||
/mocha
|
||||
/mockito/src
|
||||
/nacl_sdk_binaries/
|
||||
@@ -39,7 +39,7 @@ index a750ba32fa50d4367682bf11b88e6a8a4700dc46..c3188f418a6368b35adfdcb2cd96de16
|
||||
/ninja
|
||||
/node/*.tar.gz
|
||||
/node/linux/
|
||||
@@ -139,7 +142,7 @@
|
||||
@@ -138,7 +141,7 @@
|
||||
/spirv-cross/src
|
||||
/spirv-headers/src
|
||||
/spirv-tools/src
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Wed, 20 Aug 2025 04:03:11 +0900
|
||||
Subject: chore: add electron objects to WrappablePointerTag
|
||||
|
||||
Extends gin::WrappablePointerTag with tags needed for
|
||||
electron objects that extend gin::Wrappable and gets
|
||||
allocated on the cpp heap
|
||||
|
||||
diff --git a/gin/public/wrappable_pointer_tags.h b/gin/public/wrappable_pointer_tags.h
|
||||
index 80ec409efe1635390887d1324be661643818abff..7b23fbcb16958a37a3ad4d313326c0cd37bf05d4 100644
|
||||
--- a/gin/public/wrappable_pointer_tags.h
|
||||
+++ b/gin/public/wrappable_pointer_tags.h
|
||||
@@ -66,7 +66,13 @@ enum WrappablePointerTag : uint16_t {
|
||||
kTextInputControllerBindings, // content::TextInputControllerBindings
|
||||
kWebAXObjectProxy, // content::WebAXObjectProxy
|
||||
kWrappedExceptionHandler, // extensions::WrappedExceptionHandler
|
||||
- kLastPointerTag = kWrappedExceptionHandler,
|
||||
+ kElectronApp, // electron::api::App
|
||||
+ kElectronDebugger, // electron::api::Debugger
|
||||
+ kElectronEvent, // gin_helper::internal::Event
|
||||
+ kElectronMenu, // electron::api::Menu
|
||||
+ kElectronNetLog, // electron::api::NetLog
|
||||
+ kElectronSession, // electron::api::Session
|
||||
+ kLastPointerTag = kElectronSession,
|
||||
};
|
||||
|
||||
static_assert(kLastPointerTag <
|
||||
@@ -0,0 +1,272 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Mon, 1 Sep 2025 18:17:13 +0900
|
||||
Subject: chore: expose isolate parameter in script lifecycle observers
|
||||
|
||||
Needed after https://chromium-review.googlesource.com/c/v8/v8/+/6875273
|
||||
where callsites that deal with multiple contexts need to distinguish
|
||||
the current isolate.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 79d59c3f4d3d2d5ff39bd65ded489183247656a8..20b49742578ccf363738ee032228f30a4cd676ea 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -398,6 +398,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// WillDestroyServiceWorkerContextOnWorkerThread() is called.
|
||||
virtual void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 18714ce8fc27c8d56c5deac27ba335078c452d0a..263405c605a0477b7a39bc274d7ee03be0b9cac5 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -141,7 +141,8 @@ class CONTENT_EXPORT RenderFrameObserver {
|
||||
int32_t world_id) {}
|
||||
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
virtual void DidChangeScrollOffset() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index f337d61906651359eeb5228c112ad948f4f7a752..82cbd10f0817a85d1275519a3f93c687c0314aaa 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4684,10 +4684,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
observer.DidInstallConditionalFeatures(context, world_id);
|
||||
}
|
||||
|
||||
-void RenderFrameImpl::WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+void RenderFrameImpl::WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
- observer.WillReleaseScriptContext(context, world_id);
|
||||
+ observer.WillReleaseScriptContext(isolate, context, world_id);
|
||||
}
|
||||
|
||||
void RenderFrameImpl::DidChangeScrollOffset() {
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index f0f4335aa815ea50dbf9b720b41e4eb31f27fb90..319f222565e4ef25206cc44d33ec5e291b8ea089 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -604,7 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
int world_id) override;
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
blink::WebMediaStreamDeviceObserver* MediaStreamDeviceObserver() override;
|
||||
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
index 37691ecee7a72b2ec47ff575239f628116cf136b..c67e3faf7440514e203e5b15a68fc34525a045a2 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.cc
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
@@ -318,6 +318,7 @@ void ServiceWorkerContextClient::WorkerContextStarted(
|
||||
}
|
||||
|
||||
void ServiceWorkerContextClient::WillEvaluateScript(
|
||||
+ v8::Isolate* const v8_isolate,
|
||||
v8::Local<v8::Context> v8_context) {
|
||||
DCHECK(worker_task_runner_->RunsTasksInCurrentSequence());
|
||||
start_timing_->script_evaluation_start_time = base::TimeTicks::Now();
|
||||
@@ -336,8 +337,8 @@ void ServiceWorkerContextClient::WillEvaluateScript(
|
||||
|
||||
DCHECK(proxy_);
|
||||
GetContentClient()->renderer()->WillEvaluateServiceWorkerOnWorkerThread(
|
||||
- proxy_, v8_context, service_worker_version_id_, service_worker_scope_,
|
||||
- script_url_, service_worker_token_);
|
||||
+ proxy_, v8_isolate, v8_context, service_worker_version_id_,
|
||||
+ service_worker_scope_, script_url_, service_worker_token_);
|
||||
}
|
||||
|
||||
void ServiceWorkerContextClient::DidEvaluateScript(bool success) {
|
||||
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
|
||||
index 1f5e24bc38d6ced52e4773236522e9520efc6f6d..a22ca5968fce5e6a0c436ec9b40f0e2f7c1482cf 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.h
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.h
|
||||
@@ -165,7 +165,8 @@ class ServiceWorkerContextClient
|
||||
void WorkerContextStarted(
|
||||
blink::WebServiceWorkerContextProxy* proxy,
|
||||
scoped_refptr<base::SequencedTaskRunner> worker_task_runner) override;
|
||||
- void WillEvaluateScript(v8::Local<v8::Context> v8_context) override;
|
||||
+ void WillEvaluateScript(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> v8_context) override;
|
||||
void DidEvaluateScript(bool success) override;
|
||||
void WillInitializeWorkerContext() override;
|
||||
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
|
||||
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
|
||||
index 22fdb490c7803f3bf864d9e0e6dc618e4d83480b..3f3367b5039e28b07acd1b326724958d764171c2 100644
|
||||
--- a/extensions/renderer/dispatcher.cc
|
||||
+++ b/extensions/renderer/dispatcher.cc
|
||||
@@ -615,6 +615,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
|
||||
void Dispatcher::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
|
||||
index 9d4c74b7996e2e573079413cd24a99f86dd5b90f..241c012f1a7434944dc5ea6cad8a8c9988b069b2 100644
|
||||
--- a/extensions/renderer/dispatcher.h
|
||||
+++ b/extensions/renderer/dispatcher.h
|
||||
@@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver,
|
||||
// variables.
|
||||
void WillEvaluateServiceWorkerOnWorkerThread(
|
||||
blink::WebServiceWorkerContextProxy* context_proxy,
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> v8_context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/extensions/renderer/extension_frame_helper.cc b/extensions/renderer/extension_frame_helper.cc
|
||||
index c89ea22fcd36a9fef2ce8a83ffc46d3358630e90..6c14424384832b5ed193a08c46a0addb27e54244 100644
|
||||
--- a/extensions/renderer/extension_frame_helper.cc
|
||||
+++ b/extensions/renderer/extension_frame_helper.cc
|
||||
@@ -439,6 +439,7 @@ void ExtensionFrameHelper::DidCreateScriptContext(
|
||||
}
|
||||
|
||||
void ExtensionFrameHelper::WillReleaseScriptContext(
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
extension_dispatcher_->WillReleaseScriptContext(
|
||||
diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h
|
||||
index e16f370211ba014f778e7b9021b83988a5d27661..a79b20fe95050d6e92615711988384deea3fa1e0 100644
|
||||
--- a/extensions/renderer/extension_frame_helper.h
|
||||
+++ b/extensions/renderer/extension_frame_helper.h
|
||||
@@ -188,7 +188,8 @@ class ExtensionFrameHelper
|
||||
blink::WebDocumentLoader* document_loader) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
void OnDestruct() override;
|
||||
void DidClearWindowObject() override;
|
||||
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
index f96781a047056876b030581b539be0507acc3a1c..cd9be80be2500a001b1895c81ee597dd16fd295b 100644
|
||||
--- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
+++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
|
||||
@@ -120,7 +120,8 @@ class WebServiceWorkerContextClient {
|
||||
//
|
||||
// |v8_context| is the V8 context of the worker and is used to support
|
||||
// service workers in Chrome extensions.
|
||||
- virtual void WillEvaluateScript(v8::Local<v8::Context> v8_context) {}
|
||||
+ virtual void WillEvaluateScript(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context> v8_context) {}
|
||||
|
||||
// Called when initial script evaluation finished for the main script.
|
||||
// |success| is true if the evaluation completed with no uncaught exception.
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index 52e8828d8fffaba8ab05436cb4d727595f18238a..6743653f5018c06d3e173aaacdca7275c6ec703f 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -665,7 +665,8 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
int32_t world_id) {}
|
||||
|
||||
// WebKit is about to release its reference to a v8 context for a frame.
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
// Geometry notifications ----------------------------------------------
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 2e8653654686f4fc775288f059ff27daa38e02d5..b0e061525f442952e5f8a90fed7002830dbb4bc3 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -108,11 +108,12 @@ void LocalWindowProxy::DisposeContext(Lifecycle next_status,
|
||||
|
||||
ScriptState::Scope scope(script_state_);
|
||||
v8::Local<v8::Context> context = script_state_->GetContext();
|
||||
+ CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
|
||||
// The embedder could run arbitrary code in response to the
|
||||
// willReleaseScriptContext callback, so all disposing should happen after
|
||||
// it returns.
|
||||
- GetFrame()->Client()->WillReleaseScriptContext(context, world_->GetWorldId());
|
||||
- CHECK_EQ(GetIsolate(), script_state_->GetIsolate());
|
||||
+ GetFrame()->Client()->WillReleaseScriptContext(
|
||||
+ GetIsolate(), context, world_->GetWorldId());
|
||||
MainThreadDebugger::Instance(GetIsolate())
|
||||
->ContextWillBeDestroyed(script_state_);
|
||||
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 8d73ddb12013ce195026b9f63050cf33f0bfb0fd..078f0e67e8de6a05178e8e2410f61784fe656dee 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -303,7 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
int32_t world_id) = 0;
|
||||
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
- virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ virtual void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 1aacf6f66b543a4ede6ab5d885143dd4a0821e8a..c695d942e295d9137a284e5536a10d49a055bbf4 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -303,10 +303,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
|
||||
}
|
||||
|
||||
void LocalFrameClientImpl::WillReleaseScriptContext(
|
||||
+ v8::Isolate* const isolate,
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
if (web_frame_->Client()) {
|
||||
- web_frame_->Client()->WillReleaseScriptContext(context, world_id);
|
||||
+ web_frame_->Client()->WillReleaseScriptContext(isolate, context, world_id);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 16066fe34ee0335a0dabe00b6890e5844349c0b5..cc84479f65bdbe56cb4b38bfcef0d752bbe68d35 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -83,7 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
int32_t world_id) override;
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
|
||||
// Returns true if we should allow register V8 extensions to be added.
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index d8f3b11c98fd58baa9995762a29847b9fd760c84..5a9c9356a2098dfa9d28a5d30b19b492463216c8 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -422,7 +422,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
int32_t world_id) override {}
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
- void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
+ void WillReleaseScriptContext(v8::Isolate* const isolate,
|
||||
+ v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
bool AllowScriptExtensions() override { return false; }
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
index 17860c80651c526e03fd06e4b644c3332b241be7..741a8587e95789038168eb500d3995724e11b47d 100644
|
||||
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
|
||||
@@ -181,6 +181,7 @@ void ServiceWorkerGlobalScopeProxy::WillEvaluateScript() {
|
||||
ScriptState::Scope scope(
|
||||
WorkerGlobalScope()->ScriptController()->GetScriptState());
|
||||
Client().WillEvaluateScript(
|
||||
+ WorkerGlobalScope()->ScriptController()->GetScriptState()->GetIsolate(),
|
||||
WorkerGlobalScope()->ScriptController()->GetContext());
|
||||
top_level_script_evaluation_start_time_ = base::TimeTicks::Now();
|
||||
}
|
||||
@@ -10,10 +10,10 @@ Subject: chore: "grandfather in" Electron Views and Delegates
|
||||
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
|
||||
|
||||
diff --git a/ui/views/view.h b/ui/views/view.h
|
||||
index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d275513b80e 100644
|
||||
index 7f70b4f6062e369e2198fc12ff507786283a13c7..22cae8f202357d848bd57aff1ee22abfcc6efed6 100644
|
||||
--- a/ui/views/view.h
|
||||
+++ b/ui/views/view.h
|
||||
@@ -80,6 +80,19 @@ class ArcNotificationContentView;
|
||||
@@ -81,6 +81,19 @@ class ArcNotificationContentView;
|
||||
class WideFrameView;
|
||||
} // namespace ash
|
||||
|
||||
@@ -33,7 +33,7 @@ index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d27
|
||||
namespace exo {
|
||||
class ShellSurfaceBase;
|
||||
}
|
||||
@@ -324,6 +337,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -325,6 +338,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
public:
|
||||
class OwnedByClientPassKey {
|
||||
private:
|
||||
@@ -49,7 +49,7 @@ index 08ec59edf033052233a105ab13cf00ada8bd4e38..b80d3ab4eb24487de6a8a27d67d23d27
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop class.
|
||||
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
|
||||
index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e075f4095 100644
|
||||
index ff9c5abfdb02d9798b1491e2bbc296f2c7c74398..47d8a897d58b0d3829734105e81b887684dd009b 100644
|
||||
--- a/ui/views/widget/widget_delegate.h
|
||||
+++ b/ui/views/widget/widget_delegate.h
|
||||
@@ -168,6 +168,12 @@ namespace crostini {
|
||||
@@ -73,7 +73,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `SetOwnedByWidget()`.
|
||||
@@ -465,6 +472,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
@@ -464,6 +471,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
};
|
||||
class RegisterDeleteCallbackPassKey {
|
||||
private:
|
||||
@@ -81,7 +81,7 @@ index 1b23449ceb8e2c257cd40c375154a5fa93d1a26e..3aca30535eb99132a664936bcb19e58e
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `RegisterDeleteDelegateCallback()`.
|
||||
@@ -922,6 +930,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
@@ -921,6 +929,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
View* GetContentsView() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -7,10 +7,10 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
|
||||
of explicitly adding ScopedAllowBlocking calls as friends.
|
||||
|
||||
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
|
||||
index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d764a85205 100644
|
||||
index 71850795591e1a479620f1348c6adc705db9e839..8821ee4429727630e6600d7f85f0999d3f4b2270 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -132,6 +132,7 @@ class KeyStorageLinux;
|
||||
@@ -133,6 +133,7 @@ class KeyStorageLinux;
|
||||
class NativeBackendKWallet;
|
||||
class NativeDesktopMediaList;
|
||||
class PartnerBookmarksReader;
|
||||
@@ -18,7 +18,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
class Profile;
|
||||
class ProfileImpl;
|
||||
class ScopedAllowBlockingForProfile;
|
||||
@@ -279,6 +280,9 @@ class BackendImpl;
|
||||
@@ -280,6 +281,9 @@ class BackendImpl;
|
||||
class InFlightIO;
|
||||
bool CleanupDirectorySync(const base::FilePath&);
|
||||
} // namespace disk_cache
|
||||
@@ -28,7 +28,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
namespace enterprise_connectors {
|
||||
class LinuxKeyRotationCommand;
|
||||
} // namespace enterprise_connectors
|
||||
@@ -572,6 +576,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -574,6 +578,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class ::DesktopNotificationBalloon;
|
||||
friend class ::FirefoxProfileLock;
|
||||
friend class ::GaiaConfig;
|
||||
@@ -36,7 +36,7 @@ index f9e528588b2f2a645366c3c59148a2af06c280fe..7090003e45a213b2bc326713c6df11d7
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -613,6 +618,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class cronet::CronetPrefsManager;
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
|
||||
@@ -34,10 +34,10 @@ index 2dc44d4787d5198cff7be2cf98ad5acf2d3a9a0b..27a0335aac2bd4239616cf71f5d015c9
|
||||
|
||||
class ScrollEvent;
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 896721c02c1cf0dac03d98b152af210e6382ccee..f84b915edfd76df977aaa4fc7f0c1ae694726784 100644
|
||||
index c60e51f4e1a789caf5ad9c54e496f3e72a327b51..f4fa30c1621e2eb78913ea97a993eb0a3528f36c 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1358,6 +1358,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
@@ -1363,6 +1363,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
return background_paint_brush_;
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ index 896721c02c1cf0dac03d98b152af210e6382ccee..f84b915edfd76df977aaa4fc7f0c1ae6
|
||||
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
|
||||
return new DesktopNativeCursorManagerWin();
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
index dcda976f4c3cc0ba6bcf015d5bf7435df009ae30..13cfa18bf406f244ec361a1230ccce440ad9785a 100644
|
||||
index baee602a2ce7207ba937c4e46ad8b896bec7ca92..cef7afbf408e38798c398c23dc3e964bd1d95d17 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -273,6 +273,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -272,6 +272,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
|
||||
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
|
||||
HBRUSH GetBackgroundPaintBrush() override;
|
||||
@@ -61,10 +61,10 @@ index dcda976f4c3cc0ba6bcf015d5bf7435df009ae30..13cfa18bf406f244ec361a1230ccce44
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1fa92aa8d 100644
|
||||
index 8c70c5ecef8c352e7cd5b9a986bd45d670760069..b06c3ac425bb1f20b890447ed3315127195ed253 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3239,15 +3239,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3244,15 +3244,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
}
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
@@ -86,7 +86,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -3270,6 +3274,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3275,6 +3279,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
// handle alt-space, or in the frame itself.
|
||||
is_right_mouse_pressed_on_caption_ = false;
|
||||
ReleaseCapture();
|
||||
@@ -94,7 +94,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
|
||||
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
|
||||
// expect screen coordinates.
|
||||
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
|
||||
@@ -3277,7 +3282,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3282,7 +3287,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
w_param = static_cast<WPARAM>(SendMessage(
|
||||
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
|
||||
if (w_param == HTCAPTION || w_param == HTSYSMENU) {
|
||||
@@ -114,7 +114,7 @@ index 3637176c05a7074cb9042b74f7c9ea2e29af5ee5..3ed583cf09dec0ae83c3c9449e6ef7e1
|
||||
}
|
||||
} else if (message == WM_NCLBUTTONDOWN &&
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index 2aa7ca1f713da54d12c7ac78103a260a4744d040..7449d7642022145fc1be76b299fa1db2d724122b 100644
|
||||
index 5e075296a09099e419fcbf7af2772767592edcd8..459339a4c0f0534f4c0ca8ddcb087fc75465beca 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
|
||||
@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
|
||||
by changing something in Electron.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 2482c7544c44204073d629389ba02cce0d665529..d60ab39f3adfa225b7b4cd413c707fd05b88f924 100644
|
||||
index d30a9d94cfc30035b39d510ded65f271c9c51bb1..705e848acfc76a6b2e3a4dffb9e8ae8f86d54cbc 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5287,7 +5287,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5290,7 +5290,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
: IsGuest();
|
||||
// While some guest types do not have a guest SiteInstance, the ones that
|
||||
// don't all override WebContents creation above.
|
||||
|
||||
@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index 8221d7b96395b06ee177be302dd476c83f569eaf..4c4500421f9cd164ab49b85457e6e37e0b4a703c 100644
|
||||
index 19a127d46584ece213442b24beaa6ec45bf3fa14..d8045edd0a207b41e60dbae66a0f50eec31b2d8a 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -226,7 +226,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
|
||||
@@ -27,12 +27,12 @@ index c390a83277f564f1a67a7dcffa36b9d77a35bc0b..b13273a4b194ad5e8ca2d1639ebca831
|
||||
// When the enterprise policy is not set, use finch/feature flag choice.
|
||||
return base::FeatureList::IsEnabled(
|
||||
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
index 56eeddf89e225119a5a50b05562f1de93ed698f7..dbb9c96117816121665288a50216b1dc4ca35494 100644
|
||||
index 8f124aa7a67717f3efc52d22dfcef0776ff4cad3..d21e5b49f3a06c5f78e38b45e8be89530fdfd435 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -252,10 +252,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
|
||||
@@ -245,10 +245,13 @@ bool IsPrintingEnabled(content::BrowserContext* context) {
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
|
||||
#if BUILDFLAG(ENABLE_PDF_INK2)
|
||||
bool IsPdfAnnotationsEnabledByPolicy(content::BrowserContext* context) {
|
||||
+# if 0
|
||||
PrefService* prefs =
|
||||
@@ -42,7 +42,7 @@ index 56eeddf89e225119a5a50b05562f1de93ed698f7..dbb9c96117816121665288a50216b1dc
|
||||
+#endif
|
||||
+ return true;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(ENABLE_PDF_INK2)
|
||||
#endif // BUILDFLAG(ENABLE_PDF_INK2)
|
||||
|
||||
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
|
||||
index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd60960228 100644
|
||||
|
||||
@@ -7,10 +7,10 @@ Pending upstream patch, this gives us fuller access to the window.open params
|
||||
so that we will be able to decide whether to cancel it or not.
|
||||
|
||||
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
||||
index 7a9effeec99682ef063ebe71f209e6ed9fc4cad4..71ef44be47a8665ee36449a38333ddf9cff33ad4 100644
|
||||
index 047f1258f951f763df2ca0ba355b19d19337826b..9fc7114312212fbe38ddec740b4aebbcd72cb0f8 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.cc
|
||||
+++ b/chrome/browser/media/offscreen_tab.cc
|
||||
@@ -287,8 +287,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
@@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -80,20 +80,20 @@ index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d9
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index a1d4f57fe0d8cc69471c57bcdf17bee7b2d8aecc..a2387a6fdfbddceea8c21b449197a11215c423e9 100644
|
||||
index 2b9d9a80fb34b5083b6b038ff12714ad6bd363d7..85197b1500bbcdfbd2286b32a0188c0ca2436e07 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2371,8 +2371,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
@@ -2386,7 +2386,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
- const std::string& frame_name,
|
||||
const std::string& frame_name,
|
||||
- const GURL& target_url) {
|
||||
+ const GURL& target_url,
|
||||
+ const content::mojom::CreateNewWindowParams& params) {
|
||||
if (IsActorOperatingOnWebContents(
|
||||
if (actor::IsActorOperatingOnWebContents(
|
||||
profile(), content::WebContents::FromRenderFrameHost(opener))) {
|
||||
// If an ExecutionEngine is acting on the opener, prevent it from creating
|
||||
@@ -2384,7 +2383,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2398,7 +2399,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
return (window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
@@ -103,10 +103,10 @@ index a1d4f57fe0d8cc69471c57bcdf17bee7b2d8aecc..a2387a6fdfbddceea8c21b449197a112
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index e7c724f352f226de2e3bdba58fea2fd6d7a163f0..5436886c68f329081ccd9a6a54501de29728e1f1 100644
|
||||
index b4ed72663324d359109813a5b22b6796568097f5..86153748bc72142aafc0b0b53d922e2d22d4d372 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -947,8 +947,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -954,8 +954,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -145,7 +145,7 @@ index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3
|
||||
// The profile used for the presentation.
|
||||
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
|
||||
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
index 08b9f7ad8544011ee1cbb9bc9857ea06e2fa2c0b..69f666bdc05662bc40e133022b5364cbbbbbdb39 100644
|
||||
index 46382dbe43df6abb75ca7825de116d7ed2d1cea6..b07cfad74ec54ad251012dca57c8f44760ba13c1 100644
|
||||
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
@@ -103,8 +103,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
@@ -159,10 +159,10 @@ index 08b9f7ad8544011ee1cbb9bc9857ea06e2fa2c0b..69f666bdc05662bc40e133022b5364cb
|
||||
}
|
||||
content::WebContents* CreateCustomWebContents(
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db1951cccbb95 100644
|
||||
index 73008c08f2b4fd31636b0df232fc7cd66a69fcaf..a09bfe9af4cb4cd7e1e70b4df4900901a8336894 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -202,14 +202,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -205,14 +205,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -180,7 +180,7 @@ index c07249241e5265030c1feada568fbd54f4e18efa..f0946d19ce07723be8a3736f523db195
|
||||
java_gurl);
|
||||
}
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
index 13afd2de87888e927d8baf77f4c3de65179c52f5..06de4a27e625745947d2c119fa8f5eb555d99a1d 100644
|
||||
index fb21bd2cd47618838fb449df5fcf63ee28206146..b0faf6ee23fdc3b104e780e445202350fa155946 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -84,8 +84,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -222,10 +222,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 860b5f5eca90b9345073fbee2db016cc6c56154e..64f7b20657c9e004083ecb32544d0dcd1a443343 100644
|
||||
index d7cf36715b036c29d881c84a07c0d3b7f73d609f..11c0124b6f3f1599b5a56ba7817e946a871316cc 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5250,8 +5250,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5253,8 +5253,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
if (delegate_ &&
|
||||
delegate_->IsWebContentsCreationOverridden(
|
||||
opener, source_site_instance, params.window_container_type,
|
||||
@@ -236,7 +236,7 @@ index 860b5f5eca90b9345073fbee2db016cc6c56154e..64f7b20657c9e004083ecb32544d0dcd
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d42b36b11 100644
|
||||
index 968cddc769e2bf0bb56359b36bc03cbce6539da1..08c983ac6a8e5733431ba00e1288f6d6b087eee6 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -250,10 +250,10 @@ index 33be50ce93dd998df5244f9ade391943f06978ad..3bb9baf76d331351d23d59fc2b9eb82d
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 6c4c6265c26f5304b8f77d7fc5a4fad5dffc831d..d0842904102fee982bc8502478a0a9067bb77904 100644
|
||||
index 23b9c84175fd44f0da2ef398c8bf68cf6e3d3ef8..2e8e60c8ebe837fc68318bd5c13dbd0c873c4292 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -364,8 +364,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -368,8 +368,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -356,10 +356,10 @@ index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
index 570cfeb6c74f04d4748648b86661ccf603c71452..da8b64d70e5b26431a576cc52316210fce36f99a 100644
|
||||
index fdc6afbf9048fa254d6f361b36765cf95d5eb521..16d297a3f6bde6bc4c038b79a057700aec68b689 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
@@ -582,8 +582,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -584,8 +584,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -384,10 +384,10 @@ index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d1
|
||||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
index 1d95f5b521d7ab586fcecda6d6f822b432480367..b534327a8bd5b2c31522339b30caf123734c5cc3 100644
|
||||
index 64ecdeb50b861825c9b55a930ff18c36818cad0b..e037d5607f8e1f3acb4ed018080de1b3357647be 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -208,8 +208,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
@@ -206,8 +206,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -398,7 +398,7 @@ index 1d95f5b521d7ab586fcecda6d6f822b432480367..b534327a8bd5b2c31522339b30caf123
|
||||
->options()
|
||||
->block_new_web_contents();
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
||||
index 42e0654da5659ba647529c4b0b97ec5df61d59a1..406e2ca73c182005014b56824e89ddfb25fd28f5 100644
|
||||
index 0e0f67908ca8c97bd0dfe4c4a8e008c74010c623..27ecb428739e2548a42f1485f8b7279a84f7190c 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
|
||||
@@ -11,10 +11,10 @@ not need this dependency.
|
||||
refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603
|
||||
|
||||
diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn
|
||||
index fffee1ca3d0ab493c616e18ecdc0a4fb6525f974..11816e864deb4244c4a2d87ccd89c0a5f632a024 100644
|
||||
index db1a2f393af2b561cb7d13861bc37f81ab3227c8..d371808e1e59e2dbb2da8790a2212cc001caa772 100644
|
||||
--- a/chrome/browser/ui/color/BUILD.gn
|
||||
+++ b/chrome/browser/ui/color/BUILD.gn
|
||||
@@ -85,9 +85,6 @@ source_set("mixers") {
|
||||
@@ -87,9 +87,6 @@ source_set("mixers") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ index fffee1ca3d0ab493c616e18ecdc0a4fb6525f974..11816e864deb4244c4a2d87ccd89c0a5
|
||||
- }
|
||||
}
|
||||
|
||||
if (!is_ios && !is_android) {
|
||||
if (!is_android) {
|
||||
|
||||
@@ -8,167 +8,154 @@ Restores part of https://chromium-review.googlesource.com/c/chromium/src/+/67991
|
||||
Patch can be removed once cppgc migration is complete
|
||||
https://github.com/electron/electron/issues/47922
|
||||
|
||||
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
|
||||
index 5a31687bbd0fca61db3a7c41ed73d938340d6446..b84f5fd336bc4b61b2cd0b2fc92382b00e928701 100644
|
||||
--- a/gin/object_template_builder.cc
|
||||
+++ b/gin/object_template_builder.cc
|
||||
@@ -141,7 +141,7 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
: "Objects of this type cannot be created using the "
|
||||
"constructor"))),
|
||||
template_(constructor_template_->InstanceTemplate()) {
|
||||
- template_->SetInternalFieldCount(0);
|
||||
+ template_->SetInternalFieldCount(kNumberOfInternalFields);
|
||||
diff --git a/gin/function_template.h b/gin/function_template.h
|
||||
index 84ab9585240a49048774811718f7ebd6f988e485..f062163cdd81def12fae7e507d18a9133dd0804d 100644
|
||||
--- a/gin/function_template.h
|
||||
+++ b/gin/function_template.h
|
||||
@@ -77,6 +77,7 @@ class GIN_EXPORT CallbackHolderBase {
|
||||
CallbackHolderBase* holder);
|
||||
~DisposeObserver() override;
|
||||
void OnBeforeDispose(v8::Isolate* isolate) override;
|
||||
+ void OnBeforeMicrotasksRunnerDispose(v8::Isolate* isolate) override {}
|
||||
void OnDisposed() override;
|
||||
|
||||
private:
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 083d59f78c542f4900e1b210a0935276516b894b..e32658e386853e2142c325a60ec385635256b758 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -225,6 +225,7 @@ void IsolateHolder::WillCreateMicrotasksRunner() {
|
||||
|
||||
void IsolateHolder::WillDestroyMicrotasksRunner() {
|
||||
DCHECK(g_initialized_microtasks_runner);
|
||||
+ isolate_data_->NotifyBeforeMicrotasksRunnerDispose();
|
||||
g_destroyed_microtasks_runner = true;
|
||||
}
|
||||
|
||||
ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
|
||||
index 884990426f13a6abca22a60dd8cc0685f8435b23..64ac0a64a05105532f3cda898aeac68c21338e60 100644
|
||||
index 9670f9f904c6c864e82409617ac4c7698c6fc3ef..d1014af4b63da244820ff865a8e824ddf68433a9 100644
|
||||
--- a/gin/per_isolate_data.cc
|
||||
+++ b/gin/per_isolate_data.cc
|
||||
@@ -68,12 +68,32 @@ PerIsolateData* PerIsolateData::From(Isolate* isolate) {
|
||||
return static_cast<PerIsolateData*>(isolate->GetData(kEmbedderNativeGin));
|
||||
}
|
||||
|
||||
+void PerIsolateData::DeprecatedSetObjectTemplate(DeprecatedWrapperInfo* info,
|
||||
+ Local<ObjectTemplate> templ) {
|
||||
+ deprecated_object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::SetObjectTemplate(
|
||||
const WrapperInfo* info,
|
||||
Local<ObjectTemplate> templ) {
|
||||
@@ -79,8 +79,13 @@ void PerIsolateData::SetObjectTemplate(
|
||||
object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
|
||||
}
|
||||
|
||||
+void PerIsolateData::SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
+ Local<FunctionTemplate> templ) {
|
||||
+ function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
-void PerIsolateData::SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
- Local<FunctionTemplate> templ) {
|
||||
+void PerIsolateData::DeprecatedSetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info, Local<FunctionTemplate> templ) {
|
||||
+ deprecated_function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
+}
|
||||
+
|
||||
+v8::Local<v8::ObjectTemplate> PerIsolateData::DeprecatedGetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info) {
|
||||
+ DeprecatedObjectTemplateMap::iterator it =
|
||||
+ deprecated_object_templates_.find(info);
|
||||
+ if (it == deprecated_object_templates_.end()) {
|
||||
+ return v8::Local<v8::ObjectTemplate>();
|
||||
+ }
|
||||
+ return it->second.Get(isolate_);
|
||||
+}
|
||||
+
|
||||
v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
const WrapperInfo* info) {
|
||||
ObjectTemplateMap::iterator it = object_templates_.find(info);
|
||||
@@ -83,6 +103,15 @@ v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
+void PerIsolateData::SetFunctionTemplate(
|
||||
+ const WrapperInfo* info, Local<FunctionTemplate> templ) {
|
||||
function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
|
||||
}
|
||||
|
||||
@@ -103,11 +108,22 @@ v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
|
||||
return it->second.Get(isolate_);
|
||||
}
|
||||
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info) {
|
||||
+ FunctionTemplateMap::iterator it = function_templates_.find(info);
|
||||
+ if (it == function_templates_.end()) {
|
||||
-v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::DeprecatedGetFunctionTemplate(
|
||||
DeprecatedWrapperInfo* info) {
|
||||
+ DeprecatedFunctionTemplateMap::iterator it =
|
||||
+ deprecated_function_templates_.find(info);
|
||||
+ if (it == deprecated_function_templates_.end()) {
|
||||
+ return v8::Local<v8::FunctionTemplate>();
|
||||
+ }
|
||||
+ return it->second.Get(isolate_);
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::AddDisposeObserver(DisposeObserver* observer) {
|
||||
dispose_observers_.AddObserver(observer);
|
||||
+v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
|
||||
+ const WrapperInfo* info) {
|
||||
FunctionTemplateMap::iterator it = function_templates_.find(info);
|
||||
- if (it == function_templates_.end())
|
||||
+ if (it == function_templates_.end()) {
|
||||
return v8::Local<v8::FunctionTemplate>();
|
||||
+ }
|
||||
return it->second.Get(isolate_);
|
||||
}
|
||||
|
||||
@@ -125,6 +141,12 @@ void PerIsolateData::NotifyBeforeDispose() {
|
||||
}
|
||||
}
|
||||
|
||||
+void PerIsolateData::NotifyBeforeMicrotasksRunnerDispose() {
|
||||
+ for (auto& observer : dispose_observers_) {
|
||||
+ observer.OnBeforeMicrotasksRunnerDispose(isolate_.get());
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void PerIsolateData::NotifyDisposed() {
|
||||
for (auto& observer : dispose_observers_) {
|
||||
observer.OnDisposed();
|
||||
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
|
||||
index bce889749415da341e6e6e4082ac06bbeb4bb80a..d748c1cf8cef7da90686686f1b8072bcd530541d 100644
|
||||
index 82048c08a14d05e1f9bd6ad6cc16d16f0905f879..e38b0ca134e71a968805a547c1eccbc0cd6f6dda 100644
|
||||
--- a/gin/per_isolate_data.h
|
||||
+++ b/gin/per_isolate_data.h
|
||||
@@ -51,11 +51,24 @@ class GIN_EXPORT PerIsolateData {
|
||||
|
||||
static PerIsolateData* From(v8::Isolate* isolate);
|
||||
|
||||
+ void DeprecatedSetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::ObjectTemplate> object_template);
|
||||
@@ -34,6 +34,10 @@ class GIN_EXPORT PerIsolateData {
|
||||
// be entered before the observer is notified, but there will not be a
|
||||
// handle scope by default.
|
||||
virtual void OnBeforeDispose(v8::Isolate* isolate) = 0;
|
||||
+
|
||||
+ // Called just before the microtasks runner is about to be disposed.
|
||||
+ virtual void OnBeforeMicrotasksRunnerDispose(v8::Isolate* isolate) = 0;
|
||||
+
|
||||
// Called just after the isolate has been disposed.
|
||||
virtual void OnDisposed() = 0;
|
||||
};
|
||||
@@ -61,24 +65,29 @@ class GIN_EXPORT PerIsolateData {
|
||||
void SetObjectTemplate(const WrapperInfo* info,
|
||||
v8::Local<v8::ObjectTemplate> object_template);
|
||||
|
||||
+ void SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
+
|
||||
+ v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
|
||||
+ DeprecatedWrapperInfo* info);
|
||||
- void SetFunctionTemplate(DeprecatedWrapperInfo* info,
|
||||
- v8::Local<v8::FunctionTemplate> function_template);
|
||||
+ void DeprecatedSetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
+
|
||||
+ void SetFunctionTemplate(
|
||||
+ const WrapperInfo* info,
|
||||
+ v8::Local<v8::FunctionTemplate> function_template);
|
||||
|
||||
- // These are low-level functions for retrieving object or function templates
|
||||
- // stored in this object. Because these templates are often created lazily,
|
||||
- // most clients should call higher-level functions that know how to populate
|
||||
- // these templates if they haven't already been created.
|
||||
v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
|
||||
DeprecatedWrapperInfo* info);
|
||||
|
||||
v8::Local<v8::ObjectTemplate> GetObjectTemplate(const WrapperInfo* info);
|
||||
|
||||
- v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
|
||||
+ v8::Local<v8::FunctionTemplate> DeprecatedGetFunctionTemplate(
|
||||
DeprecatedWrapperInfo* info);
|
||||
|
||||
+ v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
|
||||
+ DeprecatedWrapperInfo* info);
|
||||
+ const WrapperInfo* info);
|
||||
+
|
||||
void AddDisposeObserver(DisposeObserver* observer);
|
||||
void RemoveDisposeObserver(DisposeObserver* observer);
|
||||
void NotifyBeforeDispose();
|
||||
@@ -74,14 +87,20 @@ class GIN_EXPORT PerIsolateData {
|
||||
}
|
||||
+ void NotifyBeforeMicrotasksRunnerDispose();
|
||||
void NotifyDisposed();
|
||||
|
||||
private:
|
||||
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
|
||||
+ DeprecatedObjectTemplateMap;
|
||||
void EnableIdleTasks(std::unique_ptr<V8IdleTaskRunner> idle_task_runner);
|
||||
@@ -99,6 +108,8 @@ class GIN_EXPORT PerIsolateData {
|
||||
typedef std::map<const WrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
|
||||
ObjectTemplateMap;
|
||||
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
+ FunctionTemplateMap;
|
||||
typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
+ DeprecatedFunctionTemplateMap;
|
||||
+ typedef std::map<const WrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
|
||||
FunctionTemplateMap;
|
||||
|
||||
// PerIsolateData doesn't actually own |isolate_|. Instead, the isolate is
|
||||
// owned by the IsolateHolder, which also owns the PerIsolateData.
|
||||
raw_ptr<v8::Isolate, AcrossTasksDanglingUntriaged> isolate_;
|
||||
@@ -107,6 +118,7 @@ class GIN_EXPORT PerIsolateData {
|
||||
raw_ptr<v8::ArrayBuffer::Allocator, DanglingUntriaged> allocator_;
|
||||
+ DeprecatedObjectTemplateMap deprecated_object_templates_;
|
||||
DeprecatedObjectTemplateMap deprecated_object_templates_;
|
||||
ObjectTemplateMap object_templates_;
|
||||
+ FunctionTemplateMap function_templates_;
|
||||
+ DeprecatedFunctionTemplateMap deprecated_function_templates_;
|
||||
FunctionTemplateMap function_templates_;
|
||||
base::ObserverList<DisposeObserver> dispose_observers_;
|
||||
std::shared_ptr<V8ForegroundTaskRunnerBase> task_runner_;
|
||||
std::shared_ptr<V8ForegroundTaskRunnerBase> user_visible_task_runner_;
|
||||
diff --git a/gin/public/wrapper_info.h b/gin/public/wrapper_info.h
|
||||
index 34b5f1c30c05152122f23708a1df62f00296fcd6..dac3459dc822db1b242288293605ab4c4a6cf76f 100644
|
||||
--- a/gin/public/wrapper_info.h
|
||||
+++ b/gin/public/wrapper_info.h
|
||||
@@ -13,6 +13,17 @@
|
||||
|
||||
namespace gin {
|
||||
|
||||
+enum InternalFields {
|
||||
+ kWrapperInfoIndex,
|
||||
+ kEncodedValueIndex,
|
||||
+ kNumberOfInternalFields,
|
||||
+};
|
||||
+
|
||||
+struct GIN_EXPORT DeprecatedWrapperInfo {
|
||||
+ static DeprecatedWrapperInfo* From(v8::Local<v8::Object> object);
|
||||
+ const GinEmbedder embedder;
|
||||
+};
|
||||
+
|
||||
struct GIN_EXPORT WrapperInfo : v8::Object::WrapperTypeInfo {
|
||||
const WrappablePointerTag pointer_tag;
|
||||
};
|
||||
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
|
||||
index 803b5648e1c3ec3621149e98850bebfbf7f2de75..dd49202103993ee03379acd6873b92bc8fccb786 100644
|
||||
--- a/gin/wrappable.cc
|
||||
+++ b/gin/wrappable.cc
|
||||
@@ -48,7 +48,7 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
|
||||
CHECK(!templ.IsEmpty());
|
||||
data->SetObjectTemplate(info, templ);
|
||||
}
|
||||
- CHECK_EQ(0, templ->InternalFieldCount());
|
||||
+ CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
|
||||
v8::Local<v8::Object> wrapper;
|
||||
// |wrapper| may be empty in some extreme cases, e.g., when
|
||||
// Object.prototype.constructor is overwritten.
|
||||
@@ -56,6 +56,12 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
|
||||
return {};
|
||||
}
|
||||
|
||||
+ // Delete the internal fields once gin_helper::DeprecatedWrappable does
|
||||
+ // not exist anymore.
|
||||
+ int indices[] = {kWrapperInfoIndex, kEncodedValueIndex};
|
||||
+ void* values[] = {nullptr, nullptr};
|
||||
+ wrapper->SetAlignedPointerInInternalFields(2, indices, values);
|
||||
+
|
||||
AssociateWithWrapper(isolate, wrapper);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0326bb438 100644
|
||||
index ac62aeecad617ce559d3248a61f3e19220d2e6bc..9e6b5b1c84ee1289fd3978fc7430f86b03165521 100644
|
||||
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
@@ -147,7 +147,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
@@ -145,7 +145,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
const bool registered =
|
||||
platform_global_shortcut_listener_->RegisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(),
|
||||
@@ -52,7 +52,7 @@ index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0
|
||||
if (registered) {
|
||||
registered_hot_keys_.insert(accelerator);
|
||||
}
|
||||
@@ -162,14 +163,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
@@ -160,14 +161,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
|
||||
platform_global_shortcut_listener_->UnregisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
|
||||
@@ -70,7 +70,7 @@ index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0
|
||||
int modifiers = 0;
|
||||
if (is_alt_down) {
|
||||
modifiers |= ui::EF_ALT_DOWN;
|
||||
@@ -180,6 +182,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
@@ -178,6 +180,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
if (is_shift_down) {
|
||||
modifiers |= ui::EF_SHIFT_DOWN;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
|
||||
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852fb311088 100644
|
||||
index 9240e8485a8dc895eb455b1418fc7559e52a5dd5..e9444e765ac8ac595b799be7feeb6a483c6acf9f 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -272,8 +272,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
}
|
||||
#endif // defined(ADDRESS_SANITIZER)
|
||||
|
||||
@@ -25,7 +25,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
base::FileDescriptorStore& file_descriptor_store =
|
||||
base::FileDescriptorStore::GetInstance();
|
||||
@@ -302,11 +307,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
|
||||
@@ -40,7 +40,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
}
|
||||
|
||||
@@ -950,7 +956,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
@@ -951,7 +957,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
return TerminateForFatalInitializationError();
|
||||
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
@@ -50,7 +50,7 @@ index 46c7c57b5ff40b0e40d66bbeb8ec3f2b7f86cea0..46d144563983dee5a793948d9fd11852
|
||||
blink::TrialTokenValidator::SetOriginTrialPolicyGetter(
|
||||
base::BindRepeating([]() -> blink::OriginTrialPolicy* {
|
||||
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
|
||||
index 8b02f553e2fc29da88c3e14c05a7ee82210eab51..14f2e66d5ecda6e860724a3ab946eaaffba33d6d 100644
|
||||
index fee2fab8ab33a3829f055b0408e9e763443016cc..678c636c9ca08f8113dc67aafaf9761f33a7f0e5 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@@ -73,7 +73,7 @@ index 8b02f553e2fc29da88c3e14c05a7ee82210eab51..14f2e66d5ecda6e860724a3ab946eaaf
|
||||
return new ContentClient();
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c08af8c7fb 100644
|
||||
index 8151396412bf6981f3424526386ad6257b8c895d..ac5041c1666ac968251768f604f92434d92e374d 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -84,8 +84,8 @@ index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c0
|
||||
#include <vector>
|
||||
|
||||
#include "base/notreached.h"
|
||||
@@ -174,6 +175,8 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
virtual bool ShouldHandleConsoleControlEvents();
|
||||
@@ -181,6 +182,8 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
virtual bool ShouldInitializePerfetto(InvokedIn invoked_in);
|
||||
#endif
|
||||
|
||||
+ virtual std::string_view GetBrowserV8SnapshotFilename();
|
||||
@@ -94,10 +94,10 @@ index db611d99a6c0f18f39967b38791822fda7d175b5..cc150475de655d5ef20a107ae3ef80c0
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index f3853a7b412d2a86dfd915441d0dffd4199d5c41..1abeb30142251c7abea1b33f7921f79d85532475 100644
|
||||
index 95d0cac02240f0a64a129cb101a53a3bb86fc914..47144ad8adb01ae611f40570e46fc97a7c93e1d5 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -651,8 +651,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -654,8 +654,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -107,7 +107,7 @@ index f3853a7b412d2a86dfd915441d0dffd4199d5c41..1abeb30142251c7abea1b33f7921f79d
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -661,10 +660,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -664,10 +663,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
|
||||
|
||||
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1fac42e9e 100644
|
||||
index 25c9e17bd063cc07fd2727474395a9276c4a000d..413f3019bd55388e8ebc8fe39af766b7c61e9924 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1956,6 +1956,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1957,6 +1957,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1975,9 +1995,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1976,9 +1996,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme_piece() == kChromeUIScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
@@ -49,7 +49,7 @@ index 6bcf498a08a4600b6fb4892e395d6d20bf771057..5d4b50fbfdb43a3efee99f2e27b7fed1
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -1985,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1986,9 +2004,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
@@ -82,7 +82,7 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b9980dd37184 100644
|
||||
index 1f5672f1aae610f2511a5a40885750f987871c8c..199a69a9c45e066a50f48298dae2dbcd06560d5b 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -216,9 +216,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
|
||||
@@ -121,7 +121,7 @@ index 024d7d74547e248ca685dc2fa8d0cdeb66b42c55..fc90627d0f733d49903325bb2f70b998
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
@@ -1010,6 +1020,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -1009,6 +1019,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 59c8d5a2e687ac6148889c87f353b33959e276f6..7ef10194f02e32a9ec137f7f2519c4a834b81b7a 100644
|
||||
index 3798a24ce4aedb6aa2954d8f99b603bf08f1179d..3f466acfb286b44a8d1ecc7ffd4faf4635a66643 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -561,7 +561,11 @@
|
||||
@@ -558,7 +558,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
||||
@@ -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 c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6a6114453 100644
|
||||
index b70623b56267fb7df71519a2c19a04a658f766e2..0bae000a3491e03196bbba033621d389c6150225 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -847,6 +847,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -840,6 +840,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,24 +21,23 @@ index c28aa525c51e9be757d5d8f8e5a60857b7a451d4..e8baae79ab127e4626f39247a5e57fe6
|
||||
// Prompts should remain open and functional across tab switches.
|
||||
if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index f07055487abd76b2a72ba555ff1b5bcd996bbd3a..7d46db80c667900576cf46264034890203020a75 100644
|
||||
index 636f09a8ac86e7c3f7b8dcdc285792f18f5c5989..276852573eade86f1bc9690e3c78a6279e9ff5af 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1026,6 +1026,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// cpu-priority boosted to run discard logic.
|
||||
void SetIsDiscarding(bool is_discarding);
|
||||
@@ -1031,6 +1031,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
return synthetic_gesture_controller_.get();
|
||||
}
|
||||
|
||||
+ // Electron: Prevents the widget from getting hidden.
|
||||
+ bool disable_hidden_ = false;
|
||||
+
|
||||
protected:
|
||||
// |routing_id| must not be IPC::mojom::kRoutingIdNone.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index f4c657fe36eba54948cacf9770d9c6c1b55b5fe5..b14f5bc3f023c512a066ce9ec9f681c96b1fafc4 100644
|
||||
index 7b6b19812f5f1989e39d9c33b387159380beb544..e95a313945397c6eff5514932ce15c5d4b6a8e1f 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -644,7 +644,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -642,7 +642,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
CHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Perry <perryuwang@tencent.com>
|
||||
Date: Wed, 24 Sep 2025 09:56:23 -0700
|
||||
Subject: Disable NSAutoFillHeuristicController on macOS 26
|
||||
|
||||
The reason for this issue is that NSAutoFillHeuristicController is
|
||||
enabled by default on macOS 26. In pages with <input> tags, browser
|
||||
process sends synchronized IPC messages to renderer process. At this
|
||||
point, if the renderer process also sends synchronized IPC messages to
|
||||
the browser process, it will cause a deadlock.
|
||||
|
||||
This bug can be reproduced on many websites. From the perspective of
|
||||
user experience, we should first disable this feature on macOS 26.
|
||||
|
||||
Bug: 446070423, 446481994
|
||||
Change-Id: I2d3855648980a22678548e373756fc156e28ecd7
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6965487
|
||||
Reviewed-by: Mark Mentovai <mark@chromium.org>
|
||||
Commit-Queue: Mark Mentovai <mark@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1520058}
|
||||
|
||||
diff --git a/content/app/mac_init.mm b/content/app/mac_init.mm
|
||||
index 603c25a1bd4a11b9dbe57ac6add81647302e63be..963f45a8936850b59013390faf7890bc4215f2d9 100644
|
||||
--- a/content/app/mac_init.mm
|
||||
+++ b/content/app/mac_init.mm
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
+#include "base/mac/mac_util.h"
|
||||
#include "content/common/mac/system_policy.h"
|
||||
|
||||
namespace content {
|
||||
@@ -29,6 +30,19 @@ void InitializeMac() {
|
||||
@"NSAppSleepDisabled" : @YES,
|
||||
}];
|
||||
|
||||
+ if (base::mac::MacOSVersion() >= 26'00'00) {
|
||||
+ [NSUserDefaults.standardUserDefaults registerDefaults:@{
|
||||
+ // Disable NSAutoFillHeuristicController on macOS 26. On macOS 26, the
|
||||
+ // browser process sends synchronized IPC messages to the renderer process
|
||||
+ // on pages with <input> tags. At this point, if the renderer process
|
||||
+ // sends a synchronized IPC message to the browser process, it will cause
|
||||
+ // a deadlock.
|
||||
+ // https://crbug.com/446070423
|
||||
+ // https://crbug.com/446481994
|
||||
+ @"NSAutoFillHeuristicControllerEnabled" : @NO,
|
||||
+ }];
|
||||
+ }
|
||||
+
|
||||
SetSystemPolicyCrashKeys();
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 671960fb876b656abc572664cd1f28492c799123..896721c02c1cf0dac03d98b152af210e6382ccee 100644
|
||||
index 86592f9197fa84cbce782ed237cdac74f60e77e1..c60e51f4e1a789caf5ad9c54e496f3e72a327b51 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -610,7 +610,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -615,7 +615,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(
|
||||
const gfx::SizeF& aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
@@ -19,10 +19,10 @@ index 671960fb876b656abc572664cd1f28492c799123..896721c02c1cf0dac03d98b152af210e
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index df17e97666de639f05b92a79ee7fbd4a3da6c64f..f404c718e0242ec9269e7d14eb236aa928fb5d58 100644
|
||||
index 0477bf1b33e5cd17e6d16ccd63f4bc53e303042f..f3f42f2c3ae4b185b0647902a2409bc9b25a152f 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1050,8 +1050,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
@@ -1049,8 +1049,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
|
||||
@@ -21,7 +21,7 @@ index 9dac402705385087ced2df2db757a07246984a94..cb49b4f085026658e920699ed285d524
|
||||
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
|
||||
#endif
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index 698b29e9c31a2695cac30bf85c97a216ff8a6257..dbc38d0d87803496ce122da62e639f2a0334e0f6 100644
|
||||
index 43a2543499c1f21eb8d1e9a559466edbe15af9f5..dd4399819ef62187e038af40caff3e8018cba8dd 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -205,6 +205,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
|
||||
@@ -33,11 +33,11 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index d3982d4608c76dcc583ab26914d0f17435f1532f..a1ed237de6315df0534c6e462f3d63bd311dd5a2 100644
|
||||
index 95822f635b61da7c63b5a1babf93bb61cb786293..892fa1d8d340906d359685894da6553377cda73b 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1872,6 +1872,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
@@ -1907,6 +1907,13 @@ void NetworkContext::EnableDurableMessageCollector(
|
||||
it->second->AddReceiver(std::move(receiver));
|
||||
}
|
||||
|
||||
+void NetworkContext::SetUserAgent(const std::string& new_user_agent) {
|
||||
@@ -51,24 +51,24 @@ index d3982d4608c76dcc583ab26914d0f17435f1532f..a1ed237de6315df0534c6e462f3d63bd
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index b9f201ccf04433a29083cd15cfe599fe9600c9c0..137aaf96a8d02b81afe64fde6b19ed1153569941 100644
|
||||
index 56f1eec94a33c2c9a6289b12ac20323b4bef13d9..1b99211c9c96efba0713e953e708712d6c3714a6 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -326,6 +326,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -335,6 +335,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
const base::UnguessableToken& throttling_profile_id,
|
||||
mojo::PendingReceiver<network::mojom::DurableMessageCollector> receiver)
|
||||
override;
|
||||
+ void SetUserAgent(const std::string& new_user_agent) override;
|
||||
void SetAcceptLanguage(const std::string& new_accept_language) override;
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd4002d0bd0b 100644
|
||||
index 840eff6ece73983a3b98673adbbb3cfd825565fe..5159d804c493bf2ae08d2786187c614efc96cf23 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1288,6 +1288,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
@@ -1337,6 +1337,9 @@ interface NetworkContext {
|
||||
mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
pending_receiver<DurableMessageCollector> receiver);
|
||||
|
||||
+ // Updates the user agent to be used for requests.
|
||||
+ SetUserAgent(string new_user_agent);
|
||||
@@ -77,10 +77,10 @@ index 1ed66c3b41e583745c5b309670fc4470fa1983cf..c7464641d0fc944aa47f3f1e0406dd40
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index 70a5ab342a8954354a3d8245d30df9520cfd398d..02700030ab651b6f8f0aecfe6857ca40e6f3839f 100644
|
||||
index 6f0fe6423e8be903d4e38b783d31443c6ce89db5..9a5d7ad5d6e84e8b824c1614ee006c4984817929 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -161,6 +161,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
||||
@@ -15,10 +15,10 @@ Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 6ba55d345d4b18c9c76e26a8a1eb3835dd692581..a2eea9184ebab62c057c0c6e370f03f3b0460859 100644
|
||||
index 68a102327e22302587f7cc402cb26ef2f02b261e..ccdbf101d07b9f8baa043894ea7f48a56e7d3ecb 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -1886,6 +1886,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1900,6 +1900,8 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -12,28 +12,23 @@ uses internally for things like menus and devtools.
|
||||
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 3f8801c6042ef2b20635838e4d4c572d89b94601..055b15ff72844cd54c60cc92042a5465ce2870ad 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -210,6 +210,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
NativeTheme::~NativeTheme() = default;
|
||||
|
||||
bool NativeTheme::ShouldUseDarkColors() const {
|
||||
+ if (theme_source() == ThemeSource::kForcedLight) return false;
|
||||
+ if (theme_source() == ThemeSource::kForcedDark) return true;
|
||||
return should_use_dark_colors_;
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a2680fabc45d 100644
|
||||
index 8391cd1469516e83b2cc1466e121bfeed5497c8e..6bed02855d0917805a43fab111d41702af94368e 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -458,6 +458,23 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
|
||||
bool use_custom_frame = true) const;
|
||||
@@ -493,6 +493,8 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
void set_page_colors(PageColors page_colors) { page_colors_ = page_colors; }
|
||||
|
||||
PreferredColorScheme preferred_color_scheme() const {
|
||||
+ if (theme_source() == ThemeSource::kForcedLight) return PreferredColorScheme::kLight;
|
||||
+ if (theme_source() == ThemeSource::kForcedDark) return PreferredColorScheme::kDark;
|
||||
return preferred_color_scheme_;
|
||||
}
|
||||
void set_preferred_color_scheme(PreferredColorScheme preferred_color_scheme) {
|
||||
@@ -536,6 +538,24 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
// Whether dark mode is forced via command-line flag.
|
||||
static bool IsForcedDarkMode();
|
||||
|
||||
+
|
||||
+ enum ThemeSource {
|
||||
+ kSystem,
|
||||
+ kForcedDark,
|
||||
@@ -45,32 +40,21 @@ index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a268
|
||||
+ }
|
||||
+
|
||||
+ void set_theme_source(ThemeSource theme_source) {
|
||||
+ bool original = ShouldUseDarkColors();
|
||||
+ bool was_dark = preferred_color_scheme() == PreferredColorScheme::kDark;
|
||||
+ theme_source_ = theme_source;
|
||||
+ if (ShouldUseDarkColors() != original) NotifyOnNativeThemeUpdated();
|
||||
+ if ((preferred_color_scheme() == PreferredColorScheme::kDark) != was_dark) {
|
||||
+ NotifyOnNativeThemeUpdated();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -713,6 +730,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
std::optional<base::TimeDelta> caret_blink_interval_;
|
||||
bool use_overlay_scrollbars_ = false;
|
||||
protected:
|
||||
explicit NativeTheme(
|
||||
ui::SystemTheme system_theme = ui::SystemTheme::kDefault);
|
||||
@@ -590,6 +610,7 @@ class COMPONENT_EXPORT(NATIVE_THEME) NativeTheme {
|
||||
std::optional<ui::ColorProviderKey::SchemeVariant> scheme_variant_;
|
||||
bool should_use_system_accent_color_ = true;
|
||||
base::TimeDelta caret_blink_interval_;
|
||||
+ ThemeSource theme_source_ = ThemeSource::kSystem;
|
||||
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 0c6d689295a03fc088b57487037d85f4d634a5f4..8e3bab233e8611c68e79d53f125560f4fb086a1e 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -697,6 +697,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode()) {
|
||||
return false;
|
||||
}
|
||||
+ if (theme_source() == ThemeSource::kForcedLight) return false;
|
||||
+ if (theme_source() == ThemeSource::kForcedDark) return true;
|
||||
return NativeTheme::ShouldUseDarkColors();
|
||||
}
|
||||
raw_ptr<NativeTheme> associated_web_instance_ = nullptr;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ remove this patch once gin::Wrappable can be managed by V8 Oilpan
|
||||
via https://github.com/electron/electron/issues/47922
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001dec5b08ff 100644
|
||||
index 656267caef2d515f8c3f77535b308108a0b30be1..083d59f78c542f4900e1b210a0935276516b894b 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -35,6 +35,8 @@ v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;
|
||||
@@ -28,7 +28,7 @@ index 5255c1094c88761c19af1ea294ceccaca63b5ae4..bb1639d73070a99984b72eb61afd001d
|
||||
|
||||
std::unique_ptr<v8::Isolate::CreateParams> getModifiedIsolateParams(
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
@@ -203,10 +205,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
@@ -204,10 +206,26 @@ IsolateHolder::getDefaultIsolateParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ which removed range-requests-supported on non-http protocols. See https://issues
|
||||
for more information.
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
index 14eeb24b27ae9c3798fac7cfbb2ef53b85250dbe..dfcb69a1bf75af5e315e02702109b958fa8edfcf 100644
|
||||
index 23d5e86aad9509159c74fef32419e26ca68b2e4c..767e6b7e4c85f9f2fafac282c4ebc6ba80e52528 100644
|
||||
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
@@ -11,8 +11,10 @@
|
||||
@@ -104,7 +104,7 @@ index 8c92f1c0c5028069cdad967b5be2bccf8005ed43..8b49dc182296f7f277981aed29b58947
|
||||
using InitializeCB = base::OnceCallback<void(bool)>;
|
||||
void Initialize(InitializeCB init_cb) override;
|
||||
diff --git a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
index 1fdc54c1de28ef0c32fc9a386097d95b48aedcaa..5822251daaa9fa5a49ace1bdad684e0076c225dc 100644
|
||||
index 093e01ba30f66e29d13c129a230f8acf875f5eb4..8fb40e4d5827985c2760e57f0dccfeb9ab700a03 100644
|
||||
--- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -123,7 +123,7 @@ index 1fdc54c1de28ef0c32fc9a386097d95b48aedcaa..5822251daaa9fa5a49ace1bdad684e00
|
||||
#include "third_party/blink/renderer/platform/media/resource_fetch_context.h"
|
||||
#include "third_party/blink/renderer/platform/media/url_index.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
|
||||
@@ -313,6 +315,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
@@ -314,6 +316,16 @@ void ResourceMultiBufferDataProvider::DidReceiveResponse(
|
||||
do_fail = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation
|
||||
IsValid is not exposed despite being commented as for embedders, this exposes something that works for us.
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 1abeb30142251c7abea1b33f7921f79d85532475..758022b4ca4c5cb69ff3df0399194dfca5c1b432 100644
|
||||
index 47144ad8adb01ae611f40570e46fc97a7c93e1d5..d4f00ffe8fa1b0f7831430de1b48d0b2dd714499 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {
|
||||
|
||||
@@ -173,7 +173,7 @@ index 213eaa5ec6d657a659726cb38103e8bd671fe907..f497447c598198bf690758b1d1c5c6fe
|
||||
void OnFileChooserDestroy(GtkWidget* dialog);
|
||||
|
||||
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
|
||||
index eb3d997598631b220c3566748f23a5cdac3e4692..b4b2f7294ce6e9349a4a8a05f614e93359eca25a 100644
|
||||
index b0f4b3df0a4f10b306ba2d25e5fd51440a25bcd4..4ac06587203d2d2adf1390d9256e537e8cf7b21d 100644
|
||||
--- a/ui/shell_dialogs/select_file_dialog.h
|
||||
+++ b/ui/shell_dialogs/select_file_dialog.h
|
||||
@@ -224,6 +224,21 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
|
||||
@@ -262,7 +262,7 @@ index 61683d0eddb04c494ca5e650e7d556b44968ec49..5492456a9138b250e97a5479838bb443
|
||||
|
||||
} // namespace ui
|
||||
diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
|
||||
index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc007ee5fed8 100644
|
||||
index 37e3d53abeca3a90649064053100cf9938b1f406..87dfa1e1c230f3aba90ba9520684828e958de093 100644
|
||||
--- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
|
||||
+++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -272,7 +272,7 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
|
||||
+#include "electron/shell/browser/ui/file_dialog.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
#include "ui/gfx/native_ui_types.h"
|
||||
@@ -96,7 +97,7 @@ void OnGetPropertyReply(dbus::Response* response) {
|
||||
: ServiceAvailability::kNotAvailable;
|
||||
}
|
||||
@@ -294,8 +294,8 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
|
||||
+ file_dialog::StartPortalAvailabilityTestInBackground();
|
||||
}
|
||||
|
||||
DbusByteArray PathToByteArray(const base::FilePath& path) {
|
||||
@@ -170,17 +174,20 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
|
||||
std::vector<uint8_t> PathToByteArray(const base::FilePath& path) {
|
||||
@@ -171,17 +175,20 @@ void SelectFileDialogLinuxPortal::StartAvailabilityTestInBackground() {
|
||||
GetMainTaskRunner() = base::SequencedTaskRunner::GetCurrentDefault();
|
||||
|
||||
dbus_xdg::SetSystemdScopeUnitNameForXdgPortal(
|
||||
@@ -318,17 +318,17 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
|
||||
}
|
||||
|
||||
bool SelectFileDialogLinuxPortal::IsRunning(
|
||||
@@ -385,11 +392,14 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
|
||||
@@ -386,11 +393,14 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
|
||||
const PortalFilterSet& filter_set) {
|
||||
DbusDictionary dict;
|
||||
dbus_xdg::Dictionary dict;
|
||||
|
||||
+ std::string accept_label = button_label().empty() ? "" : button_label();
|
||||
+
|
||||
switch (type_) {
|
||||
case SelectFileDialog::SELECT_UPLOAD_FOLDER:
|
||||
- dict.PutAs(kFileChooserOptionAcceptLabel,
|
||||
- DbusString(l10n_util::GetStringUTF8(
|
||||
- IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON)));
|
||||
- dict[kFileChooserOptionAcceptLabel] =
|
||||
- dbus_utils::Variant::Wrap<"s">(l10n_util::GetStringUTF8(
|
||||
- IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
|
||||
+ if (accept_label.empty()) {
|
||||
+ accept_label = l10n_util::GetStringUTF8(
|
||||
+ IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON);
|
||||
@@ -336,12 +336,13 @@ index 54cefe5b6236b24cd9c4625d603fe9a7205676f5..1f70697a2f9ddba8151b4c4f497fbc00
|
||||
[[fallthrough]];
|
||||
case SelectFileDialog::SELECT_FOLDER:
|
||||
case SelectFileDialog::Type::SELECT_EXISTING_FOLDER:
|
||||
@@ -402,6 +412,10 @@ DbusDictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
|
||||
@@ -403,6 +413,11 @@ dbus_xdg::Dictionary SelectFileDialogLinuxPortal::BuildOptionsDictionary(
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (!accept_label.empty()) {
|
||||
+ dict.PutAs(kFileChooserOptionAcceptLabel, DbusString(accept_label));
|
||||
+ dict[kFileChooserOptionAcceptLabel] =
|
||||
+ dbus_utils::Variant::Wrap<"s">(accept_label);
|
||||
+ }
|
||||
+
|
||||
if (!default_path.empty() && base::IsStringUTF8(default_path.value())) {
|
||||
|
||||
@@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache.
|
||||
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
|
||||
|
||||
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
|
||||
index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa438467fdf4 100644
|
||||
index b798ae06446d68fe74e7fef3ade515e9c77f1f73..0b0ecebef9e34986a95e4d9f3b52fcce19f2d686 100644
|
||||
--- a/content/browser/code_cache/generated_code_cache.cc
|
||||
+++ b/content/browser/code_cache/generated_code_cache.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -28,21 +28,11 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
|
||||
|
||||
using storage::BigIOBuffer;
|
||||
|
||||
@@ -43,7 +45,7 @@ constexpr char kSeparator[] = " \n";
|
||||
|
||||
// We always expect to receive valid URLs that can be used as keys to the code
|
||||
// cache. The relevant checks (for ex: resource_url is valid, origin_lock is
|
||||
-// not opque etc.,) must be done prior to requesting the code cache.
|
||||
+// not opaque etc.,) must be done prior to requesting the code cache.
|
||||
//
|
||||
// This function doesn't enforce anything in the production code. It is here
|
||||
// to make the assumptions explicit and to catch any errors when DCHECKs are
|
||||
@@ -53,33 +55,55 @@ void CheckValidKeys(const GURL& resource_url,
|
||||
GeneratedCodeCache::CodeCacheType cache_type) {
|
||||
@@ -53,39 +55,55 @@ void CheckValidResource(const GURL& resource_url,
|
||||
GeneratedCodeCache::CodeCacheType cache_type) {
|
||||
// If the resource url is invalid don't cache the code.
|
||||
DCHECK(resource_url.is_valid());
|
||||
- bool resource_url_is_chrome_or_chrome_untrusted =
|
||||
+
|
||||
+ // There are 3 kind of URL scheme compatible for the `resource_url`.
|
||||
+ // 1. http: and https: URLs.
|
||||
+ // 2. chrome: and chrome-untrusted: URLs.
|
||||
@@ -55,16 +45,22 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
|
||||
- resource_url_is_chrome_or_chrome_untrusted ||
|
||||
- blink::CommonSchemeRegistry::IsExtensionScheme(resource_url.scheme()));
|
||||
-
|
||||
- // The chrome and chrome-untrusted schemes are only used with the WebUI
|
||||
- // code cache type.
|
||||
- DCHECK_EQ(resource_url_is_chrome_or_chrome_untrusted,
|
||||
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
|
||||
+ const bool resource_url_embedder =
|
||||
+ base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme());
|
||||
+ DCHECK(resource_url_http || resource_url_webui || resource_url_embedder);
|
||||
}
|
||||
|
||||
void CheckValidContext(const GURL& origin_lock,
|
||||
GeneratedCodeCache::CodeCacheType cache_type) {
|
||||
- // |origin_lock| should be either empty or should have
|
||||
- // Http/Https/chrome/chrome-untrusted schemes and it should not be a URL with
|
||||
- // opaque origin. Empty origin_locks are allowed when the renderer is not
|
||||
- // locked to an origin.
|
||||
- bool origin_lock_is_chrome_or_chrome_untrusted =
|
||||
+
|
||||
+ const bool resource_url_embedder =
|
||||
+ base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme());
|
||||
+ DCHECK(resource_url_http || resource_url_webui || resource_url_embedder);
|
||||
+
|
||||
+ // |origin_lock| should be either empty or should have code cache allowed
|
||||
+ // schemes (http/https/chrome/chrome-untrusted or other custom schemes added
|
||||
+ // by url::AddCodeCacheScheme), and it should not be a URL with opaque
|
||||
@@ -86,8 +82,7 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
|
||||
- // code cache type.
|
||||
- DCHECK_EQ(origin_lock_is_chrome_or_chrome_untrusted,
|
||||
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
|
||||
- DCHECK_EQ(resource_url_is_chrome_or_chrome_untrusted,
|
||||
- cache_type == GeneratedCodeCache::kWebUIJavaScript);
|
||||
+
|
||||
+ const bool origin_lock_for_embedder =
|
||||
+ base::Contains(url::GetCodeCacheSchemes(), origin_lock.scheme());
|
||||
+
|
||||
@@ -100,16 +95,14 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
|
||||
+ case GeneratedCodeCache::kJavaScript:
|
||||
+ case GeneratedCodeCache::kWebAssembly:
|
||||
+ DCHECK(!origin_lock_for_webui);
|
||||
+ DCHECK(!resource_url_webui);
|
||||
+ break;
|
||||
+ case GeneratedCodeCache::kWebUIJavaScript:
|
||||
+ DCHECK(origin_lock_for_webui);
|
||||
+ DCHECK(resource_url_webui);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ // The custom schemes share the cache type with http(s).
|
||||
+ if (origin_lock_for_embedder || resource_url_embedder) {
|
||||
+ if (origin_lock_for_embedder) {
|
||||
+ DCHECK(cache_type == GeneratedCodeCache::kJavaScript ||
|
||||
+ cache_type == GeneratedCodeCache::kWebAssembly);
|
||||
+ }
|
||||
@@ -117,7 +110,7 @@ index 1673dd4966365f31f1073a4c90743e6fe73880b6..cb3d3da5bc9da99c950521d18f28aa43
|
||||
|
||||
// Generates the cache key for the given |resource_url|, |origin_lock| and
|
||||
diff --git a/content/browser/code_cache/generated_code_cache.h b/content/browser/code_cache/generated_code_cache.h
|
||||
index 94602e2319d3f7ed557da98e0598c9f96d986260..0a9a856d8bd9d702eb49e45a54c141a39f5ec622 100644
|
||||
index a01f0d96ef33ce9460a851b072b7ceed5227dee3..f7e39b28cc0ba2251123925c01083a7935f46f56 100644
|
||||
--- a/content/browser/code_cache/generated_code_cache.h
|
||||
+++ b/content/browser/code_cache/generated_code_cache.h
|
||||
@@ -51,12 +51,14 @@ class CONTENT_EXPORT GeneratedCodeCache {
|
||||
@@ -259,38 +252,38 @@ index 28556e56f2fd591c46ce6f48d39eb907876a499d..f5737ba60fb9e182459066ffa62c7c58
|
||||
+
|
||||
} // namespace content
|
||||
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e74b348406 100644
|
||||
index 7b4408f3480bd062ab9221f524633c177a212790..8d283d84b0817a937845b221bb13c6ed12bfade6 100644
|
||||
--- a/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
+#include "base/containers/contains.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
@@ -29,6 +30,7 @@
|
||||
#include "third_party/blink/public/common/scheme_registry.h"
|
||||
@@ -36,6 +37,7 @@
|
||||
#include "third_party/blink/public/mojom/loader/code_cache.mojom-data-view.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
+#include "url/url_util.h"
|
||||
|
||||
using blink::mojom::CacheStorageError;
|
||||
|
||||
@@ -36,6 +38,11 @@ namespace content {
|
||||
|
||||
namespace {
|
||||
@@ -55,6 +57,11 @@ GeneratedCodeCache::CodeCacheType MojoCacheTypeToCodeCacheType(
|
||||
}
|
||||
}
|
||||
|
||||
+bool ProcessLockURLIsCodeCacheScheme(const ProcessLock& process_lock) {
|
||||
+ return base::Contains(url::GetCodeCacheSchemes(),
|
||||
+ process_lock.lock_url().scheme());
|
||||
+ process_lock.GetProcessLockURL().scheme());
|
||||
+}
|
||||
+
|
||||
bool CheckSecurityForAccessingCodeCacheData(
|
||||
const GURL& resource_url,
|
||||
int render_process_id,
|
||||
@@ -46,39 +53,57 @@ bool CheckSecurityForAccessingCodeCacheData(
|
||||
@@ -65,39 +72,56 @@ bool CheckSecurityForAccessingCodeCacheData(
|
||||
|
||||
// Code caching is only allowed for http(s) and chrome/chrome-untrusted
|
||||
// scripts. Furthermore, there is no way for http(s) pages to load chrome or
|
||||
@@ -305,14 +298,14 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
// suspicious activity.
|
||||
- if (resource_url.SchemeIs(content::kChromeUIScheme) ||
|
||||
- resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
|
||||
- if (!process_lock.is_locked_to_site()) {
|
||||
- if (!process_lock.IsLockedToSite()) {
|
||||
- // We can't tell for certain whether this renderer is doing something
|
||||
- // malicious, but we don't trust it enough to store data.
|
||||
- return false;
|
||||
- }
|
||||
+ if (resource_url.SchemeIsHTTPOrHTTPS()) {
|
||||
if (process_lock.matches_scheme(url::kHttpScheme) ||
|
||||
process_lock.matches_scheme(url::kHttpsScheme)) {
|
||||
if (process_lock.MatchesScheme(url::kHttpScheme) ||
|
||||
process_lock.MatchesScheme(url::kHttpsScheme)) {
|
||||
- if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
+ return true;
|
||||
+ }
|
||||
@@ -327,15 +320,15 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (resource_url.SchemeIs(kChromeUIScheme) ||
|
||||
+ resource_url.SchemeIs(kChromeUIUntrustedScheme)) {
|
||||
+ if (process_lock.matches_scheme(kChromeUIScheme) ||
|
||||
+ process_lock.matches_scheme(kChromeUIUntrustedScheme)) {
|
||||
+ if (resource_url.SchemeIs(content::kChromeUIScheme) ||
|
||||
+ resource_url.SchemeIs(content::kChromeUIUntrustedScheme)) {
|
||||
+ if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
+ process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
+ if (process_lock.matches_scheme(url::kHttpScheme) ||
|
||||
+ process_lock.matches_scheme(url::kHttpsScheme)) {
|
||||
+ if (process_lock.MatchesScheme(url::kHttpScheme) ||
|
||||
+ process_lock.MatchesScheme(url::kHttpsScheme)) {
|
||||
mojo::ReportBadMessage("HTTP(S) pages cannot cache WebUI code");
|
||||
}
|
||||
+ if (ProcessLockURLIsCodeCacheScheme(process_lock)) {
|
||||
@@ -348,35 +341,34 @@ index d95cba73aacf4b9156e8c0c3100abd7934369fdd..1583ae512e34c29e849efc2f570e09e7
|
||||
// Other schemes which might successfully load chrome or chrome-untrusted
|
||||
// scripts, such as the PDF viewer, are unsupported but not considered
|
||||
- // dangerous.
|
||||
- return process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme);
|
||||
- return process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme);
|
||||
+ // dangerous. Similarly, the process might not be locked to a site.
|
||||
+ return false;
|
||||
}
|
||||
- if (resource_url.SchemeIsHTTPOrHTTPS() ||
|
||||
- blink::CommonSchemeRegistry::IsExtensionScheme(resource_url.scheme())) {
|
||||
- if (process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
- process_lock.matches_scheme(content::kChromeUIUntrustedScheme)) {
|
||||
- if (process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
- process_lock.MatchesScheme(content::kChromeUIUntrustedScheme)) {
|
||||
- // It is possible for WebUI pages to include open-web content, but such
|
||||
- // usage is rare and we've decided that reasoning about security is easier
|
||||
- // if the WebUI code cache includes only WebUI scripts.
|
||||
- return false;
|
||||
- }
|
||||
- return true;
|
||||
+
|
||||
+ if (base::Contains(url::GetCodeCacheSchemes(), resource_url.scheme())) {
|
||||
+ return ProcessLockURLIsCodeCacheScheme(process_lock);
|
||||
}
|
||||
|
||||
if (operation == CodeCacheHostImpl::Operation::kWrite) {
|
||||
@@ -433,6 +458,7 @@ std::optional<GURL> CodeCacheHostImpl::GetSecondaryKeyForCodeCache(
|
||||
process_lock.matches_scheme(url::kHttpsScheme) ||
|
||||
process_lock.matches_scheme(content::kChromeUIScheme) ||
|
||||
process_lock.matches_scheme(content::kChromeUIUntrustedScheme) ||
|
||||
@@ -530,6 +554,7 @@ std::optional<GURL> CodeCacheHostImpl::GetSecondaryKeyForCodeCache(
|
||||
process_lock.MatchesScheme(url::kHttpsScheme) ||
|
||||
process_lock.MatchesScheme(content::kChromeUIScheme) ||
|
||||
process_lock.MatchesScheme(content::kChromeUIUntrustedScheme) ||
|
||||
+ ProcessLockURLIsCodeCacheScheme(process_lock) ||
|
||||
blink::CommonSchemeRegistry::IsExtensionScheme(
|
||||
process_lock.lock_url().scheme())) {
|
||||
return process_lock.lock_url();
|
||||
process_lock.GetProcessLockURL().scheme())) {
|
||||
return process_lock.GetProcessLockURL();
|
||||
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
|
||||
index 225e017909b8869231b870eaaf161a0b5e93e2a0..846a5251429630b8528a84a3d67ed56cb28df5a1 100644
|
||||
--- a/content/common/url_schemes.cc
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user