Compare commits

..

55 Commits

Author SHA1 Message Date
Milan Burda
ab2bb3f8a7 wip 2023-10-10 01:13:09 +02:00
John Kleinschmidt
a31deea1ba ci: fixup diagnose_goma_log.py call (#40131) 2023-10-09 15:19:21 +02:00
Milan Burda
24bc0ee5c7 test: fix "crashed event does not crash main process when destroying WebContents in it" (#40135) 2023-10-09 09:56:48 +02:00
Cheng Zhao
f5c177698e fix: remove EarlyMallocZoneRegistration call (#40128) 2023-10-09 09:43:51 +09:00
Milan Burda
737e3de3fa chore: restore deprecate as an internal module (#40124)
* Revert "refactor: don't expose deprecate as an internal module (#35311)"

This reverts commit 8424779906.

* check crashed event warnings
2023-10-09 08:55:16 +09:00
David Sanders
8b8fbd0408 test: add back smoke test for removed API (#40132) 2023-10-09 08:46:56 +09:00
Milan Burda
6a99c7b840 refactor: eliminate duplicate code (#40088) 2023-10-09 08:43:50 +09:00
Keeley Hammond
cff50ac65a fix: fix vibrancy applying without transparency on MacOS (#40109) 2023-10-06 11:57:26 -07:00
github-actions[bot]
a55c163db0 build: update appveyor image to latest version - e-119.0.6045.0 (#40075)
build: update appveyor image to latest version

Co-authored-by: jkleinsc <jkleinsc@users.noreply.github.com>
2023-10-06 11:47:17 -04:00
Robo
fdf8b02e14 chore: cherry-pick c03569f from libuv (#40101)
Refs c03569f0df
2023-10-06 19:25:19 +09:00
Shelley Vohr
73553032ea fix: toggling DevTools while minimized on Windows (#40091)
fix: toggling devtools while minimized on Windows
2023-10-05 20:26:31 -04:00
electron-roller[bot]
8f7a48879e chore: bump chromium to 119.0.6045.0 (main) (#40076)
* chore: bump chromium in DEPS to 119.0.6045.0

* chore: update patches

* 4864948: Remove legacy-legacy

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4864948

* 4907760: Remove ui/base/glib/glib_signal.h

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-05 19:59:39 -04:00
Milan Burda
83a928f6e3 fix: crashed events deprecation (#40090) 2023-10-05 19:57:14 -04:00
Shelley Vohr
3392d9a2e7 fix: all children showing when showing child window (#40062) 2023-10-05 09:19:57 -04:00
David Sanders
5ad69df52e build: update NMV to 119 (#40081) 2023-10-05 09:14:02 -04:00
Shelley Vohr
b3a1c6d13c fix: error using webcrypto.subtle.importKey() (#40070)
fix: error using webcrypto.subtle.importKey()
2023-10-05 10:46:53 +02:00
Shelley Vohr
b0590b6ee8 fix: failing build with enable_electron_extensions=false (#40032)
* fix: ENABLE_EXTENSIONS -> ENABLE_ELECTRON_EXTENSIONS

* fix: extension guard fixes

* chore: fix linker errors
2023-10-04 10:40:01 +02:00
Shelley Vohr
713d8c4167 feat: add tabbingIdentifier property to BrowserWindow (#39980)
feat: add tabbingIdentifier property to BrowserWindow
2023-10-03 12:27:40 -07:00
Milan Burda
04b2ba84cd refactor: replace remaining NULL with nullptr (#40053)
refactor: use nullptr everywhere
2023-10-03 12:26:35 -07:00
electron-roller[bot]
9d0e6d09f0 chore: bump chromium to 119.0.6043.0 (main) (#40045)
* chore: bump chromium in DEPS to 119.0.6036.0

* chore: bump chromium in DEPS to 119.0.6037.0

* chore: bump chromium in DEPS to 119.0.6039.0

* chore: bump chromium in DEPS to 119.0.6041.0

* chore: update chromium patches

* 4765230: Move //content/browser/renderer_host/event_with_latency_info.h to //content/common/input | https://chromium-review.googlesource.com/c/chromium/src/+/4765230

* 4890325: ScopedRunLoopTimeout: add custom timeout callback handler for testing | https://chromium-review.googlesource.com/c/chromium/src/+/4890325

* chore: update all patches

* chore: bump chromium in DEPS to 119.0.6043.0

* 4898682: [api] Add Error.cause to V8 API

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

* 4837192: Plumb origin through for drags.

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

* Prevent content analysis on web pages that don't accept drag and drop.

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

* Make getting displayed notifications work with notification attribution.

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

* 4898682: [api] Add Error.cause to V8 API

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

* lib,test: do not hardcode Buffer.kMaxLength

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

* chore: remove Goma warning from mksnapshot_args

* 4776412: Remove Windows-specific wstring variants of StringPrintf() etc.

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

* [dPWA] Prevent WebAppInstallInfo from being included on Android

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-10-02 18:01:07 -04:00
github-actions[bot]
503ae86ab2 build: update appveyor image to latest version - e-119.0.6029.0 (#40046)
build: update appveyor image to latest version

Co-authored-by: jkleinsc <jkleinsc@users.noreply.github.com>
2023-10-02 11:11:07 -04:00
Athul Iddya
37c79ea844 docs: add PipeWire integration instructions for snaps (#40019) 2023-10-02 12:19:23 +02:00
Shelley Vohr
93bcb30c3e fix: BroadcastChannel initialization location (#40049)
fix: `BroadcastChannel` initialization location (#37421)

* fix: BroadcastChannel initialization location

* chore: update patches

---------

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2023-10-02 10:57:09 +02:00
Milan Burda
d301616f60 chore: remove deprecated app.runningUnderRosettaTranslation() (#39956) 2023-10-02 10:55:32 +02:00
Shelley Vohr
5643e86956 chore: update extensions url handling to match upstream (#40038)
- https://chromium-review.googlesource.com/c/chromium/src/+/4772028
- https://chromium-review.googlesource.com/c/chromium/src/+/4264656
- https://chromium-review.googlesource.com/c/chromium/src/+/4712150
2023-10-02 10:35:00 +02:00
Samuel Attard
371e83a8d2 fix: support esm entrypoint to utility process (#40047) 2023-09-29 14:38:37 -07:00
electron-roller[bot]
d6c8ff2e70 chore: bump chromium to 119.0.6029.0 (main) (#39944)
* chore: bump chromium in DEPS to 119.0.6021.0

* 4727729: Initial ScreenCaptureKit AudioInputStream implementation

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 119.0.6023.0

* 4875713: mac: Switch to Xcode 15.0 15A240d with macOS SDK 14.0 23A334

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

* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model

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

* 4877868: Remove all gitignore entries for submodules

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

* 4824705: Set origin to commit for data: URLs

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

* chore: fixup patch indices

* 4881382: Expose selection in WebFormControlElement as unsigned

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

* 4874216: Portals: Cancel drag-drop in predecessor before activation

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

* chore: bump chromium in DEPS to 119.0.6025.0

* chore: bump chromium in DEPS to 119.0.6027.0

* 4884489: Update gitignore to be explicit about directories

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

* 4881091: Add debug info about owner document's origin when inheriting

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

* chore: fixup patch indices

* chore: bump chromium in DEPS to 119.0.6029.0

* chore: update patches

* 4881091: Add debug info about owner document's origin when inheriting

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

* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model

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

* 4866732: Extract document.title for installable checks

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

* chore: link to crbug in message port test

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2023-09-28 22:26:41 -07:00
ILikeTeaALot
d002f16157 feat: systemPreferences.getColor should return RGBA instead of RGB (#38960)
* fix: return RGBA hex value from `SystemPreferences.getColor`

* docs: update docs to match changes of last commit

* fix: GetColor on windows now returns RGBA too

* fix: update tests for getColor RGBA on Windows

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-28 18:56:16 -04:00
Bruno Pitrus
dd7395ebed chore: add missing include for std::variant (#40007) 2023-09-28 12:50:58 -04:00
Bruno Pitrus
e3e793d25b chore: remove invalid constexpr qualification (#40006)
GetPathConstant calls base::internal::flat_tree<Key, GetKeyFromValue, KeyCompare, Container>::find(Key const&) const which is not constexpr.
GCC 12 and earlier raise a compile error on this.
2023-09-28 12:49:09 -04:00
dependabot[bot]
da92c9aa27 build(deps): bump get-func-name from 2.0.0 to 2.0.2 in /spec (#40012)
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 12:47:36 -04:00
David Sanders
02b58333dc ci: update release project board workflows (#40020) 2023-09-28 11:27:02 -04:00
David Sanders
23cf9fa4e9 ci: update automation workflows (#40021) 2023-09-28 11:26:04 -04:00
Cheng Zhao
4cf6884dd4 fix: detect screen readers by testing their existences (#39988) 2023-09-28 11:17:42 -04:00
marekharanczyk
94585f5889 fix: propagate layout call to all children of InspectableWebContentsViewViews (#39994)
Propagate layout call to all children of InspectableWebContentsViewViews.

When BrowserView bounds are set from js, those might not trigger layout
immediately, sometimes propagating InvalidateLayout call to parent.
View is marked as needing layout, expecting to receive it from parent on
next layout call. The problem is that BrowserView's view is added as child
of InspectableWebContentsViews which does not call setBounds (which
would trigger layout) on all of it's children when doing it's layout,
so it skips propagating Layout call to its children BrowserViews views,
even though those were marked as needing layout.
Call base class View::Layout which will iterate over views' children
and call Layout on those that were marked as needing them.

Fixes #39993.
2023-09-28 11:17:21 -04:00
John Kleinschmidt
43a646ed85 build: log uploads to GitHub (#40034) 2023-09-28 11:15:52 -04:00
dependabot[bot]
f628ce67dd build(deps): bump get-func-name from 2.0.0 to 2.0.2 (#40013)
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 10:44:16 +02:00
Shelley Vohr
c8156c3c57 fix: failure on immutable webContents.print(options) (#39985)
fix: failure on immutable webContents.print(options)
2023-09-28 10:41:46 +02:00
Tomasz
689d1b76de feat: add middle click event to tray (#39926)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 14:21:15 -04:00
Robert Günzler
480f48b2fc feat: enable dark mode on GTK UIs (#38977)
feat: port DarkModeManagerLinux

This is needed after https://bugs.chromium.org/p/chromium/issues/detail?id=998903
and replaces the previous workaround to detect dark mode on GTK.
Detect system dark theme preference via xdg settings portal:
https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Settings

Closes: https://github.com/electron/electron/issues/38961
Closes: https://github.com/electron/electron/issues/28838

Signed-off-by: Robert Günzler <r@gnzler.io>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 14:17:40 -04:00
Erick Zhao
a0ae691a9c docs: document type-specific module aliases (#39685) 2023-09-27 11:07:04 -04:00
Bruno Henrique da Silva
f943b8c940 fix: set window contents as opaque to decrease DWM GPU usage (#39895)
* set window contents as opaque to decrease DWM GPU usage

* chore: add more context to ShouldWindowContentsBeTransparent
2023-09-27 10:42:46 -04:00
Shelley Vohr
b7c9c895b5 build: fix with enable_pdf_viewer = false (#39990)
build: fix with enable_pdf_viewer = false
2023-09-27 10:09:53 -04:00
Shelley Vohr
1ba321b733 fix: rounded corners on vibrant macOS modals (#39979)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-27 15:12:37 +02:00
Cheng Zhao
ad57867594 fix: apply size constraints to NSWindow (#39975) 2023-09-27 11:11:24 +02:00
Cheng Zhao
e613595982 build: allow overriding electron version (#39974) 2023-09-27 14:49:10 +09:00
NoxFly
624ae024e2 docs: Quick Start | Electron Forge chapter requirements updated (#39639)
* Update quick-start.md

Added a note to a pre-require of Electron Forge.
Otherwise users will have an error `Cannot make for rpm, the following external binaries need to be installed: rpmbuild`

* Add two required steps for Electron Forge to build without errors

* Update docs/tutorial/quick-start.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2023-09-27 08:56:39 +09:00
michal-pichlinski-openfin
2190793fe6 fix: disable background throttling also in the viz::DisplayScheduler (#38924)
* fix: disable background throttling also in the `viz::DisplayScheduler`

`viz::DisplayScheduler` is responsible for drawing and swapping frames
in the `DisplayScheduler::DrawAndSwap` which is called from the
`DisplayScheduler::AttemptDrawAndSwap` if the `DisplayScheduler::ShouldDraw`
returns true. `ShouldDraw` depends on the `DisplayScheduler` visibility
and when it is not visible then it returns false.

In order to keep producing frames, disabling `backgroundThrottling`
should also prevent changing `DisplayScheduler` visibility to false.

`DisplayScheduler` lives in the `ui::Compositor` where every
`electron::NativewWindow` has its own `Compositor`. `electron::NativewWindow`
may be host of the multiple `electron::api::WebContents` instances which may
have different `WebPreferences` settings. Therefore if at least one
of the `WebContents` requires disabling throttling then all other `WebContents`
using the same window will have it disabled in the `ui::Compositor`.

BREAKING CHANGE:
`backgroundThrottling` set to false will disable frames throttling
in the `BrowserWindow` for all `WebContents` displayed by it.

Close: [#31016](https://github.com/electron/electron/issues/31016)

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-26 16:00:46 -04:00
Milan Burda
fa215f1009 chore: add deprecated app.runningUnderRosettaTranslation to breaking-changes.md (#39897)
chore: add deprecated app.runningUnderRosettaTranslation to breaking-changes.md
2023-09-26 13:42:56 -04:00
John Kleinschmidt
943bfa89ce test: fixup parallel/test-node-output-error test (#39972) 2023-09-25 16:23:05 -04:00
Milan Burda
d75a852743 refactor: use type enum in file stats for asar archive (#39889) 2023-09-25 13:17:24 +02:00
David Sanders
18f517d8a6 test: vendor node-is-valid-window (#39965) 2023-09-25 12:43:57 +02:00
Leon
fdf1ecec47 docs: correct v24 Alpha date (#39963) 2023-09-24 23:03:29 -07:00
John Kleinschmidt
beb52ce61c build: update patch (#39950) 2023-09-22 10:33:29 -07:00
Erick Zhao
2085aae915 docs: esm tutorial (#39722)
* docs: esm tutorial

* Update esm.md

* Update docs/tutorial/esm.md

Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>

* table adjustment

* fix lint

* Update docs/tutorial/esm.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/esm.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/esm.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/esm.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update docs/tutorial/esm.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* Update esm.md

---------

Co-authored-by: Michaela Laurencin <35157522+mlaurencin@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2023-09-22 09:49:16 -07:00
247 changed files with 2806 additions and 3496 deletions

View File

@@ -68,8 +68,8 @@ executors:
version:
description: "xcode version"
type: enum
enum: ["14.3.0", "14.0.0"]
default: 14.3.0
enum: ["15.0.0", "14.0.0"]
default: 15.0.0
macos:
xcode: << parameters.version >>
resource_class: << parameters.size >>
@@ -754,8 +754,8 @@ step-show-goma-stats: &step-show-goma-stats
command: |
set +e
set +o pipefail
$GOMA_DIR/goma_ctl.py stat
$GOMA_DIR/diagnose_goma_log.py
python3 $GOMA_DIR/goma_ctl.py stat
python3 $GOMA_DIR/diagnose_goma_log.py
true
when: always
background: true
@@ -775,6 +775,7 @@ step-mksnapshot-build: &step-mksnapshot-build
fi
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
sed $SEDOPTION '/The gn arg use_goma=true .*/d' out/Default/mksnapshot_args
if [ "`uname`" != "Darwin" ]; then
if [ "$TARGET_ARCH" == "arm" ]; then
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot

View File

@@ -2,7 +2,6 @@ name: Bug Report
description: Report an Electron bug
title: "[Bug]: "
labels: "bug :beetle:"
projects: ["electron/90"]
body:
- type: checkboxes
attributes:

View File

@@ -60,106 +60,33 @@ jobs:
done
- name: Generate GitHub App token
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id: generate-token
with:
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
org: electron
- name: Generate Release Project Board Metadata
if: ${{ steps.check-major-version.outputs.MAJOR }}
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
id: generate-project-metadata
with:
script: |
const major = ${{ steps.check-major-version.outputs.MAJOR }}
core.setOutput("template-view", JSON.stringify({
major,
"next-major": major + 1,
"prev-major": major - 1,
}))
core.setOutput("title", `${major}-x-y`)
- name: Create Release Project Board
if: ${{ steps.check-major-version.outputs.MAJOR }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
ELECTRON_ORG_ID: "O_kgDOAMybxg"
ELECTRON_REPO_ID: "R_kgDOAI8xSw"
TEMPLATE_PROJECT_ID: "PVT_kwDOAMybxs4AQvib"
run: |
# Copy template to create new project board
PROJECT_ID=$(gh api graphql -f query='mutation ($ownerId: ID!, $projectId: ID!, $title: String!) {
copyProjectV2(input: {
includeDraftIssues: true,
ownerId: $ownerId,
projectId: $projectId,
title: $title
}) {
projectV2 {
id
}
}
}' -f ownerId=$ELECTRON_ORG_ID -f projectId=$TEMPLATE_PROJECT_ID -f title="${MAJOR}-x-y" | jq -r '.data.copyProjectV2.projectV2.id')
# Make the new project public
gh api graphql -f query='mutation ($projectId: ID!) {
updateProjectV2(input: {
projectId: $projectId,
public: true,
}) {
projectV2 {
id
}
}
}' -f projectId=$PROJECT_ID
# Link the new project to the Electron repository
gh api graphql -f query='mutation ($projectId: ID!, $repositoryId: ID!) {
linkProjectV2ToRepository(input: {
projectId: $projectId,
repositoryId: $repositoryId
}) {
clientMutationId
}
}' -f projectId=$PROJECT_ID -f repositoryId=$ELECTRON_REPO_ID
# Get all draft issues on the new project board
gh api graphql -f query='query ($id: ID!) {
node(id: $id) {
... on ProjectV2 {
items(first: 100) {
nodes {
... on ProjectV2Item {
id
content {
... on DraftIssue { id title
body
}
}
}
}
}
}
}
}' -f id=$PROJECT_ID > issues.json
PROJECT_ITEMS=$(jq '.data.node.items.nodes[] | select(.content.id != null) | .id' issues.json)
#
# Do template replacement for draft issues
#
echo "{\"major\": $MAJOR, \"next-major\": $((MAJOR + 1)), \"prev-major\": $((MAJOR - 1))}" > variables.json
# npx mustache is annoyingly slow, so install mustache directly
yarn add -D mustache
for PROJECT_ITEM_ID in $PROJECT_ITEMS; do
# These are done with the raw output flag and sent to file to better retain formatting
jq -r ".data.node.items.nodes[] | select(.id == $PROJECT_ITEM_ID) | .content.title" issues.json > title.txt
jq -r ".data.node.items.nodes[] | select(.id == $PROJECT_ITEM_ID) | .content.body" issues.json > body.txt
./node_modules/.bin/mustache variables.json title.txt new_title.txt
./node_modules/.bin/mustache variables.json body.txt new_body.txt
# Only update draft issues which had content change when interpolated
if ! cmp --silent -- new_title.txt title.txt || ! cmp --silent -- new_body.txt body.txt; then
DRAFT_ISSUE_ID=$(jq ".data.node.items.nodes[] | select(.id == $PROJECT_ITEM_ID) | .content.id" issues.json)
gh api graphql -f query='mutation ($draftIssueId: ID!, $title: String!, $body: String!) {
updateProjectV2DraftIssue(input: {
draftIssueId: $draftIssueId,
title: $title,
body: $body
}) {
draftIssue {
id
}
}
}' -f draftIssueId=$DRAFT_ISSUE_ID -f title="$(cat new_title.txt)" -f body="$(cat new_body.txt)"
fi
done
uses: dsanders11/project-actions/copy-project@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
drafts: true
project-number: 64
# TODO - Set to public once GitHub fixes their GraphQL bug
# public: true
template-view: ${{ steps.generate-project-metadata.outputs.template-view }}
title: ${{ steps.generate-project-metadata.outputs.title}}
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -20,14 +20,12 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org: electron
- name: Set status
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
uses: dsanders11/project-actions/edit-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
github_token: ${{ steps.generate-token.outputs.token }}
organization: electron
project_number: 90
content_id: ${{ github.event.issue.node_id }}
token: ${{ steps.generate-token.outputs.token }}
project-number: 90
field: Status
value: 🛑 Blocked
field-value: 🛑 Blocked
issue-labeled-blocked-need-repro:
name: blocked/need-repro label added
if: github.event.label.name == 'blocked/need-repro'

27
.github/workflows/issue-opened.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Issue Opened
on:
issues:
types:
- opened
permissions: {}
jobs:
add-to-issue-triage:
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
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: Add to Issue Triage
uses: dsanders11/project-actions/add-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
field: Reporter
field-value: ${{ github.event.issue.user.login }}
project-number: 90
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -30,11 +30,9 @@ jobs:
org: electron
- name: Set status
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
uses: dsanders11/project-actions/edit-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
github_token: ${{ steps.generate-token.outputs.token }}
organization: electron
project_number: 90
content_id: ${{ github.event.issue.node_id }}
token: ${{ steps.generate-token.outputs.token }}
project-number: 90
field: Status
value: 📥 Was Blocked
field-value: 📥 Was Blocked

View File

@@ -20,11 +20,9 @@ jobs:
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
org: electron
- name: Set status
uses: dsanders11/update-project-action@7ade91760df70df76770a238abee7a4869e01cf8
uses: dsanders11/project-actions/edit-item@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
github_token: ${{ steps.generate-token.outputs.token }}
organization: electron
project_number: 94
content_id: ${{ github.event.pull_request.node_id }}
token: ${{ steps.generate-token.outputs.token }}
project-number: 94
field: Status
value: ✅ Reviewed
field-value: ✅ Reviewed

35
.github/workflows/stable-prep-items.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Check Stable Prep Items
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
permissions: {}
jobs:
check-stable-prep-items:
name: Check Stable Prep Items
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.RELEASE_BOARD_GH_APP_CREDS }}
org: electron
- name: Find Newest Release Project Board
id: find-project-number
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
set -eo pipefail
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@a24415515fa60a22f71f9d9d00e36ca82660cde9 # v1.0.1
with:
field: Prep Status
field-value: ✅ Complete
project-number: ${{ steps.find-project-number.outputs.PROJECT_NUMBER }}
token: ${{ steps.generate-token.outputs.token }}

View File

@@ -104,14 +104,26 @@ branding = read_file("shell/app/BRANDING.json", "json")
electron_project_name = branding.project_name
electron_product_name = branding.product_name
electron_mac_bundle_id = branding.mac_bundle_id
electron_version = exec_script("script/print-version.py",
[],
"trim string",
[
".git/packed-refs",
".git/HEAD",
"script/lib/get-version.js",
])
if (override_electron_version != "") {
electron_version = override_electron_version
} else {
# When building from source code tarball there is no git tag available and
# builders must explicitly pass override_electron_version in gn args.
# This read_file call will assert if there is no git information, without it
# gn will generate a malformed build configuration and ninja will get into
# infinite loop.
read_file(".git/packed-refs", "string")
# Set electron version from git tag.
electron_version = exec_script("script/get-git-version.py",
[],
"trim string",
[
".git/packed-refs",
".git/HEAD",
])
}
if (is_mas_build) {
assert(is_mac,
@@ -904,10 +916,7 @@ if (is_mac) {
assert(defined(invoker.helper_name_suffix))
output_name = electron_helper_name + invoker.helper_name_suffix
deps = [
":electron_framework+link",
"//base/allocator:early_zone_registration_apple",
]
deps = [ ":electron_framework+link" ]
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
}
@@ -1068,7 +1077,6 @@ if (is_mac) {
":electron_app_plist",
":electron_app_resources",
":electron_fuses",
"//base/allocator:early_zone_registration_apple",
"//electron/buildflags",
]
if (is_mas_build) {

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'119.0.6019.2',
'119.0.6045.0',
'node_version':
'v18.18.0',
'nan_version':

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-119.0.6019.2
image: e-119.0.6045.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -160,7 +160,7 @@ for:
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args
# Remove unused args from mksnapshot_args
- ps: >-
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') -And -not $_.Contains('The gn arg use_goma=true') } | Set-Content out/Default/mksnapshot_args
- ninja -C out/Default electron:electron_mksnapshot_zip
- cd out\Default
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S

View File

@@ -29,7 +29,7 @@
version: 1.0.{build}
build_cloud: electronhq-16-core
image: e-119.0.6019.2
image: e-119.0.6045.0
environment:
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
ELECTRON_OUT_DIR: Default
@@ -158,7 +158,7 @@ for:
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args
# Remove unused args from mksnapshot_args
- ps: >-
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') -And -not $_.Contains('The gn arg use_goma=true') } | Set-Content out/Default/mksnapshot_args
- ninja -C out/Default electron:electron_mksnapshot_zip
- cd out\Default
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S

View File

@@ -2,7 +2,7 @@ is_electron_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
node_module_version = 118
node_module_version = 119
v8_promise_internal_field_count = 1
v8_embedder_string = "-electron.0"

View File

@@ -18,4 +18,9 @@ declare_args() {
# Enable Spellchecker support
enable_builtin_spellchecker = true
# The version of Electron.
# Packagers and vendor builders should set this in gn args to avoid running
# the script that reads git tag.
override_electron_version = ""
}

View File

@@ -204,6 +204,10 @@ static_library("chrome") {
"//chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc",
"//chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h",
]
sources += [
"//chrome/browser/ui/views/dark_mode_manager_linux.cc",
"//chrome/browser/ui/views/dark_mode_manager_linux.h",
]
public_deps += [
"//components/dbus/menu",
"//components/dbus/thread_linux",
@@ -215,7 +219,11 @@ static_library("chrome") {
"//chrome/browser/win/icon_reader_service.cc",
"//chrome/browser/win/icon_reader_service.h",
]
public_deps += [ "//chrome/services/util_win:lib" ]
public_deps += [
"//chrome/browser/web_applications/proto",
"//chrome/services/util_win:lib",
"//components/webapps/common:mojo_bindings",
]
}
if (is_mac) {
@@ -334,6 +342,34 @@ static_library("chrome") {
"//components/pdf/renderer",
]
}
} else {
# These are required by the webRequest module.
sources += [
"//extensions/browser/api/declarative_net_request/request_action.cc",
"//extensions/browser/api/declarative_net_request/request_action.h",
"//extensions/browser/api/web_request/form_data_parser.cc",
"//extensions/browser/api/web_request/form_data_parser.h",
"//extensions/browser/api/web_request/upload_data_presenter.cc",
"//extensions/browser/api/web_request/upload_data_presenter.h",
"//extensions/browser/api/web_request/web_request_api_constants.cc",
"//extensions/browser/api/web_request/web_request_api_constants.h",
"//extensions/browser/api/web_request/web_request_info.cc",
"//extensions/browser/api/web_request/web_request_info.h",
"//extensions/browser/api/web_request/web_request_resource_type.cc",
"//extensions/browser/api/web_request/web_request_resource_type.h",
"//extensions/browser/extension_api_frame_id_map.cc",
"//extensions/browser/extension_api_frame_id_map.h",
"//extensions/browser/extension_navigation_ui_data.cc",
"//extensions/browser/extension_navigation_ui_data.h",
"//extensions/browser/extensions_browser_client.cc",
"//extensions/browser/extensions_browser_client.h",
"//extensions/browser/guest_view/web_view/web_view_renderer_state.cc",
"//extensions/browser/guest_view/web_view/web_view_renderer_state.h",
]
public_deps += [
"//extensions/browser/api/declarative_net_request/flat:extension_ruleset",
]
}
if (!is_mas_build) {

View File

@@ -1571,19 +1571,6 @@ This is the user agent that will be used when no user agent is set at the
app has the same user agent. Set to a custom value as early as possible
in your app's initialization to ensure that your overridden value is used.
### `app.runningUnderRosettaTranslation` _macOS_ _Readonly_ _Deprecated_
A `boolean` which when `true` indicates that the app is currently running
under the [Rosetta Translator Environment](https://en.wikipedia.org/wiki/Rosetta_(software)).
You can use this property to prompt users to download the arm64 version of
your application when they are running the x64 version under Rosetta
incorrectly.
**Deprecated:** This property is superceded by the `runningUnderARM64Translation`
property which detects when the app is being translated to ARM64 in both macOS
and Windows.
### `app.runningUnderARM64Translation` _Readonly_ _macOS_ _Windows_
A `boolean` which when `true` indicates that the app is currently running under

View File

@@ -475,6 +475,10 @@ events.
A `Integer` property representing the unique ID of the window. Each ID is unique among all `BrowserWindow` instances of the entire Electron application.
#### `win.tabbingIdentifier` _macOS_ _Readonly_
A `string` (optional) property that is equal to the `tabbingIdentifier` passed to the `BrowserWindow` constructor or `undefined` if none was set.
#### `win.autoHideMenuBar`
A `boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.

View File

@@ -74,7 +74,11 @@
* `defaultEncoding` string (optional) - Defaults to `ISO-8859-1`.
* `backgroundThrottling` boolean (optional) - Whether to throttle animations and timers
when the page becomes background. This also affects the
[Page Visibility API](../browser-window.md#page-visibility). Defaults to `true`.
[Page Visibility API](../browser-window.md#page-visibility). When at least one
[webContents](../web-contents.md) displayed in a single
[browserWindow](../browser-window.md) has disabled `backgroundThrottling` then
frames will be drawn and swapped for the whole window and other
[webContents](../web-contents.md) displayed by it. Defaults to `true`.
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
window. Defaults to `false`. See the
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for

View File

@@ -306,7 +306,7 @@ This API is only available on macOS 10.14 Mojave or newer.
* `window-background` - The background of a window.
* `window-frame-text` - The text in the window's titlebar area.
Returns `string` - The system color setting in RGB hexadecimal form (`#ABCDEF`).
Returns `string` - The system color setting in RGBA hexadecimal form (`#RRGGBBAA`).
See the [Windows docs][windows-colors] and the [macOS docs][macos-colors] for more details.
The following colors are only available on macOS 10.14: `find-highlight`, `selected-content-background`, `separator`, `unemphasized-selected-content-background`, `unemphasized-selected-text-background`, and `unemphasized-selected-text`.

View File

@@ -111,6 +111,15 @@ Returns:
Emitted when the tray icon is double clicked.
#### Event: 'middle-click' _Windows_
Returns:
* `event` [KeyboardEvent](structures/keyboard-event.md)
* `bounds` [Rectangle](structures/rectangle.md) - The bounds of tray icon.
Emitted when the tray icon is middle clicked.
#### Event: 'balloon-show' _Windows_
Emitted when the tray balloon shows.

View File

@@ -14,6 +14,11 @@ This document uses the following convention to categorize breaking changes:
## Planned Breaking API Changes (28.0)
### Behavior Changed: `WebContents.backgroundThrottling` set to false affects all `WebContents` in the host `BrowserWindow`
`WebContents.backgroundThrottling` set to false will disable frames throttling
in the `BrowserWindow` for all `WebContents` displayed by it.
### Removed: `BrowserWindow.setTrafficLightPosition(position)`
`BrowserWindow.setTrafficLightPosition(position)` has been removed, the
@@ -58,6 +63,18 @@ The `ipcRenderer.sendTo()` API has been removed. It should be replaced by settin
The `senderId` and `senderIsMainFrame` properties of `IpcRendererEvent` have been removed as well.
### Removed: `app.runningUnderRosettaTranslation`
The `app.runningUnderRosettaTranslation` property has been removed.
Use `app.runningUnderARM64Translation` instead.
```js
// Removed
console.log(app.runningUnderRosettaTranslation)
// Replace with
console.log(app.runningUnderARM64Translation)
```
## Planned Breaking API Changes (27.0)
### Removed: macOS 10.13 / 10.14 support
@@ -716,6 +733,18 @@ to open synchronously scriptable child windows, among other incompatibilities.
See the documentation for [window.open in Electron](api/window-open.md)
for more details.
### Deprecated: `app.runningUnderRosettaTranslation`
The `app.runningUnderRosettaTranslation` property has been deprecated.
Use `app.runningUnderARM64Translation` instead.
```js
// Deprecated
console.log(app.runningUnderRosettaTranslation)
// Replace with
console.log(app.runningUnderARM64Translation)
```
## Planned Breaking API Changes (14.0)
### Removed: `remote` module

View File

@@ -12,7 +12,7 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | TBD | M118 | TBD | ✅ |
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-27 | M116 | v18.16 | ✅ |
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2024-Jan-02 | M114 | v18.15 | ✅ |
| 24.0.0 | 2022-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | ✅ |
| 24.0.0 | 2023-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | ✅ |
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-15 | M110 | v18.12 | 🚫 |
| 22.0.0 | 2022-Sep-29 | 2022-Oct-25 | 2022-Nov-29 | 2023-Oct-10 | M108 | v16.17 | ✅ |
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | 2023-Apr-04 | M106 | v16.16 | 🚫 |

View File

@@ -1,38 +0,0 @@
# ESM Limitations
This document serves to outline the limitations / differences between ESM in Electron and ESM in Node.js and Chromium.
## ESM Support Matrix
This table gives a general overview of where ESM is supported and most importantly which ESM loader is used.
| | Supported | Loader | Supported in Preload | Loader in Preload | Applicable Requirements |
|-|-|-|-|-|-|
| Main Process | Yes | Node.js | N/A | N/A | <ul><li> [You must `await` generously in the main process to avoid race conditions](#you-must-use-await-generously-in-the-main-process-to-avoid-race-conditions) </li></ul> |
| Sandboxed Renderer | Yes | Chromium | No | | <ul><li> [Sandboxed preload scripts can't use ESM imports](#sandboxed-preload-scripts-cant-use-esm-imports) </li></ul> |
| Node.js Renderer + Context Isolation | Yes | Chromium | Yes | Node.js | <ul><li> [Node.js ESM Preload Scripts will run after page load on pages with no content](#nodejs-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content) </li> <li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
| Node.js Renderer + No Context Isolation | Yes | Chromium | Yes | Node.js | <ul><li> [Non-context-isolated renderers can't use dynamic Node.js ESM imports](#non-context-isolated-renderers-cant-use-dynamic-nodejs-esm-imports) </li> <li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
## Requirements
### You must use `await` generously in the main process to avoid race conditions
Certain APIs in Electron (`app.setPath` for instance) are documented as needing to be called **before** the `app.on('ready')` event is emitted. When using ESM in the main process it is only guaranteed that the `ready` event hasn't been emitted while executing the side-effects of the primary import. i.e. if `index.mjs` calls `import('./set-up-paths.mjs')` at the top level the app will likely already be "ready" by the time that dynamic import resolves. To avoid this you should `await import('./set-up-paths.mjs')` at the top level of `index.mjs`. It's not just import calls you should await, if you are reading files asynchronously or performing other asynchronous actions you must await those at the top-level as well to ensure the app does not resume initialization and become ready too early.
### Sandboxed preload scripts can't use ESM imports
Sandboxed preload scripts are run as plain javascript without an ESM context. It is recommended that preload scripts are bundled via something like `webpack` or `vite` for performance reasons regardless, so your preload script should just be a single file that doesn't need to use ESM imports. Loading the `electron` API is still done via `require('electron')`.
### Node.js ESM Preload Scripts will run after page load on pages with no content
If the response body for the page is **completely** empty, i.e. `Content-Length: 0`, the preload script will not block the page load, which may result in race conditions. If this impacts you, change your response body to have _something_ in it, for example an empty `html` tag (`<html></html>`) or swap back to using a CommonJS preload script (`.js` or `.cjs`) which will block the page load.
### ESM Preload Scripts must have the `.mjs` extension
In order to load an ESM preload script it must have a `.mjs` file extension. Using `type: module` in a nearby package.json is not sufficient. Please also note the limitation above around not blocking page load if the page is empty.
### Non-context-isolated renderers can't use dynamic Node.js ESM imports
If your renderer process does not have `contextIsolation` enabled you can not `import()` ESM files via the Node.js module loader. This means that you can't `import('fs')` or `import('./foo')`. If you want to be able to do so you must enable context isolation. This is because in the renderer Chromium's `import()` function takes precedence and without context isolation there is no way for Electron to know which loader to route the request to.
If you enable context isolation `import()` from the isolated preload context will use the Node.js loader and `import()` from the main context will continue using Chromium's loader.

172
docs/tutorial/esm.md Normal file
View File

@@ -0,0 +1,172 @@
---
title: "ES Modules (ESM) in Electron"
description: "The ES module (ESM) format is the standard way of loading JavaScript packages."
slug: esm
hide_title: false
---
# ES Modules (ESM) in Electron
## Introduction
The ECMAScript module (ESM) format is [the standard way of loading JavaScript packages](https://tc39.es/ecma262/#sec-modules).
Chromium and Node.js have their own implementations of the ESM specification, and Electron
chooses which module loader to use depending on the context.
This document serves to outline the limitations of ESM in Electron and the differences between
ESM in Electron and ESM in Node.js and Chromium.
:::info
This feature was added in `electron@28.0.0`.
:::
## Summary: ESM support matrix
This table gives a general overview of where ESM is supported and which ESM loader is used.
| Process | ESM Loader | ESM Loader in Preload | Applicable Requirements |
|----------------------|------------|-----------------------|-------------------------|
| Main | Node.js | N/A | <ul><li> [You must use `await` generously before the app's `ready` event](#you-must-use-await-generously-before-the-apps-ready-event) </li></ul> |
| Renderer (Sandboxed) | Chromium | Unsupported | <ul><li> [Sandboxed preload scripts can't use ESM imports](#sandboxed-preload-scripts-cant-use-esm-imports) </li></ul> |
| Renderer (Unsandboxed & Context Isolated) | Chromium | Node.js | <ul><li> [Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content) </li> <li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
| Renderer (Unsandboxed & Non Context Isolated) | Chromium | Node.js | <ul><li>[Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content)</li><li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li><li>[ESM preload scripts must be context isolated to use dynamic Node.js ESM imports](#esm-preload-scripts-must-be-context-isolated-to-use-dynamic-nodejs-esm-imports)</li></ul> |
## Main process
Electron's main process runs in a Node.js context and uses its ESM loader. Usage should follow
[Node's ESM documentation](https://nodejs.org/api/esm.html). To enable ESM in a file in the
main process, one of the following conditions must be met:
- The file ends with the `.mjs` extension
- The nearest parent package.json has `"type": "module"` set
See Node's [Determining Module System](https://nodejs.org/api/packages.html#determining-module-system)
doc for more details.
### Caveats
#### You must use `await` generously before the app's `ready` event
ES Modules are loaded **asynchronously**. This means that only side effects
from the main process entry point's imports will execute before the `ready` event.
This is important because certain Electron APIs (e.g. [`app.setPath`](../api/app.md#appsetpathname-path))
need to be called **before** the app's `ready` event is emitted.
With top-level `await` available in Node.js ESM, make sure to `await` every Promise that you need to
execute before the `ready` event. Otherwise, your app may be `ready` before your code executes.
This is particularly important to keep in mind for dynamic ESM import statmements (static imports are unaffected).
For example, if `index.mjs` calls `import('./set-up-paths.mjs')` at the top level, the app will
likely already be `ready` by the time that dynamic import resolves.
```js @ts-expect-error=[2] title='index.mjs (Main Process)'
// add an await call here to guarantee that path setup will finish before `ready`
import('./set-up-paths.mjs')
app.whenReady().then(() => {
console.log('This code may execute before the above import')
})
```
:::caution Transpiler translations
JavaScript transpilers (e.g. Babel, TypeScript) have historically supported ES Module
syntax before Node.js supported ESM imports by turning these calls to CommonJS
`require` calls.
<details><summary>Example: @babel/plugin-transform-modules-commonjs</summary>
The `@babel/plugin-transform-modules-commonjs` plugin will transform
ESM imports down to `require` calls. The exact syntax will depend on the
[`importInterop` setting](https://babeljs.io/docs/babel-plugin-transform-modules-commonjs#importinterop).
```js @nolint @ts-nocheck title='@babel/plugin-transform-modules-commonjs'
import foo from "foo";
import { bar } from "bar";
foo;
bar;
// with "importInterop: node", compiles to ...
"use strict";
var _foo = require("foo");
var _bar = require("bar");
_foo;
_bar.bar;
```
</details>
These CommonJS calls load module code synchronously. If you are migrating transpiled CJS code
to native ESM, be careful about the timing differences between CJS and ESM.
:::
## Renderer process
Electron's renderer processes run in a Chromium context and will use Chromium's ESM loader.
In practice, this means that `import` statements:
- will not have access to Node.js built-in modules
- will not be able to load npm packages from `node_modules`
```html
<script type="module">
import { exists } from 'node:fs' // ❌ will not work!
</script>
```
If you wish to load JavaScript packages via npm directly into the renderer process, we recommend
using a bundler such as webpack or Vite to compile your code for client-side consumption.
## Preload scripts
A renderer's preload script will use the Node.js ESM loader _when available_.
ESM availability will depend on the values of its renderer's `sandbox` and `contextIsolation`
preferences, and comes with a few other caveats due to the asynchronous nature of ESM loading.
### Caveats
#### ESM preload scripts must have the `.mjs` extension
Preload scripts will ignore `"type": "module"` fields, so you _must_ use the `.mjs` file
extension in your ESM preload scripts.
#### Sandboxed preload scripts can't use ESM imports
Sandboxed preload scripts are run as plain JavaScript without an ESM context. If you need to
use external modules, we recommend using a bundler for your preload code. Loading the
`electron` API is still done via `require('electron')`.
For more information on sandboxing, see the [Process Sandboxing](./sandbox.md) docs.
#### Unsandboxed ESM preload scripts will run after page load on pages with no content
If the response body for a renderer's loaded page is _completely_ empty (i.e. `Content-Length: 0`),
its preload script will not block the page load, which may result in race conditions.
If this impacts you, change your response body to have _something_ in it
(e.g. an empty `html` tag (`<html></html>`)) or swap back to using a CommonJS preload script
(`.js` or `.cjs`), which will block the page load.
### ESM preload scripts must be context isolated to use dynamic Node.js ESM imports
If your unsandboxed renderer process does not have the `contextIsolation` flag enabled,
you cannot dynamically `import()` files via Node's ESM loader.
```js @ts-nocheck title='preload.mjs'
// ❌ these won't work without context isolation
const fs = await import('node:fs')
await import('./foo')
```
This is because Chromium's dynamic ESM `import()` function usually takes precedence in the
renderer process and without context isolation, there is no way of knowing if Node.js is available
in a dynamic import statement. If you enable context isolation, `import()` statements
from the renderer's isolated preload context can be routed to the Node.js module loader.

View File

@@ -228,6 +228,23 @@ channel with a renderer process using [`MessagePort`][]s. An Electron app can
always prefer the [UtilityProcess][] API over Node.js [`child_process.fork`][] API when
there is need to fork a child process from the main process.
## Process-specific module aliases (TypeScript)
Electron's npm package also exports subpaths that contain a subset of
Electron's TypeScript type definitions.
- `electron/main` includes types for all main process modules.
- `electron/renderer` includes types for all renderer process modules.
- `electron/common` includes types for modules that can run in main and renderer processes.
These aliases have no impact on runtime, but can be used for typechecking
and autocomplete.
```js title="Usage example"
const { app } = require('electron/main')
const { shell } = require('electron/common')
```
[window-mdn]: https://developer.mozilla.org/en-US/docs/Web/API/Window
[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
[`child_process.fork`]: https://nodejs.org/dist/latest-v16.x/docs/api/child_process.html#child_processforkmodulepath-args-options

View File

@@ -459,7 +459,14 @@ To summarize all the steps we've done:
The fastest way to distribute your newly created app is using
[Electron Forge](https://www.electronforge.io).
1. Add Electron Forge as a development dependency of your app, and use its `import` command to set up
:::info
To build an RPM package for Linux, you will need to [install its required system dependencies](https://www.electronforge.io/config/makers/rpm).
:::
1. Add a description to your `package.json` file, otherwise rpmbuild will fail. Blank description are not valid.
2. Add Electron Forge as a development dependency of your app, and use its `import` command to set up
Forge's scaffolding:
```sh npm2yarn
@@ -478,7 +485,7 @@ Forge's scaffolding:
Thanks for using "electron-forge"!!!
```
2. Create a distributable using Forge's `make` command:
3. Create a distributable using Forge's `make` command:
```sh npm2yarn
npm run make

View File

@@ -91,14 +91,14 @@ version: '0.1'
summary: Hello World Electron app
description: |
Simple Hello World Electron app as an example
base: core18
base: core22
confinement: strict
grade: stable
apps:
electron-packager-hello-world:
command: electron-quick-start/electron-quick-start --no-sandbox
extensions: [gnome-3-34]
extensions: [gnome]
plugs:
- browser-support
- network
@@ -237,6 +237,34 @@ apps:
desktop: usr/share/applications/desktop.desktop
```
## Optional: Enabling desktop capture
Capturing the desktop requires PipeWire library in some Linux configurations that use
the Wayland protocol. To bundle PipeWire with your application, ensure that the base
snap is set to `core22` or newer. Next, create a part called `pipewire` and add it to
the `after` section of your application:
```yaml
pipewire:
plugin: nil
build-packages: [libpipewire-0.3-dev]
stage-packages: [pipewire]
prime:
- usr/lib/*/pipewire-*
- usr/lib/*/spa-*
- usr/lib/*/libpipewire*.so*
- usr/share/pipewire
```
Finally, configure your application's environment for PipeWire:
```yaml
environment:
SPA_PLUGIN_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/spa-0.2
PIPEWIRE_CONFIG_NAME: $SNAP/usr/share/pipewire/pipewire.conf
PIPEWIRE_MODULE_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/pipewire-0.3
```
[snapcraft-syntax]: https://docs.snapcraft.io/build-snaps/syntax
[electron-packager]: https://github.com/electron/electron-packager
[electron-forge]: https://github.com/electron/forge

View File

@@ -222,14 +222,26 @@ with CommonJS module syntax:
- [app][app], which controls your application's event lifecycle.
- [BrowserWindow][browser-window], which creates and manages app windows.
:::info Capitalization conventions
<details><summary>Module capitalization conventions</summary>
You might have noticed the capitalization difference between the **a**pp
and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here,
where PascalCase modules are instantiable class constructors (e.g. BrowserWindow, Tray,
Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRenderer, webContents).
:::
</details>
<details><summary>Typed import aliases</summary>
For better type checking when writing TypeScript code, you can choose to import
main process modules from <code>electron/main</code>.
```js
const { app, BrowserWindow } = require('electron/main')
```
For more information, see the [Process Model docs](../tutorial/process-model.md#process-specific-module-aliases-typescript).
</details>
:::warning ES Modules in Electron

View File

@@ -142,6 +142,7 @@ auto_filenames = {
]
sandbox_bundle_deps = [
"lib/common/api/deprecate.ts",
"lib/common/api/native-image.ts",
"lib/common/define-properties.ts",
"lib/common/ipc-messages.ts",
@@ -247,11 +248,11 @@ auto_filenames = {
"lib/browser/parse-features-string.ts",
"lib/browser/rpc-server.ts",
"lib/browser/web-view-events.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
"lib/common/define-properties.ts",
"lib/common/deprecate.ts",
"lib/common/init.ts",
"lib/common/ipc-messages.ts",
"lib/common/reset-search-paths.ts",
@@ -265,6 +266,7 @@ auto_filenames = {
]
renderer_bundle_deps = [
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
@@ -303,6 +305,7 @@ auto_filenames = {
]
worker_bundle_deps = [
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",

View File

@@ -339,6 +339,7 @@ filenames = {
"shell/browser/api/ui_event.h",
"shell/browser/auto_updater.cc",
"shell/browser/auto_updater.h",
"shell/browser/background_throttling_source.h",
"shell/browser/badging/badge_manager.cc",
"shell/browser/badging/badge_manager.h",
"shell/browser/badging/badge_manager_factory.cc",

View File

@@ -1,4 +1,5 @@
import { Buffer } from 'buffer';
import { constants } from 'fs';
import * as path from 'path';
import * as util from 'util';
import type * as Crypto from 'crypto';
@@ -75,18 +76,22 @@ const gid = process.getgid?.() ?? 0;
const fakeTime = new Date();
enum AsarFileType {
kFile = (constants as any).UV_DIRENT_FILE,
kDirectory = (constants as any).UV_DIRENT_DIR,
kLink = (constants as any).UV_DIRENT_LINK,
}
const fileTypeToMode = new Map<AsarFileType, number>([
[AsarFileType.kFile, constants.S_IFREG],
[AsarFileType.kDirectory, constants.S_IFDIR],
[AsarFileType.kLink, constants.S_IFLNK]
]);
const asarStatsToFsStats = function (stats: NodeJS.AsarFileStat) {
const { Stats, constants } = require('fs');
const { Stats } = require('fs');
let mode = constants.S_IROTH ^ constants.S_IRGRP ^ constants.S_IRUSR ^ constants.S_IWUSR;
if (stats.isFile) {
mode ^= constants.S_IFREG;
} else if (stats.isDirectory) {
mode ^= constants.S_IFDIR;
} else if (stats.isLink) {
mode ^= constants.S_IFLNK;
}
const mode = constants.S_IROTH | constants.S_IRGRP | constants.S_IRUSR | constants.S_IWUSR | fileTypeToMode.get(stats.type)!;
return new Stats(
1, // dev
@@ -249,7 +254,6 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
const logASARAccess = (asarPath: string, filePath: string, offset: number) => {
if (!process.env.ELECTRON_LOG_ASAR_READS) return;
if (!logFDs.has(asarPath)) {
const path = require('path');
const logFilename = `${path.basename(asarPath, '.asar')}-access-log.txt`;
const logPath = path.join(require('os').tmpdir(), logFilename);
logFDs.set(asarPath, fs.openSync(logPath, 'a'));
@@ -676,13 +680,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
nextTick(callback!, [error]);
return;
}
if (stats.isFile) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_FILE));
} else if (stats.isDirectory) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_DIR));
} else if (stats.isLink) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_LINK));
}
dirents.push(new fs.Dirent(file, stats.type));
}
nextTick(callback!, [null, dirents]);
return;
@@ -719,13 +717,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
if (!stats) {
throw createError(AsarError.NOT_FOUND, { asarPath, filePath: childPath });
}
if (stats.isFile) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_FILE));
} else if (stats.isDirectory) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_DIR));
} else if (stats.isLink) {
dirents.push(new fs.Dirent(file, fs.constants.UV_DIRENT_LINK));
}
dirents.push(new fs.Dirent(file, stats.type));
}
return dirents;
}
@@ -776,7 +768,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
const stats = archive.stat(filePath);
if (!stats) return -34;
return (stats.isDirectory) ? 1 : 0;
return (stats.type === AsarFileType.kDirectory) ? 1 : 0;
};
// Calling mkdir for directory inside asar archive should throw ENOTDIR

View File

@@ -1,7 +1,6 @@
import * as fs from 'fs';
import { Menu } from 'electron/main';
import * as deprecate from '@electron/internal/common/deprecate';
import { Menu, deprecate } from 'electron/main';
const bindings = process._linkedBinding('electron_browser_app');
const commandLine = process._linkedBinding('electron_common_command_line');
@@ -114,5 +113,11 @@ for (const name of events) {
}
// Deprecation.
deprecate.event(app, 'gpu-process-crashed', 'child-process-gone');
deprecate.event(app, 'renderer-process-crashed', 'render-process-gone');
deprecate.event(app, 'gpu-process-crashed', 'child-process-gone', () => {
// the old event is still emitted by App::OnGpuProcessCrashed()
return undefined;
});
deprecate.event(app, 'renderer-process-crashed', 'render-process-gone', (event: Electron.Event, webContents: Electron.WebContents, details: Electron.RenderProcessGoneDetails) => {
return [event, webContents, details.reason === 'killed'];
});

View File

@@ -1,5 +1,4 @@
import { app } from 'electron/main';
import * as deprecate from '@electron/internal/common/deprecate';
import { app, deprecate } from 'electron/main';
const binding = process._linkedBinding('electron_browser_crash_reporter');

View File

@@ -1,4 +1,4 @@
import { app, ipcMain, session, webFrameMain } from 'electron/main';
import { app, ipcMain, session, webFrameMain, deprecate } from 'electron/main';
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
import * as url from 'url';
@@ -10,7 +10,6 @@ import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-util
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
import * as deprecate from '@electron/internal/common/deprecate';
// session is not used here, the purpose is to make sure session is initialized
// before the webContents module.
@@ -345,49 +344,53 @@ WebContents.prototype.printToPDF = async function (options) {
// TODO(codebytere): deduplicate argument sanitization by moving rest of
// print param logic into new file shared between printToPDF and print
WebContents.prototype.print = function (options: ElectronInternal.WebContentsPrintOptions, callback) {
if (typeof options === 'object') {
const pageSize = options.pageSize ?? 'A4';
if (typeof pageSize === 'object') {
if (!pageSize.height || !pageSize.width) {
throw new Error('height and width properties are required for pageSize');
}
if (typeof options !== 'object') {
throw new Error('webContents.print(): Invalid print settings specified.');
}
// Dimensions in Microns - 1 meter = 10^6 microns
const height = Math.ceil(pageSize.height);
const width = Math.ceil(pageSize.width);
if (!isValidCustomPageSize(width, height)) {
throw new Error('height and width properties must be minimum 352 microns.');
}
const printSettings: Record<string, any> = { ...options };
options.mediaSize = {
name: 'CUSTOM',
custom_display_name: 'Custom',
height_microns: height,
width_microns: width,
imageable_area_left_microns: 0,
imageable_area_bottom_microns: 0,
imageable_area_right_microns: width,
imageable_area_top_microns: height
};
} else if (typeof pageSize === 'string' && PDFPageSizes[pageSize]) {
const mediaSize = PDFPageSizes[pageSize];
options.mediaSize = {
...mediaSize,
imageable_area_left_microns: 0,
imageable_area_bottom_microns: 0,
imageable_area_right_microns: mediaSize.width_microns,
imageable_area_top_microns: mediaSize.height_microns
};
} else {
throw new Error(`Unsupported pageSize: ${pageSize}`);
const pageSize = options.pageSize ?? 'A4';
if (typeof pageSize === 'object') {
if (!pageSize.height || !pageSize.width) {
throw new Error('height and width properties are required for pageSize');
}
// Dimensions in Microns - 1 meter = 10^6 microns
const height = Math.ceil(pageSize.height);
const width = Math.ceil(pageSize.width);
if (!isValidCustomPageSize(width, height)) {
throw new Error('height and width properties must be minimum 352 microns.');
}
printSettings.mediaSize = {
name: 'CUSTOM',
custom_display_name: 'Custom',
height_microns: height,
width_microns: width,
imageable_area_left_microns: 0,
imageable_area_bottom_microns: 0,
imageable_area_right_microns: width,
imageable_area_top_microns: height
};
} else if (typeof pageSize === 'string' && PDFPageSizes[pageSize]) {
const mediaSize = PDFPageSizes[pageSize];
printSettings.mediaSize = {
...mediaSize,
imageable_area_left_microns: 0,
imageable_area_bottom_microns: 0,
imageable_area_right_microns: mediaSize.width_microns,
imageable_area_top_microns: mediaSize.height_microns
};
} else {
throw new Error(`Unsupported pageSize: ${pageSize}`);
}
if (this._print) {
if (callback) {
this._print(options, callback);
this._print(printSettings, callback);
} else {
this._print(options);
this._print(printSettings);
}
} else {
console.error('Error: Printing feature is disabled.');
@@ -661,8 +664,8 @@ WebContents.prototype._init = function () {
ipcMain.emit(channel, event, message);
});
this.on('crashed', (event, ...args) => {
app.emit('renderer-process-crashed', event, this, ...args);
deprecate.event(this, 'crashed', 'render-process-gone', (event: Electron.Event, details: Electron.RenderProcessGoneDetails) => {
return [event, details.reason === 'killed'];
});
this.on('render-process-gone', (event, details) => {

View File

@@ -2,13 +2,13 @@ type DeprecationHandler = (message: string) => void;
let deprecationHandler: DeprecationHandler | null = null;
export function warnOnce (oldName: string, newName?: string) {
function warnOnce (oldName: string, newName?: string) {
return warnOnceMessage(newName
? `'${oldName}' is deprecated and will be removed. Please use '${newName}' instead.`
: `'${oldName}' is deprecated and will be removed.`);
}
export function warnOnceMessage (msg: string) {
function warnOnceMessage (msg: string) {
let warned = false;
return () => {
if (!warned && !process.noDeprecation) {
@@ -18,21 +18,21 @@ export function warnOnceMessage (msg: string) {
};
}
export function setHandler (handler: DeprecationHandler | null): void {
function setHandler (handler: DeprecationHandler | null): void {
deprecationHandler = handler;
}
export function getHandler (): DeprecationHandler | null {
function getHandler (): DeprecationHandler | null {
return deprecationHandler;
}
export function warn (oldName: string, newName: string): void {
function warn (oldName: string, newName: string): void {
if (!process.noDeprecation) {
log(`'${oldName}' is deprecated. Use '${newName}' instead.`);
}
}
export function log (message: string): void {
function log (message: string): void {
if (typeof deprecationHandler === 'function') {
deprecationHandler(message);
} else if (process.throwDeprecation) {
@@ -45,7 +45,7 @@ export function log (message: string): void {
}
// remove a function with no replacement
export function removeFunction<T extends Function> (fn: T, removedName: string): T {
function removeFunction<T extends Function> (fn: T, removedName: string): T {
if (!fn) { throw new Error(`'${removedName} function' is invalid or does not exist.`); }
// wrap the deprecated function to warn user
@@ -57,7 +57,7 @@ export function removeFunction<T extends Function> (fn: T, removedName: string):
}
// change the name of a function
export function renameFunction<T extends Function> (fn: T, newName: string): T {
function renameFunction<T extends Function> (fn: T, newName: string): T {
const warn = warnOnce(`${fn.name} function`, `${newName} function`);
return function (this: any) {
warn();
@@ -66,20 +66,23 @@ export function renameFunction<T extends Function> (fn: T, newName: string): T {
}
// change the name of an event
export function event (emitter: NodeJS.EventEmitter, oldName: string, newName: string) {
function event (emitter: NodeJS.EventEmitter, oldName: string, newName: string, transformer: (...args: any[]) => any[] | undefined = (...args) => args) {
const warn = newName.startsWith('-') /* internal event */
? warnOnce(`${oldName} event`)
: warnOnce(`${oldName} event`, `${newName} event`);
return emitter.on(newName, function (this: NodeJS.EventEmitter, ...args) {
if (this.listenerCount(oldName) !== 0) {
warn();
this.emit(oldName, ...args);
const transformedArgs = transformer(...args);
if (transformedArgs) {
this.emit(oldName, ...transformedArgs);
}
}
});
}
// remove a property with no replacement
export function removeProperty<T, K extends (keyof T & string)>(object: T, removedName: K, onlyForValues?: any[]): T {
function removeProperty<T extends Object, K extends (keyof T & string)>(object: T, removedName: K, onlyForValues?: any[]): T {
// if the property's already been removed, warn about it
// eslint-disable-next-line no-proto
const info = Object.getOwnPropertyDescriptor((object as any).__proto__, removedName);
@@ -110,7 +113,7 @@ export function removeProperty<T, K extends (keyof T & string)>(object: T, remov
}
// change the name of a property
export function renameProperty<T extends Object, K extends (keyof T & string)>(object: T, oldName: string, newName: K): T {
function renameProperty<T extends Object, K extends (keyof T & string)>(object: T, oldName: string, newName: K): T {
const warn = warnOnce(oldName, newName);
// if the new property isn't there yet,
@@ -134,10 +137,27 @@ export function renameProperty<T extends Object, K extends (keyof T & string)>(o
});
}
export function moveAPI<T extends Function> (fn: T, oldUsage: string, newUsage: string): T {
function moveAPI<T extends Function> (fn: T, oldUsage: string, newUsage: string): T {
const warn = warnOnce(oldUsage, newUsage);
return function (this: any) {
warn();
return fn.apply(this, arguments);
} as unknown as typeof fn;
}
const deprecate: ElectronInternal.DeprecationUtil = {
warnOnce,
warnOnceMessage,
setHandler,
getHandler,
warn,
log,
removeFunction,
renameFunction,
event,
removeProperty,
renameProperty,
moveAPI
};
export default deprecate;

View File

@@ -1,5 +1,7 @@
// Common modules, please sort alphabetically
export const commonModuleList: ElectronInternal.ModuleEntry[] = [
{ name: 'nativeImage', loader: () => require('./native-image') },
{ name: 'shell', loader: () => require('./shell') }
{ name: 'shell', loader: () => require('./shell') },
// The internal modules, invisible unless you know their names.
{ name: 'deprecate', loader: () => require('./deprecate'), private: true }
];

View File

@@ -9,7 +9,7 @@ export function defineProperties (targetExports: Object, moduleList: ElectronInt
const descriptors: PropertyDescriptorMap = {};
for (const module of moduleList) {
descriptors[module.name] = {
enumerable: true,
enumerable: !module.private,
get: handleESModule(module.loader)
};
}

View File

@@ -18,5 +18,11 @@ export const moduleList: ElectronInternal.ModuleEntry[] = [
{
name: 'webFrame',
loader: () => require('@electron/internal/renderer/api/web-frame')
},
// The internal modules, invisible unless you know their names.
{
name: 'deprecate',
loader: () => require('@electron/internal/common/api/deprecate'),
private: true
}
];

View File

@@ -1,5 +1,7 @@
import { pathToFileURL } from 'url';
import { ParentPort } from '@electron/internal/utility/parent-port';
const Module = require('module') as NodeJS.ModuleInternal;
const v8Util = process._linkedBinding('electron_common_v8_util');
const entryScript: string = v8Util.getHiddenValue(process, '_serviceStartupScript');
@@ -34,5 +36,14 @@ parentPort.on('removeListener', (name: string) => {
});
// Finally load entry script.
process._firstFileName = Module._resolveFilename(entryScript, null, false);
Module._load(entryScript, Module, true);
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
const mainEntry = pathToFileURL(entryScript);
loadESM(async (esmLoader: any) => {
try {
await esmLoader.import(mainEntry.toString(), undefined, Object.create(null));
} catch (err) {
// @ts-ignore internalBinding is a secret internal global that we shouldn't
// really be using, so we ignore the type error instead of declaring it in types
internalBinding('errors').triggerUncaughtException(err);
}
});

View File

@@ -20,10 +20,10 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index 5a2ac2a8f586f2b90e4eb2989b05406a5e434769..2cac586039713df70e57eee5ecedbfc9f8d33510 100644
index 58b68e6759650b9a2a3915aa343451bdd1ec1e89..a709ab4067a001ce1087f89c3b5d66e99ba0d4f7 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1333,7 +1333,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -1334,7 +1334,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
}
if (ret_code == 0) {
@@ -32,7 +32,7 @@ index 5a2ac2a8f586f2b90e4eb2989b05406a5e434769..2cac586039713df70e57eee5ecedbfc9
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2697,13 +2697,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2705,13 +2705,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

View File

@@ -124,6 +124,7 @@ feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
fix_remove_profiles_from_spellcheck_service.patch
chore_patch_out_profile_methods_in_chrome_browser_pdf.patch
chore_patch_out_profile_methods_in_titlebar_config.patch
fix_disabling_background_throttling_in_compositor.patch
fix_select_the_first_menu_item_when_opened_via_keyboard.patch
fix_return_v8_value_from_localframe_requestexecutescript.patch
fix_harden_blink_scriptstate_maybefrom.patch
@@ -134,4 +135,3 @@ fix_activate_background_material_on_windows.patch
fix_move_autopipsettingshelper_behind_branding_buildflag.patch
revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch
fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch
revert_same_site_cookie_removal.patch

View File

@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8c290f99c 100644
index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba9302780650952ecfa47 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@@ -21,7 +21,7 @@ index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -238,6 +239,11 @@ std::u16string Accelerator::GetShortcutText() const {
@@ -175,6 +176,11 @@ std::u16string Accelerator::GetShortcutText() const {
#endif
if (shortcut.empty()) {
@@ -33,7 +33,7 @@ index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8
#if BUILDFLAG(IS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -261,6 +267,10 @@ std::u16string Accelerator::GetShortcutText() const {
@@ -198,6 +204,10 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut +=
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
#endif
@@ -44,7 +44,7 @@ index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8
}
#if BUILDFLAG(IS_MAC)
@@ -445,7 +455,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -382,7 +392,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
const std::u16string& shortcut) const {
std::u16string result = shortcut;
@@ -53,7 +53,7 @@ index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
@@ -453,7 +463,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -390,7 +400,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);

View File

@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index d1e9ad95891487b37e2e03cb2a220eb969e877ab..13bdc6cf7ba4221f0a3219975a0825eb62dd0b78 100644
index a4bf5bb618510ef5ef2ab2d05405cfd3688e97af..7a12c0ecb7254fe335c5563f3fd04c629abe065f 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -140,6 +140,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidHandleOnloadEvents() {}
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
int32_t world_id) {}
@@ -23,10 +23,10 @@ index d1e9ad95891487b37e2e03cb2a220eb969e877ab..13bdc6cf7ba4221f0a3219975a0825eb
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2891a0dae415c642dc2bcaf1834fa5fc18fdd5e9..8fa09fdc00f31f41b6b50e77b38abe264a01bfed 100644
index 925b1a7b72bba63a2f2f10da9da1814ff94711e0..345b15d2ee2f5f3b08f63801ee179bfe7a8e330e 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4441,6 +4441,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 2891a0dae415c642dc2bcaf1834fa5fc18fdd5e9..8fa09fdc00f31f41b6b50e77b38abe26
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index bbca34db538e7fcfa54a845485e4c3e93507b754..988dafcd1f22c7e74386308825556f71e1b69ff1 100644
index 9afa054b3927a9441824ba7b34737d0951d85021..8ed97dce0ee37207f6b77c04432f7c18c90faa0b 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -611,6 +611,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -612,6 +612,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,7 +53,7 @@ index bbca34db538e7fcfa54a845485e4c3e93507b754..988dafcd1f22c7e74386308825556f71
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index cb4cd28c051c3ac4f97981e44636a6ea7d311c39..8eb2fd06f694c2c390427a0e981960f9292e9659 100644
index e1dcfa8fa880f9d49445cb4501b2d79037c9bcf6..96df60413bee371797acc73bb5062692d359ff2c 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -620,6 +620,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -79,10 +79,10 @@ index 5030619779b7bcd67923026991bb44d926d81e1a..1eea33740fcdca49e094ad7ad00cfda8
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 61acd17afbe3ea1a6c2e40687709deee6b767df5..0413dda58f6de06f2dcd112b912c124626b19f85 100644
index 286abd6bde7d57cf31621a61828e9d117ed9f721..16919d708515f0e1f0b713833f640db34e996482 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -321,6 +321,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -320,6 +320,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,10 +92,10 @@ index 61acd17afbe3ea1a6c2e40687709deee6b767df5..0413dda58f6de06f2dcd112b912c1246
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 65642d9cc3b021acb6b0be310db782514379f627..cd0a381fbe6dc478c8c0779c351270b5b4d818f9 100644
index f9ac78c377548164e28e6485b39044741f1053e8..2b82d3c3c7e14dd03f5ce6eda3c4eb759e9765fd 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -282,6 +282,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -281,6 +281,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@@ -110,7 +110,7 @@ index 65642d9cc3b021acb6b0be310db782514379f627..cd0a381fbe6dc478c8c0779c351270b5
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index ee4555b8ee7eab9b1ef7ef532fe94649f60c36b1..02b8bd5ce9579b4517f8188cfcb28f60012f6ce1 100644
index acf2f38bc94c55af79682c0003f5a3695210f91d..11c487843b05eda5986cd5de9ae13a70f02f8667 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {

View File

@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index e0e9996e78046fb626198beccbd08f20fc3b574d..90ad87295c197db4853056b0650e6f769de67b9d 100755
index 9535c354a29fb5f5e98fdc60edeff2bdac40d69f..b9dcbe91ca6fd16d1d53cec6a589116ba7f7797d 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -413,6 +413,31 @@ SPECIAL_CASES = {

View File

@@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused
by decoration shadows and rounded titlebars around the window while maximized.
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
index f315a30f882c17623e1f33bcd90ff8d9ae11f4c4..b22a8d627935f5554cfb524bcf5d5d8948f38f2f 100644
index a91b303e77f4b5b47742d12749eb70d857e0badf..284174aa697b3379863e0aa440b5d03c6b06f8e3 100644
--- a/ui/gtk/gtk_ui.cc
+++ b/ui/gtk/gtk_ui.cc
@@ -517,12 +517,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
@@ -523,12 +523,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
return std::make_unique<gtk::NavButtonProviderGtk>();
}
@@ -31,10 +31,10 @@ index f315a30f882c17623e1f33bcd90ff8d9ae11f4c4..b22a8d627935f5554cfb524bcf5d5d89
}
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
index c257b869f0c790f8af1f29d42e5ceb9e40344d8a..5184aa47dda70beb2f66e6227b17b632970a5a33 100644
index 8ae3369be0b628ce94eeb067b2be9f3ace31eccb..520de739d2f6f63757c15bf738c9c09b71c2a479 100644
--- a/ui/gtk/gtk_ui.h
+++ b/ui/gtk/gtk_ui.h
@@ -108,7 +108,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
@@ -109,7 +109,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
bool PreferDarkTheme() const override;
void SetDarkTheme(bool dark) override;
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
@@ -43,7 +43,7 @@ index c257b869f0c790f8af1f29d42e5ceb9e40344d8a..5184aa47dda70beb2f66e6227b17b632
private:
using TintMap = std::map<int, color_utils::HSL>;
@@ -208,6 +208,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
@@ -200,6 +200,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
// while Chrome is running.
std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;

View File

@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 631d43c65168bbc3843c5c848aee65ab9c0f761d..c0fea3501857bcbb2bdbc44e8852852579a7ee16 100644
index 914e4cdd97154c2f0986f85b0ca5e48fbd518160..d1ce82f3137dc8de3722c6406b63c47fe878e68e 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -716,6 +716,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -99,7 +99,7 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152
// 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 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9 100644
index acb43e9f5471ef78a260e76b3d0086f323e88235..31c22cd29208ef2ea1d02394b613ada32863db68 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2407,6 +2407,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -113,7 +113,7 @@ index 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fd
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 &&
@@ -3875,20 +3879,34 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3883,20 +3887,34 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}

View File

@@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes
This allows unsandboxed child process to launch setuid processes on Linux.
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index ff73345339ccaa9d5375184efb13185ed9f0a298..bd80ca431a5c50ac001d7607841c64e90f4fe4c3 100644
index 321faab043958d4be412f7b1f50931d0d9d42886..94d18b775d432cfeeb4d2db6091adda179dc6e6b 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -63,6 +63,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(

View File

@@ -49,7 +49,7 @@ index e0ce2a1bcbef7ece6b320adf820ba49148a66fd7..6aefdcfc226089ab3ae149b75ebdc86b
// 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 89a5c996ec908a2f70d2c8b873b2efc70513830f..a25361b1673083cb25125b84948daed18ea394b5 100644
index 2782ad135f843c1b61dfd0882f000e627b4d59a4..bb6e6804a49c10e5d0238aea61e4676a9dcfb72d 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

View File

@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
to introduce a new Electron category for Electron-specific tracing.
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
index 292e5ce4922b37a642233a70672d777f5ec6143a..2da2d79a05b0fbb4c53a21136cf47f51635afa03 100644
index 2f9a9813f863caa8f444bbcf64806826f5a8febb..ca6eaa5e0925936a3e6a4343c7b992b6a3e045ed 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -80,6 +80,8 @@
@@ -81,6 +81,8 @@
X("drm") \
X("drmcursor") \
X("dwrite") \

View File

@@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
index 622af2267251b3161f500e10ec667c184139285a..0c1a4e12483838ae3cbfb425173d8cd892eeee94 100644
index a6306a0e042d9fa58568d690fdc76f973782299f..72e47348b644d49e1f63b0693fad01df3bb24f01 100644
--- a/build_overrides/partition_alloc.gni
+++ b/build_overrides/partition_alloc.gni
@@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere =

View File

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 200379c8f6c933f3877fc4c6b983ca64214b8d9e..d76d319cbd13f94d204fb60f0d8f564557a6fa08 100644
index dcf02923c21e1c4c292eb800f6325e4bb764c823..8738860b44f179685198d2c0b9729fccbf6ebd6c 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -199,11 +199,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index 200379c8f6c933f3877fc4c6b983ca64214b8d9e..d76d319cbd13f94d204fb60f0d8f5645
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index f4f8b927dfe337ba717486debbd8c9e98632585e..83f3919ba4d2d6a1ba39e3521ca3a695ab66c367 100644
index 157ee5cadc0a7bf97be0fc8bf34adb858beea1f1..20303e1712ff917a6c145ab9b1bd71524d998a7f 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4767,7 +4767,7 @@ static_library("browser") {
@@ -4797,7 +4797,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@@ -46,10 +46,10 @@ index f4f8b927dfe337ba717486debbd8c9e98632585e..83f3919ba4d2d6a1ba39e3521ca3a695
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 7600b1046439e1cc7046d41547f22d7f81b42f87..e3f065f977c561e35f6e369ae2a8e0fb08d723a1 100644
index 6b98993d6737c22883bd9ddb31eda60060795e94..d1c6cce7ed68d1d523bd6683529e6ab003ace8e7 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6854,7 +6854,6 @@ test("unit_tests") {
@@ -6899,7 +6899,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@@ -57,7 +57,7 @@ index 7600b1046439e1cc7046d41547f22d7f81b42f87..e3f065f977c561e35f6e369ae2a8e0fb
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -6875,6 +6874,10 @@ test("unit_tests") {
@@ -6920,6 +6919,10 @@ test("unit_tests") {
"//ui/resources",
]
@@ -68,7 +68,7 @@ index 7600b1046439e1cc7046d41547f22d7f81b42f87..e3f065f977c561e35f6e369ae2a8e0fb
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -7852,7 +7855,6 @@ test("unit_tests") {
@@ -7905,7 +7908,6 @@ test("unit_tests") {
}
deps += [
@@ -76,7 +76,7 @@ index 7600b1046439e1cc7046d41547f22d7f81b42f87..e3f065f977c561e35f6e369ae2a8e0fb
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
@@ -7938,6 +7940,10 @@ test("unit_tests") {
@@ -7992,6 +7994,10 @@ test("unit_tests") {
"//ui/webui/resources/js/browser_command:mojo_bindings",
]
@@ -86,4 +86,4 @@ index 7600b1046439e1cc7046d41547f22d7f81b42f87..e3f065f977c561e35f6e369ae2a8e0fb
+
data += [ "//ash/components/arc/test/data/icons/" ]
if (include_js2gtest_tests) {
if (include_js2gtest_tests && is_chromeos_ash) {

View File

@@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
diff --git a/base/BUILD.gn b/base/BUILD.gn
index cf62fd258b9074679e9adc19777e871fff00433a..76f1af0a22ea7a018d281523347c018f68f37eb9 100644
index 55479f4187323ad0f26dbbda555c0ff3093cc8d5..a9cf41bce37672d355373568b04fbda45210a6d8 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1031,6 +1031,7 @@ component("base") {
@@ -1032,6 +1032,7 @@ component("base") {
"//build/config/compiler:prevent_unsafe_narrowing",
"//build/config/compiler:wexit_time_destructors",
"//build/config/compiler:wglobal_constructors",
@@ -42,7 +42,7 @@ index c4bca6fca7c990222b0bf65087d14b21b01c1b5f..b95e2f3824ac4a029fb98a8d7e24f47e
if (is_win) {
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6b3d752de 100644
index 0369b1efab3783c0c61e086f82b3724772e4dff0..11a35c9f611fba4f5313994e41a440658cbe040a 100644
--- a/components/remote_cocoa/app_shim/BUILD.gn
+++ b/components/remote_cocoa/app_shim/BUILD.gn
@@ -16,6 +16,7 @@ component("app_shim") {
@@ -54,10 +54,10 @@ index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6
"alert.h",
"alert.mm",
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182dee047a20 100644
index 3029fda279a6e2062115ac7fc7ade32e4a3aecd2..a76eb15b7498e13933331f221d8b7314c9004131 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -336,6 +336,7 @@ viz_component("service") {
@@ -337,6 +337,7 @@ viz_component("service") {
"frame_sinks/external_begin_frame_source_mac.h",
]
}
@@ -65,7 +65,7 @@ index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182d
}
if (is_android || use_ozone) {
@@ -594,6 +595,7 @@ viz_source_set("unit_tests") {
@@ -595,6 +596,7 @@ viz_source_set("unit_tests") {
"display_embedder/software_output_device_mac_unittest.mm",
]
frameworks = [ "IOSurface.framework" ]
@@ -74,10 +74,10 @@ index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182d
if (is_win) {
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 0647eaaf0a1991ef7861d105b74222b70401a856..2de832c1c5d4b4492d7b8aabaf403151ba29cb5b 100644
index 75d8a3fa0083a82587ba6d429286764db37ba84d..7643533c471d0ccbcc8a38dfc050bad1e41fe130 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -59,6 +59,7 @@ source_set("browser") {
@@ -51,6 +51,7 @@ source_set("browser") {
"//content:content_implementation",
"//v8:external_startup_data",
]
@@ -86,10 +86,10 @@ index 0647eaaf0a1991ef7861d105b74222b70401a856..2de832c1c5d4b4492d7b8aabaf403151
libs = []
frameworks = []
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 9c9f6d58a8e5c1ed14eb60c722667d1a24d2c6fa..34979dbbd84da86db079b423967ab8b775b47c52 100644
index 0c72e7f246f3d0b46c4902dfbe0f9ec647e47c26..bd2afdf7630f4b3f5f2b99fe8d1bd226d3c7c6e0 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -176,6 +176,7 @@ source_set("common") {
@@ -182,6 +182,7 @@ source_set("common") {
"//content:content_implementation",
"//build/config:precompiled_headers",
]
@@ -110,7 +110,7 @@ index 5ab406dbebe5c159c6e209f8844bf6fabd47199f..224c45b7bff3c4073c70bbd8bdc1fd1c
public_deps = [
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 77b0b977f21a9ceb7efc4c46bfc24e410352a88e..48380262ae5a993f5355a2f7d2a44b06b90b48e4 100644
index e08104a1a983176406483d97f8affa0c88b33a7a..a41b409ce8f08e20375504b324df7e1e75f6684d 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -484,6 +484,7 @@ static_library("test_support") {
@@ -122,7 +122,7 @@ index 77b0b977f21a9ceb7efc4c46bfc24e410352a88e..48380262ae5a993f5355a2f7d2a44b06
public_deps = [
diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn
index 5fcb135fdcdee5022e5caed46dece4e304495bfe..83cc95b1086b0619be019d7b797f3395910884b7 100644
index 5cd75b5bd5dcf31b6a589f69c1086b429c533923..924b5205cd38a80db38d505d8fd9263da77bf3af 100644
--- a/content/web_test/BUILD.gn
+++ b/content/web_test/BUILD.gn
@@ -145,6 +145,8 @@ static_library("web_test_browser") {
@@ -132,8 +132,8 @@ index 5fcb135fdcdee5022e5caed46dece4e304495bfe..83cc95b1086b0619be019d7b797f3395
+ configs += ["//electron/build/config:mas_build"]
+
if (is_mac) {
sources += [
"browser/web_test_browser_main_platform_support_mac.mm",
sources += [ "browser/web_test_shell_platform_delegate_mac.mm" ]
} else if (toolkit_views && !is_castos) {
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
index 003a2504dd6810160924065e3acd65e6703fdcba..d9e0c2e88d55fe82c6ae98aef0adecf01d88a4fc 100644
--- a/device/bluetooth/BUILD.gn
@@ -159,13 +159,13 @@ index 090bbd6f03c5749aaf763dac9e52c776f366c33d..5143231f5b3c95f55bf12aaedf253781
if (is_ios) {
sources += [ "image_transport_surface_ios.mm" ]
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index 93cf87a37792691f41d7c611104a378d9af45195..2d3a0f923f4991be41534e7f951fe5dfcceda5c9 100644
index e938775a9f4eccc31a6bc616cd25d45660d563cd..e232fff1f156844ba4c2919112f26bae9e1867c6 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -199,6 +199,7 @@ source_set("audio") {
"mac/coreaudio_dispatch_override.h",
@@ -206,6 +206,7 @@ source_set("audio") {
"CoreMedia.framework",
]
frameworks += [ "AudioUnit.framework" ]
weak_frameworks = [ "ScreenCaptureKit.framework" ] # macOS 13.0
+ configs += ["//electron/build/config:mas_build"]
}
@@ -212,7 +212,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
source_set("sandbox_unittests") {
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index ea945ef532688367a86f2858f6b03f4b571acdc4..9286ef801349aeef8e9234a6f5e5f0390812cbf8 100644
index 77c1ee82fc5cca302148445fb6f2f975bb41c23e..90ab237f45e751b95b061146bb3f3f9a87763c1d 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -309,6 +309,7 @@ component("core") {
@@ -249,7 +249,7 @@ index 4e23c38763184840a393589b3f55dcabb0db8121..e4ad30d0d7acecdca3a22fe05935a340
if (use_atk) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 80ca25f1b7d3562d29a76fe725f54eca7ce179f2..76232879cb6454f433907ab71b10ddaf047e82fe 100644
index ebdd885b00da86656bec13fb45a763ef49209d3e..614d07f318870db973f47d41f935c03f08970736 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -359,6 +359,7 @@ component("base") {
@@ -261,7 +261,7 @@ index 80ca25f1b7d3562d29a76fe725f54eca7ce179f2..76232879cb6454f433907ab71b10ddaf
if (is_apple) {
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
index 7e17546f658ce0e6908f7dea499eac31e5295895..85c5fe7e25a84de5342d3d9b8cd20d195dd2b159 100644
index a8c6d49637a53961d1e16521ae569c3f03fd1e8a..b36e64816bb296e53479c5666ab418fdebfde4e4 100644
--- a/ui/display/BUILD.gn
+++ b/ui/display/BUILD.gn
@@ -67,6 +67,10 @@ component("display") {
@@ -288,7 +288,7 @@ index ebd698116ef4f88c3bbaea1b02912bbeddbca34f..e096f9371607a088250e1ea72f450f85
if (is_win) {
sources += [
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 2a8a84adf7ad37bf1857e4a553c5115eee027c99..c7e3b70b30abaf3cc91a24c406054ae1870d8185 100644
index 3deb7d15b80319596e0be663fb0883ee27dd9d1d..017641614e530a5296599578f4ba80eece996b95 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -684,6 +684,7 @@ component("views") {
@@ -299,7 +299,7 @@ index 2a8a84adf7ad37bf1857e4a553c5115eee027c99..c7e3b70b30abaf3cc91a24c406054ae1
}
if (is_win) {
@@ -1111,6 +1112,8 @@ source_set("test_support") {
@@ -1110,6 +1111,8 @@ source_set("test_support") {
"//testing/gtest",
]

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 70f2b666d7fa5421c26f7354d4fd0871bb51229a..fc93a7e98acd09ea2c6a1c8d209775d2c9482d74 100644
index f9295c24641e9a7322f088c869d90423bcd36991..5ea6972f03fd450272de52c84f783be9113608bc 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8201,6 +8201,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -8101,6 +8101,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 70f2b666d7fa5421c26f7354d4fd0871bb51229a..fc93a7e98acd09ea2c6a1c8d209775d2
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c500f6507c2d9298cdeba10cdf12c27f3a34c4d8..6cbca31bca51095b2301c9926910139b53548a9d 100644
index 355f0d796d3c6f0481a1a807b4f22113e09c8029..6354e6152d281d06fcd85c61b76d836bd5043e1a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4395,6 +4395,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4371,6 +4371,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
auto* new_contents_impl = new_contents.get();
@@ -37,7 +37,7 @@ index c500f6507c2d9298cdeba10cdf12c27f3a34c4d8..6cbca31bca51095b2301c9926910139b
// 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
@@ -4436,12 +4442,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4412,12 +4418,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -51,10 +51,10 @@ index c500f6507c2d9298cdeba10cdf12c27f3a34c4d8..6cbca31bca51095b2301c9926910139b
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 3ddc93e18d353d5af31e28f8f8e682ea813db21c..2f1df452ce3617cf845409d01d8049325a1bd0a2 100644
index e1d6dffca2e718f9e9b67525a1fe09abedfe077c..702fa0c351eada9c6de5d25f3ef2375db32fe595 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -611,6 +611,10 @@ struct CreateNewWindowParams {
@@ -589,6 +589,10 @@ struct CreateNewWindowParams {
// The navigation initiator's user activation and ad status.
blink.mojom.NavigationInitiatorActivationAndAdStatus
initiator_activation_and_ad_status;
@@ -66,10 +66,10 @@ index 3ddc93e18d353d5af31e28f8f8e682ea813db21c..2f1df452ce3617cf845409d01d804932
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 4d84a234087209212c6af2bea6b1934e3de42000..d1d1d373a825f6d3ca90297059f23ab8a834ce81 100644
index 5733e6d1ea77f85c428df07eb444391447b79e80..89eccdb2e2f429fb1a9c3d2994fd03bdda45ccb8 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -702,6 +702,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -708,6 +708,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -79,10 +79,10 @@ index 4d84a234087209212c6af2bea6b1934e3de42000..d1d1d373a825f6d3ca90297059f23ab8
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 56057fe8c0b0f307ba804a65d9b929531eb7d749..eaa60ae3c2e33f0592bbc0e9e44dca32c1cf4ea2 100644
index 8b4b26ed9f976438754c5ada0bd6193cf02891a5..48f2887b6c7181aae3d4cc6a87578d4f876ee79f 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -173,6 +173,7 @@ class NetworkService;
@@ -177,6 +177,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -90,7 +90,7 @@ index 56057fe8c0b0f307ba804a65d9b929531eb7d749..eaa60ae3c2e33f0592bbc0e9e44dca32
} // namespace network
namespace sandbox {
@@ -1116,6 +1117,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1128,6 +1129,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -148,10 +148,10 @@ index 0fa12e6a5dd2eb2cd2102919f6127731e8500133..64ac8d677a9f7a723c46bbf0e74595b3
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4d69b5e3305ab3c5aa50de5d65924f378a719897..2891a0dae415c642dc2bcaf1834fa5fc18fdd5e9 100644
index 47a2bc8e75e24ca61772f65140bbb2f868e63788..925b1a7b72bba63a2f2f10da9da1814ff94711e0 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6402,6 +6402,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6364,6 +6364,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 0f97cb0d05ecfad9ac6dff6046257862c47f146c..635e1f3aa30afd42bc35c8bb9a795566797a6423 100644
index cc84e51f5bb4fe4413faa69ae52c025c3b476a54..09599219703a682e565ae2d03b69211a1e564182 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2166,6 +2166,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2165,6 +2165,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View File

@@ -9,7 +9,7 @@ This is an experimental commit; but if it's successful,
This patch should be upstreamed and then removed from electron's code.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index fdb693680c28572ec0d5a1fc731a3cc2d2745e95..0f348db4b0b795623380bb1d068c7b7d28831650 100644
index f6251860d8bd387b31e748ede3d4a4a0d5c1ff8c..ca4df8d7ebda791e55932eaf512215da55fbdf49 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -43,7 +43,6 @@

View File

@@ -18,28 +18,28 @@ index 22417f27125a44d481483439066d73e60348b414..82e5084b0e12231e5cc96a38d99b7238
/googleurl
/gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 5cd5dda2f903662cc470d445fc39837aea0b821d..df0499538b4de6d14afd33d3c1c03d3d70c6c100 100644
index 2d9aed0c5f27d34e586180214028fb9c6af6fbb4..f3c8d474c067f7012b42be1491c1e1f96e8e810f 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -96,6 +96,7 @@
@@ -51,6 +51,7 @@
/custom_tabs_client/src
/cygwin
/directxsdk
/dom_distiller_js/dist
/eigen3/src
+/electron_node
/elfutils/src
/emoji-metadata/src
/emoji-segmenter/src
@@ -212,6 +213,7 @@
/espresso/lib/
/eyesfree/src
@@ -110,6 +111,7 @@
/mocha
/mockito/src
/nacl_sdk_binaries/
+/nan
/nasm
/nearby/src
/neon_2_sse/src
@@ -280,6 +282,7 @@
/ninja/ninja*
/node/*.tar.gz
/node/linux/
@@ -153,6 +155,7 @@
/soda-win64
/speex
/sqlite/src
/sqlite4java/lib/
+/squirrel.mac
/subresource-filter-ruleset/data/UnindexedRules

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d75993310cb7dcb 100644
index b0bd783057a77a6752729105c5ca9d12f5b14ab0..2b665e4f96d4a86fc77ffa1ddf4b83e0efd8130e 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -135,6 +135,7 @@ class KeyStorageLinux;
@@ -18,7 +18,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933
class Profile;
class ProfileImpl;
class ScopedAllowBlockingForProfile;
@@ -274,6 +275,9 @@ class BackendImpl;
@@ -275,6 +276,9 @@ class BackendImpl;
class InFlightIO;
bool CleanupDirectorySync(const base::FilePath&);
} // namespace disk_cache
@@ -28,7 +28,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -560,6 +564,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
@@ -561,6 +565,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
friend class ::StartupTabProviderImpl;
@@ -598,6 +603,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
@@ -599,6 +604,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class crosapi::LacrosThreadTypeDelegate;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;

View File

@@ -8,7 +8,7 @@ is therefore not a method that will compile given we don't include
relevant files.
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
index 7e0a4eb93ac9444d760d13736c1a2f6381fc3a7b..d5e45f27144ee4b05b82d699071eaa0780c9401d 100644
index 0df82b71f05c34bd7896996feabcdd91ef3ea654..a59edbf28e561437db68f21471d806b71c6dd0c5 100644
--- a/chrome/browser/profiles/profile_selections.cc
+++ b/chrome/browser/profiles/profile_selections.cc
@@ -14,6 +14,7 @@

View File

@@ -80,7 +80,7 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index e7df94b97731f9c0a11fc8cb862198df781fe21c..975206defd9e3b035d0a7cb2066fe97deb4b0cd3 100644
index 9ba202563436566aa63897b9e702e131b4353664..2fc17060004f81ba3e4d203700c5a8b4d8a1e575 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1885,12 +1885,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -141,7 +141,7 @@ index 0c8f72c7e6cbe38c2e05381e97c58a3a6c991f8e..2afc5dc73d6e23555faf39bf144b43a1
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 69d39ab12f7a1895e1ca50914a4f8dc37e10e6cd..eaa9156721de98d19f6110e7b2ab55afa30a8f81 100644
index bf521a05278e2b2344751794def98324e7cdcbb5..bf984aa612e4a464ce46703d37402ef0fa24ea0c 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -71,8 +71,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index cab32460f2da655fa65675a64cef0a04106f3876..864835dc83c51e8d67a6a6d2da32e1fb2fffb23d 100644
index 4eb6047128a5cfdd1c6e62adbae7f662c477b6f1..0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4302,8 +4302,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4278,8 +4278,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -372,10 +372,10 @@ index e236e1ac647004c4a91c7098d38572e22d0312da..92c2b13acd54a8aaa14d0d0bab4f93bb
return delegate_->HandleShouldOverrideWebContentsCreation();
return false;
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index e01b8206fe3661b157436c221eca6e6b6eef3f17..1828c2d1b80d772be734a6b2ab56aa71829c38e0 100644
index 517debd480aba9340f058c9b37bef0a56a171659..2815466b8041beda9f05b36b1ff9ca221a22558b 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -156,8 +156,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -158,8 +158,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

View File

@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee450e69d7 100644
index c5b68291a9632e8820721de5513ed682c65a175c..5b6c92952de30bb9a80b9595ab57344323484eea 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -39,6 +39,7 @@
@@ -18,7 +18,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
@@ -252,8 +253,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
@@ -254,8 +255,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
#endif
@@ -33,7 +33,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -282,11 +288,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
@@ -284,11 +290,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
#endif // V8_USE_EXTERNAL_STARTUP_DATA
@@ -48,7 +48,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -966,7 +973,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -969,7 +976,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -102,10 +102,10 @@ index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd7
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 67b6b7ab4194d831a38429789dba269ddec7cbc9..35114fabe0156f48bd0f0a8adfa409e4ee06363a 100644
index 7b9a1f6ab9c32415b0ecc7be3017227f58c2547a..3d2f9832312919ca6b650d18efa36d78b7319665 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -542,8 +542,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -541,8 +541,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@@ -115,7 +115,7 @@ index 67b6b7ab4194d831a38429789dba269ddec7cbc9..35114fabe0156f48bd0f0a8adfa409e4
if (g_mapped_snapshot) {
// TODO(crbug.com/802962): Confirm not loading different type of snapshot
// files in a process.
@@ -552,10 +551,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -551,10 +550,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701bd30ddf1 100644
index d8d68ec1ca1da4c6a14f2cacc3b0cec60b96ed7c..08ac09937dda4d8950b5086abac637afeb3daaba 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1889,6 +1889,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1886,6 +1886,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1908,9 +1928,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1905,9 +1925,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1918,9 +1936,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1915,9 +1933,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0cecd6ec1f4df330be91034d8874b33615f174fb..a64522c74ac567c98f1ef630f8a6ecbc4009f2ad 100644
index 2f7c2546d8543d7b296e214c524c95dc290539ca..5a917617ec583ef4ae7a4eebbc43eeb67694a956 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -35,7 +35,7 @@ index 0cecd6ec1f4df330be91034d8874b33615f174fb..a64522c74ac567c98f1ef630f8a6ecbc
// If we are likely to software composite the resource, we use sRGB because
// software compositing is unable to perform color conversion.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index a47fbc82c7a9369d49cb62d31fb5c786473b9a66..b9dd88949ac6f6913539a4f913534112cb6e07fa 100644
index e0732ebde444ca3def954797b4266501c68a0c30..8621bcdc40b16a31fec8bf86a4018c4a74d0101f 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -102,6 +102,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -81,7 +81,7 @@ index e4deb71ea3afa1ef9d6ddac9c61f5916ff608514..d2e6854ac2aaa3cc83c0b72ebc03193b
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 77a5695f93e91d50cb57eebd56e53ebad62033ff..a043c585453f5a286ec770b6e1e34de0afcbc06f 100644
index 3cc40e4b0183bf8f6861a6d1240df7d2972362a9..7468b1ec1b4c4e7f29baef2fc2decd2ec692351c 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -93,10 +93,10 @@ index 77a5695f93e91d50cb57eebd56e53ebad62033ff..a043c585453f5a286ec770b6e1e34de0
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 1db5bf460224534a3fb4223bfd2c361ec6256e8d..56832950694627742ee9d2cce5488ee6a8381371 100644
index 20351961220004528837f16b5d858481f0b788aa..5f8e6a9e2d85611fa4bbfe62ecec4431905a9c4f 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3286,6 +3286,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3279,6 +3279,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
@@ -148,7 +148,7 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index 6dd6faea68da987e9c8e0d87cb6246537af28186..6c68997c5459e0f6304bb275a2b0d6e7df85f2ca 100644
index d6e88526b6cb21f3b2eb983a6d42066b6f2ab3c5..66ea1727f6609008425a47fc485ee71843983133 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -29,6 +29,7 @@
@@ -159,7 +159,7 @@ index 6dd6faea68da987e9c8e0d87cb6246537af28186..6c68997c5459e0f6304bb275a2b0d6e7
#include "ui/native_theme/native_theme_features.h"
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
@@ -329,6 +330,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
@@ -328,6 +329,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);

View File

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

View File

@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 1f3efcc9f982f0fe70c9080cb8fe742a5ecb6287..7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e 100644
index 7a99c04fcf5bba1eafab94bd7d2b5ee9c58d4d85..80224052d4a3c195eabeadfb0d8863a2cf31b6e2 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -801,6 +801,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -20,10 +20,10 @@ index 1f3efcc9f982f0fe70c9080cb8fe742a5ecb6287..7bd2cdfab5e0f0cfea19f198a4f62456
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d465997c6ff4f0 100644
index 5c042eea04022ed4e74b5b4796e60de7bbb4137e..9ba426de189921774e47e6e5b4763bae602f6532 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -907,6 +907,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -905,6 +905,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
cc::BrowserControlsState current,
bool animate);
@@ -31,7 +31,7 @@ index cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d46599
+ bool disable_hidden_ = false;
void StartDragging(blink::mojom::DragDataPtr drag_data,
blink::DragOperationsMask drag_operations_mask,
const url::Origin& source_origin,
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 98746fea627ab5319cd9b66e203738a270e27f17..b7d50b6286ac90ab06089f75f0b9d0b7b02bbf6c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc

View File

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 6887a784db5a2a9df582a2dc26f03af61b5c004c..abbcafb1f9f28577b586f93250c5bd75c2a94d83 100644
index f2b36dbd52bc59928ea14b6adb30005f6505ab19..36c07c1a0371274ff93a86e388b2a6d541cdf614 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1571,6 +1571,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1558,6 +1558,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,7 +51,7 @@ index 6887a784db5a2a9df582a2dc26f03af61b5c004c..abbcafb1f9f28577b586f93250c5bd75
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 9bd43e9e373b74f2f8fcc8f12ab0e0c38927dfcb..0112afaa651e75af56abe5ca51b11d9bb001e51b 100644
index c81ae450479d994a89f4d9560028ecd761e8e74f..eb181df1e63fe10734f4eb7d39a28705affa0bca 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index 9bd43e9e373b74f2f8fcc8f12ab0e0c38927dfcb..0112afaa651e75af56abe5ca51b11d9b
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index b678694478f62fc096bb2f79a1982492a0b9a228..fe994600df0ca42d3a6eb668ed127eb6538001a3 100644
index 5d20e33a59de709a8e21630de2e1c357c5a68dfd..b736e555a1ce8ba513fe94ef8f52d95c4b7b120e 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1233,6 +1233,9 @@ interface NetworkContext {
@@ -1240,6 +1240,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

View File

@@ -6,7 +6,7 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread
This is needed to blend Blink and Node's policy for code generation policy.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index df61f9a3f12a626a295488d24da3cf31aa1f12eb..965e9562f0e891ab043cd7dfab0f53d1bb08192d 100644
index 0a476b423cb4271d0a4ba2ea118c44cfcae8c3c8..9af71550493e372f3be34d0e8ad03ab2ae0413f0 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -422,8 +422,9 @@ TrustedTypesCodeGenerationCheck(v8::Local<v8::Context> context,

View File

@@ -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 fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9..8c14bfc9f0a6ad2bd314b653d4f993eda1e87348 100644
index 31c22cd29208ef2ea1d02394b613ada32863db68..4292381e56519a338c4de654c6cf0e02b7025de7 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -165,6 +165,7 @@

View File

@@ -10,22 +10,22 @@ get this standardised, but in lieu of that, this makes MessagePort a
whole bunch more useful!
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
index 109ca611fedb6acce1142b2087ec3c4d6cbbfbf0..cf683459c3bb67df027d8b28cd471214b89fbda6 100644
index 1d75181438c3219aa984bc87051df3e938b65211..0fd5bbf170efa02d3e710de3cb6733158faec858 100644
--- a/third_party/blink/renderer/core/messaging/message_port.cc
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
@@ -175,6 +175,7 @@ void MessagePort::close() {
Entangle(pipe.TakePort0());
@@ -193,6 +193,7 @@ void MessagePort::close() {
Entangle(pipe.TakePort0(), nullptr);
}
closed_ = true;
+ DispatchEvent(*Event::Create(event_type_names::kClose));
}
void MessagePort::Entangle(MessagePortDescriptor port) {
void MessagePort::Entangle(MessagePortDescriptor port_descriptor,
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
index 3055b625e7474f94aaddcf5500b4db07bd59a428..cc6b29749a9cf5ddd71aa4163078dce8989bd3bf 100644
index e093a1ed6c40ab49255fec71c5349272c413d0ca..98ed58a9a765f5101d9b421507bf25db4359d7e5 100644
--- a/third_party/blink/renderer/core/messaging/message_port.h
+++ b/third_party/blink/renderer/core/messaging/message_port.h
@@ -120,6 +120,13 @@ class CORE_EXPORT MessagePort : public EventTarget,
@@ -125,6 +125,13 @@ class CORE_EXPORT MessagePort : public EventTarget,
return GetAttributeEventListener(event_type_names::kMessageerror);
}

View File

@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index d017d73c6cf99607f5b2e1ef26b2e28d8ca9c71a..7f615a4a1fbe4d92c8e91091e4f21e675a4ce3ae 100644
index 18722961833e489b359a28cf691b67bbeeb3ac56..f1d61a47cae0e508d03cf773be4191c57712c59d 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -162,6 +162,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
@@ -26,10 +26,10 @@ index d017d73c6cf99607f5b2e1ef26b2e28d8ca9c71a..7f615a4a1fbe4d92c8e91091e4f21e67
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 341248a6b15b280c382c965009540fbdb64b0978..c9bead90658ac0e2d503c90c6ce380a318fee457 100644
index ddfd9e4d3424a21bcc6c3d59cbb0b813b5e00b78..7f4310b8882ad1ba52eb726ff4f8e21a17cedc8d 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -433,6 +433,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -434,6 +434,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
bool use_custom_frame = true) const;
@@ -53,7 +53,7 @@ index 341248a6b15b280c382c965009540fbdb64b0978..c9bead90658ac0e2d503c90c6ce380a3
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -654,6 +671,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -655,6 +672,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool inverted_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

View File

@@ -13,13 +13,13 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4939c81de 100644
index 30558fdfc35755fbc35f9eab7db2356e038c1884..3232629b263acae147a56864ebd73caf59b39789 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -11,8 +11,10 @@
#include "base/functional/bind.h"
@@ -12,8 +12,10 @@
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
+#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
#include "base/task/single_thread_task_runner.h"
@@ -27,7 +27,7 @@ index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4
#include "media/base/media_log.h"
#include "net/base/net_errors.h"
#include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h"
@@ -61,8 +63,20 @@ const int kUpdateBufferSizeFrequency = 32;
@@ -62,8 +64,20 @@ const int kUpdateBufferSizeFrequency = 32;
// How long to we delay a seek after a read?
constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20);
@@ -48,7 +48,7 @@ index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4
class MultiBufferDataSource::ReadOperation {
public:
ReadOperation() = delete;
@@ -154,7 +168,14 @@ bool MultiBufferDataSource::media_has_played() const {
@@ -155,7 +169,14 @@ bool MultiBufferDataSource::media_has_played() const {
bool MultiBufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);
@@ -65,10 +65,10 @@ index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4
void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
index 29ca8efb5994ccb5b65d2762088dd53e0583cb72..c533149f567731e6bb6ed2d94dcffd03346f7f87 100644
index c5093eea3f0f354d3ac7358a92f3d1a3dfa849b2..eb6c49c52b4f511db9c99735544c541ed64870ba 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h
@@ -33,6 +33,8 @@ namespace blink {
@@ -34,6 +34,8 @@ namespace blink {
class BufferedDataSourceHost;
class MultiBufferReader;

View File

@@ -58,7 +58,7 @@ index e515503a0f636d935fdcd779a5ac01bd8f351e74..0669361cb063c9dd15a19486fce1a609
// Launches a process asynchronously and notifies the client of the process
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index bd80ca431a5c50ac001d7607841c64e90f4fe4c3..befc9666c3901e84b75934c6c98ca6de864eaa19 100644
index 94d18b775d432cfeeb4d2db6091adda179dc6e6b..7560f17040c40291f9f603e5811db4c94dece517 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -63,6 +63,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -110,7 +110,7 @@ index 9e5365dc37489dcd9f94d23cf03713492ab20e5f..03206ccc3181eae7776b4f2c076285b8
}
diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc
index fe4006de7c8f5fc26b6981a0ba4db70cd188b8bb..6fe38b4649610179bd840dbee0ad1f0de2636886 100644
index 57f3ac588c98c3a3ec0857c7f0d60c3bce0e32a1..707e878379b337b1ef22bb9675aad4fabcf453bd 100644
--- a/content/browser/child_process_launcher_helper_win.cc
+++ b/content/browser/child_process_launcher_helper_win.cc
@@ -19,6 +19,8 @@
@@ -627,10 +627,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165fa5f6fb8 100644
index fc31388dc32322c2a7a77b8d468bacfcb3e28b23..6a0270dfd41a36e1cfa816cd8b94dab51c665477 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -717,11 +717,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@@ -721,11 +721,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
// command line flag.
ResultCode LaunchWithoutSandbox(
const base::CommandLine& cmd_line,
@@ -643,7 +643,7 @@ index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165
// Network process runs in a job even when unsandboxed. This is to ensure it
// does not outlive the browser, which could happen if there is a lot of I/O
// on process shutdown, in which case TerminateProcess can fail. See
@@ -949,7 +947,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
@@ -953,7 +951,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
@@ -652,7 +652,7 @@ index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165
SandboxDelegate* delegate,
TargetPolicy* policy) {
const base::CommandLine& launcher_process_command_line =
@@ -963,7 +961,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -967,7 +965,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
}
// Add any handles to be inherited to the policy.
@@ -661,7 +661,7 @@ index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165
policy->AddHandleToShare(handle);
if (!policy->GetConfig()->IsConfigured()) {
@@ -978,6 +976,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -982,6 +980,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@@ -675,7 +675,7 @@ index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165
#endif
if (!delegate->PreSpawnTarget(policy))
@@ -990,7 +995,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -994,7 +999,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
ResultCode SandboxWin::StartSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
@@ -684,7 +684,7 @@ index 3944a868cec29cd6a79cdc83da934db666527160..e29287602b6654225f038946adb77165
SandboxDelegate* delegate,
base::Process* process) {
const base::ElapsedTimer timer;
@@ -998,13 +1003,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -1002,13 +1007,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
// Avoid making a policy if we won't use it.
if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
*base::CommandLine::ForCurrentProcess())) {

View File

@@ -87,10 +87,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 6e360b9a82555293f1a162a00f28a6d24f939c11..5d0bae2eb27d6ed90ac83932630954e4376e62b5 100644
index d3a1ba02c09245b063720749dd52c015bdf71efb..3029fda279a6e2062115ac7fc7ade32e4a3aecd2 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -142,6 +142,8 @@ viz_component("service") {
@@ -143,6 +143,8 @@ viz_component("service") {
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
"display_embedder/skia_render_copy_results.cc",
"display_embedder/skia_render_copy_results.h",
@@ -514,7 +514,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 479c65c0ecf51d9b8e20e8b39eae4d9e62576b94..3d3634695888ada5569ffb04388e2b9b85c4ccfb 100644
index 1864388f93ae8c1be079af20988066d8f9d30629..9df25eb94d9862fda7ea743a5a1ae777ce787e4f 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -97,7 +97,8 @@ RootCompositorFrameSinkImpl::Create(

View File

@@ -7,7 +7,7 @@ This allows embedders to call SetDefersLoading without reaching into Blink inter
This might be upstreamable?
diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h
index ff1948e649fffdc92a2db0e736c99bf4e8c06514..b165201b273c8fa9de8e66fe8ef7bfc28eee0850 100644
index 0960ab9c8361222cd4acf554e04dc3fc124d714e..524c7cf9032a249a30cc726019266ecddacac070 100644
--- a/third_party/blink/public/web/web_document_loader.h
+++ b/third_party/blink/public/web/web_document_loader.h
@@ -38,6 +38,7 @@
@@ -28,10 +28,10 @@ index ff1948e649fffdc92a2db0e736c99bf4e8c06514..b165201b273c8fa9de8e66fe8ef7bfc2
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index 8328adb3dfcdea728bb845355cb548059a0d5a4f..242530b7a53e4836315283ad4c9079ad7f7b24a1 100644
index f6b1dc84c58ee94d1aed49f25494bcb64aa0c52c..dbca796070f2bc2aa29fedf6ccb96bdc66b31e8b 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -304,7 +304,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -307,7 +307,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
absl::optional<scheduler::TaskAttributionId>
soft_navigation_heuristics_task_id);

View File

@@ -76,7 +76,7 @@ index aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0
cookie_observer(
const network::ResourceRequest::TrustedParams& trusted_params) {
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index ce3b7cef16884a6689fea06907d346452e754925..41c7ae0e74b9dfc65c82141e64b4652d735465da 100644
index 6478e8136096fa7c4f704737372d36dcfc771600..b46ce581d8b5707a9a034344de96707daa4f4b5d 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {

View File

@@ -23,7 +23,7 @@ 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 2b803d24e126bc3e46fb76b0ead258251c224056..ec766b739d131ddd8f8bbb922ceebcbfcb388c92 100644
index 68b50260715c2a56bacf0f2e856f761c793ff143..e457ea82f6dd9ab8a3f1683bda61f6513f8abd00 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -799,6 +799,12 @@ GetOriginForURLLoaderFactoryUncheckedWithDebugInfo(
@@ -40,10 +40,10 @@ index 2b803d24e126bc3e46fb76b0ead258251c224056..ec766b739d131ddd8f8bbb922ceebcbf
// origin of |common_params.url| and/or |common_params.initiator_origin|.
return std::make_pair(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index c87f1324a18fccf9742f2f568af42f20307858d0..8299185439b626c8dc59a1796a57f3a63aac1131 100644
index 9b0ad2483fcf02d8d46dcf222541b0a4b34984c0..d5f99b20fbe5242f95935918fedaf3e00d771ab9 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2023,6 +2023,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2054,6 +2054,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@@ -51,17 +51,17 @@ index c87f1324a18fccf9742f2f568af42f20307858d0..8299185439b626c8dc59a1796a57f3a6
+ std::string protocol = url_.Protocol().Ascii();
+ is_standard = url::IsStandard(
+ protocol.data(), url::Component(0, static_cast<int>(protocol.size())));
StringBuilder debug_info_builder;
if (origin_to_commit_) {
// Origin to commit is specified by the browser process, it must be taken
// and used directly. It is currently supplied only for failed navigations.
@@ -2056,6 +2060,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
// breaks aliasing...
origin = owner_document->domWindow()->GetMutableSecurityOrigin();
origin_calculation_debug_info_ = AtomicString("use_owner_document_origin");
@@ -2101,6 +2105,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
debug_info_builder.Append(", url=");
debug_info_builder.Append(owner_document->Url().BaseAsString());
debug_info_builder.Append(")");
+ } else if (!SecurityOrigin::ShouldUseInnerURL(url_) &&
+ !is_standard) {
+ origin_calculation_debug_info_ = AtomicString("use_url_with_non_standard_scheme");
+ debug_info_builder.Append("use_url_with_non_standard_scheme");
+ origin = SecurityOrigin::Create(url_);
} else {
origin_calculation_debug_info_ = AtomicString("use_url_with_precursor");
debug_info_builder.Append("use_url_with_precursor");
// Otherwise, create an origin that propagates precursor information

View File

@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michal Pichlinski <michal.pichlinski@openfin.co>
Date: Thu, 15 Jun 2023 23:04:48 +0200
Subject: allow disabling throttling in the `viz::DisplayScheduler` per
`ui::Compositor`
In Chromium when the `viz::DisplayScheduler` is invisible it throttles
its work by dropping frame draws and swaps.
This patch allows disbling this throttling by preventing transition to
invisible state of the `viz::DisplayScheduler` owned
by the `ui::Compositor`.
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 623991465edb99ee720c8177c3511e4d025ed890..c94537af56f7de8cd15bd3b3155b79b41ea003f4 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -341,7 +341,8 @@ void Compositor::SetLayerTreeFrameSink(
if (display_private_) {
disabled_swap_until_resize_ = false;
display_private_->Resize(size());
- display_private_->SetDisplayVisible(host_->IsVisible());
+ // Invisible display is throttling itself.
+ display_private_->SetDisplayVisible(background_throttling_ ? host_->IsVisible() : true);
display_private_->SetDisplayColorSpaces(display_color_spaces_);
display_private_->SetDisplayColorMatrix(
gfx::SkM44ToTransform(display_color_matrix_));
@@ -533,8 +534,11 @@ void Compositor::SetVisible(bool visible) {
host_->SetVisible(visible);
// Visibility is reset when the output surface is lost, so this must also be
// updated then.
- if (display_private_)
- display_private_->SetDisplayVisible(visible);
+ if (display_private_) {
+ // Invisible display is throttling itself.
+ display_private_->SetDisplayVisible(
+ background_throttling_ ? visible : true);
+ }
}
bool Compositor::IsVisible() {
@@ -959,4 +963,13 @@ const cc::LayerTreeSettings& Compositor::GetLayerTreeSettings() const {
return host_->GetSettings();
}
+void Compositor::SetBackgroundThrottling(bool background_throttling_enabled) {
+ background_throttling_ = background_throttling_enabled;
+ if (display_private_) {
+ // Invisible display is throttling itself.
+ display_private_->SetDisplayVisible(
+ background_throttling_ ? host_->IsVisible() : true);
+ }
+}
+
} // namespace ui
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index ddb28fd6f7549759df7e3b7d6b309cd982e199af..7473f3af9bc8cac8db3c30dfbc9b7140f832ac15 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -511,6 +511,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
const cc::LayerTreeSettings& GetLayerTreeSettings() const;
+ // Sets |background_throttling_| responsible for suspending drawing
+ // and switching frames.
+ void SetBackgroundThrottling(bool background_throttling_enabled);
+
private:
friend class base::RefCounted<Compositor>;
friend class TotalAnimationThroughputReporter;
@@ -617,6 +621,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// See go/report-ux-metrics-at-painting for details.
bool animation_started_ = false;
+ // Background throttling is a default Chromium behaviour. It occurs
+ // when the |display_private_| is not visible by prevent drawing and swapping
+ // frames. When it is disabled we are keeping |display_private_| always
+ // visible in order to keep generating frames.
+ bool background_throttling_ = true;
+
TrackerId next_throughput_tracker_id_ = 1u;
struct TrackerState {
TrackerState();

View File

@@ -14,10 +14,10 @@ can potentially be upstreamed but it's likely that the better fix for this
is to update our OSR code which is several years outdated.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 81c64d21b8da5daae656d63dfde9536988af2cfb..6d0cfd67c0ebb157b0c440e76d52a35ee411df69 100644
index 73cf38cf0846bf224b4e01434b2bcf1875c3e782..91ca97624a1a5a67cd4a7ea7d78393e7041eefe9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3889,6 +3889,8 @@ void WebContentsImpl::Restore() {
@@ -3866,6 +3866,8 @@ void WebContentsImpl::Restore() {
void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
aura::Window* window = GetTopLevelNativeWindow();
@@ -26,7 +26,7 @@ index 81c64d21b8da5daae656d63dfde9536988af2cfb..6d0cfd67c0ebb157b0c440e76d52a35e
// TODO(isandrk, crbug.com/1466855): This API function currently works only on
// Aura platforms (Win/Lin/CrOS/Fuchsia), make it also work on Mac.
@@ -3903,7 +3905,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
@@ -3880,7 +3882,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) {
ui::WindowShowState WebContentsImpl::GetWindowShowState() {
aura::Window* window = GetTopLevelNativeWindow();

View File

@@ -86,10 +86,10 @@ index 7ff8785cd64c1264a88f91f7bd3292c6943f58ea..bc14ad8cab9fa3ec45bcb9f670b19897
// Cut the reference from ScriptState to V8 context.
diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h
index 7109852950cde0a6553000421faacefb39366b41..79be73cb660839d6074b11cd7491dc3d5e876345 100644
index 7c3cbdf73198f5592bff3e4fba8088f774efb0dd..ce3a01ded69eb10756e9a79f776afd3c22b8c931 100644
--- a/third_party/blink/renderer/platform/bindings/script_state.h
+++ b/third_party/blink/renderer/platform/bindings/script_state.h
@@ -178,7 +178,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
@@ -182,7 +182,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
static ScriptState* MaybeFrom(v8::Local<v8::Context> context) {
DCHECK(!context.IsEmpty());
if (context->GetNumberOfEmbedderDataFields() <=
@@ -102,8 +102,8 @@ index 7109852950cde0a6553000421faacefb39366b41..79be73cb660839d6074b11cd7491dc3d
+ ScriptState::kScriptStateTagPtr) {
return nullptr;
}
return From(context);
@@ -249,9 +254,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
ScriptState* script_state =
@@ -257,9 +262,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
static void SetCreateCallback(CreateCallback);
friend class ScriptStateImpl;

View File

@@ -9,7 +9,7 @@ to support content settings UI. The support pulls in chrome content settings
and UI code which are not valid in the scope of Electron.
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288fef6adb6 100644
index 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85cc5ab845 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
@@ -19,8 +19,10 @@
@@ -23,7 +23,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288
#include "third_party/blink/public/common/features.h"
#include "ui/views/view.h"
#endif // !BUILDFLAG(IS_ANDROID)
@@ -316,7 +318,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
@@ -337,7 +339,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
video_web_contents_observer_.reset();
pip_window_controller_->Close(false /* should_pause_video */);
pip_window_controller_ = nullptr;
@@ -32,7 +32,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288
auto_pip_setting_helper_.reset();
#endif // !BUILDFLAG(IS_ANDROID)
}
@@ -327,8 +329,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
@@ -348,8 +350,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
// contents, so we only need to forget the controller here when user closes
// the parent web contents with the PiP window open.
document_web_contents_observer_.reset();
@@ -43,7 +43,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288
if (pip_window_controller_)
pip_window_controller_ = nullptr;
}
@@ -350,6 +354,7 @@ PictureInPictureWindowManager::GetOverlayView(
@@ -371,6 +375,7 @@ PictureInPictureWindowManager::GetOverlayView(
return nullptr;
}
@@ -51,7 +51,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288
auto* const web_contents = pip_window_controller_->GetWebContents();
auto* auto_pip_tab_helper =
@@ -372,6 +377,8 @@ PictureInPictureWindowManager::GetOverlayView(
@@ -393,6 +398,8 @@ PictureInPictureWindowManager::GetOverlayView(
}
return overlay_view;
@@ -61,7 +61,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288
#endif // !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
index a3acf948f1460c31341f4f1291f5a8ad9ca85d3a..a9488cfe10f5dff1e64af1206a1f0c99ad8925f4 100644
index 85ae9fb9f969709c35c27ac1235e5bdc48e2084a..a2adddb3ec8c72a2ff1a3739a1792868a6f89ffc 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
@@ -11,6 +11,7 @@
@@ -82,7 +82,7 @@ index a3acf948f1460c31341f4f1291f5a8ad9ca85d3a..a9488cfe10f5dff1e64af1206a1f0c99
namespace views {
class View;
@@ -214,7 +217,9 @@ class PictureInPictureWindowManager {
@@ -238,7 +241,9 @@ class PictureInPictureWindowManager {
#if !BUILDFLAG(IS_ANDROID)
std::unique_ptr<DocumentWebContentsObserver> document_web_contents_observer_;

View File

@@ -15,10 +15,10 @@ node does not change in this case.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 454033207ee52358ead79e16682b4aeb95cb0d71..a7650faa1ab1494e792814d2fa3af26988d4d95f 100644
index 96f7a459fca45f2d8c260d2de52b298afc1afd1c..9a57593c8059eecd75e84bcf4453010acaec4568 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -1046,6 +1046,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
@@ -1045,6 +1045,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
}
@@ -32,7 +32,7 @@ index 454033207ee52358ead79e16682b4aeb95cb0d71..a7650faa1ab1494e792814d2fa3af269
if (!text_input_manager_)
return ui::TEXT_INPUT_TYPE_NONE;
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3f18fd916 100644
index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438691fce1f 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -184,6 +184,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
@@ -45,10 +45,10 @@ index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3
// RenderFrameMetadataProvider::Observer implementation.
void OnRenderFrameMetadataChangedBeforeActivation(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a0114fd97e5721f7b1961e893793f43ba865b721..81c64d21b8da5daae656d63dfde9536988af2cfb 100644
index 737ca972a248538d110d4c91f9eb45a4645bdd0c..73cf38cf0846bf224b4e01434b2bcf1875c3e782 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -8416,7 +8416,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -8392,7 +8392,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View File

@@ -25,10 +25,10 @@ index c9a13aee1e64f359cd1d5c2e440b4df204420997..7790c311400fc84bfda6c99e1ebd8da7
// Returns true if duplex mode is set.
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index ee900c7541af99c61844920433ae39e2648ae90b..59137008aeddc03d60c58a463206dc91a0ef5c1f 100644
index e7c2af99322d27d88e77bdebce44c1356161dfd4..22101df16677599a82e72c89014fa3d73aa3a147 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -464,7 +464,8 @@ void ApplySystemPrintDialogData(
@@ -485,7 +485,8 @@ void ApplySystemPrintDialogData(
!SetCollateInPrintSettings(settings_->collate()) ||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
!SetOutputColor(static_cast<int>(settings_->color())) ||
@@ -38,7 +38,7 @@ index ee900c7541af99c61844920433ae39e2648ae90b..59137008aeddc03d60c58a463206dc91
return OnError();
}
}
@@ -617,6 +618,22 @@ void ApplySystemPrintDialogData(
@@ -637,6 +638,22 @@ void ApplySystemPrintDialogData(
return PMSetCopies(print_settings, copies, false) == noErr;
}
@@ -100,7 +100,7 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792
} else {
// No need to bother, we don't know how many pages are available.
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
index 20c68958d5645aba963ddd1fb61eebb534641dfc..c8b0100cf9d4370deaa9284528b6fdd12d2a9309 100644
index 3fb7a99ac1f2efa472dc8aa6682ab5b8c326c7aa..4c43edf8dd9db4416cc1edbb438ee3612524cc8a 100644
--- a/ui/gtk/printing/print_dialog_gtk.cc
+++ b/ui/gtk/printing/print_dialog_gtk.cc
@@ -241,6 +241,24 @@ void PrintDialogGtk::UpdateSettings(

View File

@@ -8,10 +8,10 @@ v8::Value instead of base::Value.
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 34777e89362b14587979cef76d8cd71b634cca8c..3d5e44883bab30eebdfaba70f3933435fe946ca1 100644
index 6c924dcf068a1ba2fe647a0a6b34d981d3dad570..febd81af331c06d9aaf1dda14be2718a1c5689d9 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -275,6 +275,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
@@ -276,6 +276,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
blink::mojom::LoadEventBlockingOption::kBlock,
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
weak_ptr_factory_.GetWeakPtr()),
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
#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 a25361b1673083cb25125b84948daed18ea394b5..af281ca5ee637d8aa6be39077aab568dd5b4d9ba 100644
index bb6e6804a49c10e5d0238aea61e4676a9dcfb72d..a3fec02c6c1179a2ed1a69c9eac76d0e53f3a544 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -2815,6 +2815,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2813,6 +2813,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -75,7 +75,7 @@ index a25361b1673083cb25125b84948daed18ea394b5..af281ca5ee637d8aa6be39077aab568d
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -2848,7 +2849,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2846,7 +2847,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,10 +85,10 @@ index a25361b1673083cb25125b84948daed18ea394b5..af281ca5ee637d8aa6be39077aab568d
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 eb4ce179cb09e28b97ad167b5b6d0e1c25e53c5f..a9cde93321e1afd18e3f742777b31112c066a6a1 100644
index 72ad9031f29df222b81c9232152d4d4f863349b9..f754df2a4edfffb9058625fc125d8114a27673c2 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -796,6 +796,7 @@ class CORE_EXPORT LocalFrame final
@@ -794,6 +794,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -97,7 +97,7 @@ index eb4ce179cb09e28b97ad167b5b6d0e1c25e53c5f..a9cde93321e1afd18e3f742777b31112
mojom::blink::WantResultOption,
mojom::blink::PromiseResultOption);
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index 2a25fa8cf63052fc9278fb6e7a9f579b4d258ca5..ae894500c3e10797241ee95d19eb70c79bf7e7af 100644
index b3403675e34ae0113d2d00ecc649818cf7cb9169..bbd94da0e079bc60a036aea8ba646cf73e1bf30c 100644
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -937,6 +937,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
@@ -204,10 +204,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
const mojom::blink::UserActivationOption user_activation_option_;
const mojom::blink::LoadEventBlockingOption blocking_option_;
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index ccbf9e325d2aefe460800b1e515fd99c807a047c..24e810c757f3277b02d023c0f9937726b4242ffd 100644
index e2761c6b431657778ffe10cdf5fb7e6e29c4c099..42b8887568efdf978f563c8297c42dac04d5de12 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1118,14 +1118,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -1117,14 +1117,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,

View File

@@ -145,7 +145,7 @@ index e6587d2208a13576af1831b94724a6286f0e0607..91223ef3f099e20aee5cf1d685c45d2c
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h
index 2056016df30982e24d4d99271f59e0edb261a16a..2876d3ccedf0e9f041d3f3310cd596de1fb7b000 100644
index 2325534ec92430ac4effc95d370925984ce7bd4b..8b6cc1780e53f4edf579e8a62de831330ab94c49 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.h
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h
@@ -41,6 +41,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
@@ -157,7 +157,7 @@ index 2056016df30982e24d4d99271f59e0edb261a16a..2876d3ccedf0e9f041d3f3310cd596de
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
index f137d6f86aba7227440b06160d072fcc0578a736..45d1eaf4cd73c00e9ddd79499b351517a12958cb 100644
index c3c80f6becee734319e374968bc00a08273f07b8..5e1bfcc6e1114c6d9dee56428b41797f447586b6 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -189,6 +189,7 @@

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 590fadafa20e3e51beb6bed4ed95960f0f52c777..1574a1fc4e7c0221a20d94024451925407039b81 100644
index 331975fb93f435fc6ebe756113cee74cf7b61c56..f39fe9c4d85f351df8adeea8f32c3dd568311577 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4224,6 +4224,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4222,6 +4222,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,10 +20,10 @@ index 590fadafa20e3e51beb6bed4ed95960f0f52c777..1574a1fc4e7c0221a20d940244519254
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index eaa60ae3c2e33f0592bbc0e9e44dca32c1cf4ea2..0d95cffd80d122e87b6e6972c32b868ffd6679e3 100644
index 48f2887b6c7181aae3d4cc6a87578d4f876ee79f..6c9c592ccc5be2243e56f8b9dbc2a21173e35864 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -311,6 +311,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -315,6 +315,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

View File

@@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7
// Returns whether `Initialize` has already been invoked in the process.
// Initialization is a one-way operation (i.e., this method cannot return
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 87adacdf36f17b49eba5db104f4e365d517f787c..67b6b7ab4194d831a38429789dba269ddec7cbc9 100644
index 33dc4eb4070698bcd156fc59ec11fc419c2120a8..7b9a1f6ab9c32415b0ecc7be3017227f58c2547a 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -430,7 +430,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -429,7 +429,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
// static
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
const std::string js_command_line_flags,
@@ -51,7 +51,7 @@ index 87adacdf36f17b49eba5db104f4e365d517f787c..67b6b7ab4194d831a38429789dba269d
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -440,7 +441,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@@ -439,7 +440,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
SetFlags(mode, js_command_line_flags);

View File

@@ -40,7 +40,7 @@ index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c403
// Called from BrowserMainLoop::PostCreateThreads().
// TODO(content/browser/gpu/OWNERS): This should probably use a
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 6831a7207aa2e02ea88673cd69cfe50f31c1682c..2ebd7dcbffed67caa5b625fa57332904c7e443fc 100644
index ef2ff9a1dd1a2b18d9896cb7e9e8adb06bf2bd18..dbf021231b9373233e55c040ea2fdb2406b90647 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1222,6 +1222,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 1f99aac43496bfed8c4862cda4d0a1ca70a89781..98613e1776e7ebf4393c8253dddac1fab40406d7 100644
index 99322038017ccbb65ced6a8d49ed6a2c7815caed..6db47e8ce5ea95df040626e5c6459bd55f36ce37 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1221,6 +1221,11 @@
@@ -1238,6 +1238,11 @@
"includes": [7440],
},

View File

@@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 47314a4f02c33f7ba7e03ecf9f1b6bb97598b947..0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62 100644
index 965b07bc438473baacd3c1309e012e68a3b245d9..c5b68291a9632e8820721de5513ed682c65a175c 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
@@ -275,11 +275,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
const std::string& process_type) {

View File

@@ -54,10 +54,10 @@ index d196e304a43191b6dc82f25b0b4bf24d242edb3c..85d618efa0574b00fc0cb1e5bde5ed72
static bool loaded = LoadGtkImpl();
return loaded;
diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h
index 94f3997bcfc05b1ce9cb5bd821d8b57e2ffe85f3..da45ce627a9cac6460d0e1577d192f5a2dd03ae4 100644
index 409e385fc952662c9887d9a810bb3c547c5be282..1518b681f98b3bc051aed74713a23c016c7b755e 100644
--- a/ui/gtk/gtk_compat.h
+++ b/ui/gtk/gtk_compat.h
@@ -34,6 +34,12 @@ using SkColor = uint32_t;
@@ -40,6 +40,12 @@ using SkColor = uint32_t;
namespace gtk {

View File

@@ -6,7 +6,7 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
Removes usage of the CGDisplayUsesForceToGray private API.
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index 18d1dbbc6d15ea7191f8c48c30e692a59875df37..8997858f873901a7cc7fb922f322c0150a1716f3 100644
index 074d92bd07e39d4f7d5561dae5cb09aa157b870a..6d92d63437ebf8ce68612e6fbbc1c767f23a7727 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {

View File

@@ -7,10 +7,10 @@ Disable private window frame APIs (NSNextStepFrame and NSThemeFrame) for MAS
build.
diff --git a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
index 9db1a07aabdbc5ebcf5d971664a8783a3d4810a3..eed51d0af307a0bb1c6cbbcbe2dbd3c906d0999c 100644
index b8eb13a42aa41143412b9a01f2716a3608b968fb..8eaccd4ce7e484aef1b4517935bc4ba2fa4a1ea4 100644
--- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
+++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
@@ -10,6 +10,7 @@
@@ -9,6 +9,7 @@
#include "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
#include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h"
@@ -18,7 +18,7 @@ index 9db1a07aabdbc5ebcf5d971664a8783a3d4810a3..eed51d0af307a0bb1c6cbbcbe2dbd3c9
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -70,10 +71,13 @@ - (BOOL)_shouldCenterTrafficLights {
@@ -65,10 +66,13 @@ - (BOOL)_shouldCenterTrafficLights {
@end
@@ -32,7 +32,7 @@ index 9db1a07aabdbc5ebcf5d971664a8783a3d4810a3..eed51d0af307a0bb1c6cbbcbe2dbd3c9
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -120,6 +124,8 @@ - (BOOL)_usesCustomDrawing {
@@ -115,6 +119,8 @@ - (BOOL)_usesCustomDrawing {
return NO;
}

View File

@@ -43,7 +43,7 @@ index 5a096477c123a782341115f964c4975301ccaf9a..ecfbb3b405425af346a6ba6788fc1d8f
} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 260eb6c3aadc48ec5cb9a2586f6a1e38b2ab8090..d906065d0791519183b03f15974239ac9fab8379 100644
index b9cab13f0916c1b6d092badb5100af52e640c479..3cb91f8ca4e7a9518d2ac34ab6a3f45b8aab2763 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -605,10 +605,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -147,10 +147,10 @@ index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b12047133e68f920 100644
index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7a626e40c 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -278,8 +278,10 @@
@@ -279,8 +279,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -161,7 +161,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1636,8 +1638,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1637,8 +1639,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -172,7 +172,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713
return [GetInProcessNSView() window];
}
@@ -1682,9 +1686,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1683,9 +1687,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -184,7 +184,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2186,12 +2192,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2192,12 +2198,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@@ -200,7 +200,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index ff4cbb1065f89098b6465fdb2b7e13118dcaab29..80ca25f1b7d3562d29a76fe725f54eca7ce179f2 100644
index 099dd572b6b258b3214743bee63125c6bc30e0c5..ebdd885b00da86656bec13fb45a763ef49209d3e 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -376,6 +376,13 @@ component("base") {
@@ -265,10 +265,10 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 65e513f282d9ab085407d62cfe99cb69b9c787a9..b7b095a4570952758b4d13cf7231c92f89cbb7c7 100644
index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4acb2a44c0 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -356,7 +356,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -342,7 +342,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
@@ -280,7 +280,7 @@ index 65e513f282d9ab085407d62cfe99cb69b9c787a9..b7b095a4570952758b4d13cf7231c92f
}
gfx::NativeViewAccessible
@@ -371,7 +375,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -357,7 +361,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
return [in_process_ns_window_bridge_->ns_view() window];
}
@@ -292,7 +292,7 @@ index 65e513f282d9ab085407d62cfe99cb69b9c787a9..b7b095a4570952758b4d13cf7231c92f
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1402,20 +1410,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1388,20 +1396,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {

View File

@@ -145,10 +145,10 @@ index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736
base::WeakPtr<BluetoothLowEnergyAdapterApple>
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index f834373f52a65b67fa0b601a18ac81044e66b0d2..5d7c4cf2fb323bdef2d5f671f96e2a4d6a7fff4f 100644
index c97d1fff57cdf5128a9ec972a2987d6f8d50583f..b852f651086d5bf667984c151fd1111ee9f1b486 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -969,7 +969,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
@@ -995,7 +995,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
void AudioManagerMac::InitializeOnAudioThread() {
DCHECK(GetTaskRunner()->BelongsToCurrentThread());

View File

@@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 0a5ee4bd20bb54eb00def65134fa8d45c401f052..6887a784db5a2a9df582a2dc26f03af61b5c004c 100644
index 0a0fa8772cab92d23a8b75aded6c1dbcf29e7b94..f2b36dbd52bc59928ea14b6adb30005f6505ab19 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -147,6 +147,11 @@
@@ -145,6 +145,11 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"
@@ -22,7 +22,7 @@ index 0a5ee4bd20bb54eb00def65134fa8d45c401f052..6887a784db5a2a9df582a2dc26f03af6
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -439,6 +444,99 @@ bool GetFullDataFilePath(
@@ -437,6 +442,99 @@ bool GetFullDataFilePath(
} // namespace
@@ -122,7 +122,7 @@ index 0a5ee4bd20bb54eb00def65134fa8d45c401f052..6887a784db5a2a9df582a2dc26f03af6
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -836,6 +934,13 @@ void NetworkContext::SetClient(
@@ -825,6 +923,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -136,7 +136,7 @@ index 0a5ee4bd20bb54eb00def65134fa8d45c401f052..6887a784db5a2a9df582a2dc26f03af6
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2461,6 +2566,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2448,6 +2553,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -147,7 +147,7 @@ index 0a5ee4bd20bb54eb00def65134fa8d45c401f052..6887a784db5a2a9df582a2dc26f03af6
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 3f51ecd9694c900ffb21d7e9ec5d737387ea39ca..9bd43e9e373b74f2f8fcc8f12ab0e0c38927dfcb 100644
index ef4140d740e233964e1db25d3239a8807f591e2d..c81ae450479d994a89f4d9560028ecd761e8e74f 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -114,6 +114,7 @@ class URLMatcher;
@@ -167,7 +167,7 @@ index 3f51ecd9694c900ffb21d7e9ec5d737387ea39ca..9bd43e9e373b74f2f8fcc8f12ab0e0c3
void ResetURLLoaderFactories() override;
void GetViaObliviousHttp(
mojom::ObliviousHttpRequestPtr request,
@@ -899,6 +902,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -904,6 +907,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@@ -177,10 +177,10 @@ index 3f51ecd9694c900ffb21d7e9ec5d737387ea39ca..9bd43e9e373b74f2f8fcc8f12ab0e0c3
std::unique_ptr<HostResolver> internal_host_resolver_;
// Map values set to non-null only if that HostResolver has its own private
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 0af727743712cb82c882c3597e3b75e9f2ef5303..b678694478f62fc096bb2f79a1982492a0b9a228 100644
index 3d95f8cd1adebd11a57ec7fd5152ac89e30e28bc..5d20e33a59de709a8e21630de2e1c357c5a68dfd 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -317,6 +317,17 @@ struct NetworkContextFilePaths {
@@ -316,6 +316,17 @@ struct NetworkContextFilePaths {
bool trigger_migration = false;
};
@@ -198,7 +198,7 @@ index 0af727743712cb82c882c3597e3b75e9f2ef5303..b678694478f62fc096bb2f79a1982492
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -942,6 +953,9 @@ interface NetworkContext {
@@ -949,6 +960,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View File

@@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 21683b9fba4414d825a32a7c12cf55b4bcc488a9..367299bdfc6d716099ff4ceafe493af4fe880bad 100644
index 7b31b8fce0fb99baa751131b336a2842f728433a..8f230c09e465df0403c7f162f5f9161ae0085cdf 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -201,6 +201,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
@@ -19,7 +19,7 @@ index 21683b9fba4414d825a32a7c12cf55b4bcc488a9..367299bdfc6d716099ff4ceafe493af4
const GURL& origin,
const GURL& document_url,
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
index 4ffd662e1411c8ba707cfab6970d7533246633e1..9266120342a179bb642286e617feeafb8f57d798 100644
index 2552c32ed769482c8bbb7b7538bf59cb66dcc16d..7fda86e70ad47766211a9ff8b5ed732068f0b885 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.h
+++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl
@@ -92,7 +92,7 @@ index 00965c253f28bd3947255b2ab77bf3a0bb71f14a..e04a7eef94990dfb0e2fca2e116352fe
contents_.get()->GetPrimaryMainFrame()->GetWeakDocumentPtr(),
RenderProcessHost::NotificationServiceCreatorType::kDocument,
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf240c1aa5 100644
index aaccaa3e3e43497ebd0909d55f471cf98972f27a..52e0692c5ce782d3ac433e9de443c2b63430e2ce 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -268,6 +268,7 @@ void PlatformNotificationContextImpl::Shutdown() {
@@ -113,7 +113,7 @@ index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf
}
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f62c86c2d0 100644
index 9c9e590aab71d5b66cdd2c9a0cfc5f2d34443e84..c461c131d93d592487e319893d531bf4bdf14e39 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -45,6 +45,7 @@ struct NotificationDatabaseData;
@@ -133,10 +133,10 @@ index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f6
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 ab3ce062a15a06e775925d02df4eeaf8594cd825..fb172d287b1eae251fbc9ef7bbf1ed484d36ae15 100644
index 44922d6b9f7f7a9d1d0fb9f69b044d4728593cf3..cb161217889e2daaffcf68ff438bbba395ac7b4e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1967,7 +1967,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -1960,7 +1960,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index ab3ce062a15a06e775925d02df4eeaf8594cd825..fb172d287b1eae251fbc9ef7bbf1ed48
creator_type, std::move(receiver));
break;
}
@@ -1975,7 +1975,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -1968,7 +1968,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -155,7 +155,7 @@ index ab3ce062a15a06e775925d02df4eeaf8594cd825..fb172d287b1eae251fbc9ef7bbf1ed48
break;
}
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
index d9e36712dc3fbc6a9043e2c33660090ca2f7367b..7d910583eb22fc315eb0619febe518d5c24c0c4d 100644
index 82db1db4175fb9f4ee7490d5a163164ef4495ecb..4f51683be14ba6ee657a290c7747969e052a88ca 100644
--- a/content/public/browser/platform_notification_service.h
+++ b/content/public/browser/platform_notification_service.h
@@ -26,6 +26,8 @@ struct PlatformNotificationData;
@@ -176,7 +176,7 @@ index d9e36712dc3fbc6a9043e2c33660090ca2f7367b..7d910583eb22fc315eb0619febe518d5
const GURL& origin,
const GURL& document_url,
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
index c9a01dd2bd6e0de08c09b417c3dce5ef13adb304..ded3b477c9766a77cd8fe1c2646bcc1935ebb1ec 100644
index 6b835ca4d0426d2412f1cff6f0bb962e0f2fd586..a48198747b80929e7d4b290e9b40b6629dbda669 100644
--- a/content/test/mock_platform_notification_service.cc
+++ b/content/test/mock_platform_notification_service.cc
@@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
@@ -188,7 +188,7 @@ index c9a01dd2bd6e0de08c09b417c3dce5ef13adb304..ded3b477c9766a77cd8fe1c2646bcc19
const GURL& origin,
const GURL& document_url,
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
index 7cd457defa729855c8d7c9d873efab5389d025cd..2b8e644d54d93a9499adcc1bf5660d72a24e2f29 100644
index 66fd1e7f1171fec33c337375a9f8f11fcc6ab27e..188d507b42544dfab7abceed24097766496086b5 100644
--- a/content/test/mock_platform_notification_service.h
+++ b/content/test/mock_platform_notification_service.h
@@ -52,6 +52,7 @@ class MockPlatformNotificationService : public PlatformNotificationService {

View File

@@ -40,7 +40,7 @@ index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index dbaef31a6399ff8d872b7ab66540643bc823e005..f4d5ffdf0e6511f8d376c05185fc01ee7142905d 100644
index 50c222d235461ecce1f3ccc8941293de41cc134c..88d2338f7b6fb4fded4c34105bb7f52fc35f06a1 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -16,9 +16,11 @@
@@ -64,7 +64,7 @@ index dbaef31a6399ff8d872b7ab66540643bc823e005..f4d5ffdf0e6511f8d376c05185fc01ee
#include "chrome/browser/shell_integration_win.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
@@ -281,7 +283,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
@@ -276,7 +278,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();

View File

@@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/BUILD.gn b/BUILD.gn
index d51b0758e8883ba29a36b1dc3717bc76722f13f9..c68f9ec516f8adca4be86b6ce6158df36aa58f63 100644
index 64819b31d74a78986b5e9f7f133192a83f9bf113..bc2c7f6505c8b8b99ff8e35c1b0798e29e76c5cc 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -972,7 +972,6 @@ if (is_win) {
@@ -973,7 +973,6 @@ if (is_win) {
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
@@ -22,7 +22,7 @@ index d51b0758e8883ba29a36b1dc3717bc76722f13f9..c68f9ec516f8adca4be86b6ce6158df3
"//sql:sql_unittests",
"//third_party/breakpad:symupload($host_toolchain)",
"//ui/base:ui_base_unittests",
@@ -981,6 +980,10 @@ if (is_win) {
@@ -982,6 +981,10 @@ if (is_win) {
"//ui/views:views_unittests",
"//url:url_unittests",
]
@@ -602,10 +602,10 @@ index ae2339d1ab82bd7cfa971ed03a188cfc26d6e1c0..186414ee72c6b431b87b02623abd4d19
// Indication that the job is getting canceled.
bool canceling_job_ = false;
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 83bce57ef52afa2094e294ae6bbe35e5e9e7797c..a32fc474b7db1bfa07443900eac49184036136da 100644
index e175525a9626624bca06f1ac2b5babd75a8fd833..cbf981c3fc3b7fe8022312d44e054b70d3f5e43b 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -355,17 +355,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
@@ -353,17 +353,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
#endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
}
@@ -706,10 +706,10 @@ index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebde
// Tells the browser printing failed.
PrintingFailed(int32 cookie, PrintFailureReason reason);
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad2712c509660 100644
index ab80b6840e97c112db0fab65e4d0d3fa61f186dd..9524b79c3a9b770312a064e5c25fa0a0d95cd1ed 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -45,6 +45,7 @@
@@ -47,6 +47,7 @@
#include "printing/mojom/print.mojom.h"
#include "printing/page_number.h"
#include "printing/print_job_constants.h"
@@ -717,7 +717,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
#include "printing/units.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
@@ -1207,14 +1208,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1215,14 +1216,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
}
print_in_progress_ = true;
@@ -734,7 +734,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
if (!weak_this) {
return;
}
@@ -1245,7 +1246,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1253,7 +1254,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@@ -743,7 +743,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -1260,7 +1261,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1268,7 +1269,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@@ -752,7 +752,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
if (render_frame_gone_) {
return;
@@ -1349,7 +1350,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1357,7 +1358,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
}
Print(frame, print_preview_context_.source_node(),
@@ -762,7 +762,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
if (render_frame_gone_) {
return;
}
@@ -1412,6 +1414,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
@@ -1420,6 +1422,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -771,7 +771,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
print_preview_context_.OnPrintPreview();
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -2036,7 +2040,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2044,7 +2048,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
}
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -781,7 +781,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
// Check if `this` is still valid.
if (!weak_this) {
return;
@@ -2052,17 +2057,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2060,17 +2065,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -804,7 +804,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
DidFinishPrinting(PrintingResult::kFailPrintInit);
return;
}
@@ -2083,8 +2090,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2091,8 +2098,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@@ -821,7 +821,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
// Check if `this` is still valid.
if (!self)
return;
@@ -2323,25 +2337,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2331,25 +2345,33 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@@ -861,7 +861,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
return true;
}
@@ -2448,7 +2470,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
@@ -2456,7 +2478,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
std::move(params),
base::BindOnce(
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
@@ -871,10 +871,10 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271
std::move(quit_closure).Run();
},
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index 45b63865e34e6d8225e11e9b74d864f40dce5f4a..d175ab1e3aa7612467a4eb06464e1d2bfd02b243 100644
index c68b68767ac52602981278ec655d9ccfad0c30ab..df2ea4524584417d859e1a22ec8a49c88e534ae3 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -247,7 +247,7 @@ class PrintRenderFrameHelper
@@ -248,7 +248,7 @@ class PrintRenderFrameHelper
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
// printing::mojom::PrintRenderFrame:
@@ -883,7 +883,7 @@ index 45b63865e34e6d8225e11e9b74d864f40dce5f4a..d175ab1e3aa7612467a4eb06464e1d2b
void PrintWithParams(mojom::PrintPagesParamsPtr params,
PrintWithParamsCallback callback) override;
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -317,7 +317,9 @@ class PrintRenderFrameHelper
@@ -318,7 +318,9 @@ class PrintRenderFrameHelper
// WARNING: |this| may be gone after this method returns.
void Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -894,7 +894,7 @@ index 45b63865e34e6d8225e11e9b74d864f40dce5f4a..d175ab1e3aa7612467a4eb06464e1d2b
// Notification when printing is done - signal tear-down/free resources.
void DidFinishPrinting(PrintingResult result);
@@ -327,7 +329,8 @@ class PrintRenderFrameHelper
@@ -328,7 +330,8 @@ class PrintRenderFrameHelper
// Initialize print page settings with default settings.
// Used only for native printing workflow.
bool InitPrintSettings(blink::WebLocalFrame* frame,
@@ -905,10 +905,10 @@ index 45b63865e34e6d8225e11e9b74d864f40dce5f4a..d175ab1e3aa7612467a4eb06464e1d2b
// Calculate number of pages in source document.
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index f3a9f07786e91dc3a2955f677c17694183b8c69c..0647eaaf0a1991ef7861d105b74222b70401a856 100644
index 576f6e3b2ef210aaae5b74d3e93ccc62017016d3..75d8a3fa0083a82587ba6d429286764db37ba84d 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2971,8 +2971,9 @@ source_set("browser") {
@@ -2963,8 +2963,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,7 +30,7 @@ index c4255d8dfc2e3c4f1f32506e4e9edbb90a74340a..142398a8adafc94e6724ee750b612a66
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e..0e704d385ba11f418d0ea12cbd42826ba8fc8dc0 100644
index 80224052d4a3c195eabeadfb0d8863a2cf31b6e2..11fde625a13a78dec5ae8245ada514e8ca6ab2c6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2122,6 +2122,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -44,10 +44,10 @@ index 7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e..0e704d385ba11f418d0ea12cbd42826b
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6cbca31bca51095b2301c9926910139b53548a9d..cab32460f2da655fa65675a64cef0a04106f3876 100644
index 6354e6152d281d06fcd85c61b76d836bd5043e1a..4eb6047128a5cfdd1c6e62adbae7f662c477b6f1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4996,6 +4996,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -4972,6 +4972,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -60,7 +60,7 @@ index 6cbca31bca51095b2301c9926910139b53548a9d..cab32460f2da655fa65675a64cef0a04
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 f56c25e1dadb8c59eceb9ec4ca76536ca82f755d..bd7491a48a39fde39dd171aecef51c3297c0bcbe 100644
index d471d2559a21e4cd92c33fa08ab402167851654a..02352f13c1b26e9a49bf9957920424320e7c33e0 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1009,6 +1009,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,

View File

@@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 965e9562f0e891ab043cd7dfab0f53d1bb08192d..d9a8af76ff98547e5c048e1020270f7b9077c5b6 100644
index 9af71550493e372f3be34d0e8ad03ab2ae0413f0..f5fe8904e052289dfa7f83e4de3b053ec8b69f83 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -589,7 +589,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback(
@@ -598,7 +598,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback(
execution_context);
}
@@ -21,7 +21,7 @@ index 965e9562f0e891ab043cd7dfab0f53d1bb08192d..d9a8af76ff98547e5c048e1020270f7b
v8::Local<v8::Context> context,
v8::Local<v8::Data> v8_host_defined_options,
v8::Local<v8::Value> v8_referrer_resource_url,
@@ -665,7 +667,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
@@ -674,7 +676,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
}
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
@@ -30,7 +30,7 @@ index 965e9562f0e891ab043cd7dfab0f53d1bb08192d..d9a8af76ff98547e5c048e1020270f7b
v8::Local<v8::Module> module,
v8::Local<v8::Object> meta) {
ScriptState* script_state = ScriptState::From(context);
@@ -692,6 +694,8 @@ void HostGetImportMetaProperties(v8::Local<v8::Context> context,
@@ -701,6 +703,8 @@ void HostGetImportMetaProperties(v8::Local<v8::Context> context,
meta->CreateDataProperty(context, resolve_key, resolve_value).ToChecked();
}
@@ -39,7 +39,7 @@ index 965e9562f0e891ab043cd7dfab0f53d1bb08192d..d9a8af76ff98547e5c048e1020270f7b
void InitializeV8Common(v8::Isolate* isolate) {
// Set up garbage collection before setting up anything else as V8 may trigger
// GCs during Blink setup.
@@ -711,9 +715,9 @@ void InitializeV8Common(v8::Isolate* isolate) {
@@ -722,9 +726,9 @@ void InitializeV8Common(v8::Isolate* isolate) {
SharedArrayBufferConstructorEnabledCallback);
isolate->SetJavaScriptCompileHintsMagicEnabledCallback(
JavaScriptCompileHintsMagicEnabledCallback);

View File

@@ -12,12 +12,12 @@ should be removed as soon as those have been updated. Patching because
every instance is a FTBFS that prevents testing any one instance's fix.
diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h
index a04ff2452a68096bee9673d08bfa66b2fca8e7ba..098ef69594f2450a937d658f8fa710877a04481d 100644
index 1b44aeb4302d4ca0100e837e4551c5f83420cc6a..7570f6a85755b6760751cda22635cf509f61a8d0 100644
--- a/base/functional/callback_helpers.h
+++ b/base/functional/callback_helpers.h
@@ -98,6 +98,22 @@ class OnceCallbackHolder final {
} // namespace internal
@@ -123,6 +123,22 @@ RepeatingCallback<void(Args...)> ForwardRepeatingCallbacks(
std::move(v));
}
+// Wraps the given OnceCallback into a RepeatingCallback that relays its
+// invocation to the original OnceCallback on the first invocation. The

View File

@@ -23,7 +23,7 @@ index 30a7e6a641e7b17a47fb5c66fb44d3d5899b9e78..85764a533585df0abe398758e4fd510c
+#endif
}
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
index 7ecd897db8830378f82733d519c00c17093636cb..7e0a4eb93ac9444d760d13736c1a2f6381fc3a7b 100644
index ab3979e69f272bbc9596300823d96641fdf960bd..0df82b71f05c34bd7896996feabcdd91ef3ea654 100644
--- a/chrome/browser/profiles/profile_selections.cc
+++ b/chrome/browser/profiles/profile_selections.cc
@@ -121,6 +121,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const {

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