mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
97 Commits
v34.0.0-be
...
re-enable-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f53397ad1c | ||
|
|
a15e42e9ff | ||
|
|
aca84be970 | ||
|
|
4fb5aab2ef | ||
|
|
27fe6cc97f | ||
|
|
b1957f52e3 | ||
|
|
8a67e77f03 | ||
|
|
41b5d7e312 | ||
|
|
946ab5f1d7 | ||
|
|
0fd16dc9e2 | ||
|
|
a120d87570 | ||
|
|
d380cda14a | ||
|
|
80ff7a14c6 | ||
|
|
7a79d4c96e | ||
|
|
a6390b539c | ||
|
|
777e547922 | ||
|
|
c6c430bff1 | ||
|
|
928c0301e7 | ||
|
|
6e3a5daf62 | ||
|
|
f9a04012b9 | ||
|
|
4b57a8fb1a | ||
|
|
e3d75b3087 | ||
|
|
ea7b0a4cc8 | ||
|
|
2002472b10 | ||
|
|
adbd25f699 | ||
|
|
3090e40c09 | ||
|
|
4f2fb7b1a0 | ||
|
|
9bf067dd5a | ||
|
|
f0d3e42338 | ||
|
|
24dc9ddf5c | ||
|
|
1835c0ab6c | ||
|
|
1c1eb3e19d | ||
|
|
726d439399 | ||
|
|
c63d0d61e7 | ||
|
|
e3f2ca1425 | ||
|
|
f5bdbdb1e8 | ||
|
|
48801be8e9 | ||
|
|
d9a9d5b8fe | ||
|
|
7fea537fbf | ||
|
|
bc6c7bd757 | ||
|
|
9137d96ef4 | ||
|
|
b985d8eb28 | ||
|
|
2081f771e4 | ||
|
|
15151c6853 | ||
|
|
8be4ae4bab | ||
|
|
31f8e7553b | ||
|
|
7cdf1a01b8 | ||
|
|
a720c8daf6 | ||
|
|
fb959f8d30 | ||
|
|
de04fc3b90 | ||
|
|
7ff7160135 | ||
|
|
9fc94a162b | ||
|
|
53458da01e | ||
|
|
dffe00b232 | ||
|
|
39b24aed92 | ||
|
|
f7ead785cd | ||
|
|
b3c2e83243 | ||
|
|
cc3359f126 | ||
|
|
46561fc5bc | ||
|
|
214c8228ed | ||
|
|
739688214b | ||
|
|
5d0d15a0b3 | ||
|
|
348801b20e | ||
|
|
57920e7747 | ||
|
|
a0f51d816e | ||
|
|
83d7040096 | ||
|
|
c42fb09fc9 | ||
|
|
fd500477ac | ||
|
|
d60d526df6 | ||
|
|
e3e94d45ee | ||
|
|
fff6ea438a | ||
|
|
3e77faf2f7 | ||
|
|
cc9d85d3ca | ||
|
|
d3d02ef111 | ||
|
|
e70f70f5b4 | ||
|
|
0d948da4b9 | ||
|
|
2cf59b3885 | ||
|
|
87bd665e41 | ||
|
|
35aeab6ecd | ||
|
|
738533dec7 | ||
|
|
456aac1f94 | ||
|
|
6c6e5c002a | ||
|
|
089f233054 | ||
|
|
2b0624f2f1 | ||
|
|
ac09d11ed1 | ||
|
|
9280add5b4 | ||
|
|
44c398fedb | ||
|
|
cbc12d6675 | ||
|
|
d801bad5d2 | ||
|
|
d386664900 | ||
|
|
67775d19ec | ||
|
|
cbe3cb770a | ||
|
|
bd4ea5ba72 | ||
|
|
af6e2fb257 | ||
|
|
df45474b58 | ||
|
|
b5acebf3ba | ||
|
|
ef84f13650 |
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@@ -8,6 +8,7 @@
|
||||
DEPS @electron/wg-upgrades
|
||||
|
||||
# Releases WG
|
||||
/.github/workflows/update_appveyor_image.yml @electron/wg-releases
|
||||
/docs/breaking-changes.md @electron/wg-releases
|
||||
/npm/ @electron/wg-releases
|
||||
/script/release @electron/wg-releases
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Bug Report
|
||||
description: Report an Electron bug
|
||||
title: "[Bug]: "
|
||||
description: Report a bug in Electron
|
||||
type: 'bug'
|
||||
labels: "bug :beetle:"
|
||||
body:
|
||||
- type: checkboxes
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Feature Request
|
||||
description: Suggest an idea for Electron
|
||||
title: "[Feature Request]: "
|
||||
type: 'enhancement'
|
||||
labels: "enhancement :sparkles:"
|
||||
body:
|
||||
- type: checkboxes
|
||||
|
||||
6
.github/workflows/archaeologist-dig.yml
vendored
6
.github/workflows/archaeologist-dig.yml
vendored
@@ -9,11 +9,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.0.2
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
- name: Setting Up Dig Site
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
sha-file: .dig-old
|
||||
filename: electron.old.d.ts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
|
||||
with:
|
||||
name: artifacts
|
||||
path: electron/artifacts
|
||||
|
||||
6
.github/workflows/branch-created.yml
vendored
6
.github/workflows/branch-created.yml
vendored
@@ -94,7 +94,7 @@ jobs:
|
||||
}))
|
||||
- name: Create Release Project Board
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
uses: dsanders11/project-actions/copy-project@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/copy-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
id: create-release-board
|
||||
with:
|
||||
drafts: true
|
||||
@@ -114,14 +114,14 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
- name: Find Previous Release Project Board
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
uses: dsanders11/project-actions/find-project@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/find-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
id: find-prev-release-board
|
||||
with:
|
||||
title: ${{ steps.generate-project-metadata.outputs.prev-prev-major }}-x-y
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
- name: Close Previous Release Project Board
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
uses: dsanders11/project-actions/close-project@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/close-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
project-number: ${{ steps.find-prev-release-board.outputs.number }}
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
|
||||
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
||||
steps:
|
||||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.0.2
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: filter
|
||||
with:
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
4
.github/workflows/issue-labeled.yml
vendored
4
.github/workflows/issue-labeled.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Set status
|
||||
uses: dsanders11/project-actions/edit-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
project-number: 90
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Set status
|
||||
uses: dsanders11/project-actions/edit-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
project-number: 90
|
||||
|
||||
2
.github/workflows/issue-opened.yml
vendored
2
.github/workflows/issue-opened.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Add to Issue Triage
|
||||
uses: dsanders11/project-actions/add-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/add-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
field: Reporter
|
||||
field-value: ${{ github.event.issue.user.login }}
|
||||
|
||||
24
.github/workflows/issue-transferred.yml
vendored
Normal file
24
.github/workflows/issue-transferred.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Issue Transferred
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [transferred]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
issue-transferred:
|
||||
name: Issue Transferred
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Generate GitHub App token
|
||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||
id: generate-token
|
||||
with:
|
||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Remove from issue triage
|
||||
uses: dsanders11/project-actions/delete-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
project-number: 90
|
||||
2
.github/workflows/issue-unlabeled.yml
vendored
2
.github/workflows/issue-unlabeled.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
org: electron
|
||||
- name: Set status
|
||||
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
||||
uses: dsanders11/project-actions/edit-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
project-number: 90
|
||||
|
||||
2
.github/workflows/linux-publish.yml
vendored
2
.github/workflows/linux-publish.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/macos-publish.yml
vendored
2
.github/workflows/macos-publish.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/pipeline-electron-lint.yml
vendored
2
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
- name: Create src dir
|
||||
run: mkdir src
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
run: df -h
|
||||
- name: Setup Node.js/npm
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
cache: yarn
|
||||
@@ -156,7 +156,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'linux' }}
|
||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
fi
|
||||
done
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
if [ "${{ inputs.is-asan }}" == "true" ]; then
|
||||
cd ..
|
||||
ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron"
|
||||
export ASAN_OPTIONS="symbolize=0 handle_abort=1"
|
||||
export ASAN_OPTIONS="symbolize=0 handle_abort=1 detect_container_overflow=0"
|
||||
export G_SLICE=always-malloc
|
||||
export NSS_DISABLE_ARENA_FREE_LIST=1
|
||||
export NSS_DISABLE_UNLOAD=1
|
||||
@@ -203,7 +203,7 @@ jobs:
|
||||
if: always() && !cancelled()
|
||||
- name: Upload Test Artifacts
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
|
||||
with:
|
||||
name: test_artifacts_${{ env.ARTIFACT_KEY }}
|
||||
path: src/electron/spec/artifacts
|
||||
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
|
||||
2
.github/workflows/pull-request-labeled.yml
vendored
2
.github/workflows/pull-request-labeled.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
||||
org: electron
|
||||
- name: Set status
|
||||
uses: dsanders11/project-actions/edit-item@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
project-number: 94
|
||||
|
||||
6
.github/workflows/scorecards.yml
vendored
6
.github/workflows/scorecards.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
|
||||
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
2
.github/workflows/stable-prep-items.yml
vendored
2
.github/workflows/stable-prep-items.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
PROJECT_NUMBER=$(gh project list --owner electron --format json | jq -r '.projects | map(select(.title | test("^[0-9]+-x-y$"))) | max_by(.number) | .number')
|
||||
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> "$GITHUB_OUTPUT"
|
||||
- name: Update Completed Stable Prep Items
|
||||
uses: dsanders11/project-actions/completed-by@eb760c48894b5702398529cbb8f6e98378e315d0 # v1.3.0
|
||||
uses: dsanders11/project-actions/completed-by@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||
with:
|
||||
field: Prep Status
|
||||
field-value: ✅ Complete
|
||||
|
||||
6
.github/workflows/update_appveyor_image.yml
vendored
6
.github/workflows/update_appveyor_image.yml
vendored
@@ -19,10 +19,14 @@ jobs:
|
||||
with:
|
||||
creds: ${{ secrets.APPVEYOR_UPDATER_GH_APP_CREDS }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
- name: Yarn install
|
||||
run: |
|
||||
node script/yarn.js install --frozen-lockfile
|
||||
|
||||
11
BUILD.gn
11
BUILD.gn
@@ -9,7 +9,7 @@ import("//pdf/features.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/electron_node/electron_node.gni")
|
||||
import("//third_party/electron_node/node.gni")
|
||||
import("//third_party/ffmpeg/ffmpeg_options.gni")
|
||||
import("//tools/generate_library_loader/generate_library_loader.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
@@ -408,7 +408,7 @@ action("electron_generate_node_defines") {
|
||||
source_set("electron_lib") {
|
||||
configs += [
|
||||
"//v8:external_startup_data",
|
||||
"//third_party/electron_node:node_internals",
|
||||
"//third_party/electron_node:node_external_config",
|
||||
]
|
||||
|
||||
public_configs = [
|
||||
@@ -483,7 +483,7 @@ source_set("electron_lib") {
|
||||
"//third_party/blink/public:blink_devtools_inspector_resources",
|
||||
"//third_party/blink/public/platform/media",
|
||||
"//third_party/boringssl",
|
||||
"//third_party/electron_node:node_lib",
|
||||
"//third_party/electron_node:libnode",
|
||||
"//third_party/inspector_protocol:crdtp",
|
||||
"//third_party/leveldatabase",
|
||||
"//third_party/libyuv",
|
||||
@@ -868,6 +868,7 @@ if (is_mac) {
|
||||
":electron_framework_resources",
|
||||
":electron_swiftshader_library",
|
||||
":electron_xibs",
|
||||
"//third_party/electron_node:libnode",
|
||||
]
|
||||
if (!is_mas_build) {
|
||||
deps += [ ":electron_crashpad_helper" ]
|
||||
@@ -923,7 +924,6 @@ if (is_mac) {
|
||||
"shell/app/electron_main_mac.cc",
|
||||
"shell/app/uv_stdio_fix.cc",
|
||||
"shell/app/uv_stdio_fix.h",
|
||||
"shell/common/electron_constants.cc",
|
||||
]
|
||||
include_dirs = [ "." ]
|
||||
info_plist = "shell/renderer/resources/mac/Info.plist"
|
||||
@@ -1192,6 +1192,7 @@ if (is_mac) {
|
||||
"//components/crash/core/app",
|
||||
"//content:sandbox_helper_win",
|
||||
"//electron/buildflags",
|
||||
"//third_party/electron_node:libnode",
|
||||
"//ui/strings",
|
||||
]
|
||||
|
||||
@@ -1538,7 +1539,7 @@ copy("node_gypi_headers") {
|
||||
action("node_version_header") {
|
||||
inputs = [ "$node_dir/src/node_version.h" ]
|
||||
outputs = [ "$node_headers_dir/include/node/node_version.h" ]
|
||||
script = "script/generate_node_version_header.py"
|
||||
script = "script/node/generate_node_version_header.py"
|
||||
args = rebase_path(inputs) + rebase_path(outputs)
|
||||
if (node_module_version != "") {
|
||||
args += [ "$node_module_version" ]
|
||||
|
||||
@@ -12,7 +12,7 @@ propose changes to this document in a pull request.
|
||||
|
||||
## [Issues](https://electronjs.org/docs/development/issues)
|
||||
|
||||
Issues are created [here](https://github.com/electron/electron/issues/new/choose).
|
||||
Issues are created [here](https://github.com/electron/electron/issues/new).
|
||||
|
||||
* [How to Contribute in Issues](https://electronjs.org/docs/development/issues#how-to-contribute-in-issues)
|
||||
* [Asking for General Help](https://electronjs.org/docs/development/issues#asking-for-general-help)
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'132.0.6834.32',
|
||||
'132.0.6834.0',
|
||||
'node_version':
|
||||
'v20.18.1',
|
||||
'v22.9.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -77,3 +77,6 @@ enterprise_cloud_content_analysis = false
|
||||
# TODO: remove dependency on legacy ipc
|
||||
# https://issues.chromium.org/issues/40943039
|
||||
content_enable_legacy_ipc = true
|
||||
|
||||
# Electron has its own unsafe-buffers enforcement directories.
|
||||
clang_unsafe_buffers_paths = "//electron/electron_unsafe_buffers_paths.txt"
|
||||
|
||||
@@ -160,12 +160,14 @@ static_library("chrome") {
|
||||
"//chrome/browser/icon_loader_win.cc",
|
||||
"//chrome/browser/media/webrtc/window_icon_util_win.cc",
|
||||
"//chrome/browser/process_singleton_win.cc",
|
||||
"//chrome/browser/ui/frame/window_frame_util.h",
|
||||
"//chrome/browser/win/chrome_process_finder.cc",
|
||||
"//chrome/browser/win/chrome_process_finder.h",
|
||||
"//chrome/browser/win/chrome_select_file_dialog_factory.cc",
|
||||
"//chrome/browser/win/chrome_select_file_dialog_factory.h",
|
||||
"//chrome/browser/win/titlebar_config.cc",
|
||||
"//chrome/browser/win/titlebar_config.h",
|
||||
"//chrome/browser/win/titlebar_config.h",
|
||||
"//chrome/browser/win/util_win_service.cc",
|
||||
"//chrome/browser/win/util_win_service.h",
|
||||
"//chrome/child/v8_crashpad_support_win.cc",
|
||||
|
||||
@@ -514,20 +514,20 @@ and `will-quit` events will not be emitted.
|
||||
* `args` string[] (optional)
|
||||
* `execPath` string (optional)
|
||||
|
||||
Relaunches the app when the current instance exits.
|
||||
Relaunches the app when current instance exits.
|
||||
|
||||
By default, the new instance will use the same working directory and command line
|
||||
arguments as the current instance. When `args` is specified, the `args` will be
|
||||
passed as the command line arguments instead. When `execPath` is specified, the
|
||||
`execPath` will be executed for the relaunch instead of the current app.
|
||||
arguments with current instance. When `args` is specified, the `args` will be
|
||||
passed as command line arguments instead. When `execPath` is specified, the
|
||||
`execPath` will be executed for relaunch instead of current app.
|
||||
|
||||
Note that this method does not quit the app when executed. You have to call
|
||||
Note that this method does not quit the app when executed, you have to call
|
||||
`app.quit` or `app.exit` after calling `app.relaunch` to make the app restart.
|
||||
|
||||
When `app.relaunch` is called multiple times, multiple instances will be
|
||||
started after the current instance exits.
|
||||
When `app.relaunch` is called for multiple times, multiple instances will be
|
||||
started after current instance exited.
|
||||
|
||||
An example of restarting the current instance immediately and adding a new command
|
||||
An example of restarting current instance immediately and adding a new command
|
||||
line argument to the new instance:
|
||||
|
||||
```js
|
||||
@@ -1302,23 +1302,24 @@ Returns `Object`:
|
||||
Set the app's login item settings.
|
||||
|
||||
To work with Electron's `autoUpdater` on Windows, which uses [Squirrel][Squirrel-Windows],
|
||||
you'll want to set the launch path to Update.exe, and pass arguments that specify your
|
||||
application name. For example:
|
||||
you'll want to set the launch path to your executable's name but a directory up, which is
|
||||
a stub application automatically generated by Squirrel which will automatically launch the
|
||||
latest version.
|
||||
|
||||
``` js
|
||||
const { app } = require('electron')
|
||||
const path = require('node:path')
|
||||
|
||||
const appFolder = path.dirname(process.execPath)
|
||||
const updateExe = path.resolve(appFolder, '..', 'Update.exe')
|
||||
const exeName = path.basename(process.execPath)
|
||||
const ourExeName = path.basename(process.execPath)
|
||||
const stubLauncher = path.resolve(appFolder, '..', ourExeName)
|
||||
|
||||
app.setLoginItemSettings({
|
||||
openAtLogin: true,
|
||||
path: updateExe,
|
||||
path: stubLauncher,
|
||||
args: [
|
||||
'--processStart', `"${exeName}"`,
|
||||
'--process-start-args', '"--hidden"'
|
||||
// You might want to pass a parameter here indicating that this
|
||||
// app was launched via login, but you don't have to
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
@@ -512,7 +512,7 @@ Sets the content view of the window.
|
||||
|
||||
#### `win.getContentView()`
|
||||
|
||||
Returns [View](view.md) - The content view of the window.
|
||||
Returns [`View`](view.md) - The content view of the window.
|
||||
|
||||
#### `win.destroy()`
|
||||
|
||||
|
||||
@@ -1549,13 +1549,17 @@ there is only one tab in the current window.
|
||||
|
||||
Adds a window as a tab on this window, after the tab for the window instance.
|
||||
|
||||
#### `win.setVibrancy(type)` _macOS_
|
||||
#### `win.setVibrancy(type[, options])` _macOS_
|
||||
|
||||
* `type` string | null - Can be `titlebar`, `selection`, `menu`, `popover`, `sidebar`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`, `tooltip`, `content`, `under-window`, or `under-page`. See
|
||||
the [macOS documentation][vibrancy-docs] for more details.
|
||||
* `options` Object (optional)
|
||||
* `animationDuration` number (optional) - if greater than zero, the change to vibrancy will be animated over the given duration (in milliseconds).
|
||||
|
||||
Adds a vibrancy effect to the browser window. Passing `null` or an empty string
|
||||
will remove the vibrancy effect on the window.
|
||||
will remove the vibrancy effect on the window. The `animationDuration` parameter only
|
||||
animates fading in or fading out the vibrancy effect. Animating between
|
||||
different types of vibrancy is not supported.
|
||||
|
||||
#### `win.setBackgroundMaterial(material)` _Windows_
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ process, see [webContents.send][web-contents-send] for more information.
|
||||
|
||||
## Methods
|
||||
|
||||
The `ipcMain` module has the following methods to listen for events:
|
||||
The `ipcMain` module has the following method to listen for events:
|
||||
|
||||
### `ipcMain.on(channel, listener)`
|
||||
|
||||
@@ -44,16 +44,6 @@ The `ipcMain` module has the following methods to listen for events:
|
||||
Listens to `channel`, when a new message arrives `listener` would be called with
|
||||
`listener(event, args...)`.
|
||||
|
||||
### `ipcMain.off(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` [IpcMainEvent][ipc-main-event]
|
||||
* `...args` any[]
|
||||
|
||||
Removes the specified `listener` from the listener array for the specified
|
||||
`channel`.
|
||||
|
||||
### `ipcMain.once(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
@@ -64,28 +54,20 @@ Removes the specified `listener` from the listener array for the specified
|
||||
Adds a one time `listener` function for the event. This `listener` is invoked
|
||||
only the next time a message is sent to `channel`, after which it is removed.
|
||||
|
||||
### `ipcMain.addListener(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` [IpcMainEvent][ipc-main-event]
|
||||
* `...args` any[]
|
||||
|
||||
Alias for [`ipcMain.on`](#ipcmainonchannel-listener).
|
||||
|
||||
### `ipcMain.removeListener(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `...args` any[]
|
||||
|
||||
Alias for [`ipcMain.off`](#ipcmainoffchannel-listener).
|
||||
Removes the specified `listener` from the listener array for the specified
|
||||
`channel`.
|
||||
|
||||
### `ipcMain.removeAllListeners([channel])`
|
||||
|
||||
* `channel` string (optional)
|
||||
|
||||
Removes all listeners from the specified `channel`. Removes all listeners from all channels if no channel is specified.
|
||||
Removes listeners of the specified `channel`.
|
||||
|
||||
### `ipcMain.handle(channel, listener)`
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@ Listens to `channel`, when a new message arrives `listener` would be called with
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Removes the specified `listener` from the listener array for the specified
|
||||
`channel`.
|
||||
Alias for [`ipcRenderer.removeListener`](#ipcrendererremovelistenerchannel-listener).
|
||||
|
||||
### `ipcRenderer.once(channel, listener)`
|
||||
|
||||
@@ -77,13 +76,14 @@ Alias for [`ipcRenderer.on`](#ipcrendereronchannel-listener).
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Alias for [`ipcRenderer.off`](#ipcrendereroffchannel-listener).
|
||||
Removes the specified `listener` from the listener array for the specified
|
||||
`channel`.
|
||||
|
||||
### `ipcRenderer.removeAllListeners([channel])`
|
||||
### `ipcRenderer.removeAllListeners(channel)`
|
||||
|
||||
* `channel` string (optional)
|
||||
* `channel` string
|
||||
|
||||
Removes all listeners from the specified `channel`. Removes all listeners from all channels if no channel is specified.
|
||||
Removes all listeners, or those of the specified `channel`.
|
||||
|
||||
### `ipcRenderer.send(channel, ...args)`
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ The `menu` object has the following instance methods:
|
||||
#### `menu.popup([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional) - Default is the focused window.
|
||||
* `window` [BrowserWindow](browser-window.md) (optional) - Default is the focused window.
|
||||
* `x` number (optional) - Default is the current mouse cursor position.
|
||||
Must be declared if `y` is declared.
|
||||
* `y` number (optional) - Default is the current mouse cursor position.
|
||||
@@ -86,13 +86,13 @@ The `menu` object has the following instance methods:
|
||||
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.
|
||||
* `callback` Function (optional) - Called when menu is closed.
|
||||
|
||||
Pops up this menu as a context menu in the [`BaseWindow`](base-window.md).
|
||||
Pops up this menu as a context menu in the [`BrowserWindow`](browser-window.md).
|
||||
|
||||
#### `menu.closePopup([window])`
|
||||
#### `menu.closePopup([browserWindow])`
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional) - Default is the focused window.
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional) - Default is the focused window.
|
||||
|
||||
Closes the context menu in the `window`.
|
||||
Closes the context menu in the `browserWindow`.
|
||||
|
||||
#### `menu.append(menuItem)`
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ See https://developer.apple.com/library/archive/documentation/Performance/Concep
|
||||
|
||||
### Event: 'speed-limit-change' _macOS_ _Windows_
|
||||
|
||||
Returns:
|
||||
|
||||
* `limit` number - The operating system's advertised speed limit for CPUs, in percent.
|
||||
|
||||
Notification of a change in the operating system's advertised speed limit for
|
||||
|
||||
@@ -1360,36 +1360,6 @@ specified when registering the protocol.
|
||||
|
||||
Returns `Promise<void>` - resolves when the code cache clear operation is complete.
|
||||
|
||||
#### `ses.getSharedDictionaryUsageInfo()`
|
||||
|
||||
Returns `Promise<SharedDictionaryUsageInfo[]>` - an array of shared dictionary information entries in Chromium's networking service's storage.
|
||||
|
||||
Shared dictionaries are used to power advanced compression of data sent over the wire, specifically with Brotli and ZStandard. You don't need to call any of the shared dictionary APIs in Electron to make use of this advanced web feature, but if you do, they allow deeper control and inspection of the shared dictionaries used during decompression.
|
||||
|
||||
To get detailed information about a specific shared dictionary entry, call `getSharedDictionaryInfo(options)`.
|
||||
|
||||
#### `ses.getSharedDictionaryInfo(options)`
|
||||
|
||||
* `options` Object
|
||||
* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
|
||||
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
|
||||
|
||||
Returns `Promise<SharedDictionaryInfo[]>` - an array of shared dictionary information entries in Chromium's networking service's storage.
|
||||
|
||||
To get information about all present shared dictionaries, call `getSharedDictionaryUsageInfo()`.
|
||||
|
||||
#### `ses.clearSharedDictionaryCache()`
|
||||
|
||||
Returns `Promise<void>` - resolves when the dictionary cache has been cleared, both in memory and on disk.
|
||||
|
||||
#### `ses.clearSharedDictionaryCacheForIsolationKey(options)`
|
||||
|
||||
* `options` Object
|
||||
* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
|
||||
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
|
||||
|
||||
Returns `Promise<void>` - resolves when the dictionary cache has been cleared for the specified isolation key, both in memory and on disk.
|
||||
|
||||
#### `ses.setSpellCheckerEnabled(enable)`
|
||||
|
||||
* `enable` boolean
|
||||
@@ -1539,11 +1509,9 @@ session is persisted on disk. For in memory sessions this returns `null`.
|
||||
#### `ses.clearData([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data. This
|
||||
can potentially include data types not explicitly listed here. (See Chromium's
|
||||
[`BrowsingDataRemover`][browsing-data-remover] for the full list.)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data.
|
||||
* `backgroundFetch` - Background Fetch
|
||||
* `cache` - Cache (includes `cachestorage` and `shadercache`)
|
||||
* `cache` - Cache
|
||||
* `cookies` - Cookies
|
||||
* `downloads` - Downloads
|
||||
* `fileSystems` - File Systems
|
||||
@@ -1567,9 +1535,7 @@ This method clears more types of data and is more thorough than the
|
||||
|
||||
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.
|
||||
|
||||
**Note:** Clearing cache data will also clear the shared dictionary cache. This means that any dictionaries used for compression may be reloaded after clearing the cache. If you wish to clear the shared dictionary cache but leave other cached data intact, you may want to use the `clearSharedDictionaryCache` method.
|
||||
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface][browsing-data-remover].
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h).
|
||||
|
||||
### Instance Properties
|
||||
|
||||
@@ -1635,5 +1601,3 @@ app.whenReady().then(async () => {
|
||||
console.log('Net-logs written to', path)
|
||||
})
|
||||
```
|
||||
|
||||
[browsing-data-remover]: https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# SharedDictionaryInfo Object
|
||||
|
||||
* `match` string - The matching path pattern for the dictionary which was declared in 'use-as-dictionary' response header's `match` option.
|
||||
* `matchDestinations` string[] - An array of matching destinations for the dictionary which was declared in 'use-as-dictionary' response header's `match-dest` option.
|
||||
* `id` string - The Id for the dictionary which was declared in 'use-as-dictionary' response header's `id` option.
|
||||
* `dictionaryUrl` string - URL of the dictionary.
|
||||
* `lastFetchTime` Date - The time of when the dictionary was received from the network layer.
|
||||
* `responseTime` Date - The time of when the dictionary was received from the server. For cached responses, this time could be "far" in the past.
|
||||
* `expirationDuration` number - The expiration time for the dictionary which was declared in 'use-as-dictionary' response header's `expires` option in seconds.
|
||||
* `lastUsedTime` Date - The time when the dictionary was last used.
|
||||
* `size` number - The amount of bytes stored for this shared dictionary information object in Chromium's internal storage (usually Sqlite).
|
||||
* `hash` string - The sha256 hash of the dictionary binary.
|
||||
@@ -1,5 +0,0 @@
|
||||
# SharedDictionaryUsageInfo Object
|
||||
|
||||
* `frameOrigin` string - The origin of the frame where the request originates. It’s specific to the individual frame making the request and is defined by its scheme, host, and port. In practice, will look like a URL.
|
||||
* `topFrameSite` string - The site of the top-level browsing context (the main frame or tab that contains the request). It’s less granular than `frameOrigin` and focuses on the broader "site" scope. In practice, will look like a URL.
|
||||
* `totalSizeBytes` number - The amount of bytes stored for this shared dictionary information object in Chromium's internal storage (usually Sqlite).
|
||||
@@ -37,10 +37,7 @@ Process: [Main](../glossary.md#main-process)<br />
|
||||
to load unsigned libraries. Unless you specifically need this capability, it is best to leave this disabled.
|
||||
Default is `false`.
|
||||
* `respondToAuthRequestsFromMainProcess` boolean (optional) - With this flag, all HTTP 401 and 407 network
|
||||
requests created via the [net module](net.md) will allow responding to them via the
|
||||
[`app#login`](app.md#event-login) event in the main process instead of the default
|
||||
[`login`](client-request.md#event-login) event on the [`ClientRequest`](client-request.md) object. Default is
|
||||
`false`.
|
||||
requests created via the [net module](net.md) will allow responding to them via the [`app#login`](app.md#event-login) event in the main process instead of the default [`login`](client-request.md#event-login) event on the [`ClientRequest`](client-request.md) object.
|
||||
|
||||
Returns [`UtilityProcess`](utility-process.md#class-utilityprocess)
|
||||
|
||||
@@ -95,8 +92,6 @@ the child process exits, then the value is `undefined` after the `exit` event is
|
||||
```js
|
||||
const child = utilityProcess.fork(path.join(__dirname, 'test.js'))
|
||||
|
||||
console.log(child.pid) // undefined
|
||||
|
||||
child.on('spawn', () => {
|
||||
console.log(child.pid) // Integer
|
||||
})
|
||||
@@ -106,8 +101,6 @@ child.on('exit', () => {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** You can use the `pid` to determine if the process is currently running.
|
||||
|
||||
#### `child.stdout`
|
||||
|
||||
A `NodeJS.ReadableStream | null` that represents the child process's stdout.
|
||||
|
||||
@@ -955,11 +955,17 @@ Emitted when a `<webview>` has been attached to this web contents.
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `level` Integer - The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and `error`.
|
||||
* `message` string - The actual console message
|
||||
* `line` Integer - The line number of the source that triggered this console message
|
||||
* `sourceId` string
|
||||
* `details` Event\<\>
|
||||
* `message` string - Message text
|
||||
* `level` string - Message severity
|
||||
Possible values include `info`, `warning`, `error`, and `debug`.
|
||||
* `lineNumber` Integer - Line number in the log source
|
||||
* `sourceId` string - URL of the log source
|
||||
* `frame` WebFrameMain - Frame that logged the message
|
||||
* `level` Integer _Deprecated_ - The log level, from 0 to 3. In order it matches `verbose`, `info`, `warning` and `error`.
|
||||
* `message` string _Deprecated_ - The actual console message
|
||||
* `line` Integer _Deprecated_ - The line number of the source that triggered this console message
|
||||
* `sourceId` string _Deprecated_
|
||||
|
||||
Emitted when the associated window logs a console message.
|
||||
|
||||
|
||||
@@ -142,29 +142,6 @@ ipcRenderer.on('port', (e, msg) => {
|
||||
})
|
||||
```
|
||||
|
||||
#### `frame.collectJavaScriptCallStack()` _Experimental_
|
||||
|
||||
Returns `Promise<string> | Promise<void>` - A promise that resolves with the currently running JavaScript call
|
||||
stack. If no JavaScript runs in the frame, the promise will never resolve. In cases where the call stack is
|
||||
otherwise unable to be collected, it will return `undefined`.
|
||||
|
||||
This can be useful to determine why the frame is unresponsive in cases where there's long-running JavaScript.
|
||||
For more information, see the [proposed Crash Reporting API.](https://wicg.github.io/crash-reporting/)
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('enable-features', 'DocumentPolicyIncludeJSCallStacksInCrashReports')
|
||||
|
||||
app.on('web-contents-created', (_, webContents) => {
|
||||
webContents.on('unresponsive', async () => {
|
||||
// Interrupt execution and collect call stack from unresponsive renderer
|
||||
const callStack = await webContents.mainFrame.collectJavaScriptCallStack()
|
||||
console.log('Renderer unresponsive\n', callStack)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
### Instance Properties
|
||||
|
||||
#### `frame.ipc` _Readonly_
|
||||
|
||||
@@ -12,6 +12,23 @@ This document uses the following convention to categorize breaking changes:
|
||||
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||
|
||||
## Planned Breaking API Changes (34.0)
|
||||
|
||||
### Deprecated: `level`, `message`, `line`, and `sourceId` arguments in `console-message` event on `WebContents`
|
||||
|
||||
The `console-message` event on `WebContents` has been updated to provide details on the `Event`
|
||||
argument.
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
webContents.on('console-message', (event, level, message, line, sourceId) => {})
|
||||
|
||||
// Replace with:
|
||||
webContents.on('console-message', ({ level, message, lineNumber, sourceId, frame }) => {})
|
||||
```
|
||||
|
||||
Additionally, `level` is now a string with possible values of `info`, `warning`, `error`, and `debug`.
|
||||
|
||||
## Planned Breaking API Changes (33.0)
|
||||
|
||||
### Behavior Changed: frame properties may retrieve detached WebFrameMain instances or none at all
|
||||
@@ -111,14 +128,14 @@ The nonstandard `path` property of the Web `File` object was added in an early v
|
||||
```js
|
||||
// Before (renderer)
|
||||
|
||||
const file = document.querySelector('input[type=file]').files[0]
|
||||
const file = document.querySelector('input[type=file]')
|
||||
alert(`Uploaded file path was: ${file.path}`)
|
||||
```
|
||||
|
||||
```js
|
||||
// After (renderer)
|
||||
|
||||
const file = document.querySelector('input[type=file]').files[0]
|
||||
const file = document.querySelector('input[type=file]')
|
||||
electron.showFilePath(file)
|
||||
|
||||
// (preload)
|
||||
|
||||
@@ -78,7 +78,6 @@ The following Devtools extensions have been tested to work in Electron:
|
||||
* [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)
|
||||
* [Backbone Debugger](https://chrome.google.com/webstore/detail/backbone-debugger/bhljhndlimiafopmmhjlgfpnnchjjbhd)
|
||||
* [jQuery Debugger](https://chrome.google.com/webstore/detail/jquery-debugger/dbhhnnnpaeobfddmlalhnehgclcmjimi)
|
||||
* [AngularJS Batarang](https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk)
|
||||
* [Vue.js devtools](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
||||
* [Cerebral Debugger](https://cerebraljs.com/docs/introduction/devtools.html)
|
||||
* [Redux DevTools Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
|
||||
|
||||
@@ -9,10 +9,10 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | TBD | ✅ |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2024-Jan-07 | 2025-Jun-24 | M132 | TBD | ✅ |
|
||||
| 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 | ✅ |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-14 | M126 | v20.14 | ✅ |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-07 | M126 | v20.14 | ✅ |
|
||||
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.11 | 🚫 |
|
||||
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | 🚫 |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | 🚫 |
|
||||
|
||||
@@ -68,10 +68,6 @@ The onlyLoadAppFromAsar fuse changes the search system that Electron uses to loc
|
||||
|
||||
The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.
|
||||
|
||||
V8 snapshots can be useful to improve app startup performance. V8 lets you take snapshots of initialized heaps and then load them back in to avoid the cost of initializing the heap.
|
||||
|
||||
Using separate snapshots for renderer processes and the main process can improve security, especially to make sure that the renderer doesn't use a snapshot with `nodeIntegration` enabled. See [#35170](https://github.com/electron/electron/issues/35170) for details.
|
||||
|
||||
### `grantFileProtocolExtraPrivileges`
|
||||
|
||||
**Default:** Enabled
|
||||
|
||||
@@ -42,7 +42,7 @@ safe.
|
||||
The only way to load a native module safely for now, is to make sure the app
|
||||
loads no native modules after the Web Workers get started.
|
||||
|
||||
```js @ts-expect-error=[1]
|
||||
```js
|
||||
process.dlopen = () => {
|
||||
throw new Error('Load native module is not safe')
|
||||
}
|
||||
|
||||
34
electron_unsafe_buffers_paths.txt
Normal file
34
electron_unsafe_buffers_paths.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
# Copyright 2024 The Electron Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# The set of path prefixes that should be checked for unsafe buffer usage (see
|
||||
# -Wunsafe-buffer-usage in Clang).
|
||||
#
|
||||
# ***
|
||||
# Paths should be written as relative to the root of the source tree with
|
||||
# unix-style path separators. Directory prefixes should end with `/`, such
|
||||
# as `base/`.
|
||||
# ***
|
||||
#
|
||||
# Files in this set are known to not use pointer arithmetic/subscripting, and
|
||||
# make use of constructs like base::span or containers like std::vector instead.
|
||||
#
|
||||
# See `docs/unsafe_buffers.md`.
|
||||
|
||||
# These directories are excluded because they come from outside Electron and
|
||||
# we don't have control over their contents.
|
||||
-base/
|
||||
-chrome/
|
||||
-components/
|
||||
-device/
|
||||
-extensions/
|
||||
-google_apis/
|
||||
-net/
|
||||
-services/
|
||||
-skia/
|
||||
-third_party/
|
||||
-tools/
|
||||
-ui/
|
||||
-url/
|
||||
-v8/
|
||||
@@ -133,8 +133,6 @@ auto_filenames = {
|
||||
"docs/api/structures/segmented-control-segment.md",
|
||||
"docs/api/structures/serial-port.md",
|
||||
"docs/api/structures/service-worker-info.md",
|
||||
"docs/api/structures/shared-dictionary-info.md",
|
||||
"docs/api/structures/shared-dictionary-usage-info.md",
|
||||
"docs/api/structures/shared-worker-info.md",
|
||||
"docs/api/structures/sharing-item.md",
|
||||
"docs/api/structures/shortcut-details.md",
|
||||
|
||||
@@ -586,7 +586,6 @@ filenames = {
|
||||
"shell/common/crash_keys.h",
|
||||
"shell/common/electron_command_line.cc",
|
||||
"shell/common/electron_command_line.h",
|
||||
"shell/common/electron_constants.cc",
|
||||
"shell/common/electron_constants.h",
|
||||
"shell/common/electron_paths.h",
|
||||
"shell/common/gin_converters/accelerator_converter.cc",
|
||||
@@ -680,7 +679,6 @@ filenames = {
|
||||
"shell/common/node_includes.h",
|
||||
"shell/common/node_util.cc",
|
||||
"shell/common/node_util.h",
|
||||
"shell/common/options_switches.cc",
|
||||
"shell/common/options_switches.h",
|
||||
"shell/common/platform_util.cc",
|
||||
"shell/common/platform_util.h",
|
||||
|
||||
@@ -549,6 +549,8 @@ WebContents.prototype.goToOffset = function (index: number) {
|
||||
return this._goToOffset(index);
|
||||
};
|
||||
|
||||
const consoleMessageDeprecated = deprecate.warnOnceMessage('\'console-message\' arguments are deprecated and will be removed. Please use Event<WebContentsConsoleMessageEventParams> object instead.');
|
||||
|
||||
// Add JavaScript wrappers for WebContents class.
|
||||
WebContents.prototype._init = function () {
|
||||
const prefs = this.getLastWebPreferences() || {};
|
||||
@@ -909,6 +911,15 @@ WebContents.prototype._init = function () {
|
||||
openDialogs.clear();
|
||||
});
|
||||
|
||||
// TODO(samuelmaddock): remove deprecated 'console-message' arguments
|
||||
this.on('-console-message' as any, (event: Electron.Event<Electron.WebContentsConsoleMessageEventParams>) => {
|
||||
const hasDeprecatedListener = this.listeners('console-message').some(listener => listener.length > 1);
|
||||
if (hasDeprecatedListener) {
|
||||
consoleMessageDeprecated();
|
||||
}
|
||||
this.emit('console-message', event, (event as any)._level, event.message, event.lineNumber, event.sourceId);
|
||||
});
|
||||
|
||||
this.on('-unresponsive' as any, (event: Electron.Event<any>) => {
|
||||
const shouldEmit = !event.shouldIgnore && event.visible && event.rendererInitialized;
|
||||
if (shouldEmit) {
|
||||
|
||||
@@ -306,13 +306,17 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) {
|
||||
if (shouldThrowStatError(options)) throw createError(AsarError.INVALID_ARCHIVE, { asarPath });
|
||||
if (shouldThrowStatError(options)) {
|
||||
throw createError(AsarError.INVALID_ARCHIVE, { asarPath });
|
||||
};
|
||||
return null;
|
||||
}
|
||||
|
||||
const stats = archive.stat(filePath);
|
||||
if (!stats) {
|
||||
if (shouldThrowStatError(options)) throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
if (shouldThrowStatError(options)) {
|
||||
throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
};
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -690,7 +694,9 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
const { encoding } = options;
|
||||
const buffer = Buffer.alloc(info.size);
|
||||
const fd = archive.getFdAndValidateIntegrityLater();
|
||||
if (!(fd >= 0)) throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
if (!(fd >= 0)) {
|
||||
throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
}
|
||||
|
||||
logASARAccess(asarPath, filePath, info.offset);
|
||||
fs.readSync(fd, buffer, 0, info.size, info.offset);
|
||||
@@ -755,7 +761,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
nextTick(callback!, [null, files]);
|
||||
};
|
||||
|
||||
const { readdir: readdirPromise } = require('fs').promises;
|
||||
const { readdir: readdirPromise } = fs.promises;
|
||||
fs.promises.readdir = async function (pathArgument: string, options: ReaddirOptions) {
|
||||
options = getOptions(options);
|
||||
pathArgument = getValidatedPath(pathArgument);
|
||||
@@ -841,37 +847,30 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
return files;
|
||||
};
|
||||
|
||||
const binding = internalBinding('fs');
|
||||
const { internalModuleReadJSON, kUsePromises } = binding;
|
||||
internalBinding('fs').internalModuleReadJSON = (pathArgument: string) => {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleReadJSON(pathArgument);
|
||||
const modBinding = internalBinding('modules');
|
||||
const { readPackageJSON } = modBinding;
|
||||
internalBinding('modules').readPackageJSON = (
|
||||
jsonPath: string,
|
||||
isESM: boolean,
|
||||
base: undefined | string,
|
||||
specifier: undefined | string
|
||||
) => {
|
||||
const pathInfo = splitPath(jsonPath);
|
||||
if (!pathInfo.isAsar) return readPackageJSON(jsonPath, isESM, base, specifier);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) return [];
|
||||
if (!archive) return undefined;
|
||||
|
||||
const info = archive.getFileInfo(filePath);
|
||||
if (!info) return [];
|
||||
if (info.size === 0) return ['', false];
|
||||
if (info.unpacked) {
|
||||
const realPath = archive.copyFileOut(filePath);
|
||||
const str = fs.readFileSync(realPath, { encoding: 'utf8' });
|
||||
return [str, str.length > 0];
|
||||
}
|
||||
const realPath = archive.copyFileOut(filePath);
|
||||
if (!realPath) return undefined;
|
||||
|
||||
const buffer = Buffer.alloc(info.size);
|
||||
const fd = archive.getFdAndValidateIntegrityLater();
|
||||
if (!(fd >= 0)) return [];
|
||||
|
||||
logASARAccess(asarPath, filePath, info.offset);
|
||||
fs.readSync(fd, buffer, 0, info.size, info.offset);
|
||||
validateBufferIntegrity(buffer, info.integrity);
|
||||
const str = buffer.toString('utf8');
|
||||
return [str, str.length > 0];
|
||||
return readPackageJSON(realPath, isESM, base, specifier);
|
||||
};
|
||||
|
||||
const { internalModuleStat } = internalBinding('fs');
|
||||
const binding = internalBinding('fs');
|
||||
|
||||
const { internalModuleStat } = binding;
|
||||
internalBinding('fs').internalModuleStat = (pathArgument: string) => {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleStat(pathArgument);
|
||||
@@ -888,6 +887,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
return (stats.type === AsarFileType.kDirectory) ? 1 : 0;
|
||||
};
|
||||
|
||||
const { kUsePromises } = binding;
|
||||
async function readdirRecursive (originalPath: string, options: ReaddirOptions) {
|
||||
const result: any[] = [];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/get": "^2.0.0",
|
||||
"@types/node": "^20.9.0",
|
||||
"@types/node": "^22.7.7",
|
||||
"extract-zip": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"@octokit/rest": "^20.0.2",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/node": "^20.9.0",
|
||||
"@types/node": "^22.7.7",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/stream-json": "^1.7.7",
|
||||
"@types/temp": "^0.9.4",
|
||||
@@ -45,7 +45,7 @@
|
||||
"null-loader": "^4.0.1",
|
||||
"pre-flight": "^2.0.0",
|
||||
"process": "^0.11.10",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-cli": "^12.0.1",
|
||||
"remark-preset-lint-markdown-style-guide": "^4.0.0",
|
||||
"semver": "^7.6.3",
|
||||
"shx": "^0.3.4",
|
||||
@@ -57,7 +57,7 @@
|
||||
"ts-node": "6.2.0",
|
||||
"typescript": "^5.6.2",
|
||||
"url": "^0.11.4",
|
||||
"webpack": "^5.94.0",
|
||||
"webpack": "^5.95.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"wrapper-webpack-plugin": "^2.2.0"
|
||||
},
|
||||
|
||||
@@ -134,4 +134,3 @@ feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
|
||||
chore_partial_revert_of.patch
|
||||
fix_software_compositing_infinite_loop.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
support_bstr_pkey_appusermodel_id_in_windows_shortcuts.patch
|
||||
|
||||
@@ -116,10 +116,10 @@ index 083af135d890c2837e72c314e170e81931bd2a20..5245ea88441ef84c15b8052a9011ce70
|
||||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index ad134361e0b9c9a9db4cec06c429102d5dbe0c4e..82aef58c0a3c00c818e0d60df9a5296162c57cc3 100644
|
||||
index f5fe2e061448673c788315a167efff1fb70c3ef0..ed0c77c14e8dcf3e6d7328c8a9c640388b7be92d 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2456,6 +2456,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2452,6 +2452,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index ad134361e0b9c9a9db4cec06c429102d5dbe0c4e..82aef58c0a3c00c818e0d60df9a52961
|
||||
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 &&
|
||||
@@ -3988,10 +3992,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3984,10 +3988,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index ad134361e0b9c9a9db4cec06c429102d5dbe0c4e..82aef58c0a3c00c818e0d60df9a52961
|
||||
// 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 e4784453b357e2a9c18ccf5acfde43f5afd583ae..2c5a9f08ac34ae4106f25c42dca04f78ae703618 100644
|
||||
index d5397c53559ba239e46c9485fb30daea89bd392b..4989d9f6a28d519098b16e832c2a36c61ab04c15 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -166,7 +166,7 @@ index e4784453b357e2a9c18ccf5acfde43f5afd583ae..2c5a9f08ac34ae4106f25c42dca04f78
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -936,6 +937,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -933,6 +934,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ index 2f33ec660a975522c473ecd50e633b5edaca707f..65221a51927d9f44bd6adbad88fa1144
|
||||
// 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 6a071e614bfd44fce79bf6db80d026f24eefdd7f..1daf1d65e2e6ac494790aa9201609c9ca9af6828 100644
|
||||
index 5c8c50fc2025a160bfb0587cd46ba45f8d58a175..d918e9d165acefa8ba3a225aec261ebf028c40f7 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -746,10 +746,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -6,15 +6,34 @@ Subject: build: allow electron to use exec_script
|
||||
This is similar to the //build usecase so we're OK adding ourselves here
|
||||
|
||||
diff --git a/.gn b/.gn
|
||||
index 44a11ec90ec9b67cf22b6d529c6843e6b6af12bc..783dd77dcdf92ec32cc6594b739eab9738f3e3ba 100644
|
||||
index 44a11ec90ec9b67cf22b6d529c6843e6b6af12bc..3e880eed02ca57db10d734d6a7566e0a977433a5 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -172,4 +172,8 @@ exec_script_whitelist =
|
||||
@@ -172,4 +172,27 @@ exec_script_whitelist =
|
||||
|
||||
"//tools/grit/grit_rule.gni",
|
||||
"//tools/gritsettings/BUILD.gn",
|
||||
+
|
||||
+ "//electron/BUILD.gn",
|
||||
+ "//third_party/electron_node/deps/ada/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/base64/BUILD.gn",
|
||||
+ "//third_party/electron_node/deps/base64/unofficial.gni",
|
||||
+ "//third_party/electron_node/node.gni",
|
||||
+ "//third_party/electron_node/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/brotli/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/cares/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/googletest/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/histogram/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/llhttp/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/nbytes/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/ncrypto/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/nghttp2/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/ngtcp2/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/openssl/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/simdutf/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/simdjson/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/sqlite/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/uv/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/uvwasi/unofficial.gni",
|
||||
+ "//third_party/electron_node/src/inspector/unofficial.gni",
|
||||
]
|
||||
|
||||
@@ -33,7 +33,7 @@ index 9580623c57cb02f7e924742c6cb1638676881115..ad80d8e63dfebbbdb8eaa63bfe38a6f8
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 3914cb63eed91e0e8a6eb8b64092c5dbe5348781..a6a24986f33fb79d3226840ffaa62448026f7383 100644
|
||||
index 1a136cdeb8aea796a8b3f81e4f791c29ae02cf02..9033419bb880830076835e8400276e738b71f428 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4525,7 +4525,7 @@ static_library("browser") {
|
||||
|
||||
@@ -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 95b2ad64c83361c452f9256cf96873f2cd82b446..53f96ccd4954972bc78ebccf4bf479ac8564a8d3 100644
|
||||
index d29dac893805535bbbd9aefe096a0ca2825a01aa..4f31803e492d0d05b29659f8bf75b6fee7aff25e 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9179,6 +9179,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9170,6 +9170,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 95b2ad64c83361c452f9256cf96873f2cd82b446..53f96ccd4954972bc78ebccf4bf479ac
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ea5a63ce49a1eb99792be2eafc64c44ad6da0a60..a722f77502e8b896fb5d55df7cb44d45d13df04f 100644
|
||||
index c93722f2fc5340edeeace5a1690d0fa7d84dffb2..e7e47a9aa5a22aea2aa0eeab7bd661b47c9cbdae 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4891,6 +4891,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4887,6 +4887,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
|
||||
opener);
|
||||
|
||||
@@ -37,7 +37,7 @@ index ea5a63ce49a1eb99792be2eafc64c44ad6da0a60..a722f77502e8b896fb5d55df7cb44d45
|
||||
// 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
|
||||
@@ -4932,12 +4938,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4928,12 +4934,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 5469931a7c4dc7ad8b98f5ac54c5538a7ba23a78..9bd28a4029de17833d5147986736747075ff35bc 100644
|
||||
index 1b748a2e0d803217985847014855b095b53c58e5..0e742f196367bbbe8c4e147ef4db4f8dbbe4cbbe 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4817,9 +4817,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4813,9 +4813,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
bool renderer_started_hidden =
|
||||
params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB;
|
||||
|
||||
|
||||
@@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 1f0b9a602a9e6cf565818ad584688b783fe3430b..1d1d761f8c7ff09cbd2c6a567e070ac41d3a1759 100644
|
||||
index de6b544df67c9702b6771b08b003805b4f5fb5a4..4de45e398ec013714302c8cbaafa3bb6aa01ef8e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4786,8 +4786,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4782,8 +4782,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
||||
@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 82aef58c0a3c00c818e0d60df9a5296162c57cc3..930e6160134897a91d4ed8f1517bc90d708cfd04 100644
|
||||
index ed0c77c14e8dcf3e6d7328c8a9c640388b7be92d..7bf2296e1a3b48cc3aa7f031d5b835fab8488267 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -169,6 +169,7 @@
|
||||
@@ -23,7 +23,7 @@ index 82aef58c0a3c00c818e0d60df9a5296162c57cc3..930e6160134897a91d4ed8f1517bc90d
|
||||
#include "third_party/blink/renderer/platform/graphics/image.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
|
||||
@@ -1854,6 +1855,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1850,6 +1851,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -11,7 +11,7 @@ ServiceProcessHost::Observer functions, but we need to pass the exit code to
|
||||
the observer.
|
||||
|
||||
diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc
|
||||
index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4870c9f61 100644
|
||||
index f6082bada22c5f4e70af60ea6f555b0f363919c5..228f947edbe04bce242df62080052d9c383f1709 100644
|
||||
--- a/content/browser/service_process_host_impl.cc
|
||||
+++ b/content/browser/service_process_host_impl.cc
|
||||
@@ -73,12 +73,15 @@ class ServiceProcessTracker {
|
||||
@@ -33,7 +33,19 @@ index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4
|
||||
processes_.erase(iter);
|
||||
}
|
||||
|
||||
@@ -154,7 +157,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client {
|
||||
@@ -87,6 +90,11 @@ class ServiceProcessTracker {
|
||||
observers_.AddObserver(observer);
|
||||
}
|
||||
|
||||
+ bool HasObserver(ServiceProcessHost::Observer* observer) {
|
||||
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
+ return observers_.HasObserver(observer);
|
||||
+ }
|
||||
+
|
||||
void RemoveObserver(ServiceProcessHost::Observer* observer) {
|
||||
// NOTE: Some tests may remove observers after BrowserThreads are shut down.
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
||||
@@ -154,7 +162,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client {
|
||||
process_info_->service_process_id());
|
||||
}
|
||||
|
||||
@@ -42,7 +54,7 @@ index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4
|
||||
// TODO(crbug.com/40654042): It is unclear how we can observe
|
||||
// |OnProcessCrashed()| without observing |OnProcessLaunched()| first, but
|
||||
// it can happen on Android. Ignore the notification in this case.
|
||||
@@ -162,7 +165,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client {
|
||||
@@ -162,7 +170,7 @@ class UtilityProcessClient : public UtilityProcessHost::Client {
|
||||
return;
|
||||
|
||||
GetServiceProcessTracker().NotifyCrashed(
|
||||
@@ -51,6 +63,18 @@ index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -232,6 +240,11 @@ void ServiceProcessHost::AddObserver(Observer* observer) {
|
||||
GetServiceProcessTracker().AddObserver(observer);
|
||||
}
|
||||
|
||||
+// static
|
||||
+bool ServiceProcessHost::HasObserver(Observer* observer) {
|
||||
+ return GetServiceProcessTracker().HasObserver(observer);
|
||||
+}
|
||||
+
|
||||
// static
|
||||
void ServiceProcessHost::RemoveObserver(Observer* observer) {
|
||||
GetServiceProcessTracker().RemoveObserver(observer);
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index cdc2046f465110b60285da81fb0db7cdce064a59..8feca9f1c294b3de15d74dfc94508ee2a43e5fc3 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
@@ -77,8 +101,23 @@ index 66cbabae31236758eef35bab211d4874f8a5c699..88515741fa08176ba9e952759c3a52e1
|
||||
};
|
||||
|
||||
// This class is self-owned. It must be instantiated using new, and shouldn't
|
||||
diff --git a/content/public/browser/service_process_host.h b/content/public/browser/service_process_host.h
|
||||
index 611a52e908f4cb70fbe5628e220a082e45320b70..d7fefab99f86515007aff5f523a423a421850c47 100644
|
||||
--- a/content/public/browser/service_process_host.h
|
||||
+++ b/content/public/browser/service_process_host.h
|
||||
@@ -235,6 +235,10 @@ class CONTENT_EXPORT ServiceProcessHost {
|
||||
// removed before destruction. Must be called from the UI thread only.
|
||||
static void AddObserver(Observer* observer);
|
||||
|
||||
+ // Returns true if the given observer is currently registered.
|
||||
+ // Must be called from the UI thread only.
|
||||
+ static bool HasObserver(Observer* observer);
|
||||
+
|
||||
// Removes a registered observer. This must be called some time before
|
||||
// |*observer| is destroyed and must be called from the UI thread only.
|
||||
static void RemoveObserver(Observer* observer);
|
||||
diff --git a/content/public/browser/service_process_info.h b/content/public/browser/service_process_info.h
|
||||
index 1a8656aef341cd3b23af588fb00569b79d6cd100..6af523eb27a8c1e5529721c029e5b3ba0708b9fc 100644
|
||||
index 1a8656aef341cd3b23af588fb00569b79d6cd100..f904af7ee6bbacf4474e0939855ecf9f2c9a5eaa 100644
|
||||
--- a/content/public/browser/service_process_info.h
|
||||
+++ b/content/public/browser/service_process_info.h
|
||||
@@ -64,7 +64,13 @@ class CONTENT_EXPORT ServiceProcessInfo {
|
||||
@@ -90,7 +129,7 @@ index 1a8656aef341cd3b23af588fb00569b79d6cd100..6af523eb27a8c1e5529721c029e5b3ba
|
||||
+
|
||||
private:
|
||||
+ // The exit code of the process, if it has exited.
|
||||
+ int exit_code_ = 0;
|
||||
+ int exit_code_;
|
||||
+
|
||||
// The name of the service interface for which the process was launched.
|
||||
std::string service_interface_name_;
|
||||
|
||||
@@ -16,13 +16,13 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
||||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685beef2035619 100644
|
||||
index 176f02f0abb4220564caa1d794faabc5b22bd8bc..4b08918cef83a84076e452b41302588efdfb0619 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -20,12 +20,16 @@
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -21,12 +21,16 @@
|
||||
#include "chrome/browser/history/history_service_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/ui/blocked_content/popunder_preventer.h"
|
||||
+#endif
|
||||
@@ -36,7 +36,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "components/history/core/browser/history_service.h"
|
||||
#include "components/history/core/browser/history_types.h"
|
||||
@@ -260,10 +264,12 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -259,10 +263,12 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
|
||||
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
|
||||
// value of |IsWindowFullscreenForTabOrPending|.
|
||||
@@ -375,12 +381,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -374,12 +380,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
void FullscreenController::FullscreenTabOpeningPopup(
|
||||
content::WebContents* opener,
|
||||
content::WebContents* popup) {
|
||||
@@ -64,7 +64,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
}
|
||||
|
||||
void FullscreenController::OnTabDeactivated(
|
||||
@@ -466,10 +474,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
@@ -465,10 +473,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
#endif // DCHECK_IS_ON()
|
||||
tab_fullscreen_target_display_id_ = display::kInvalidDisplayId;
|
||||
started_fullscreen_transition_ = false;
|
||||
@@ -77,7 +77,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
}
|
||||
|
||||
void FullscreenController::RunOrDeferUntilTransitionIsComplete(
|
||||
@@ -577,18 +587,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -576,18 +586,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
@@ -101,7 +101,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
if (option == TAB) {
|
||||
url = GetRequestingOrigin();
|
||||
tab_fullscreen_ = true;
|
||||
@@ -621,6 +630,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -620,6 +629,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
if (!extension_caused_fullscreen_.is_empty())
|
||||
url = extension_caused_fullscreen_;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
|
||||
fullscreen_start_time_ = base::TimeTicks::Now();
|
||||
if (option == BROWSER)
|
||||
@@ -641,6 +651,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -640,6 +650,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
|
||||
if (fullscreen_start_time_ && exclusive_access_tab()) {
|
||||
ukm::SourceId source_id =
|
||||
@@ -652,15 +663,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -651,15 +662,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
.Record(ukm::UkmRecorder::Get());
|
||||
fullscreen_start_time_.reset();
|
||||
}
|
||||
@@ -137,7 +137,7 @@ index 47d494f0c3c02bc65ca18521cc1049e766e050cb..40262c3b77980be3208387d64a685bee
|
||||
exclusive_access_manager()->context()->ExitFullscreen();
|
||||
extension_caused_fullscreen_ = GURL();
|
||||
exclusive_access_manager()->UpdateBubble(base::NullCallback());
|
||||
@@ -722,8 +734,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
@@ -721,8 +733,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
void FullscreenController::RecordMetricsOnFullscreenApiRequested(
|
||||
content::RenderFrameHost* requesting_frame) {
|
||||
history::HistoryService* service =
|
||||
|
||||
@@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 4f76cfa33ea68a49e1c7cec096cd34a1587042a2..0ee902a2ff5f82b75f4b6cb2eb0f96209e260183 100644
|
||||
index f8e18b15a19517b28057dd007adccc0fd222e2e1..6e1656f3bd62b597952528bfee884666111277fc 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10806,6 +10806,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10802,6 +10802,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
"blob");
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
|
||||
or support it enough to fix the crash.
|
||||
|
||||
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
index a861c34084b90561beab221ac13929bef295ac6d..94ea00dba8a6bb314421e6bd0ccef32e3ac02829 100644
|
||||
index f7e98f2c94ac9802062880f9341214f88c85a669..86b0b3b7596e7da68c536c0dea3d95b22bdd9481 100644
|
||||
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
@@ -1086,28 +1086,27 @@ export class PdfViewerElement extends PdfViewerBaseElement {
|
||||
@@ -1076,28 +1076,27 @@ export class PdfViewerElement extends PdfViewerBaseElement {
|
||||
dataArray = [result.dataToSave];
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ index a861c34084b90561beab221ac13929bef295ac6d..94ea00dba8a6bb314421e6bd0ccef32e
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1298,36 +1297,33 @@ export class PdfViewerElement extends PdfViewerBaseElement {
|
||||
@@ -1288,36 +1287,33 @@ export class PdfViewerElement extends PdfViewerBaseElement {
|
||||
fileName = fileName + '.pdf';
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index a861c34084b90561beab221ac13929bef295ac6d..94ea00dba8a6bb314421e6bd0ccef32e
|
||||
|
||||
// <if expr="enable_pdf_ink2">
|
||||
// Ink2 doesn't need to exit annotation mode after save.
|
||||
@@ -1474,6 +1470,9 @@ declare global {
|
||||
@@ -1464,6 +1460,9 @@ declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'pdf-viewer': PdfViewerElement;
|
||||
}
|
||||
|
||||
@@ -87,10 +87,10 @@ index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f93
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index f8872945d67dacbdb9c3d610ff3719039eca7c94..5469931a7c4dc7ad8b98f5ac54c5538a7ba23a78 100644
|
||||
index 9b84cc06795a5bef730cd81908254cf9ad11c836..1b748a2e0d803217985847014855b095b53c58e5 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9393,7 +9393,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -9384,7 +9384,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -64,10 +64,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 1daf1d65e2e6ac494790aa9201609c9ca9af6828..a4e649e4c63160e6152d3ff0d6a414ccd4f8b4cc 100644
|
||||
index d918e9d165acefa8ba3a225aec261ebf028c40f7..d6cbf553961137429c40fe768f28b104bda0f89b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3136,6 +3136,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3130,6 +3130,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -75,7 +75,7 @@ index 1daf1d65e2e6ac494790aa9201609c9ca9af6828..a4e649e4c63160e6152d3ff0d6a414cc
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -3168,7 +3169,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -3162,7 +3163,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
script_state, std::move(script_sources), execute_script_policy,
|
||||
user_gesture, evaluation_timing, blocking_option, want_result_option,
|
||||
@@ -85,7 +85,7 @@ index 1daf1d65e2e6ac494790aa9201609c9ca9af6828..a4e649e4c63160e6152d3ff0d6a414cc
|
||||
|
||||
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
index 7e65f92dbeb987836be447dee2c660cdde8295ed..b5484a84fea067938a9e3d15f49f4c12c3739c20 100644
|
||||
index 13d1bea90341efbf51c476d3eacae49c8b960537..f508e3e9df98c167740b0574ef554bd17f41447f 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
@@ -824,6 +824,7 @@ class CORE_EXPORT LocalFrame final
|
||||
@@ -204,7 +204,7 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
|
||||
const mojom::blink::UserActivationOption user_activation_option_;
|
||||
const mojom::blink::LoadEventBlockingOption blocking_option_;
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
index 0802173ce891bcaca8b6bba2762ad2b80d4d5c75..6d31ccae7e6a9e204999d8475808afc11a0665c8 100644
|
||||
index 3979c3987da3dd49218407c41977d9ce7d114edb..7e00f6bdd1d398f22d39823088caf5cde3a34dd9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
@@ -291,6 +291,7 @@ void ExecuteScriptsInMainWorld(
|
||||
|
||||
@@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 09b7137cd3e26a1aef2c93ff7f08641df56704c0..732978b9650cac5102007c27b9226ff053c92d4f 100644
|
||||
index 07907372f37d3ef5c9eaef7011ebcd4ed6a2fed6..ec5e553d93caf8a24de97465a870567d95944000 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2106,7 +2106,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2105,7 +2105,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index 09b7137cd3e26a1aef2c93ff7f08641df56704c0..732978b9650cac5102007c27b9226ff0
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2114,7 +2114,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2113,7 +2113,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -10,7 +10,7 @@ an about:blank check to this area.
|
||||
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 7b7e21c5b4b2e6657965c4433c6f9bc064a4ef9f..5abddf5b5cf2ab5e8e03066143b1824908257e87 100644
|
||||
index 174b6cb9531237528664bcaff06a6e8dc1677349..144490c1ad76dce306e7e4a25270456d60bbb7f5 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -784,8 +784,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
|
||||
@@ -44,10 +44,10 @@ index 886d70636aedfa714b29625f58420ad11ede9ffd..7906b94983733a9deb2365fb2a134619
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index a722f77502e8b896fb5d55df7cb44d45d13df04f..1f0b9a602a9e6cf565818ad584688b783fe3430b 100644
|
||||
index e7e47a9aa5a22aea2aa0eeab7bd661b47c9cbdae..de6b544df67c9702b6771b08b003805b4f5fb5a4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5616,6 +5616,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -5612,6 +5612,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index a722f77502e8b896fb5d55df7cb44d45d13df04f..1f0b9a602a9e6cf565818ad584688b78
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 2a098761bc3b67af3ada46596613152c136583b0..1d0df8595a89642a0eb33cdf76fd9cafc1e4b4b0 100644
|
||||
index 88282f2880d2443aca30ec1754bf5e43ed67acfc..60c94fd4508e166e0dd1be9c6eb97dd45e418853 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1130,6 +1130,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
@@ -1128,6 +1128,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
@@ -72,7 +72,7 @@ index 2a098761bc3b67af3ada46596613152c136583b0..1d0df8595a89642a0eb33cdf76fd9caf
|
||||
RenderWidgetHostImpl* render_widget_host) override;
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index f3284b11c2a9d020e85af2fea2057926de4cdd0b..9d58a654ddbabeecef2d9f17e0229c72c0afe6fd 100644
|
||||
index 0379a5ca835e3e9d1b90543bbbe5971148d6c73e..03ed25d04ff0f54d412e1a3044b7770f75384a96 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 9bd28a4029de17833d5147986736747075ff35bc..140e94cd6dfba03260ff9e2cf4b38459cdaaf9ba 100644
|
||||
index 319800cec84a968b0e442fc760c8e1d701bda2ed..459663af86272fe1e23a6a163e01c67fc5f8a66d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9527,25 +9527,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -9464,25 +9464,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Thu, 21 Nov 2024 14:23:17 +0100
|
||||
Subject: Support BSTR PKEY_AppUserModel_ID in Windows Shortcuts
|
||||
|
||||
It's possible for a shortcut link on Windows to be BSTR format;
|
||||
this resulted in a DCHECK previously but as of the NOTREACHED
|
||||
fatal migration now will crash a given app. This has created an
|
||||
issue for Electron, which allows providing the shortcut information
|
||||
to end users. This CL thus allows for supporting VT_BSTR variants
|
||||
for PKEY_AppUserModel_ID and mitigates a crash. One such example
|
||||
is https://github.com/wez/wezterm, which after this change
|
||||
correctly gets an appUserModelId of 'org.wezfurlong.wezterm'.
|
||||
|
||||
Bug: N/A
|
||||
Change-Id: I5ad114bc345059637465b68a53a2f3f8c42de898
|
||||
|
||||
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
|
||||
index d4a54d1afdc121192f9c0321c6ced584ee066486..02f3e63d16c3324f546f6155d722900f0a81131a 100644
|
||||
--- a/base/win/shortcut.cc
|
||||
+++ b/base/win/shortcut.cc
|
||||
@@ -289,14 +289,22 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
|
||||
return false;
|
||||
}
|
||||
switch (pv_app_id.get().vt) {
|
||||
- case VT_EMPTY:
|
||||
+ case VT_EMPTY: {
|
||||
properties->set_app_id(std::wstring());
|
||||
break;
|
||||
- case VT_LPWSTR:
|
||||
+ }
|
||||
+ case VT_LPWSTR: {
|
||||
properties->set_app_id(pv_app_id.get().pwszVal);
|
||||
break;
|
||||
- default:
|
||||
+ }
|
||||
+ case VT_BSTR: {
|
||||
+ BSTR bs = pv_app_id.get().bstrVal;
|
||||
+ properties->set_app_id(std::wstring(bs, ::SysStringLen(bs)));
|
||||
+ break;
|
||||
+ }
|
||||
+ default: {
|
||||
NOTREACHED() << "Unexpected variant type: " << pv_app_id.get().vt;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 732978b9650cac5102007c27b9226ff053c92d4f..851eff886b5827e362b260f6a954a9081417b067 100644
|
||||
index ec5e553d93caf8a24de97465a870567d95944000..369b4c70bba9363ed8fac184fd843bf1aa49e59e 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1754,6 +1754,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1753,6 +1753,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), IsJitDisabled());
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 1d1d761f8c7ff09cbd2c6a567e070ac41d3a1759..50dd1fe97063a3d763461fe3ff7af340e7c4ad05 100644
|
||||
index 4de45e398ec013714302c8cbaafa3bb6aa01ef8e..6d0b5e9a3350108f183e958871928623283cbe23 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3758,6 +3758,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3754,6 +3754,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index 1d1d761f8c7ff09cbd2c6a567e070ac41d3a1759..50dd1fe97063a3d763461fe3ff7af340
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3768,6 +3775,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3764,6 +3771,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ index 1d1d761f8c7ff09cbd2c6a567e070ac41d3a1759..50dd1fe97063a3d763461fe3ff7af340
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 191a98adec4cc5eb1378be40456a11ff5c093a2e..7a3eb2028af908907bd5e72df90534c90884b34e 100644
|
||||
index 825e0d9d641bfa8fc5907a6d479d94206d432fb6..0f2ce0476e9b067ea2f678e5683040e29f10fe81 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -111,10 +111,13 @@ class BrowserPluginGuestDelegate;
|
||||
|
||||
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 53f96ccd4954972bc78ebccf4bf479ac8564a8d3..7b7e21c5b4b2e6657965c4433c6f9bc064a4ef9f 100644
|
||||
index 4f31803e492d0d05b29659f8bf75b6fee7aff25e..174b6cb9531237528664bcaff06a6e8dc1677349 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8286,6 +8286,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -8277,6 +8277,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ index 53f96ccd4954972bc78ebccf4bf479ac8564a8d3..7b7e21c5b4b2e6657965c4433c6f9bc0
|
||||
if (had_fullscreen_token && !GetView()->HasFocus())
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 50dd1fe97063a3d763461fe3ff7af340e7c4ad05..f8872945d67dacbdb9c3d610ff3719039eca7c94 100644
|
||||
index 6d0b5e9a3350108f183e958871928623283cbe23..9b84cc06795a5bef730cd81908254cf9ad11c836 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4015,21 +4015,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
@@ -4011,21 +4011,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
@@ -78,7 +78,7 @@ index 50dd1fe97063a3d763461fe3ff7af340e7c4ad05..f8872945d67dacbdb9c3d610ff371903
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -4188,7 +4192,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -4184,7 +4188,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
{ "patch_dir": "src/electron/patches/Mantle", "repo": "src/third_party/squirrel.mac/vendor/Mantle" },
|
||||
{ "patch_dir": "src/electron/patches/ReactiveObjC", "repo": "src/third_party/squirrel.mac/vendor/ReactiveObjC" },
|
||||
{ "patch_dir": "src/electron/patches/webrtc", "repo": "src/third_party/webrtc" },
|
||||
{ "patch_dir": "src/electron/patches/reclient-configs", "repo": "src/third_party/engflow-reclient-configs" }
|
||||
{ "patch_dir": "src/electron/patches/reclient-configs", "repo": "src/third_party/engflow-reclient-configs" },
|
||||
{ "patch_dir": "src/electron/patches/sqlite", "repo": "src/third_party/sqlite/src" }
|
||||
]
|
||||
|
||||
@@ -21,37 +21,25 @@ enable_crashpad_linux_node_processes.patch
|
||||
fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch
|
||||
chore_expose_importmoduledynamically_and.patch
|
||||
test_formally_mark_some_tests_as_flaky.patch
|
||||
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
|
||||
chore_remove_--no-harmony-atomics_related_code.patch
|
||||
fix_account_for_createexternalizablestring_v8_global.patch
|
||||
fix_do_not_resolve_electron_entrypoints.patch
|
||||
ci_ensure_node_tests_set_electron_run_as_node.patch
|
||||
fix_assert_module_in_the_renderer_process.patch
|
||||
fix_add_trusted_space_and_trusted_lo_space_to_the_v8_heap.patch
|
||||
win_process_avoid_assert_after_spawning_store_app_4152.patch
|
||||
chore_remove_use_of_deprecated_kmaxlength.patch
|
||||
src_update_default_v8_platform_to_override_functions_with_location.patch
|
||||
fix_capture_embedder_exceptions_before_entering_v8.patch
|
||||
spec_add_iterator_to_global_intrinsics.patch
|
||||
test_make_test-node-output-v8-warning_generic.patch
|
||||
test_match_wpt_streams_transferable_transform-stream-members_any_js.patch
|
||||
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
|
||||
deprecate_vector_v8_local_in_v8.patch
|
||||
fix_remove_deprecated_errno_constants.patch
|
||||
build_enable_perfetto.patch
|
||||
fix_add_source_location_for_v8_task_runner.patch
|
||||
cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch
|
||||
src_do_not_use_deprecated_v8_api.patch
|
||||
src_use_new_v8_api_to_define_stream_accessor.patch
|
||||
src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch
|
||||
test_update_v8-stats_test_for_v8_12_6.patch
|
||||
src_do_not_use_soon-to-be-deprecated_v8_api.patch
|
||||
fix_add_property_query_interceptors.patch
|
||||
src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch
|
||||
src_use_supported_api_to_get_stalled_tla_messages.patch
|
||||
build_don_t_redefine_win32_lean_and_mean.patch
|
||||
build_compile_with_c_20_support.patch
|
||||
add_v8_taskpirority_to_foreground_task_runner_signature.patch
|
||||
cli_remove_deprecated_v8_flag.patch
|
||||
build_restore_clang_as_default_compiler_on_macos.patch
|
||||
esm_drop_support_for_import_assertions.patch
|
||||
fix_-wextra-semi_errors_in_nghttp2_helper_h.patch
|
||||
fix_remove_harmony-import-assertions_from_node_cc.patch
|
||||
win_almost_fix_race_detecting_esrch_in_uv_kill.patch
|
||||
chore_disable_deprecation_ftbfs_in_simdjson_header.patch
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,28 +10,19 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
|
||||
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index bdf1a1f33f3ea09d933757c7fee87c563cc833ab..2eb62610db2f0ebf68fa9a55ffba98291ecfe451 100644
|
||||
index 74616453e2e047acbb9e25f2f93ebeab06011669..bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -305,7 +305,7 @@
|
||||
'VCCLCompilerTool': {
|
||||
'AdditionalOptions': [
|
||||
'/Zc:__cplusplus',
|
||||
- '-std:c++17'
|
||||
+ '-std:c++20'
|
||||
@@ -518,7 +518,7 @@
|
||||
'-fno-rtti',
|
||||
'-fno-exceptions',
|
||||
'-fno-strict-aliasing',
|
||||
- '-std=gnu++17',
|
||||
+ '-std=gnu++20',
|
||||
],
|
||||
'BufferSecurityCheck': 'true',
|
||||
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
|
||||
@@ -487,7 +487,7 @@
|
||||
}],
|
||||
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
|
||||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
||||
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
|
||||
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
|
||||
'defines': [ '__STDC_FORMAT_MACROS' ],
|
||||
'ldflags': [ '-rdynamic' ],
|
||||
'target_conditions': [
|
||||
@@ -658,7 +658,7 @@
|
||||
@@ -688,7 +688,7 @@
|
||||
['clang==1', {
|
||||
'xcode_settings': {
|
||||
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
|
||||
|
||||
@@ -12,6 +12,19 @@ adding associated guards there should be relatively small.
|
||||
|
||||
We should upstream this as it will eventually impact Node.js as well.
|
||||
|
||||
diff --git a/filenames.json b/filenames.json
|
||||
index 5af3886d8d3d74d31249a4d79030a8373b8dad52..8ab04d0b1b58454c6ea21f33870f9557f3a57b56 100644
|
||||
--- a/filenames.json
|
||||
+++ b/filenames.json
|
||||
@@ -739,8 +739,6 @@
|
||||
"src/tcp_wrap.h",
|
||||
"src/timers.h",
|
||||
"src/tracing/agent.h",
|
||||
- "src/tracing/node_trace_buffer.h",
|
||||
- "src/tracing/node_trace_writer.h",
|
||||
"src/tracing/trace_event.h",
|
||||
"src/tracing/trace_event_common.h",
|
||||
"src/tracing/traced_value.h",
|
||||
diff --git a/lib/internal/constants.js b/lib/internal/constants.js
|
||||
index 8d7204f6cb48f783adc4d1c1eb2de0c83b7fffe2..a154559a56bf383d3c26af523c9bb07b564ef600 100644
|
||||
--- a/lib/internal/constants.js
|
||||
@@ -63,11 +76,62 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index 11474953b186c7b3ec2edb0539f34572e6c551b7..eeaaef8a06cdc2d17e89f9c719f9922e6e04ce92 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -174,7 +174,6 @@
|
||||
'src/timers.cc',
|
||||
'src/timer_wrap.cc',
|
||||
'src/tracing/agent.cc',
|
||||
- 'src/tracing/node_trace_buffer.cc',
|
||||
'src/tracing/node_trace_writer.cc',
|
||||
'src/tracing/trace_event.cc',
|
||||
'src/tracing/traced_value.cc',
|
||||
@@ -302,7 +301,6 @@
|
||||
'src/tcp_wrap.h',
|
||||
'src/timers.h',
|
||||
'src/tracing/agent.h',
|
||||
- 'src/tracing/node_trace_buffer.h',
|
||||
'src/tracing/node_trace_writer.h',
|
||||
'src/tracing/trace_event.h',
|
||||
'src/tracing/trace_event_common.h',
|
||||
diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc
|
||||
index e7b6d3b3ea63bdc80e569f56209e958b4fcde328..b52d5b1c7293539315626cd67f794cce4cfd1760 100644
|
||||
--- a/src/inspector/tracing_agent.cc
|
||||
+++ b/src/inspector/tracing_agent.cc
|
||||
@@ -84,14 +84,14 @@ class InspectorTraceWriter : public node::tracing::AsyncTraceWriter {
|
||||
explicit InspectorTraceWriter(int frontend_object_id,
|
||||
std::shared_ptr<MainThreadHandle> main_thread)
|
||||
: frontend_object_id_(frontend_object_id), main_thread_(main_thread) {}
|
||||
-
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
void AppendTraceEvent(
|
||||
v8::platform::tracing::TraceObject* trace_event) override {
|
||||
if (!json_writer_)
|
||||
json_writer_.reset(TraceWriter::CreateJSONTraceWriter(stream_, "value"));
|
||||
json_writer_->AppendTraceEvent(trace_event);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
void Flush(bool) override {
|
||||
if (!json_writer_)
|
||||
return;
|
||||
diff --git a/src/tracing/agent.cc b/src/tracing/agent.cc
|
||||
index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e94a001d7 100644
|
||||
index 7ce59674356f9743438350949be42fa7ead2afbe..30bff4272ed8eb5146e3b73a4849c187177fc3bd 100644
|
||||
--- a/src/tracing/agent.cc
|
||||
+++ b/src/tracing/agent.cc
|
||||
@@ -50,7 +50,9 @@ using v8::platform::tracing::TraceWriter;
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
#include <string>
|
||||
#include "trace_event.h"
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
#include "tracing/node_trace_buffer.h"
|
||||
+#endif
|
||||
#include "debug_utils-inl.h"
|
||||
#include "env-inl.h"
|
||||
|
||||
@@ -50,7 +52,9 @@ using v8::platform::tracing::TraceWriter;
|
||||
using std::string;
|
||||
|
||||
Agent::Agent() : tracing_controller_(new TracingController()) {
|
||||
@@ -77,7 +141,7 @@ index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e
|
||||
|
||||
CHECK_EQ(uv_loop_init(&tracing_loop_), 0);
|
||||
CHECK_EQ(uv_async_init(&tracing_loop_,
|
||||
@@ -86,10 +88,14 @@ Agent::~Agent() {
|
||||
@@ -86,10 +90,14 @@ Agent::~Agent() {
|
||||
void Agent::Start() {
|
||||
if (started_)
|
||||
return;
|
||||
@@ -93,7 +157,7 @@ index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e
|
||||
|
||||
// This thread should be created *after* async handles are created
|
||||
// (within NodeTraceWriter and NodeTraceBuffer constructors).
|
||||
@@ -143,8 +149,10 @@ void Agent::StopTracing() {
|
||||
@@ -143,8 +151,10 @@ void Agent::StopTracing() {
|
||||
return;
|
||||
// Perform final Flush on TraceBuffer. We don't want the tracing controller
|
||||
// to flush the buffer again on destruction of the V8::Platform.
|
||||
@@ -105,7 +169,7 @@ index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e
|
||||
started_ = false;
|
||||
|
||||
// Thread should finish when the tracing loop is stopped.
|
||||
@@ -202,6 +210,7 @@ std::string Agent::GetEnabledCategories() const {
|
||||
@@ -202,6 +212,7 @@ std::string Agent::GetEnabledCategories() const {
|
||||
return categories;
|
||||
}
|
||||
|
||||
@@ -113,7 +177,7 @@ index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e
|
||||
void Agent::AppendTraceEvent(TraceObject* trace_event) {
|
||||
for (const auto& id_writer : writers_)
|
||||
id_writer.second->AppendTraceEvent(trace_event);
|
||||
@@ -211,18 +220,21 @@ void Agent::AddMetadataEvent(std::unique_ptr<TraceObject> event) {
|
||||
@@ -211,18 +222,21 @@ void Agent::AddMetadataEvent(std::unique_ptr<TraceObject> event) {
|
||||
Mutex::ScopedLock lock(metadata_events_mutex_);
|
||||
metadata_events_.push_back(std::move(event));
|
||||
}
|
||||
@@ -136,7 +200,7 @@ index 7ce59674356f9743438350949be42fa7ead2afbe..c5fedc3be86a77730c57321b9c73cc8e
|
||||
void TracingController::AddMetadataEvent(
|
||||
const unsigned char* category_group_enabled,
|
||||
const char* name,
|
||||
@@ -246,6 +258,6 @@ void TracingController::AddMetadataEvent(
|
||||
@@ -246,6 +260,6 @@ void TracingController::AddMetadataEvent(
|
||||
if (node_agent != nullptr)
|
||||
node_agent->AddMetadataEvent(std::move(trace_event));
|
||||
}
|
||||
@@ -198,26 +262,20 @@ index b542a849fe8da7e8bbbcca7067b73dc32b18d6d3..059ce6f6ea17199ead09c6c13bcc680f
|
||||
};
|
||||
|
||||
void AgentWriterHandle::reset() {
|
||||
diff --git a/src/tracing/node_trace_buffer.cc b/src/tracing/node_trace_buffer.cc
|
||||
index e187a1d78c81972b69cd4e03f7079cdb727956ad..3256c6326a08c6cafd83f1e49e3350193e813b51 100644
|
||||
--- a/src/tracing/node_trace_buffer.cc
|
||||
+++ b/src/tracing/node_trace_buffer.cc
|
||||
@@ -55,6 +55,7 @@ TraceObject* InternalTraceBuffer::GetEventByHandle(uint64_t handle) {
|
||||
}
|
||||
|
||||
void InternalTraceBuffer::Flush(bool blocking) {
|
||||
diff --git a/src/tracing/node_trace_buffer.h b/src/tracing/node_trace_buffer.h
|
||||
index 18e4f43efaae3a60b924e697918867e604513194..7cbaf01235750138c680c8ec2ed5d206d638f8b6 100644
|
||||
--- a/src/tracing/node_trace_buffer.h
|
||||
+++ b/src/tracing/node_trace_buffer.h
|
||||
@@ -42,7 +42,9 @@ class InternalTraceBuffer {
|
||||
bool flushing_;
|
||||
size_t max_chunks_;
|
||||
Agent* agent_;
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
{
|
||||
Mutex::ScopedLock scoped_lock(mutex_);
|
||||
if (total_chunks_ > 0) {
|
||||
@@ -75,6 +76,7 @@ void InternalTraceBuffer::Flush(bool blocking) {
|
||||
flushing_ = false;
|
||||
}
|
||||
}
|
||||
std::vector<std::unique_ptr<TraceBufferChunk>> chunks_;
|
||||
+#endif
|
||||
agent_->Flush(blocking);
|
||||
}
|
||||
|
||||
size_t total_chunks_ = 0;
|
||||
uint32_t current_chunk_seq_ = 1;
|
||||
uint32_t id_;
|
||||
diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc
|
||||
index 8f053efe93324b9acbb4e85f7b974b4f7712e200..e331ed5567caa39ade90ce28cea69f1d10533812 100644
|
||||
--- a/src/tracing/node_trace_writer.cc
|
||||
|
||||
@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
|
||||
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c563cc833ab 100644
|
||||
index 229cb96c1385c597138719f2b01f78bd54ad44ab..74616453e2e047acbb9e25f2f93ebeab06011669 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -86,6 +86,8 @@
|
||||
@@ -19,7 +19,7 @@ index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c56
|
||||
##### end V8 defaults #####
|
||||
|
||||
# When building native modules using 'npm install' with the system npm,
|
||||
@@ -285,6 +287,7 @@
|
||||
@@ -291,6 +293,7 @@
|
||||
# Defines these mostly for node-gyp to pickup.
|
||||
'defines': [
|
||||
'_GLIBCXX_USE_CXX11_ABI=1',
|
||||
@@ -27,7 +27,7 @@ index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c56
|
||||
],
|
||||
|
||||
# Forcibly disable -Werror. We support a wide range of compilers, it's
|
||||
@@ -414,6 +417,11 @@
|
||||
@@ -437,6 +440,11 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
@@ -40,19 +40,19 @@ index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c56
|
||||
# list in v8/BUILD.gn.
|
||||
['v8_enable_v8_checks == 1', {
|
||||
diff --git a/configure.py b/configure.py
|
||||
index 0d089c35d1720e05c4c61d0226a2ebc276b65d6e..cf19b9d092698e1697508e8891926947bc2f7b12 100755
|
||||
index d03db1970fd7a1629a7a7719a5ff267402ab4a66..ce055fb5dfc84c75c486b99f01fea6b9531ff54b 100755
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -1585,6 +1585,7 @@ def configure_library(lib, output, pkgname=None):
|
||||
@@ -1634,6 +1634,7 @@ def configure_library(lib, output, pkgname=None):
|
||||
def configure_v8(o, configs):
|
||||
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)
|
||||
|
||||
|
||||
def configure_v8(o):
|
||||
+ o['variables']['using_electron_config_gypi'] = 1
|
||||
o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
|
||||
o['variables']['v8_enable_javascript_promise_hooks'] = 1
|
||||
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 4f2eb9d0aab88b70c86339e750799080e980d7da..df3fb3372d6357b5d77b4f683e309b8483998128 100644
|
||||
index 0fec9477fd0f2a3c2aa68284131c510b0da0e025..c16204ad2a4787eeffe61eedda254d3a5509df8c 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -22,6 +22,12 @@
|
||||
|
||||
@@ -34,10 +34,10 @@ index f5ecc15159f457cd0b8069c0427b7c758c916c4e..c9ce67391f321989b0af48159b4da3ab
|
||||
let kResistStopPropagation;
|
||||
|
||||
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
|
||||
index c7ae7759595bfc7fdc31dab174a7514ddd8345e7..4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2 100644
|
||||
index 48d29a0d05538cd1d992f3f086d826e78d0d8882..8987234c2d08449242b5fd037ed314b725bc42a5 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -35,6 +35,7 @@ using v8::Value;
|
||||
@@ -34,6 +34,7 @@ using v8::Value;
|
||||
BuiltinLoader::BuiltinLoader()
|
||||
: config_(GetConfig()), code_cache_(std::make_shared<BuiltinCodeCache>()) {
|
||||
LoadJavaScriptSource();
|
||||
|
||||
@@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment
|
||||
in which the binary got built.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 2eb62610db2f0ebf68fa9a55ffba98291ecfe451..3ec08ee144b586d05c4e49c2251416734cbc02c5 100644
|
||||
index bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45..289ab5d282e93c795eafb5fb992c3bbc4790a687 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -125,6 +125,7 @@
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Klein <adamk@chromium.org>
|
||||
Date: Wed, 15 May 2024 09:16:00 +0200
|
||||
Subject: cherry-pick: src: remove calls to recently deprecated V8 APIs
|
||||
|
||||
Node.js Commit: a6d54f179d997497a95c18456bef6bc3ee15e2c4
|
||||
Node.js PR: https://github.com/nodejs/node/pull/52996
|
||||
V8 API Removal CL: https://chromium-review.googlesource.com/c/v8/v8/+/5539888
|
||||
|
||||
This patch is slightly modified from the original commit in order to
|
||||
resolve conflicts due to the base commit difference between the Node.js
|
||||
PR and the current upgrade roll.
|
||||
|
||||
This patch is expected to be deleted once we catch up with a Node.js
|
||||
upgrade that includes the original Node.js commit above.
|
||||
|
||||
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
|
||||
index ff658ec88e5161cd66536ee6e95dba675b16eccc..9bbb8ab908d8d992abb43254860d51f57f56387b 100644
|
||||
--- a/src/module_wrap.cc
|
||||
+++ b/src/module_wrap.cc
|
||||
@@ -202,8 +202,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
|
||||
Local<String> source_text = args[2].As<String>();
|
||||
- ScriptOrigin origin(isolate,
|
||||
- url,
|
||||
+ ScriptOrigin origin(url,
|
||||
line_offset,
|
||||
column_offset,
|
||||
true, // is cross origin
|
||||
@@ -464,7 +463,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env());
|
||||
TryCatchScope try_catch(realm->env());
|
||||
- Isolate::SafeForTerminationScope safe_for_termination(isolate);
|
||||
|
||||
bool timed_out = false;
|
||||
bool received_signal = false;
|
||||
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
|
||||
index 4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2..3e37aa8b0c9696cceb3f3cfab9721f38c74a2fba 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -267,7 +267,7 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal(
|
||||
std::string filename_s = std::string("node:") + id;
|
||||
Local<String> filename =
|
||||
OneByteString(isolate, filename_s.c_str(), filename_s.size());
|
||||
- ScriptOrigin origin(isolate, filename, 0, 0, true);
|
||||
+ ScriptOrigin origin(filename, 0, 0, true);
|
||||
|
||||
BuiltinCodeCacheData cached_data{};
|
||||
{
|
||||
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
|
||||
index 6456d87d4202c013aafe071adbac06852b3ae2c1..28ba7dbe66a44a43c39e3d75edf0be9513bcf732 100644
|
||||
--- a/src/node_contextify.cc
|
||||
+++ b/src/node_contextify.cc
|
||||
@@ -877,16 +877,15 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
|
||||
host_defined_options->Set(
|
||||
isolate, loader::HostDefinedOptions::kID, id_symbol);
|
||||
|
||||
- ScriptOrigin origin(isolate,
|
||||
- filename,
|
||||
- line_offset, // line offset
|
||||
- column_offset, // column offset
|
||||
- true, // is cross origin
|
||||
- -1, // script id
|
||||
- Local<Value>(), // source map URL
|
||||
- false, // is opaque (?)
|
||||
- false, // is WASM
|
||||
- false, // is ES Module
|
||||
+ ScriptOrigin origin(filename,
|
||||
+ line_offset, // line offset
|
||||
+ column_offset, // column offset
|
||||
+ true, // is cross origin
|
||||
+ -1, // script id
|
||||
+ Local<Value>(), // source map URL
|
||||
+ false, // is opaque (?)
|
||||
+ false, // is WASM
|
||||
+ false, // is ES Module
|
||||
host_defined_options);
|
||||
ScriptCompiler::Source source(code, origin, cached_data);
|
||||
ScriptCompiler::CompileOptions compile_options =
|
||||
@@ -998,7 +997,7 @@ MaybeLocal<Function> CompileFunction(Local<Context> context,
|
||||
Local<String> filename,
|
||||
Local<String> content,
|
||||
std::vector<Local<String>>* parameters) {
|
||||
- ScriptOrigin script_origin(context->GetIsolate(), filename, 0, 0, true);
|
||||
+ ScriptOrigin script_origin(filename, 0, 0, true);
|
||||
ScriptCompiler::Source script_source(content, script_origin);
|
||||
|
||||
return ScriptCompiler::CompileFunction(context,
|
||||
@@ -1108,7 +1107,6 @@ bool ContextifyScript::EvalMachine(Local<Context> context,
|
||||
}
|
||||
|
||||
TryCatchScope try_catch(env);
|
||||
- Isolate::SafeForTerminationScope safe_for_termination(env->isolate());
|
||||
ContextifyScript* wrapped_script;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.This(), false);
|
||||
Local<UnboundScript> unbound_script =
|
||||
@@ -1286,8 +1284,7 @@ void ContextifyContext::CompileFunction(
|
||||
Local<PrimitiveArray> host_defined_options =
|
||||
GetHostDefinedOptions(isolate, id_symbol);
|
||||
ScriptCompiler::Source source =
|
||||
- GetCommonJSSourceInstance(isolate,
|
||||
- code,
|
||||
+ GetCommonJSSourceInstance(code,
|
||||
filename,
|
||||
line_offset,
|
||||
column_offset,
|
||||
@@ -1342,15 +1339,13 @@ void ContextifyContext::CompileFunction(
|
||||
}
|
||||
|
||||
ScriptCompiler::Source ContextifyContext::GetCommonJSSourceInstance(
|
||||
- Isolate* isolate,
|
||||
Local<String> code,
|
||||
Local<String> filename,
|
||||
int line_offset,
|
||||
int column_offset,
|
||||
Local<PrimitiveArray> host_defined_options,
|
||||
ScriptCompiler::CachedData* cached_data) {
|
||||
- ScriptOrigin origin(isolate,
|
||||
- filename,
|
||||
+ ScriptOrigin origin(filename,
|
||||
line_offset, // line offset
|
||||
column_offset, // column offset
|
||||
true, // is cross origin
|
||||
@@ -1528,7 +1523,7 @@ void ContextifyContext::ContainsModuleSyntax(
|
||||
Local<PrimitiveArray> host_defined_options =
|
||||
GetHostDefinedOptions(isolate, id_symbol);
|
||||
ScriptCompiler::Source source = GetCommonJSSourceInstance(
|
||||
- isolate, code, filename, 0, 0, host_defined_options, nullptr);
|
||||
+ code, filename, 0, 0, host_defined_options, nullptr);
|
||||
ScriptCompiler::CompileOptions options = GetCompileOptions(source);
|
||||
|
||||
std::vector<Local<String>> params = GetCJSParameters(env->isolate_data());
|
||||
@@ -1576,7 +1571,7 @@ void ContextifyContext::ContainsModuleSyntax(
|
||||
code,
|
||||
String::NewFromUtf8(isolate, "})();").ToLocalChecked());
|
||||
ScriptCompiler::Source wrapped_source = GetCommonJSSourceInstance(
|
||||
- isolate, code, filename, 0, 0, host_defined_options, nullptr);
|
||||
+ code, filename, 0, 0, host_defined_options, nullptr);
|
||||
std::ignore = ScriptCompiler::CompileFunction(
|
||||
context,
|
||||
&wrapped_source,
|
||||
@@ -1629,8 +1624,7 @@ static void CompileFunctionForCJSLoader(
|
||||
|
||||
Local<Symbol> symbol = env->vm_dynamic_import_default_internal();
|
||||
Local<PrimitiveArray> hdo = GetHostDefinedOptions(isolate, symbol);
|
||||
- ScriptOrigin origin(isolate,
|
||||
- filename,
|
||||
+ ScriptOrigin origin(filename,
|
||||
0, // line offset
|
||||
0, // column offset
|
||||
true, // is cross origin
|
||||
diff --git a/src/node_contextify.h b/src/node_contextify.h
|
||||
index 517e3f44d324900222e1da961a4cd60bbb4a85f9..10715c7eb07715cc11e49734bd54747dad95f6a4 100644
|
||||
--- a/src/node_contextify.h
|
||||
+++ b/src/node_contextify.h
|
||||
@@ -99,7 +99,6 @@ class ContextifyContext : public BaseObject {
|
||||
v8::Local<v8::Symbol> id_symbol,
|
||||
const errors::TryCatchScope& try_catch);
|
||||
static v8::ScriptCompiler::Source GetCommonJSSourceInstance(
|
||||
- v8::Isolate* isolate,
|
||||
v8::Local<v8::String> code,
|
||||
v8::Local<v8::String> filename,
|
||||
int line_offset,
|
||||
diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc
|
||||
index 64e38c83006a004ebc3519a5e9f8b04263244514..14e82cc80ff73084fb43b2ef07febfd2667a0abc 100644
|
||||
--- a/test/cctest/test_environment.cc
|
||||
+++ b/test/cctest/test_environment.cc
|
||||
@@ -620,12 +620,9 @@ TEST_F(EnvironmentTest, SetImmediateMicrotasks) {
|
||||
|
||||
#ifndef _WIN32 // No SIGINT on Windows.
|
||||
TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) {
|
||||
- // We need to go through the whole setup dance here because we want to
|
||||
- // set only_terminate_in_safe_scope.
|
||||
// Allocate and initialize Isolate.
|
||||
v8::Isolate::CreateParams create_params;
|
||||
create_params.array_buffer_allocator = allocator.get();
|
||||
- create_params.only_terminate_in_safe_scope = true;
|
||||
v8::Isolate* isolate = v8::Isolate::Allocate();
|
||||
CHECK_NOT_NULL(isolate);
|
||||
platform->RegisterIsolate(isolate, ¤t_loop);
|
||||
@@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
|
||||
a customizable error message.
|
||||
|
||||
diff --git a/src/node_binding.cc b/src/node_binding.cc
|
||||
index 4e750be66452de47040e3a46555c062dfccf7807..5e1caeee18e447cc76b980df712521cf8b60e8da 100644
|
||||
index b5c0a93d83ab4d4f6792d0eb648e7198de874bcf..0fd01987c29b06b91944d18266ba67994c1fac45 100644
|
||||
--- a/src/node_binding.cc
|
||||
+++ b/src/node_binding.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -19,7 +19,7 @@ index 4e750be66452de47040e3a46555c062dfccf7807..5e1caeee18e447cc76b980df712521cf
|
||||
#include "util.h"
|
||||
|
||||
#include <string>
|
||||
@@ -483,7 +484,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -495,7 +496,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
|
||||
if (mp->nm_context_register_func == nullptr) {
|
||||
if (env->force_context_aware()) {
|
||||
dlib->Close();
|
||||
|
||||
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
|
||||
of this.
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index 364469160af5e348f8890417de16a63c0d1dca67..75d5f58fe02fa8cfa7716ffaf761d567ab403a2c 100644
|
||||
index d49941881e6cfd8647a6d44a57e0daaf1c874702..f696fb263b356a76b87cd4b6c4b1a0fd60a84afd 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -1441,6 +1441,13 @@ Module.prototype._compile = function(content, filename, loadAsESM = false) {
|
||||
@@ -1518,6 +1518,13 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
if (getOptionValue('--inspect-brk') && process._eval == null) {
|
||||
if (!resolvedArgv) {
|
||||
// We enter the repl if we're not given a filename argument.
|
||||
@@ -26,10 +26,10 @@ index 364469160af5e348f8890417de16a63c0d1dca67..75d5f58fe02fa8cfa7716ffaf761d567
|
||||
try {
|
||||
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
|
||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||
index a05d2846050c2f505eac16320f645e79182a27f6..348bb80ef7fae1e0e5f529b1313093eeadad9276 100644
|
||||
index cb96fd1bc4fcdce750ce241ee5f47f2ae39cfdc6..c46b270109697f7cc1683f8f9f463575e5040216 100644
|
||||
--- a/lib/internal/process/pre_execution.js
|
||||
+++ b/lib/internal/process/pre_execution.js
|
||||
@@ -247,12 +247,14 @@ function patchProcessObject(expandArgv1) {
|
||||
@@ -243,12 +243,14 @@ function patchProcessObject(expandArgv1) {
|
||||
if (expandArgv1 && process.argv[1] &&
|
||||
!StringPrototypeStartsWith(process.argv[1], '-')) {
|
||||
// Expand process.argv[1] into a full path.
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Mon, 4 Nov 2024 17:40:17 -0600
|
||||
Subject: chore: disable deprecation ftbfs in simdjson header
|
||||
|
||||
Without this patch, building with simdjson fails with
|
||||
|
||||
> error: identifier '_padded' preceded by whitespace in a literal operator
|
||||
> declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
|
||||
|
||||
This patch can be removed once this is fixed upstream in simdjson.
|
||||
|
||||
diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
|
||||
index ddb6f2e4e0a6edd23d5e16db07bc4bb18974d4aa..533dfea4d5fd3c7f6f7fdf0ea525479b11634fd3 100644
|
||||
--- a/deps/simdjson/simdjson.h
|
||||
+++ b/deps/simdjson/simdjson.h
|
||||
@@ -3650,12 +3650,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
|
||||
|
||||
} // namespace simdjson
|
||||
|
||||
+#pragma clang diagnostic push
|
||||
+#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
|
||||
+
|
||||
// This is deliberately outside of simdjson so that people get it without having to use the namespace
|
||||
inline simdjson::padded_string operator "" _padded(const char *str, size_t len);
|
||||
#ifdef __cpp_char8_t
|
||||
inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t len);
|
||||
#endif
|
||||
|
||||
+#pragma clang diagnostic pop
|
||||
+
|
||||
namespace simdjson {
|
||||
namespace internal {
|
||||
|
||||
@@ -4033,6 +4038,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
|
||||
|
||||
} // namespace simdjson
|
||||
|
||||
+#pragma clang diagnostic push
|
||||
+#pragma clang diagnostic ignored "-Wdeprecated-literal-operator"
|
||||
+
|
||||
inline simdjson::padded_string operator "" _padded(const char *str, size_t len) {
|
||||
return simdjson::padded_string(str, len);
|
||||
}
|
||||
@@ -4041,6 +4049,8 @@ inline simdjson::padded_string operator "" _padded(const char8_t *str, size_t le
|
||||
return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
|
||||
}
|
||||
#endif
|
||||
+#pragma clang diagnostic pop
|
||||
+
|
||||
#endif // SIMDJSON_PADDED_STRING_INL_H
|
||||
/* end file simdjson/padded_string-inl.h */
|
||||
/* skipped duplicate #include "simdjson/padded_string_view.h" */
|
||||
@@ -118280,4 +118290,4 @@ namespace simdjson {
|
||||
/* end file simdjson/ondemand.h */
|
||||
|
||||
#endif // SIMDJSON_H
|
||||
-/* end file simdjson.h */
|
||||
+/* end file simdjson.h */
|
||||
\ No newline at end of file
|
||||
@@ -11,7 +11,7 @@ its own blended handler between Node and Blink.
|
||||
Not upstreamable.
|
||||
|
||||
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
|
||||
index 150816057129c147c13ce044474f341581679f34..dd8627653265e22f55e67ec4a47641b20fba6c9d 100644
|
||||
index d393d4336a0c1e681e4f6b4e5c7cf2bcc5fc287e..807cb5172e0c2178b6c20e81f8175141d3a0284f 100644
|
||||
--- a/lib/internal/modules/esm/utils.js
|
||||
+++ b/lib/internal/modules/esm/utils.js
|
||||
@@ -30,7 +30,7 @@ const {
|
||||
@@ -40,10 +40,10 @@ index 150816057129c147c13ce044474f341581679f34..dd8627653265e22f55e67ec4a47641b2
|
||||
|
||||
/**
|
||||
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
|
||||
index eea74bed4bb8a980f99a9a1404c9a2df203ca09c..e862b51293135995c527c32aa3c3579780d7831c 100644
|
||||
index 48b61e8b7600701c4992a98ff802614ce915faee..4e9835e502a8d078a448aa4253f37de0f49f4854 100644
|
||||
--- a/src/module_wrap.cc
|
||||
+++ b/src/module_wrap.cc
|
||||
@@ -752,7 +752,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
|
||||
@@ -813,7 +813,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
|
||||
return module->module_.Get(isolate);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ index eea74bed4bb8a980f99a9a1404c9a2df203ca09c..e862b51293135995c527c32aa3c35797
|
||||
Local<Context> context,
|
||||
Local<v8::Data> host_defined_options,
|
||||
Local<Value> resource_name,
|
||||
@@ -817,12 +817,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
@@ -878,12 +878,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
Realm* realm = Realm::GetCurrent(args);
|
||||
HandleScope handle_scope(isolate);
|
||||
|
||||
@@ -68,7 +68,7 @@ index eea74bed4bb8a980f99a9a1404c9a2df203ca09c..e862b51293135995c527c32aa3c35797
|
||||
}
|
||||
|
||||
void ModuleWrap::HostInitializeImportMetaObjectCallback(
|
||||
@@ -864,13 +865,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
@@ -925,13 +926,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
Realm* realm = Realm::GetCurrent(args);
|
||||
Isolate* isolate = realm->isolate();
|
||||
|
||||
@@ -87,18 +87,18 @@ index eea74bed4bb8a980f99a9a1404c9a2df203ca09c..e862b51293135995c527c32aa3c35797
|
||||
|
||||
MaybeLocal<Value> ModuleWrap::SyntheticModuleEvaluationStepsCallback(
|
||||
diff --git a/src/module_wrap.h b/src/module_wrap.h
|
||||
index 45a338b38e01c824f69ea59ee286130c67e9eddf..99bb079df11696fc3ba5e6bcca7e7a42818fe3d1 100644
|
||||
index 83b5793013cbc453cf92c0a006fc7be3c06ad276..90353954bc497cb4ae413dc134850f8abb4efc7c 100644
|
||||
--- a/src/module_wrap.h
|
||||
+++ b/src/module_wrap.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include "base_object.h"
|
||||
+#include "node.h"
|
||||
#include "v8-script.h"
|
||||
|
||||
namespace node {
|
||||
|
||||
@@ -31,7 +32,14 @@ enum HostDefinedOptions : int {
|
||||
@@ -33,7 +34,14 @@ enum HostDefinedOptions : int {
|
||||
kLength = 9,
|
||||
};
|
||||
|
||||
@@ -114,20 +114,20 @@ index 45a338b38e01c824f69ea59ee286130c67e9eddf..99bb079df11696fc3ba5e6bcca7e7a42
|
||||
public:
|
||||
enum InternalFields {
|
||||
kModuleSlot = BaseObject::kInternalFieldCount,
|
||||
@@ -68,6 +76,8 @@ class ModuleWrap : public BaseObject {
|
||||
return true;
|
||||
}
|
||||
@@ -91,6 +99,8 @@ class ModuleWrap : public BaseObject {
|
||||
static void CreateRequiredModuleFacade(
|
||||
const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
|
||||
+ static ModuleWrap* GetFromModule(node::Environment*, v8::Local<v8::Module>);
|
||||
+
|
||||
private:
|
||||
ModuleWrap(Realm* realm,
|
||||
v8::Local<v8::Object> object,
|
||||
@@ -110,7 +120,6 @@ class ModuleWrap : public BaseObject {
|
||||
@@ -129,7 +139,6 @@ class ModuleWrap : public BaseObject {
|
||||
v8::Local<v8::String> specifier,
|
||||
v8::Local<v8::FixedArray> import_attributes,
|
||||
v8::Local<v8::Module> referrer);
|
||||
- static ModuleWrap* GetFromModule(node::Environment*, v8::Local<v8::Module>);
|
||||
|
||||
v8::Global<v8::Module> module_;
|
||||
std::unordered_map<std::string, v8::Global<v8::Promise>> resolve_cache_;
|
||||
std::unordered_map<std::string, v8::Global<v8::Object>> resolve_cache_;
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 19 Apr 2023 14:13:23 +0200
|
||||
Subject: chore: remove --no-harmony-atomics related code
|
||||
|
||||
This was removed in https://chromium-review.googlesource.com/c/v8/v8/+/4416459.
|
||||
|
||||
This patch can be removed when Node.js upgrades to a version of V8 containing
|
||||
the above CL.
|
||||
|
||||
diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml
|
||||
index c028204481d44cb5f35ad98413022e7b07ce04b2..230c2378996c5d1ec18a9183ef138bbf70bba22d 100644
|
||||
--- a/lib/.eslintrc.yaml
|
||||
+++ b/lib/.eslintrc.yaml
|
||||
@@ -30,10 +30,6 @@ rules:
|
||||
message: Use `const { AbortController } = require('internal/abort_controller');` instead of the global.
|
||||
- name: AbortSignal
|
||||
message: Use `const { AbortSignal } = require('internal/abort_controller');` instead of the global.
|
||||
- # Atomics is not available in primordials because it can be
|
||||
- # disabled with --no-harmony-atomics CLI flag.
|
||||
- - name: Atomics
|
||||
- message: Use `const { Atomics } = globalThis;` instead of the global.
|
||||
- name: Blob
|
||||
message: Use `const { Blob } = require('buffer');` instead of the global.
|
||||
- name: BroadcastChannel
|
||||
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
|
||||
index cfd1d1b6f18e2943e155cf021b566a4673f71ab0..8d1a184ad1936c0d8493d6c54c32bebcf0021d8b 100644
|
||||
--- a/lib/internal/main/worker_thread.js
|
||||
+++ b/lib/internal/main/worker_thread.js
|
||||
@@ -113,7 +113,7 @@ port.on('message', (message) => {
|
||||
|
||||
require('internal/worker').assignEnvironmentData(environmentData);
|
||||
|
||||
- if (SharedArrayBuffer !== undefined && Atomics !== undefined) {
|
||||
+ if (SharedArrayBuffer !== undefined) {
|
||||
// The counter is only passed to the workers created by the main thread,
|
||||
// not to workers created by other workers.
|
||||
let cachedCwd = '';
|
||||
diff --git a/lib/internal/worker.js b/lib/internal/worker.js
|
||||
index 401bc43550ea7f19847dfd588e3fba0507243905..560f69c6c2de2bd976bcd62cd7ac9c770b838446 100644
|
||||
--- a/lib/internal/worker.js
|
||||
+++ b/lib/internal/worker.js
|
||||
@@ -101,8 +101,7 @@ let cwdCounter;
|
||||
const environmentData = new SafeMap();
|
||||
|
||||
// SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
|
||||
-// Atomics can be disabled with --no-harmony-atomics.
|
||||
-if (isMainThread && SharedArrayBuffer !== undefined && Atomics !== undefined) {
|
||||
+if (isMainThread && SharedArrayBuffer !== undefined) {
|
||||
cwdCounter = new Uint32Array(new SharedArrayBuffer(4));
|
||||
const originalChdir = process.chdir;
|
||||
process.chdir = function(path) {
|
||||
@@ -1,35 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Tue, 17 Oct 2023 10:58:41 -0500
|
||||
Subject: chore: remove use of deprecated kMaxLength
|
||||
|
||||
https://chromium-review.googlesource.com/c/v8/v8/+/4935412
|
||||
|
||||
This patch can be removed when upstream moves to kMaxByteLength
|
||||
|
||||
diff --git a/src/node_buffer.h b/src/node_buffer.h
|
||||
index 606a6f5caa3b11b6d2a9068ed2fd65800530a5eb..080dcce21da05ccea398d8a856deb397b1ac8b07 100644
|
||||
--- a/src/node_buffer.h
|
||||
+++ b/src/node_buffer.h
|
||||
@@ -29,7 +29,7 @@ namespace node {
|
||||
|
||||
namespace Buffer {
|
||||
|
||||
-static const size_t kMaxLength = v8::TypedArray::kMaxLength;
|
||||
+static const size_t kMaxLength = v8::TypedArray::kMaxByteLength;
|
||||
|
||||
typedef void (*FreeCallback)(char* data, void* hint);
|
||||
|
||||
diff --git a/src/node_errors.h b/src/node_errors.h
|
||||
index ac07b96b5cad0f3502468c86745e2b341d338e1f..f51c4309ceec3f0dc5e07982fb789ff6663076ba 100644
|
||||
--- a/src/node_errors.h
|
||||
+++ b/src/node_errors.h
|
||||
@@ -235,7 +235,7 @@ inline v8::Local<v8::Object> ERR_BUFFER_TOO_LARGE(v8::Isolate* isolate) {
|
||||
char message[128];
|
||||
snprintf(message, sizeof(message),
|
||||
"Cannot create a Buffer larger than 0x%zx bytes",
|
||||
- v8::TypedArray::kMaxLength);
|
||||
+ v8::TypedArray::kMaxByteLength);
|
||||
return ERR_BUFFER_TOO_LARGE(isolate, message);
|
||||
}
|
||||
|
||||
@@ -7,53 +7,6 @@ Some node tests / test fixtures spawn other tests that clobber env,
|
||||
which causes the `ELECTRON_RUN_AS_NODE` variable to be lost. This patch
|
||||
re-injects it.
|
||||
|
||||
diff --git a/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot b/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot
|
||||
index d7f1aa2f72007f6f70b6b66b81913f39e5678d2f..e091b1575954f5dc82a05a5d200ee028e053f616 100644
|
||||
--- a/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot
|
||||
+++ b/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot
|
||||
@@ -6,5 +6,5 @@
|
||||
at *
|
||||
at *
|
||||
at *
|
||||
-(Use `node --trace-warnings ...` to show where the warning was created)
|
||||
+(Use `* --trace-warnings ...` to show where the warning was created)
|
||||
(node:*) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https:*nodejs.org*api*cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
|
||||
diff --git a/test/fixtures/errors/throw_error_with_getter_throw.snapshot b/test/fixtures/errors/throw_error_with_getter_throw.snapshot
|
||||
index 30bbb336a22aaffbd63333f297eb598a8f501d75..1786f96f19856cdc43e0e86c8271a845e337359f 100644
|
||||
--- a/test/fixtures/errors/throw_error_with_getter_throw.snapshot
|
||||
+++ b/test/fixtures/errors/throw_error_with_getter_throw.snapshot
|
||||
@@ -3,6 +3,6 @@
|
||||
throw { * eslint-disable-line no-throw-literal
|
||||
^
|
||||
[object Object]
|
||||
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
|
||||
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
||||
|
||||
Node.js *
|
||||
diff --git a/test/fixtures/errors/throw_null.snapshot b/test/fixtures/errors/throw_null.snapshot
|
||||
index 88494ec6832205b30e7ae159708112a45494834c..1a1191ca9ced90936b764c32c1c334cce114b46e 100644
|
||||
--- a/test/fixtures/errors/throw_null.snapshot
|
||||
+++ b/test/fixtures/errors/throw_null.snapshot
|
||||
@@ -3,6 +3,6 @@
|
||||
throw null;
|
||||
^
|
||||
null
|
||||
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
|
||||
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
||||
|
||||
Node.js *
|
||||
diff --git a/test/fixtures/errors/throw_undefined.snapshot b/test/fixtures/errors/throw_undefined.snapshot
|
||||
index baae7384453373f3a005b4f85abb702a4c165f98..b6b6060b17839f3452aa915c12bd5174b7585414 100644
|
||||
--- a/test/fixtures/errors/throw_undefined.snapshot
|
||||
+++ b/test/fixtures/errors/throw_undefined.snapshot
|
||||
@@ -3,6 +3,6 @@
|
||||
throw undefined;
|
||||
^
|
||||
undefined
|
||||
-(Use `node --trace-uncaught ...` to show where the exception was thrown)
|
||||
+(Use `* --trace-uncaught ...` to show where the exception was thrown)
|
||||
|
||||
Node.js *
|
||||
diff --git a/test/fixtures/test-runner/output/arbitrary-output-colored.js b/test/fixtures/test-runner/output/arbitrary-output-colored.js
|
||||
index af23e674cb361ed81dafa22670d5633559cd1144..1dd59990cb7cdba8aecf4f499ee6b92e7cd41b30 100644
|
||||
--- a/test/fixtures/test-runner/output/arbitrary-output-colored.js
|
||||
@@ -67,32 +20,3 @@ index af23e674cb361ed81dafa22670d5633559cd1144..1dd59990cb7cdba8aecf4f499ee6b92e
|
||||
+ await once(spawn(process.execPath, ['-r', reset, '--test', test], { stdio: 'inherit', env: { ELECTRON_RUN_AS_NODE: 1 }}), 'exit');
|
||||
+ await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit', env: { ELECTRON_RUN_AS_NODE: 1 } }), 'exit');
|
||||
})().then(common.mustCall());
|
||||
diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs
|
||||
index 84f20a77dda367fe1ada8d616c7b6813d39efd43..9bebb256776c5be155a8de07abbe4284bc8dad8a 100644
|
||||
--- a/test/parallel/test-node-output-errors.mjs
|
||||
+++ b/test/parallel/test-node-output-errors.mjs
|
||||
@@ -3,6 +3,7 @@ import * as fixtures from '../common/fixtures.mjs';
|
||||
import * as snapshot from '../common/assertSnapshot.js';
|
||||
import * as os from 'node:os';
|
||||
import { describe, it } from 'node:test';
|
||||
+import { basename } from 'node:path';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
const skipForceColors =
|
||||
@@ -20,13 +21,15 @@ function replaceForceColorsStackTrace(str) {
|
||||
|
||||
describe('errors output', { concurrency: true }, () => {
|
||||
function normalize(str) {
|
||||
+ const baseName = basename(process.argv0 || 'node', '.exe');
|
||||
return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '')
|
||||
.replaceAll(pathToFileURL(process.cwd()).pathname, '')
|
||||
.replaceAll('//', '*')
|
||||
.replaceAll(/\/(\w)/g, '*$1')
|
||||
.replaceAll('*test*', '*')
|
||||
.replaceAll('*fixtures*errors*', '*')
|
||||
- .replaceAll('file:**', 'file:*/');
|
||||
+ .replaceAll('file:**', 'file:*/')
|
||||
+ .replaceAll(`${baseName} --`, '* --');
|
||||
}
|
||||
|
||||
function normalizeNoNumbers(str) {
|
||||
|
||||
@@ -18,10 +18,10 @@ Reviewed-By: Michaël Zasso <targos@protonmail.com>
|
||||
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
|
||||
|
||||
diff --git a/doc/api/cli.md b/doc/api/cli.md
|
||||
index d97682ac2ebcdf145e202325a4642a1bfd3970b2..7c5c08c450b9b4774265ead6a91d3ed76693c290 100644
|
||||
index 0cfed4a4a91a3d3fb5aee6c9a4db3405ba836565..61d980a12fcf7c799e726e1462c65ce478a8ed0c 100644
|
||||
--- a/doc/api/cli.md
|
||||
+++ b/doc/api/cli.md
|
||||
@@ -2869,7 +2869,6 @@ V8 options that are allowed are:
|
||||
@@ -3151,7 +3151,6 @@ V8 options that are allowed are:
|
||||
* `--disallow-code-generation-from-strings`
|
||||
* `--enable-etw-stack-walking`
|
||||
* `--expose-gc`
|
||||
@@ -30,10 +30,10 @@ index d97682ac2ebcdf145e202325a4642a1bfd3970b2..7c5c08c450b9b4774265ead6a91d3ed7
|
||||
* `--jitless`
|
||||
* `--max-old-space-size`
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index 9b5f49ebb478a21acf8f0d6ed012ed6829a8a320..433c8a3c1df125e3d7df414980440c64ffca61d6 100644
|
||||
index 4b3f7751db2871c8ce76b197a84a2417097030ea..21e53e1053fe2e4194d91b27a726d3a1306b1683 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -866,11 +866,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
|
||||
@@ -922,11 +922,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
|
||||
"disallow eval and friends",
|
||||
V8Option{},
|
||||
kAllowedInEnvvar);
|
||||
@@ -46,10 +46,10 @@ index 9b5f49ebb478a21acf8f0d6ed012ed6829a8a320..433c8a3c1df125e3d7df414980440c64
|
||||
"disable runtime allocation of executable memory",
|
||||
V8Option{},
|
||||
diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
|
||||
index 9fb6d8af0691108868a3245518edc0f0057557ab..3b9409c3af778fcfe2be0fae2cbb04753dd5c8f1 100644
|
||||
index e898a81af09ca6852ddc866310e5b8e0dc82971b..22d5a342df5d55f065383a6ebe1aebe59dc0f8d2 100644
|
||||
--- a/test/parallel/test-cli-node-options.js
|
||||
+++ b/test/parallel/test-cli-node-options.js
|
||||
@@ -72,7 +72,6 @@ if (common.hasCrypto) {
|
||||
@@ -70,7 +70,6 @@ if (common.hasCrypto) {
|
||||
expect('--abort_on-uncaught_exception', 'B\n');
|
||||
expect('--disallow-code-generation-from-strings', 'B\n');
|
||||
expect('--expose-gc', 'B\n');
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Sun, 10 Mar 2024 16:59:30 +0100
|
||||
Subject: Deprecate vector<v8::Local> in v8
|
||||
|
||||
Adapts for changes in https://chromium-review.googlesource.com/c/v8/v8/+/4866222.
|
||||
|
||||
This patch can be removed when Electron upgrades to a version of Node.js that
|
||||
contains the above CL.
|
||||
|
||||
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
|
||||
index e862b51293135995c527c32aa3c3579780d7831c..ff658ec88e5161cd66536ee6e95dba675b16eccc 100644
|
||||
--- a/src/module_wrap.cc
|
||||
+++ b/src/module_wrap.cc
|
||||
@@ -186,7 +186,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
|
||||
export_names[i] = export_name_val.As<String>();
|
||||
}
|
||||
|
||||
- module = Module::CreateSyntheticModule(isolate, url, export_names,
|
||||
+
|
||||
+ module = Module::CreateSyntheticModule(isolate, url,
|
||||
+ v8::MemorySpan<const Local<String>>(export_names.begin(), export_names.end()),
|
||||
SyntheticModuleEvaluationStepsCallback);
|
||||
} else {
|
||||
ScriptCompiler::CachedData* cached_data = nullptr;
|
||||
@@ -8,7 +8,7 @@ to child processes spawned with `ELECTRON_RUN_AS_NODE` which is used
|
||||
by the crashpad client to connect with the handler process.
|
||||
|
||||
diff --git a/lib/child_process.js b/lib/child_process.js
|
||||
index cc81cb373d59dbc1ab18182aa2a0c8ebe63f6245..d3871405e2ecb3917b8ec816490c575891c91d18 100644
|
||||
index 580a441a803bdd0b57871c0cdd8af576f11609b1..755712d24219de7ffe491957d941df7c8cf7baad 100644
|
||||
--- a/lib/child_process.js
|
||||
+++ b/lib/child_process.js
|
||||
@@ -61,6 +61,7 @@ let debug = require('internal/util/debuglog').debuglog(
|
||||
@@ -19,7 +19,7 @@ index cc81cb373d59dbc1ab18182aa2a0c8ebe63f6245..d3871405e2ecb3917b8ec816490c5758
|
||||
|
||||
const {
|
||||
AbortError,
|
||||
@@ -154,7 +155,6 @@ function fork(modulePath, args = [], options) {
|
||||
@@ -153,7 +154,6 @@ function fork(modulePath, args = [], options) {
|
||||
ArrayPrototypeSplice(execArgv, index - 1, 2);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ index cc81cb373d59dbc1ab18182aa2a0c8ebe63f6245..d3871405e2ecb3917b8ec816490c5758
|
||||
args = [...execArgv, modulePath, ...args];
|
||||
|
||||
if (typeof options.stdio === 'string') {
|
||||
@@ -618,6 +618,22 @@ function normalizeSpawnArguments(file, args, options) {
|
||||
@@ -617,6 +617,22 @@ function normalizeSpawnArguments(file, args, options) {
|
||||
'options.windowsVerbatimArguments');
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ index cc81cb373d59dbc1ab18182aa2a0c8ebe63f6245..d3871405e2ecb3917b8ec816490c5758
|
||||
if (options.shell) {
|
||||
validateArgumentNullCheck(options.shell, 'options.shell');
|
||||
const command = ArrayPrototypeJoin([file, ...args], ' ');
|
||||
@@ -651,7 +667,6 @@ function normalizeSpawnArguments(file, args, options) {
|
||||
@@ -650,7 +666,6 @@ function normalizeSpawnArguments(file, args, options) {
|
||||
ArrayPrototypeUnshift(args, file);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= <hello@nicr.dev>
|
||||
Date: Fri, 19 Apr 2024 02:01:24 +0200
|
||||
Subject: esm: drop support for import assertions
|
||||
|
||||
This patch removes support for the `assert` keyword
|
||||
for import attributes. It was an old variant of the
|
||||
proposal that was only shipped in V8 and no other
|
||||
engine, and that has then been replaced by the `with`
|
||||
keyword.
|
||||
|
||||
Chrome is planning to remove support for `assert`
|
||||
in version 126, which will be released in June.
|
||||
|
||||
Node.js already supports the `with` keyword for
|
||||
import attributes, and this patch does not change that.
|
||||
|
||||
PR-URL: https://github.com/nodejs/node/pull/52104
|
||||
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
||||
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
||||
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
|
||||
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
|
||||
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
|
||||
(cherry picked from commit 25c79f333104d1feb0d84794d5bcdb4227177c9b)
|
||||
|
||||
esm: remove --no-import-harmony-assertions
|
||||
|
||||
It is off by default now.
|
||||
|
||||
PR-URL: https://github.com/nodejs/node/pull/54890
|
||||
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
|
||||
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
|
||||
Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
(cherry picked from commit 8fd90938f923ef2a04bb3ebb08b89568fe6fd4ee)
|
||||
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index 9f6f8e53abd7e447d88c187c447431a0d96cd150..4415f18ecbd84c1f41e0febbf2446fb636242d58 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -778,12 +778,6 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
|
||||
return ExitCode::kInvalidCommandLineArgument2;
|
||||
}
|
||||
|
||||
- // TODO(aduh95): remove this when the harmony-import-assertions flag
|
||||
- // is removed in V8.
|
||||
- if (std::find(v8_args.begin(), v8_args.end(),
|
||||
- "--no-harmony-import-assertions") == v8_args.end()) {
|
||||
- v8_args.emplace_back("--harmony-import-assertions");
|
||||
- }
|
||||
// TODO(aduh95): remove this when the harmony-import-attributes flag
|
||||
// is removed in V8.
|
||||
if (std::find(v8_args.begin(),
|
||||
@@ -9,10 +9,10 @@ modules to sandboxed renderers.
|
||||
TODO(codebytere): remove and replace with a public facing API.
|
||||
|
||||
diff --git a/src/node_binding.cc b/src/node_binding.cc
|
||||
index 6b0297d8984ccb34b8d0019fedd1307d48cf49f8..4e750be66452de47040e3a46555c062dfccf7807 100644
|
||||
index c2ef9b36d5b2967c798c123b6cbbd099b15c2791..b5c0a93d83ab4d4f6792d0eb648e7198de874bcf 100644
|
||||
--- a/src/node_binding.cc
|
||||
+++ b/src/node_binding.cc
|
||||
@@ -641,6 +641,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -653,6 +653,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
|
||||
args.GetReturnValue().Set(exports);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ index 6b0297d8984ccb34b8d0019fedd1307d48cf49f8..4e750be66452de47040e3a46555c062d
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
|
||||
diff --git a/src/node_binding.h b/src/node_binding.h
|
||||
index 7256bf2bbcf73214a25e61156305cc212b6f2451..d129981ad8588376eeee61155964062f624695d6 100644
|
||||
index eb1364cb01a2bea52bce768056e73b0f3a86ae35..d421a2773403e7b22fcca2fcf8275ef2d9654c55 100644
|
||||
--- a/src/node_binding.h
|
||||
+++ b/src/node_binding.h
|
||||
@@ -137,6 +137,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
@@ -146,6 +146,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
void GetLinkedBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
void DLOpen(const v8::FunctionCallbackInfo<v8::Value>& args);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ index 0f5ddfb3ca21b7e5b38d0a4ce4b9e77387597199..ba815202fb157aa82859ec0518523cf6
|
||||
.. c:function:: int uv_loop_close(uv_loop_t* loop)
|
||||
|
||||
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
|
||||
index 02397dd0fdd43d51f86c0dde9a62046702f12bdb..3375600023e39ddacf62cc17deb4f206db942084 100644
|
||||
index a62b3fa69b1087847f37c7093954e19a07959b74..7f48b7daa87d1a5b14bc6f641b60f21263fa5ec3 100644
|
||||
--- a/deps/uv/include/uv.h
|
||||
+++ b/deps/uv/include/uv.h
|
||||
@@ -260,7 +260,8 @@ typedef struct uv_metrics_s uv_metrics_t;
|
||||
@@ -101,10 +101,10 @@ index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..117190ef26338944b78dbed7380c631d
|
||||
static int uv__async_start(uv_loop_t* loop) {
|
||||
int pipefd[2];
|
||||
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
|
||||
index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09d9364d21 100644
|
||||
index 965e7f775250cf9899266bc3aaf62eda69367264..45b3dec662b093a61af356e431416530b35343d2 100644
|
||||
--- a/deps/uv/src/unix/core.c
|
||||
+++ b/deps/uv/src/unix/core.c
|
||||
@@ -926,6 +926,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
||||
@@ -927,6 +927,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
||||
loop->watchers[w->fd] = w;
|
||||
loop->nfds++;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09
|
||||
}
|
||||
|
||||
|
||||
@@ -957,6 +960,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
||||
@@ -958,6 +961,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
|
||||
}
|
||||
else if (uv__queue_empty(&w->watcher_queue))
|
||||
uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue);
|
||||
@@ -124,7 +124,7 @@ index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09
|
||||
}
|
||||
|
||||
|
||||
@@ -973,6 +979,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
|
||||
@@ -974,6 +980,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
|
||||
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
|
||||
if (uv__queue_empty(&w->pending_queue))
|
||||
uv__queue_insert_tail(&loop->pending_queue, &w->pending_queue);
|
||||
@@ -241,7 +241,7 @@ index e9885a0f1ff3890a8d957c8793e22b01cedc0e97..ae3d09878253fe7169ad7b74b3faea02
|
||||
return -1;
|
||||
}
|
||||
diff --git a/deps/uv/test/test-embed.c b/deps/uv/test/test-embed.c
|
||||
index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf893ab93d2 100644
|
||||
index 6e9917239aa5626dd56fffd6eb2469d3e63224bf..b0da9d1cddc69428e9fb3379d1338cf893ab93d2 100644
|
||||
--- a/deps/uv/test/test-embed.c
|
||||
+++ b/deps/uv/test/test-embed.c
|
||||
@@ -25,54 +25,184 @@
|
||||
@@ -278,7 +278,7 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
|
||||
-static void thread_main(void* arg) {
|
||||
- ASSERT_LE(0, uv_barrier_wait(&barrier));
|
||||
- uv_sleep(250);
|
||||
- ASSERT_EQ(0, uv_async_send(&async));
|
||||
- ASSERT_OK(uv_async_send(&async));
|
||||
-}
|
||||
+static uv_timer_t main_timer;
|
||||
+static int main_timer_called;
|
||||
@@ -333,9 +333,9 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
|
||||
- uv_loop_t* loop;
|
||||
-
|
||||
- loop = uv_default_loop();
|
||||
- ASSERT_EQ(0, uv_async_init(loop, &async, async_cb));
|
||||
- ASSERT_EQ(0, uv_barrier_init(&barrier, 2));
|
||||
- ASSERT_EQ(0, uv_thread_create(&thread, thread_main, NULL));
|
||||
- ASSERT_OK(uv_async_init(loop, &async, async_cb));
|
||||
- ASSERT_OK(uv_barrier_init(&barrier, 2));
|
||||
- ASSERT_OK(uv_thread_create(&thread, thread_main, NULL));
|
||||
- ASSERT_LE(0, uv_barrier_wait(&barrier));
|
||||
-
|
||||
- while (uv_loop_alive(loop)) {
|
||||
@@ -457,7 +457,7 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
|
||||
+ uv_timer_init(&external_loop, &external_timer);
|
||||
+ uv_timer_start(&external_timer, external_timer_cb, 100, 0);
|
||||
|
||||
- ASSERT_EQ(0, uv_thread_join(&thread));
|
||||
- ASSERT_OK(uv_thread_join(&thread));
|
||||
- uv_barrier_destroy(&barrier);
|
||||
+ run_loop();
|
||||
+ ASSERT_EQ(main_timer_called, 1);
|
||||
@@ -465,10 +465,10 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
|
||||
index 78ff9c2d1621676feab5d357609970cdf1ba5864..204160f324ad1a80c9b042e62c4bedcb745666ba 100644
|
||||
index d30f02faa8515ca3a995490d53f2e85fda11c6a2..a392f5e3d701b0d973db2bbc6553977ce55a8775 100644
|
||||
--- a/deps/uv/test/test-list.h
|
||||
+++ b/deps/uv/test/test-list.h
|
||||
@@ -273,6 +273,7 @@ TEST_DECLARE (process_priority)
|
||||
@@ -276,6 +276,7 @@ TEST_DECLARE (process_priority)
|
||||
TEST_DECLARE (has_ref)
|
||||
TEST_DECLARE (active)
|
||||
TEST_DECLARE (embed)
|
||||
@@ -476,7 +476,7 @@ index 78ff9c2d1621676feab5d357609970cdf1ba5864..204160f324ad1a80c9b042e62c4bedcb
|
||||
TEST_DECLARE (async)
|
||||
TEST_DECLARE (async_null_cb)
|
||||
TEST_DECLARE (eintr_handling)
|
||||
@@ -894,6 +895,7 @@ TASK_LIST_START
|
||||
@@ -906,6 +907,7 @@ TASK_LIST_START
|
||||
TEST_ENTRY (active)
|
||||
|
||||
TEST_ENTRY (embed)
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 16 Oct 2024 16:09:37 +0200
|
||||
Subject: fix: -Wextra-semi errors in nghttp2_helper.h
|
||||
|
||||
Introduced in https://github.com/nodejs/node/pull/52966
|
||||
|
||||
Upstreamed in https://github.com/nghttp2/nghttp2/pull/2258
|
||||
|
||||
diff --git a/deps/nghttp2/lib/nghttp2_helper.h b/deps/nghttp2/lib/nghttp2_helper.h
|
||||
index 89b0d4f535db795cd1df582475c02b2f4d1ac98f..f5de6290dab0e17ae3aff10230dd8ad7414f9631 100644
|
||||
--- a/deps/nghttp2/lib/nghttp2_helper.h
|
||||
+++ b/deps/nghttp2/lib/nghttp2_helper.h
|
||||
@@ -38,28 +38,28 @@
|
||||
#define nghttp2_max_def(SUFFIX, T) \
|
||||
static inline T nghttp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; }
|
||||
|
||||
-nghttp2_max_def(int8, int8_t);
|
||||
-nghttp2_max_def(int16, int16_t);
|
||||
-nghttp2_max_def(int32, int32_t);
|
||||
-nghttp2_max_def(int64, int64_t);
|
||||
-nghttp2_max_def(uint8, uint8_t);
|
||||
-nghttp2_max_def(uint16, uint16_t);
|
||||
-nghttp2_max_def(uint32, uint32_t);
|
||||
-nghttp2_max_def(uint64, uint64_t);
|
||||
-nghttp2_max_def(size, size_t);
|
||||
+nghttp2_max_def(int8, int8_t)
|
||||
+nghttp2_max_def(int16, int16_t)
|
||||
+nghttp2_max_def(int32, int32_t)
|
||||
+nghttp2_max_def(int64, int64_t)
|
||||
+nghttp2_max_def(uint8, uint8_t)
|
||||
+nghttp2_max_def(uint16, uint16_t)
|
||||
+nghttp2_max_def(uint32, uint32_t)
|
||||
+nghttp2_max_def(uint64, uint64_t)
|
||||
+nghttp2_max_def(size, size_t)
|
||||
|
||||
#define nghttp2_min_def(SUFFIX, T) \
|
||||
static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
|
||||
|
||||
-nghttp2_min_def(int8, int8_t);
|
||||
-nghttp2_min_def(int16, int16_t);
|
||||
-nghttp2_min_def(int32, int32_t);
|
||||
-nghttp2_min_def(int64, int64_t);
|
||||
-nghttp2_min_def(uint8, uint8_t);
|
||||
-nghttp2_min_def(uint16, uint16_t);
|
||||
-nghttp2_min_def(uint32, uint32_t);
|
||||
-nghttp2_min_def(uint64, uint64_t);
|
||||
-nghttp2_min_def(size, size_t);
|
||||
+nghttp2_min_def(int8, int8_t)
|
||||
+nghttp2_min_def(int16, int16_t)
|
||||
+nghttp2_min_def(int32, int32_t)
|
||||
+nghttp2_min_def(int64, int64_t)
|
||||
+nghttp2_min_def(uint8, uint8_t)
|
||||
+nghttp2_min_def(uint16, uint16_t)
|
||||
+nghttp2_min_def(uint32, uint32_t)
|
||||
+nghttp2_min_def(uint64, uint64_t)
|
||||
+nghttp2_min_def(size, size_t)
|
||||
|
||||
#define lstreq(A, B, N) ((sizeof((A)) - 1) == (N) && memcmp((A), (B), (N)) == 0)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Tue, 23 May 2023 18:21:17 +0200
|
||||
Subject: fix: account for createExternalizableString V8 global
|
||||
|
||||
Introduced in https://chromium-review.googlesource.com/c/v8/v8/+/4531903.
|
||||
|
||||
This patch can be removed when Node.js upgrades to a version of V8 with the above
|
||||
CL - they'll need to make the same change.
|
||||
|
||||
diff --git a/test/parallel/test-fs-write.js b/test/parallel/test-fs-write.js
|
||||
index 59b83f531cf0a60f960d0096aea70854f45bd629..9dcc35987a4757ea090e81c7de38a6af5bc3182f 100644
|
||||
--- a/test/parallel/test-fs-write.js
|
||||
+++ b/test/parallel/test-fs-write.js
|
||||
@@ -38,7 +38,7 @@ const constants = fs.constants;
|
||||
const { externalizeString, isOneByteString } = global;
|
||||
|
||||
// Account for extra globals exposed by --expose_externalize_string.
|
||||
-common.allowGlobals(externalizeString, isOneByteString, global.x);
|
||||
+common.allowGlobals(createExternalizableString, externalizeString, isOneByteString, global.x);
|
||||
|
||||
{
|
||||
const expected = 'ümlaut sechzig'; // Must be a unique string.
|
||||
@@ -1,82 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 29 Mar 2023 09:55:47 +0200
|
||||
Subject: fix: adapt debugger tests for upstream v8 changes
|
||||
|
||||
Updates debugger tests to conform to changes in https://chromium-review.googlesource.com/c/v8/v8/+/4290476
|
||||
|
||||
This can be removed when Node.js updates to at least V8 11.4.
|
||||
|
||||
diff --git a/test/common/debugger.js b/test/common/debugger.js
|
||||
index 4aff5b9a0f74d99f8f605b68631f820e282091ab..d5d77fc7c648ddb45225f04c6cf23f9816b2186d 100644
|
||||
--- a/test/common/debugger.js
|
||||
+++ b/test/common/debugger.js
|
||||
@@ -4,7 +4,7 @@ const spawn = require('child_process').spawn;
|
||||
|
||||
const BREAK_MESSAGE = new RegExp('(?:' + [
|
||||
'assert', 'break', 'break on start', 'debugCommand',
|
||||
- 'exception', 'other', 'promiseRejection',
|
||||
+ 'exception', 'other', 'promiseRejection', 'step',
|
||||
].join('|') + ') in', 'i');
|
||||
|
||||
let TIMEOUT = common.platformTimeout(5000);
|
||||
@@ -121,13 +121,13 @@ function startCLI(args, flags = [], spawnOpts = {}) {
|
||||
get breakInfo() {
|
||||
const output = this.output;
|
||||
const breakMatch =
|
||||
- output.match(/break (?:on start )?in ([^\n]+):(\d+)\n/i);
|
||||
+ output.match(/(step |break (?:on start )?)in ([^\n]+):(\d+)\n/i);
|
||||
|
||||
if (breakMatch === null) {
|
||||
throw new Error(
|
||||
`Could not find breakpoint info in ${JSON.stringify(output)}`);
|
||||
}
|
||||
- return { filename: breakMatch[1], line: +breakMatch[2] };
|
||||
+ return { filename: breakMatch[2], line: +breakMatch[3] };
|
||||
},
|
||||
|
||||
ctrlC() {
|
||||
diff --git a/test/parallel/test-debugger-break.js b/test/parallel/test-debugger-break.js
|
||||
index 65b4355cfe7bc25464626cca6f1c3b0de1dd9a45..8e3a290321a2e70304859eb57a2056c3a70af0f6 100644
|
||||
--- a/test/parallel/test-debugger-break.js
|
||||
+++ b/test/parallel/test-debugger-break.js
|
||||
@@ -27,7 +27,7 @@ const cli = startCLI(['--port=0', script]);
|
||||
|
||||
await cli.stepCommand('n');
|
||||
assert.ok(
|
||||
- cli.output.includes(`break in ${script}:2`),
|
||||
+ cli.output.includes(`step in ${script}:2`),
|
||||
'pauses in next line of the script');
|
||||
assert.match(
|
||||
cli.output,
|
||||
@@ -36,7 +36,7 @@ const cli = startCLI(['--port=0', script]);
|
||||
|
||||
await cli.stepCommand('next');
|
||||
assert.ok(
|
||||
- cli.output.includes(`break in ${script}:3`),
|
||||
+ cli.output.includes(`step in ${script}:3`),
|
||||
'pauses in next line of the script');
|
||||
assert.match(
|
||||
cli.output,
|
||||
@@ -89,7 +89,7 @@ const cli = startCLI(['--port=0', script]);
|
||||
await cli.stepCommand('');
|
||||
assert.match(
|
||||
cli.output,
|
||||
- /break in node:timers/,
|
||||
+ /step in node:timers/,
|
||||
'entered timers.js');
|
||||
|
||||
await cli.stepCommand('cont');
|
||||
diff --git a/test/parallel/test-debugger-run-after-quit-restart.js b/test/parallel/test-debugger-run-after-quit-restart.js
|
||||
index 2c56f7227aed69d781392ce2f3f40e489e3501f2..0e1048699206dcc77696974e097e97de6b217811 100644
|
||||
--- a/test/parallel/test-debugger-run-after-quit-restart.js
|
||||
+++ b/test/parallel/test-debugger-run-after-quit-restart.js
|
||||
@@ -25,7 +25,7 @@ const path = require('path');
|
||||
.then(() => cli.stepCommand('n'))
|
||||
.then(() => {
|
||||
assert.ok(
|
||||
- cli.output.includes(`break in ${script}:2`),
|
||||
+ cli.output.includes(`step in ${script}:2`),
|
||||
'steps to the 2nd line'
|
||||
);
|
||||
})
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user