mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
49 Commits
v35.0.0-be
...
v35.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6d61577aa | ||
|
|
260933601e | ||
|
|
18007f843e | ||
|
|
4417f74a5b | ||
|
|
8a200e0427 | ||
|
|
7a0abfd667 | ||
|
|
255e4e22e4 | ||
|
|
c32fcdfede | ||
|
|
a9c535d900 | ||
|
|
aa584714cd | ||
|
|
24bc99cc2f | ||
|
|
248104ece6 | ||
|
|
0a543f389d | ||
|
|
768daef27b | ||
|
|
8e32d80512 | ||
|
|
4c81971213 | ||
|
|
2da02ec9bc | ||
|
|
05b57a2f07 | ||
|
|
4cb9c44d97 | ||
|
|
51babe4592 | ||
|
|
4015b8c48e | ||
|
|
671178cfdb | ||
|
|
3a65cfe339 | ||
|
|
8934eb1af5 | ||
|
|
02b85f1e6d | ||
|
|
5a641e02ee | ||
|
|
d291fa6ced | ||
|
|
f29559e46c | ||
|
|
3ad2989862 | ||
|
|
8ea1f5b604 | ||
|
|
b63be7b5c7 | ||
|
|
11d1f063bd | ||
|
|
eb456ec5cd | ||
|
|
c92a02ea17 | ||
|
|
74c71dbb2d | ||
|
|
497849bf66 | ||
|
|
277a80da98 | ||
|
|
fc6a602929 | ||
|
|
bdab736f08 | ||
|
|
3c6e75e22d | ||
|
|
9a7f27d845 | ||
|
|
b2b59a6c0b | ||
|
|
b6884b5c50 | ||
|
|
fa0da6f19f | ||
|
|
cf85d2d7c1 | ||
|
|
bc163a5ea8 | ||
|
|
b52917c380 | ||
|
|
cd1186a116 | ||
|
|
f1176be749 |
@@ -4,7 +4,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set the git cookie from chromium.googlesource.com (Unix)
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
if: ${{ runner.os != 'Windows' && env.CHROMIUM_GIT_COOKIE }}
|
||||
shell: bash
|
||||
run: |
|
||||
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
@@ -18,7 +18,7 @@ runs:
|
||||
__END__
|
||||
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
- name: Set the git cookie from chromium.googlesource.com (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
if: ${{ runner.os == 'Windows' && env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
shell: cmd
|
||||
run: |
|
||||
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
|
||||
|
||||
8
.github/workflows/clean-src-cache.yml
vendored
8
.github/workflows/clean-src-cache.yml
vendored
@@ -1,8 +1,12 @@
|
||||
name: Clean Source Cache
|
||||
|
||||
description: |
|
||||
This workflow cleans up the source cache on the cross-instance cache volume
|
||||
to free up space. It runs daily at midnight and clears files older than 15 days.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * SUN" # Run at midnight every Sunday
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
clean-src-cache:
|
||||
@@ -17,5 +21,5 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
df -h /mnt/cross-instance-cache
|
||||
find /mnt/cross-instance-cache -type f -mtime +30 -delete
|
||||
find /mnt/cross-instance-cache -type f -mtime +15 -delete
|
||||
df -h /mnt/cross-instance-cache
|
||||
|
||||
3
.github/workflows/pipeline-electron-lint.yml
vendored
3
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -12,6 +12,9 @@ concurrency:
|
||||
group: electron-lint-${{ github.ref_protected == true && github.run_id || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
|
||||
@@ -31,6 +31,7 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
|
||||
@@ -38,7 +39,7 @@ jobs:
|
||||
node-tests:
|
||||
name: Run Node.js Tests
|
||||
runs-on: electron-arc-linux-amd64-8core
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
BUILD_TYPE: linux
|
||||
@@ -101,7 +102,7 @@ jobs:
|
||||
nan-tests:
|
||||
name: Run Nan Tests
|
||||
runs-on: electron-arc-linux-amd64-4core
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
BUILD_TYPE: linux
|
||||
|
||||
78
.github/workflows/update_appveyor_image.yml
vendored
78
.github/workflows/update_appveyor_image.yml
vendored
@@ -1,78 +0,0 @@
|
||||
name: Update AppVeyor Image
|
||||
|
||||
# Run chron daily Mon-Fri
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 8 * * 1-5' # runs 8:00 every business day (see https://crontab.guru)
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
bake-appveyor-image:
|
||||
name: Bake AppVeyor Image
|
||||
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.APPVEYOR_UPDATER_GH_APP_CREDS }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
- name: Yarn install
|
||||
run: |
|
||||
node script/yarn.js install --frozen-lockfile
|
||||
- name: Set Repo for Commit
|
||||
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
- name: Check AppVeyor Image
|
||||
env:
|
||||
APPVEYOR_TOKEN: ${{ secrets.APPVEYOR_TOKEN }}
|
||||
run: |
|
||||
node ./script/prepare-appveyor
|
||||
if [ -f ./image_version.txt ]; then
|
||||
echo "APPVEYOR_IMAGE_VERSION="$(cat image_version.txt)"" >> $GITHUB_ENV
|
||||
rm image_version.txt
|
||||
fi
|
||||
- name: (Optionally) Update Appveyor Image
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
uses: mikefarah/yq@4839dbbf80445070a31c7a9c1055da527db2d5ee # v4.44.6
|
||||
with:
|
||||
cmd: |
|
||||
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor.yml" > "appveyor2.yml"
|
||||
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor-woa.yml" > "appveyor-woa2.yml"
|
||||
- name: (Optionally) Generate Commit Diff
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
run: |
|
||||
diff -w -B appveyor.yml appveyor2.yml > appveyor.diff || true
|
||||
patch -f appveyor.yml < appveyor.diff
|
||||
rm appveyor2.yml appveyor.diff
|
||||
git add appveyor.yml
|
||||
- name: (Optionally) Generate Commit Diff for WOA
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
run: |
|
||||
diff -w -B appveyor-woa.yml appveyor-woa2.yml > appveyor-woa.diff || true
|
||||
patch -f appveyor-woa.yml < appveyor-woa.diff
|
||||
rm appveyor-woa2.yml appveyor-woa.diff
|
||||
git add appveyor-woa.yml
|
||||
- name: (Optionally) Commit to Branch
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
|
||||
with:
|
||||
message: 'build: update appveyor image to latest version'
|
||||
ref: bump-appveyor-image
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
- name: (Optionally) Create Pull Request
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
run: |
|
||||
printf "This PR updates appveyor.yml to the latest baked image, ${{ env.APPVEYOR_IMAGE_VERSION }}.\n\nNotes: none" | gh pr create --head bump-appveyor-image --label no-backport --label semver/none --title 'build: update appveyor image to latest version' --body-file=-
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'134.0.6990.0',
|
||||
'134.0.6998.23',
|
||||
'node_version':
|
||||
'v22.9.0',
|
||||
'v22.14.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -74,10 +74,4 @@ enterprise_cloud_content_analysis = false
|
||||
# https://issues.chromium.org/issues/40943039
|
||||
content_enable_legacy_ipc = true
|
||||
|
||||
# Electron has its own unsafe-buffers enforcement directories.
|
||||
# TODO: clang_unsafe_buffers_paths = "//electron/electron_unsafe_buffers_paths.txt"
|
||||
#
|
||||
# Disables unsafe-buffers-usage plugin due to incompatibilities with our reclient implementation
|
||||
# Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5426599
|
||||
# Ref: https://github.com/electron/electron/commit/8e20f16ea35eeaeb149ae63bad3703d782665f6a
|
||||
clang_unsafe_buffers_paths = ""
|
||||
clang_unsafe_buffers_paths = "//electron/electron_unsafe_buffers_paths.txt"
|
||||
|
||||
@@ -313,6 +313,12 @@ Set the default value of the `verbatim` parameter in the Node.js [`dns.lookup()`
|
||||
|
||||
The default is `verbatim` and `dns.setDefaultResultOrder()` have higher priority than `--dns-result-order`.
|
||||
|
||||
### `--diagnostic-dir=directory`
|
||||
|
||||
Set the directory to which all Node.js diagnostic output files are written. Defaults to current working directory.
|
||||
|
||||
Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https://nodejs.org/docs/latest/api/v8.html#v8setheapsnapshotnearheaplimitlimit).
|
||||
|
||||
[app]: app.md
|
||||
[append-switch]: command-line.md#commandlineappendswitchswitch-value
|
||||
[debugging-main-process]: ../tutorial/debugging-main-process.md
|
||||
|
||||
@@ -12,9 +12,17 @@ shortcuts.
|
||||
not have the keyboard focus. This module cannot be used before the `ready`
|
||||
event of the app module is emitted.
|
||||
|
||||
Please also note that it is also possible to use Chromium's
|
||||
`GlobalShortcutsPortal` implementation, which allows apps to bind global
|
||||
shortcuts when running within a Wayland session.
|
||||
|
||||
```js
|
||||
const { app, globalShortcut } = require('electron')
|
||||
|
||||
// Enable usage of Portal's globalShortcuts. This is essential for cases when
|
||||
// the app runs in a Wayland session.
|
||||
app.commandLine.appendSwitch('enable-features', 'GlobalShortcutsPortal')
|
||||
|
||||
app.whenReady().then(() => {
|
||||
// Register a 'CommandOrControl+X' shortcut listener.
|
||||
const ret = globalShortcut.register('CommandOrControl+X', () => {
|
||||
|
||||
@@ -5,7 +5,16 @@
|
||||
Process: [Main](../glossary.md#main-process)<br />
|
||||
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._
|
||||
|
||||
Each navigation entry corresponds to a specific page. The indexing system follows a sequential order, where the first available navigation entry is at index 0, representing the earliest visited page, and the latest navigation entry is at index N, representing the most recent page. Maintaining this ordered list of navigation entries enables seamless navigation both backward and forward through the user's browsing history.
|
||||
Each [NavigationEntry](./structures/navigation-entry.md) corresponds to a specific visited page.
|
||||
The indexing system follows a sequential order, where the entry for the earliest visited
|
||||
page is at index 0 and the entry for the most recent visited page is at index N.
|
||||
|
||||
Some APIs in this class also accept an _offset_, which is an integer representing the relative
|
||||
position of an index from the current entry according to the above indexing system (i.e. an offset
|
||||
value of `1` would represent going forward in history by one page).
|
||||
|
||||
Maintaining this ordered list of navigation entries enables seamless navigation both backward and
|
||||
forward through the user's browsing history.
|
||||
|
||||
### Instance Methods
|
||||
|
||||
@@ -21,7 +30,7 @@ Returns `boolean` - Whether the browser can go forward to next web page.
|
||||
|
||||
* `offset` Integer
|
||||
|
||||
Returns `boolean` - Whether the web page can go to the specified `offset` from the current entry.
|
||||
Returns `boolean` - Whether the web page can go to the specified relative `offset` from the current entry.
|
||||
|
||||
#### `navigationHistory.clear()`
|
||||
|
||||
@@ -57,7 +66,7 @@ Navigates browser to the specified absolute web page index.
|
||||
|
||||
* `offset` Integer
|
||||
|
||||
Navigates to the specified offset from the current entry.
|
||||
Navigates to the specified relative offset from the current entry.
|
||||
|
||||
#### `navigationHistory.length()`
|
||||
|
||||
@@ -74,3 +83,22 @@ Returns `boolean` - Whether the navigation entry was removed from the webContent
|
||||
#### `navigationHistory.getAllEntries()`
|
||||
|
||||
Returns [`NavigationEntry[]`](structures/navigation-entry.md) - WebContents complete history.
|
||||
|
||||
#### `navigationHistory.restore(options)`
|
||||
|
||||
Restores navigation history and loads the given entry in the in stack. Will make a best effort
|
||||
to restore not just the navigation stack but also the state of the individual pages - for instance
|
||||
including HTML form values or the scroll position. It's recommended to call this API before any
|
||||
navigation entries are created, so ideally before you call `loadURL()` or `loadFile()` on the
|
||||
`webContents` object.
|
||||
|
||||
This API allows you to create common flows that aim to restore, recreate, or clone other webContents.
|
||||
|
||||
* `options` Object
|
||||
* `entries` [NavigationEntry[]](structures/navigation-entry.md) - Result of a prior `getAllEntries()` call
|
||||
* `index` Integer (optional) - Index of the stack that should be loaded. If you set it to `0`, the webContents will load the first (oldest) entry. If you leave it undefined, Electron will automatically load the last (newest) entry.
|
||||
|
||||
Returns `Promise<void>` - the promise will resolve when the page has finished loading the selected navigation entry
|
||||
(see [`did-finish-load`](web-contents.md#event-did-finish-load)), and rejects
|
||||
if the page fails to load (see
|
||||
[`did-fail-load`](web-contents.md#event-did-fail-load)). A noop rejection handler is already attached, which avoids unhandled rejection errors.
|
||||
|
||||
@@ -97,9 +97,10 @@
|
||||
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
|
||||
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
|
||||
Set a custom position for the traffic light buttons in frameless windows.
|
||||
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
|
||||
should have rounded corners on macOS. Default is `true`. Setting this property
|
||||
to `false` will prevent the window from being fullscreenable.
|
||||
* `roundedCorners` boolean (optional) _macOS_ _Windows_ - Whether frameless window
|
||||
should have rounded corners. Default is `true`. Setting this property
|
||||
to `false` will prevent the window from being fullscreenable on macOS.
|
||||
On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
|
||||
* `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
|
||||
Windows, which adds standard window frame. Setting it to `false` will remove
|
||||
window shadow and window animations. Default is `true`.
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
|
||||
* `url` string
|
||||
* `title` string
|
||||
* `pageState` string (optional) - A base64 encoded data string containing Chromium page state
|
||||
including information like the current scroll position or form values. It is committed by
|
||||
Chromium before a navigation event and on a regular interval.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# WebRequestFilter Object
|
||||
|
||||
* `urls` string[] - Array of [URL patterns](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) that will be used to filter out the requests that do not match the URL patterns.
|
||||
* `types` String[] (optional) - Array of types that will be used to filter out the requests that do not match the types. When not specified, all types will be matched. Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media` or `webSocket`.
|
||||
* `urls` string[] - Array of [URL patterns](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) used to include requests that match these patterns. Use the pattern `<all_urls>` to match all URLs.
|
||||
* `excludeUrls` string[] (optional) - Array of [URL patterns](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) used to exclude requests that match these patterns.
|
||||
* `types` string[] (optional) - Array of types that will be used to filter out the requests that do not match the types. When not specified, all types will be matched. Can be `mainFrame`, `subFrame`, `stylesheet`, `script`, `image`, `font`, `object`, `xhr`, `ping`, `cspReport`, `media` or `webSocket`.
|
||||
|
||||
@@ -6,7 +6,7 @@ Process: [Main](../glossary.md#main-process), [Utility](../glossary.md#utility-p
|
||||
|
||||
```js
|
||||
const { systemPreferences } = require('electron')
|
||||
console.log(systemPreferences.isAeroGlassEnabled())
|
||||
console.log(systemPreferences.getEffectiveAppearance())
|
||||
```
|
||||
|
||||
## Events
|
||||
@@ -181,35 +181,13 @@ Some popular `key` and `type`s are:
|
||||
Removes the `key` in `NSUserDefaults`. This can be used to restore the default
|
||||
or global value of a `key` previously set with `setUserDefault`.
|
||||
|
||||
### `systemPreferences.isAeroGlassEnabled()` _Windows_
|
||||
### `systemPreferences.isAeroGlassEnabled()` _Windows_ _Deprecated_
|
||||
|
||||
Returns `boolean` - `true` if [DWM composition][dwm-composition] (Aero Glass) is
|
||||
enabled, and `false` otherwise.
|
||||
|
||||
An example of using it to determine if you should create a transparent window or
|
||||
not (transparent windows won't work correctly when DWM composition is disabled):
|
||||
|
||||
```js
|
||||
const { BrowserWindow, systemPreferences } = require('electron')
|
||||
const browserOptions = { width: 1000, height: 800 }
|
||||
|
||||
// Make the window transparent only if the platform supports it.
|
||||
if (process.platform !== 'win32' || systemPreferences.isAeroGlassEnabled()) {
|
||||
browserOptions.transparent = true
|
||||
browserOptions.frame = false
|
||||
}
|
||||
|
||||
// Create the window.
|
||||
const win = new BrowserWindow(browserOptions)
|
||||
|
||||
// Navigate.
|
||||
if (browserOptions.transparent) {
|
||||
win.loadFile('index.html')
|
||||
} else {
|
||||
// No transparency, so we load a fallback that uses basic styles.
|
||||
win.loadFile('fallback.html')
|
||||
}
|
||||
```
|
||||
**Deprecated:**
|
||||
This function has been always returning `true` since Electron 23, which only supports Windows 10+.
|
||||
|
||||
[dwm-composition]: https://learn.microsoft.com/en-us/windows/win32/dwm/composition-ovw
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ The `callback` has to be called with an `response` object.
|
||||
Some examples of valid `urls`:
|
||||
|
||||
```js
|
||||
'<all_urls>'
|
||||
'http://foo:1234/'
|
||||
'http://foo.com/'
|
||||
'http://foo:1234/bar'
|
||||
|
||||
@@ -63,6 +63,29 @@ webContents.on('console-message', ({ level, message, lineNumber, sourceId, frame
|
||||
|
||||
Additionally, `level` is now a string with possible values of `info`, `warning`, `error`, and `debug`.
|
||||
|
||||
### Behavior Changed: `urls` property of `WebRequestFilter`.
|
||||
|
||||
Previously, an empty urls array was interpreted as including all URLs. To explicitly include all URLs, developers should now use the `<all_urls>` pattern, which is a [designated URL pattern](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns#all_urls) that matches every possible URL. This change clarifies the intent and ensures more predictable behavior.
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
const deprecatedFilter = {
|
||||
urls: []
|
||||
}
|
||||
|
||||
// Replace with
|
||||
const newFilter = {
|
||||
urls: ['<all_urls>']
|
||||
}
|
||||
```
|
||||
|
||||
### Deprecated: `systemPreferences.isAeroGlassEnabled()`
|
||||
|
||||
The `systemPreferences.isAeroGlassEnabled()` function has been deprecated without replacement.
|
||||
It has been always returning `true` since Electron 23, which only supports Windows 10+, where DWM composition can no longer be disabled.
|
||||
|
||||
https://learn.microsoft.com/en-us/windows/win32/dwm/composition-ovw#disabling-dwm-composition-windows7-and-earlier
|
||||
|
||||
## Planned Breaking API Changes (34.0)
|
||||
|
||||
### Behavior Changed: menu bar will be hidden during fullscreen on Windows
|
||||
|
||||
@@ -69,8 +69,25 @@ if (navigationHistory.canGoToOffset(2)) {
|
||||
}
|
||||
```
|
||||
|
||||
## Restoring history
|
||||
|
||||
A common flow is that you want to restore the history of a webContents - for instance to implement an "undo close tab" feature. To do so, you can call `navigationHistory.restore({ index, entries })`. This will restore the webContent's navigation history and the webContents location in said history, meaning that `goBack()` and `goForward()` navigate you through the stack as expected.
|
||||
|
||||
```js @ts-type={navigationHistory:Electron.NavigationHistory}
|
||||
|
||||
const firstWindow = new BrowserWindow()
|
||||
|
||||
// Later, you want a second window to have the same history and navigation position
|
||||
async function restore () {
|
||||
const entries = firstWindow.webContents.navigationHistory.getAllEntries()
|
||||
const index = firstWindow.webContents.navigationHistory.getActiveIndex()
|
||||
|
||||
const secondWindow = new BrowserWindow()
|
||||
await secondWindow.webContents.navigationHistory.restore({ index, entries })
|
||||
}
|
||||
```
|
||||
|
||||
Here's a full example that you can open with Electron Fiddle:
|
||||
|
||||
```fiddle docs/fiddles/features/navigation-history
|
||||
|
||||
```
|
||||
|
||||
@@ -14,7 +14,7 @@ _Notes_:
|
||||
* There are two rendering modes that can be used (see the section below) and only
|
||||
the dirty area is passed to the `paint` event to be more efficient.
|
||||
* You can stop/continue the rendering as well as set the frame rate.
|
||||
* The maximum frame rate is 240 because greater values bring only performance
|
||||
* When `webPreferences.offscreen.useSharedTexture` is not `true`, the maximum frame rate is 240 because greater values bring only performance
|
||||
losses with no benefits.
|
||||
* When nothing is happening on a webpage, no frames are generated.
|
||||
* An offscreen window is always created as a
|
||||
|
||||
@@ -20,4 +20,12 @@ if ('accessibilityDisplayShouldReduceTransparency' in systemPreferences) {
|
||||
});
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
const isAeroGlassEnabledDeprecated = deprecate.warnOnce('systemPreferences.isAeroGlassEnabled');
|
||||
systemPreferences.isAeroGlassEnabled = () => {
|
||||
isAeroGlassEnabledDeprecated();
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
export default systemPreferences;
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as deprecate from '@electron/internal/common/deprecate';
|
||||
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
||||
|
||||
import { app, ipcMain, session, webFrameMain, dialog } from 'electron/main';
|
||||
import type { BrowserWindowConstructorOptions, MessageBoxOptions } from 'electron/main';
|
||||
import type { BrowserWindowConstructorOptions, MessageBoxOptions, NavigationEntry } from 'electron/main';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
@@ -343,8 +343,8 @@ WebContents.prototype.loadFile = function (filePath, options = {}) {
|
||||
|
||||
type LoadError = { errorCode: number, errorDescription: string, url: string };
|
||||
|
||||
WebContents.prototype.loadURL = function (url, options) {
|
||||
const p = new Promise<void>((resolve, reject) => {
|
||||
function _awaitNextLoad (this: Electron.WebContents, navigationUrl: string) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const resolveAndCleanup = () => {
|
||||
removeListeners();
|
||||
resolve();
|
||||
@@ -402,7 +402,7 @@ WebContents.prototype.loadURL = function (url, options) {
|
||||
// the only one is with a bad scheme, perhaps ERR_INVALID_ARGUMENT
|
||||
// would be more appropriate.
|
||||
if (!error) {
|
||||
error = { errorCode: -2, errorDescription: 'ERR_FAILED', url };
|
||||
error = { errorCode: -2, errorDescription: 'ERR_FAILED', url: navigationUrl };
|
||||
}
|
||||
finishListener();
|
||||
};
|
||||
@@ -426,6 +426,10 @@ WebContents.prototype.loadURL = function (url, options) {
|
||||
this.on('did-stop-loading', stopLoadingListener);
|
||||
this.on('destroyed', stopLoadingListener);
|
||||
});
|
||||
};
|
||||
|
||||
WebContents.prototype.loadURL = function (url, options) {
|
||||
const p = _awaitNextLoad.call(this, url);
|
||||
// Add a no-op rejection handler to silence the unhandled rejection error.
|
||||
p.catch(() => {});
|
||||
this._loadURL(url, options ?? {});
|
||||
@@ -611,7 +615,27 @@ WebContents.prototype._init = function () {
|
||||
length: this._historyLength.bind(this),
|
||||
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this),
|
||||
removeEntryAtIndex: this._removeNavigationEntryAtIndex.bind(this),
|
||||
getAllEntries: this._getHistory.bind(this)
|
||||
getAllEntries: this._getHistory.bind(this),
|
||||
restore: ({ index, entries }: { index?: number, entries: NavigationEntry[] }) => {
|
||||
if (index === undefined) {
|
||||
index = entries.length - 1;
|
||||
}
|
||||
|
||||
if (index < 0 || !entries[index]) {
|
||||
throw new Error('Invalid index. Index must be a positive integer and within the bounds of the entries length.');
|
||||
}
|
||||
|
||||
const p = _awaitNextLoad.call(this, entries[index].url);
|
||||
p.catch(() => {});
|
||||
|
||||
try {
|
||||
this._restoreHistory(index, entries);
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
},
|
||||
writable: false,
|
||||
enumerable: true
|
||||
|
||||
@@ -24,6 +24,8 @@ const nextTick = (functionToCall: Function, args: any[] = []) => {
|
||||
process.nextTick(() => functionToCall(...args));
|
||||
};
|
||||
|
||||
const binding = internalBinding('fs');
|
||||
|
||||
// Cache asar archive objects.
|
||||
const cachedArchives = new Map<string, NodeJS.AsarArchive>();
|
||||
|
||||
@@ -705,7 +707,137 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
};
|
||||
|
||||
type ReaddirOptions = { encoding: BufferEncoding | null; withFileTypes?: false, recursive?: false } | undefined | null;
|
||||
type ReaddirCallback = (err: NodeJS.ErrnoException | null, files: string[]) => void;
|
||||
type ReaddirCallback = (err: NodeJS.ErrnoException | null, files?: string[]) => void;
|
||||
|
||||
const processReaddirResult = (args: any) => (args.context.withFileTypes ? handleDirents(args) : handleFilePaths(args));
|
||||
|
||||
function handleDirents ({ result, currentPath, context }: { result: any[], currentPath: string, context: any }) {
|
||||
const length = result[0].length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
const resultPath = path.join(currentPath, result[0][i]);
|
||||
const info = splitPath(resultPath);
|
||||
|
||||
let type = result[1][i];
|
||||
if (info.isAsar) {
|
||||
const archive = getOrCreateArchive(info.asarPath);
|
||||
if (!archive) return;
|
||||
const stats = archive.stat(info.filePath);
|
||||
if (!stats) continue;
|
||||
type = stats.type;
|
||||
}
|
||||
|
||||
const dirent = getDirent(currentPath, result[0][i], type);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, resultPath);
|
||||
|
||||
context.readdirResults.push(dirent);
|
||||
if (dirent.isDirectory() || stat === 1) {
|
||||
context.pathsQueue.push(path.join(dirent.path, dirent.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleFilePaths ({ result, currentPath, context }: { result: string[], currentPath: string, context: any }) {
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
const resultPath = path.join(currentPath, result[i]);
|
||||
const relativeResultPath = path.relative(context.basePath, resultPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, resultPath);
|
||||
context.readdirResults.push(relativeResultPath);
|
||||
|
||||
if (stat === 1) {
|
||||
context.pathsQueue.push(resultPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function readdirRecursive (basePath: string, options: ReaddirOptions, callback: ReaddirCallback) {
|
||||
const context = {
|
||||
withFileTypes: Boolean(options!.withFileTypes),
|
||||
encoding: options!.encoding,
|
||||
basePath,
|
||||
readdirResults: [],
|
||||
pathsQueue: [basePath]
|
||||
};
|
||||
|
||||
let i = 0;
|
||||
|
||||
function read (pathArg: string) {
|
||||
const req = new binding.FSReqCallback();
|
||||
req.oncomplete = (err: any, result: string) => {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
if (result === undefined) {
|
||||
callback(null, context.readdirResults);
|
||||
return;
|
||||
}
|
||||
|
||||
processReaddirResult({
|
||||
result,
|
||||
currentPath: pathArg,
|
||||
context
|
||||
});
|
||||
|
||||
if (i < context.pathsQueue.length) {
|
||||
read(context.pathsQueue[i++]);
|
||||
} else {
|
||||
callback(null, context.readdirResults);
|
||||
}
|
||||
};
|
||||
|
||||
const pathInfo = splitPath(pathArg);
|
||||
if (pathInfo.isAsar) {
|
||||
let readdirResult;
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) {
|
||||
const error = createError(AsarError.INVALID_ARCHIVE, { asarPath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
readdirResult = archive.readdir(filePath);
|
||||
if (!readdirResult) {
|
||||
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
// If we're in an asar dir, we need to ensure the result is in the same format as the
|
||||
// native call to readdir withFileTypes i.e. an array of arrays.
|
||||
if (context.withFileTypes) {
|
||||
readdirResult = [
|
||||
[...readdirResult], readdirResult.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
processReaddirResult({
|
||||
result: readdirResult,
|
||||
currentPath: pathArg,
|
||||
context
|
||||
});
|
||||
|
||||
if (i < context.pathsQueue.length) {
|
||||
read(context.pathsQueue[i++]);
|
||||
} else {
|
||||
callback(null, context.readdirResults);
|
||||
}
|
||||
} else {
|
||||
binding.readdir(
|
||||
pathArg,
|
||||
context.encoding,
|
||||
context.withFileTypes,
|
||||
req
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
read(context.pathsQueue[i++]);
|
||||
}
|
||||
|
||||
const { readdir } = fs;
|
||||
fs.readdir = function (pathArgument: string, options: ReaddirOptions, callback: ReaddirCallback) {
|
||||
@@ -720,7 +852,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
}
|
||||
|
||||
if (options?.recursive) {
|
||||
nextTick(callback!, [null, readdirSyncRecursive(pathArgument, options)]);
|
||||
readdirRecursive(pathArgument, options, callback);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -771,7 +903,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
}
|
||||
|
||||
if (options?.recursive) {
|
||||
return readdirRecursive(pathArgument, options);
|
||||
return readdirRecursivePromises(pathArgument, options);
|
||||
}
|
||||
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
@@ -868,12 +1000,10 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
return readPackageJSON(realPath, isESM, base, specifier);
|
||||
};
|
||||
|
||||
const binding = internalBinding('fs');
|
||||
|
||||
const { internalModuleStat } = binding;
|
||||
internalBinding('fs').internalModuleStat = (pathArgument: string) => {
|
||||
internalBinding('fs').internalModuleStat = (receiver: unknown, pathArgument: string) => {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleStat(pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleStat(receiver, pathArgument);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
// -ENOENT
|
||||
@@ -888,7 +1018,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
};
|
||||
|
||||
const { kUsePromises } = binding;
|
||||
async function readdirRecursive (originalPath: string, options: ReaddirOptions) {
|
||||
async function readdirRecursivePromises (originalPath: string, options: ReaddirOptions) {
|
||||
const result: any[] = [];
|
||||
|
||||
const pathInfo = splitPath(originalPath);
|
||||
@@ -908,7 +1038,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
if (withFileTypes) {
|
||||
initialItem = [
|
||||
[...initialItem], initialItem.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(path.join(originalPath, p));
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(originalPath, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -941,7 +1071,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
|
||||
readdirResult = [
|
||||
[...files], files.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(path.join(direntPath, p));
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(direntPath, p));
|
||||
})
|
||||
];
|
||||
} else {
|
||||
@@ -962,7 +1092,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
const { 0: pathArg, 1: readDir } = queue.pop();
|
||||
for (const ent of readDir) {
|
||||
const direntPath = path.join(pathArg, ent);
|
||||
const stat = internalBinding('fs').internalModuleStat(direntPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, direntPath);
|
||||
result.push(path.relative(originalPath, direntPath));
|
||||
|
||||
if (stat === 1) {
|
||||
@@ -992,11 +1122,13 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
}
|
||||
|
||||
function readdirSyncRecursive (basePath: string, options: ReaddirOptions) {
|
||||
const withFileTypes = Boolean(options!.withFileTypes);
|
||||
const encoding = options!.encoding;
|
||||
|
||||
const readdirResults: string[] = [];
|
||||
const pathsQueue = [basePath];
|
||||
const context = {
|
||||
withFileTypes: Boolean(options!.withFileTypes),
|
||||
encoding: options!.encoding,
|
||||
basePath,
|
||||
readdirResults: [] as any,
|
||||
pathsQueue: [basePath]
|
||||
};
|
||||
|
||||
function read (pathArg: string) {
|
||||
let readdirResult;
|
||||
@@ -1011,62 +1143,37 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
if (!readdirResult) return;
|
||||
// If we're in an asar dir, we need to ensure the result is in the same format as the
|
||||
// native call to readdir withFileTypes i.e. an array of arrays.
|
||||
if (withFileTypes) {
|
||||
if (context.withFileTypes) {
|
||||
readdirResult = [
|
||||
[...readdirResult], readdirResult.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(path.join(pathArg, p));
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
} else {
|
||||
readdirResult = binding.readdir(
|
||||
path.toNamespacedPath(pathArg),
|
||||
encoding,
|
||||
withFileTypes
|
||||
context.encoding,
|
||||
context.withFileTypes
|
||||
);
|
||||
}
|
||||
|
||||
if (readdirResult === undefined) return;
|
||||
|
||||
if (withFileTypes) {
|
||||
const length = readdirResult[0].length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
const resultPath = path.join(pathArg, readdirResult[0][i]);
|
||||
const info = splitPath(resultPath);
|
||||
|
||||
let type = readdirResult[1][i];
|
||||
if (info.isAsar) {
|
||||
const archive = getOrCreateArchive(info.asarPath);
|
||||
if (!archive) return;
|
||||
const stats = archive.stat(info.filePath);
|
||||
if (!stats) continue;
|
||||
type = stats.type;
|
||||
}
|
||||
|
||||
const dirent = getDirent(pathArg, readdirResult[0][i], type);
|
||||
|
||||
readdirResults.push(dirent);
|
||||
if (dirent.isDirectory()) {
|
||||
pathsQueue.push(path.join(dirent.path, dirent.name));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < readdirResult.length; i++) {
|
||||
const resultPath = path.join(pathArg, readdirResult[i]);
|
||||
const relativeResultPath = path.relative(basePath, resultPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(resultPath);
|
||||
|
||||
readdirResults.push(relativeResultPath);
|
||||
if (stat === 1) pathsQueue.push(resultPath);
|
||||
}
|
||||
if (readdirResult === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
processReaddirResult({
|
||||
result: readdirResult,
|
||||
currentPath: pathArg,
|
||||
context
|
||||
});
|
||||
}
|
||||
|
||||
for (let i = 0; i < pathsQueue.length; i++) {
|
||||
read(pathsQueue[i]);
|
||||
for (let i = 0; i < context.pathsQueue.length; i++) {
|
||||
read(context.pathsQueue[i]);
|
||||
}
|
||||
|
||||
return readdirResults;
|
||||
return context.readdirResults;
|
||||
}
|
||||
|
||||
// Calling mkdir for directory inside asar archive should throw ENOTDIR
|
||||
|
||||
@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
|
||||
module.
|
||||
|
||||
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
|
||||
index 8e26b987b783edd5bb399a6ef5a2c5c7b8d4a547..c925cc14eb7a0b2e30f5cad421cd225bee17985e 100644
|
||||
index f68ede9156ee57526f4578953c350798a1299f00..1de18075e1cfa7f9660fa3b065cd20bafcbe7ee8 100644
|
||||
--- a/crypto/digest/digest_extra.cc
|
||||
+++ b/crypto/digest/digest_extra.cc
|
||||
@@ -40,6 +40,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
@@ -45,6 +45,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
|
||||
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
|
||||
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
|
||||
@@ -22,10 +22,10 @@ index 8e26b987b783edd5bb399a6ef5a2c5c7b8d4a547..c925cc14eb7a0b2e30f5cad421cd225b
|
||||
// hash function when given a signature OID. To avoid unintended lax parsing
|
||||
// of hash OIDs, this is no longer supported for lookup by OID or NID.
|
||||
diff --git a/crypto/fipsmodule/digest/digests.cc.inc b/crypto/fipsmodule/digest/digests.cc.inc
|
||||
index 61dc524d4a7bb788f5ac8b39121a5e85d86d54b4..a7ce0306e9b942bc793a29a9362917d634ede98b 100644
|
||||
index 3c1bfac504c8f41788e429f23606a02e87ad03ae..c3a371029cd9e871ebffae5396cc2f8ae773409f 100644
|
||||
--- a/crypto/fipsmodule/digest/digests.cc.inc
|
||||
+++ b/crypto/fipsmodule/digest/digests.cc.inc
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/nid.h>
|
||||
@@ -33,7 +33,7 @@ index 61dc524d4a7bb788f5ac8b39121a5e85d86d54b4..a7ce0306e9b942bc793a29a9362917d6
|
||||
|
||||
#include "../../internal.h"
|
||||
#include "../bcm_interface.h"
|
||||
@@ -170,4 +171,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
|
||||
@@ -175,4 +176,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
|
||||
out->ctx_size = sizeof(SHA512_CTX);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ index 61dc524d4a7bb788f5ac8b39121a5e85d86d54b4..a7ce0306e9b942bc793a29a9362917d6
|
||||
+
|
||||
#undef CHECK
|
||||
diff --git a/decrepit/evp/evp_do_all.cc b/decrepit/evp/evp_do_all.cc
|
||||
index e199e10ca6602f231df4d83e1efe5254ee20e98f..9fd0e0225fa48b0afb90b525236e54cff17c1c84 100644
|
||||
index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b23905a4d 100644
|
||||
--- a/decrepit/evp/evp_do_all.cc
|
||||
+++ b/decrepit/evp/evp_do_all.cc
|
||||
@@ -79,6 +79,7 @@ void EVP_MD_do_all_sorted(void (*callback)(const EVP_MD *cipher,
|
||||
@@ -82,10 +82,10 @@ index e199e10ca6602f231df4d83e1efe5254ee20e98f..9fd0e0225fa48b0afb90b525236e54cf
|
||||
|
||||
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
|
||||
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
|
||||
index 19d517785976041e62fa533d8d97745b6dc074dd..30fab7cd264edb0f17b164d3e685773a5c741aea 100644
|
||||
index 5ddc2d3b4cfb8a87eb22fb707230f56dcb7ccb3e..dea3c5b3adf49e1b4aab197e822744c80964afac 100644
|
||||
--- a/include/openssl/digest.h
|
||||
+++ b/include/openssl/digest.h
|
||||
@@ -43,6 +43,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
|
||||
@@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
|
||||
// MD5 and SHA-1, as used in TLS 1.1 and below.
|
||||
OPENSSL_EXPORT const EVP_MD *EVP_md5_sha1(void);
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ RC2 Ciphers: rc2-40-cbc
|
||||
It's unclear whether this would be accepted upstream. We should try regardless.
|
||||
|
||||
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
|
||||
index 2d0f369bdeba84b157db82bd87c293ae2344c560..9088a0f29a95fe7abbb98cbf7e8be2577e5617ac 100644
|
||||
index 2622dc78d1da236862312f55bc0a40f26116486e..ac7aff6518ad5c2a0e48bd91d60a1f825851b634 100644
|
||||
--- a/crypto/cipher/get_cipher.cc
|
||||
+++ b/crypto/cipher/get_cipher.cc
|
||||
@@ -26,6 +26,7 @@ static const struct {
|
||||
@@ -31,6 +31,7 @@ static const struct {
|
||||
const EVP_CIPHER *(*func)(void);
|
||||
} kCiphers[] = {
|
||||
{NID_aes_128_cbc, "aes-128-cbc", EVP_aes_128_cbc},
|
||||
@@ -39,7 +39,7 @@ index 2d0f369bdeba84b157db82bd87c293ae2344c560..9088a0f29a95fe7abbb98cbf7e8be257
|
||||
{NID_aes_128_ctr, "aes-128-ctr", EVP_aes_128_ctr},
|
||||
{NID_aes_128_ecb, "aes-128-ecb", EVP_aes_128_ecb},
|
||||
{NID_aes_128_gcm, "aes-128-gcm", EVP_aes_128_gcm},
|
||||
@@ -36,17 +37,23 @@ static const struct {
|
||||
@@ -41,17 +42,23 @@ static const struct {
|
||||
{NID_aes_192_gcm, "aes-192-gcm", EVP_aes_192_gcm},
|
||||
{NID_aes_192_ofb128, "aes-192-ofb", EVP_aes_192_ofb},
|
||||
{NID_aes_256_cbc, "aes-256-cbc", EVP_aes_256_cbc},
|
||||
@@ -64,7 +64,7 @@ index 2d0f369bdeba84b157db82bd87c293ae2344c560..9088a0f29a95fe7abbb98cbf7e8be257
|
||||
|
||||
const EVP_CIPHER *EVP_get_cipherbynid(int nid) {
|
||||
diff --git a/decrepit/evp/evp_do_all.cc b/decrepit/evp/evp_do_all.cc
|
||||
index 9fd0e0225fa48b0afb90b525236e54cff17c1c84..dded715011ac8c1dd9e4525f0bdd64088f8007cf 100644
|
||||
index 8fdf1c624794f568bfc77b7b6b0c510b23905a4d..2e40c031e8c681fe921331b26dbf63f4df2fcf71 100644
|
||||
--- a/decrepit/evp/evp_do_all.cc
|
||||
+++ b/decrepit/evp/evp_do_all.cc
|
||||
@@ -20,8 +20,10 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
||||
@@ -118,10 +118,10 @@ index 9fd0e0225fa48b0afb90b525236e54cff17c1c84..dded715011ac8c1dd9e4525f0bdd6408
|
||||
callback(EVP_des_ede3_cbc(), "des-ede3-cbc", NULL, arg);
|
||||
callback(EVP_rc2_cbc(), "rc2-cbc", NULL, arg);
|
||||
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
|
||||
index a7ca77d9d7a6c71a66229c89af6eeb76ec91d2c2..7abc9b92ba92a4fdddb4ab38b573224544c5cf85 100644
|
||||
index 6bb135801326bc1cbe2b93f02e561e38c90abeca..06bcba4451456c72b168266859482343af76a931 100644
|
||||
--- a/include/openssl/cipher.h
|
||||
+++ b/include/openssl/cipher.h
|
||||
@@ -443,6 +443,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
@@ -448,6 +448,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
|
||||
// EVP_aes_128_cfb128 is only available in decrepit.
|
||||
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
||||
|
||||
@@ -8,7 +8,7 @@ This reverts commit ebd8b8965c74ab06bb91f7a00b23822e1f1f26ca.
|
||||
It is causing significant TLS failures in Node.js.
|
||||
|
||||
diff --git a/ssl/ssl_buffer.cc b/ssl/ssl_buffer.cc
|
||||
index 76c74e2941d9912ca93a69254f540a6a6ddd9e74..3baf5043800c8cbca73efa4d8a65a68e9ec0ecc4 100644
|
||||
index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a02124b80f9ef 100644
|
||||
--- a/ssl/ssl_buffer.cc
|
||||
+++ b/ssl/ssl_buffer.cc
|
||||
@@ -230,7 +230,6 @@ int ssl_handle_open_record(SSL *ssl, bool *out_retry, ssl_open_record_t ret,
|
||||
@@ -20,10 +20,10 @@ index 76c74e2941d9912ca93a69254f540a6a6ddd9e74..3baf5043800c8cbca73efa4d8a65a68e
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index a77b50b0f7cec57a2ce5bfcf76f5f543e6a9618a..51ee5c3546f3c803eae58da0b8ef8248efe560eb 100644
|
||||
index 98bd21eed9b71d2339c1fbc19a294cc0f00fe43b..87b6a657b4a5a5423299febb703ea5122be0bf9c 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1193,7 +1193,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1198,7 +1198,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index a77b50b0f7cec57a2ce5bfcf76f5f543e6a9618a..51ee5c3546f3c803eae58da0b8ef8248
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2560,13 +2560,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2565,13 +2565,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ feat_add_data_parameter_to_processsingleton.patch
|
||||
load_v8_snapshot_in_browser_process.patch
|
||||
fix_adapt_exclusive_access_for_electron_needs.patch
|
||||
fix_aspect_ratio_with_max_size.patch
|
||||
fix_crash_when_saving_edited_pdf_files.patch
|
||||
port_autofill_colors_to_the_color_pipeline.patch
|
||||
fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch
|
||||
build_make_libcxx_abi_unstable_false_for_electron.patch
|
||||
@@ -141,3 +140,8 @@ revert_code_health_clean_up_stale_macwebcontentsocclusion.patch
|
||||
feat_add_signals_when_embedder_cleanup_callbacks_run_for.patch
|
||||
feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
|
||||
cherry-pick-dd8e2822e507.patch
|
||||
fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch
|
||||
ignore_parse_errors_for_pkey_appusermodel_toastactivatorclsid.patch
|
||||
fix_win32_synchronous_spellcheck.patch
|
||||
fix_drag_and_drop_icons_on_windows.patch
|
||||
chore_remove_conflicting_allow_unsafe_libc_calls.patch
|
||||
|
||||
@@ -23,7 +23,7 @@ index bb4d6c56978469d3c2efb4b2d519a7a69ef538b0..b164e89a394df060f6154ad2acadf15d
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index d86148672f36ecc42f4635d61cf474f6e9348ada..48cb9025f830045aa9dbe0b6c71177d8f999b40c 100644
|
||||
index 51d32ef662315d4a9dcc544093dd1d5e93d39c6f..827f64a8b4299222ff1e9c2ee492bbdea5c1cc32 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4780,6 +4780,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
|
||||
@@ -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/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
index b8462d19d3b61e5813a0248b8667af5bbace4716..3939abfd02fa8728d48e99b1ee1c00135f8220c5 100644
|
||||
index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a8620da3d 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -23,10 +23,10 @@ index b8462d19d3b61e5813a0248b8667af5bbace4716..3939abfd02fa8728d48e99b1ee1c0013
|
||||
return receiver_.BindNewEndpointAndPassDedicatedRemote();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 6e61c80ad9779c3c703d20d0617529583cbf5973..5a756e2e5d3cef2f4ad0137dd59f22bb6b68ddb2 100644
|
||||
index ac0856149902d266654ed245a5b4933ad7f239d0..26560099f3419247b2d27ccce3538ca1b4b65afd 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -754,6 +754,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -755,6 +755,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index 5fb8a3dc69dc5fc5bfa08e01d8f03707a23c9274..41774b60b8cb7e0a22cedc597dc07ad1
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index e2d7bfcc45c6450de38a1dd1a743ac3de61f3d35..09a67ee96d89df82f14c4b10e2cf856feece66eb 100644
|
||||
index 92085aca6bd0c95a73b98e4173c0128d596b77f4..9503beefcbcfe7d99674582ece10a7e551fae96d 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -80,7 +80,7 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
|
||||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
|
||||
index 603798ae0d45836f1bf3e6608761ce1467303310..2d8caa06e418f123d7565b96d40c66fb51617a6d 100644
|
||||
index 913e465918750df6852c3ede34a75ecebab8b1fa..c81d6ad098cf977cbd8933721e539c52056c258b 100644
|
||||
--- a/content/test/test_page_broadcast.h
|
||||
+++ b/content/test/test_page_broadcast.h
|
||||
@@ -50,6 +50,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -92,7 +92,7 @@ index 603798ae0d45836f1bf3e6608761ce1467303310..2d8caa06e418f123d7565b96d40c66fb
|
||||
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
|
||||
};
|
||||
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
|
||||
index c980f3f76a37a4207bb54f18fbcdb8d0950c8856..91a9dfe56fbbcd1cc873add438947dd29c7e6646 100644
|
||||
index f868a3cc56b49b7fdac9fa1415386bd3a59a3dd7..ac7e92740bf7a61f3d8dcf8feff0fee978ffbfee 100644
|
||||
--- a/third_party/blink/public/mojom/page/page.mojom
|
||||
+++ b/third_party/blink/public/mojom/page/page.mojom
|
||||
@@ -173,4 +173,7 @@ interface PageBroadcast {
|
||||
@@ -104,7 +104,7 @@ index c980f3f76a37a4207bb54f18fbcdb8d0950c8856..91a9dfe56fbbcd1cc873add438947dd2
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index 083af135d890c2837e72c314e170e81931bd2a20..5245ea88441ef84c15b8052a9011ce70b8e9b848 100644
|
||||
index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b47141fb7 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -371,6 +371,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -116,7 +116,7 @@ index 083af135d890c2837e72c314e170e81931bd2a20..5245ea88441ef84c15b8052a9011ce70
|
||||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 7a5ad6c9f2b0598f2aab5fabcea09cf60101e890..bf141e3d121736ac38ae918cbe8400ee92325824 100644
|
||||
index 972603d6408bd428955116db395c7577530c3bb0..20b4be1d50eb00f36c545714b9a676246682a017 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2468,6 +2468,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -155,7 +155,7 @@ index 7a5ad6c9f2b0598f2aab5fabcea09cf60101e890..bf141e3d121736ac38ae918cbe8400ee
|
||||
// Do not throttle if the page should be painting.
|
||||
bool is_visible =
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 1700e9ae4809eb34bfa9e477131c928afcc87814..16bb378b55eec58f5bb1d717c3f2dd1e5ab072e3 100644
|
||||
index 06f7cf79b4526ca3ec7670c234a6bb8faec32f04..b8fe2a9b7b6b4de2a689f3857c7ce44909e6f2dc 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -166,7 +166,7 @@ index 1700e9ae4809eb34bfa9e477131c928afcc87814..16bb378b55eec58f5bb1d717c3f2dd1e
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -938,6 +939,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -936,6 +937,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ index e662d4d61595735a30d5c721147a95698d4da3d9..6a0388aad469422dd1c0c2164f8aa858
|
||||
// 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 0222da2083719693d499223c16879fb762631f5a..62d2977d81f4d30aad1ddf41be524802876694d8 100644
|
||||
index ac54c9ef09fe7a4a94737e76aa186ce6bd4f1f21..79ec1e2b1274160cca97d14a69c36eac4bc36b0f 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -748,10 +748,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -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 c428a5f8d79e826077ab05fb6c56ae8e0e4ff609..c5fd8782fc1343f04f9e2c2c0414245d20696193 100644
|
||||
index 397fd890b7db6aed6f75ee3d685fe4b7c22e875f..4f5735f7700360b30378b6e7869f3551c5ae7ba2 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
@@ -92,6 +92,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
perfetto::Category("drm"),
|
||||
perfetto::Category("drmcursor"),
|
||||
perfetto::Category("dwrite"),
|
||||
|
||||
@@ -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 66ef563af7a9698ef76ac710824234885ecb6125..e11d4f2d11a4a701c3e02719cc71d3d1f92c74fd 100644
|
||||
index 1da9a118fedc612dfed638abba54e69b983d9185..f76f04f25307c9d49edf7462c16e0e04f64109aa 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,10 +33,10 @@ index 66ef563af7a9698ef76ac710824234885ecb6125..e11d4f2d11a4a701c3e02719cc71d3d1
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 512e796b8dd07f7d06a69d4183f915b72d3e3400..6b7118ad3e507f32d4dccd26e1dddfa06cf04819 100644
|
||||
index 9f293f4ddd146e183e50ad3a99f464c10d2aaab5..9de2b989244cdf2966004b40118ea1b13d3be7b0 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4531,7 +4531,7 @@ static_library("browser") {
|
||||
@@ -4527,7 +4527,7 @@ static_library("browser") {
|
||||
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index 512e796b8dd07f7d06a69d4183f915b72d3e3400..6b7118ad3e507f32d4dccd26e1dddfa0
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index b9c2a5301ec9ff352bb7dc22478f6bdcaf73367d..46b9c69bf798fc2628442f3ce726ff4ed5f50fec 100644
|
||||
index c56a3502fd364356b6a014764eeda80ada812932..7386010cbfc6e9d29d636329bdcc160fc24cf042 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6997,9 +6997,12 @@ test("unit_tests") {
|
||||
@@ -7001,9 +7001,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index b9c2a5301ec9ff352bb7dc22478f6bdcaf73367d..46b9c69bf798fc2628442f3ce726ff4e
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -7956,6 +7959,10 @@ test("unit_tests") {
|
||||
@@ -7961,6 +7964,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index b9c2a5301ec9ff352bb7dc22478f6bdcaf73367d..46b9c69bf798fc2628442f3ce726ff4e
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8011,7 +8018,6 @@ test("unit_tests") {
|
||||
@@ -8021,7 +8028,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index ac6c76e34fdc8b84374161c2984349e4c40f6b49..bf5c630c3e7f86f20bddd5d7c1953c10d3d0f323 100644
|
||||
index 622142dcf64df8bf50a6ae5448fdf97c097e49c6..be846f0ff4d960d7d26071f4d3c9c34a3d99f233 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9401,6 +9401,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9605,6 +9605,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 ac6c76e34fdc8b84374161c2984349e4c40f6b49..bf5c630c3e7f86f20bddd5d7c1953c10
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ef5cf5d027cbae80508d188165b5a2a522a4c648..b76df2fa58a2f96d1b6dd13fec2cea420bb8ecb4 100644
|
||||
index 94917dc412682c04086cb6d2971209e660f406dc..61d09271ab44bbe4f19cfe7c5cf5b21c002d967e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5002,6 +5002,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5003,6 +5003,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
|
||||
opener);
|
||||
|
||||
@@ -37,7 +37,7 @@ index ef5cf5d027cbae80508d188165b5a2a522a4c648..b76df2fa58a2f96d1b6dd13fec2cea42
|
||||
// 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
|
||||
@@ -5043,12 +5049,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5044,12 +5050,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index 91dcf6c9c4a2d840fb50cb329fe3ef1bba9103c3..cbc887a3034605a93468e73a310e9ca6
|
||||
|
||||
// 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 fb1309ff3283ba220b4ffcc01abd217211c0a57c..2f8bdfa586c1392264ed7ce6c6aee36b2c6b8577 100644
|
||||
index f07621fc686236a9b009d425b96d2a847ffd07cf..6d7b34575a4831eafca792a5b8ed4720d4ad5957 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -805,6 +805,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -79,7 +79,7 @@ index fb1309ff3283ba220b4ffcc01abd217211c0a57c..2f8bdfa586c1392264ed7ce6c6aee36b
|
||||
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 e418a12409a250a747a194c137807a2d2cfb4e8d..7bda9f416d7399a3e9fe42ec22af374ba9c4130f 100644
|
||||
index 373e9128eeefb3931059fc67099b00fdc071a52e..045689f947f45e7d4c50850ba760b0861af79798 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -203,6 +203,7 @@ class NetworkService;
|
||||
@@ -100,10 +100,10 @@ index e418a12409a250a747a194c137807a2d2cfb4e8d..7bda9f416d7399a3e9fe42ec22af374b
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 210854ca740d53d62d53dcc48af813a510f46fbc..01fdc6dd78c2238b634d78f5d7be45577cd18878 100644
|
||||
index ece9688e5f0a06be4cb6fb2d85e60269d0f66463..a955b37b93ca0887f3fba1ebea4a3c89e62aa6bc 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -31,6 +31,17 @@ namespace content {
|
||||
@@ -32,6 +32,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
@@ -122,7 +122,7 @@ index 210854ca740d53d62d53dcc48af813a510f46fbc..01fdc6dd78c2238b634d78f5d7be4557
|
||||
WebContents* source,
|
||||
const OpenURLParams& params,
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 6f8cb1cafde354923f494c1151169e916735de7f..375d5b8c8046b66aff9c7b5e482c347e4820603e 100644
|
||||
index fbd5d3275fb9dfb04bee078b5ef275926fdad926..3938045d8028abff5f44ad347b514e4f823748cd 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -148,10 +148,10 @@ index 6f8cb1cafde354923f494c1151169e916735de7f..375d5b8c8046b66aff9c7b5e482c347e
|
||||
// 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 4db85df1bd41ed1c9220a42cf1db57d9241e5817..d86148672f36ecc42f4635d61cf474f6e9348ada 100644
|
||||
index 5d9ad1b7d5dfce78ce411a7670d4b20f35747b88..51d32ef662315d4a9dcc544093dd1d5e93d39c6f 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6891,6 +6891,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6893,6 +6893,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -210,10 +210,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 3f43b8dcfc99a2d168f994ab18f6ed325a8df867..c021d1d050bea88a1e65e0e8a49dfde4b91c81f2 100644
|
||||
index 28c64640717f499227786f661336557b9eede5d0..1e059a7f69c498d94a4e35b42ced76802e30575d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2264,6 +2264,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2269,6 +2269,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ index 932351e288f37fd09ae1a43f44e8b51fb0caa4b8..4a0616bc210d234e51e564daabdd2ebd
|
||||
// Overridden from WidgetObserver.
|
||||
void OnWidgetThemeChanged(Widget* widget) override;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index eddd85cfcfa0ca85bfee0fab1ae217e1b567b21a..b33728cb13d07ad0805379ff2cf8f734b6cbf7cf 100644
|
||||
index 2bd015be3178ab8dea012d6b1f71d13dd0548c14..759f00dd4e674d1dfca690b82e6e1820900ebf0c 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3142,15 +3142,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3144,15 +3144,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
}
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
|
||||
@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
|
||||
by changing something in Electron.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index b48b57fd851430b273d89efe23ba8287e238a992..036f36e0db1ca493bbeefc5f9bfcc1da743eabe6 100644
|
||||
index 96c246c74529f01df55416d756245be60630f9ac..9ab2ef6e7c0c66b0405c5af38722c9a0c2dca4b5 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4921,7 +4921,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4922,7 +4922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
: IsGuest();
|
||||
// While some guest types do not have a guest SiteInstance, the ones that
|
||||
// don't all override WebContents creation above.
|
||||
|
||||
@@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 79dc99f9c0ccb87725dbad44de7f0b6de7c05ca1..cd9d136ea162efb45a69324246debf7c128bf942 100644
|
||||
index 3d0ffcbb38c234b97fe8df33e34eab5386bd59b8..0ac03ba26534494f963238672c1aa253e4a601e8 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2203,12 +2203,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2210,12 +2210,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 4fc5cf0ca116f75b46ce61f1315c6666c54e1009..ea3051dcced29ea08d557dd94b5bf255aa828ddc 100644
|
||||
index 393d05a3adc42cc960283b2572e52b80db9010eb..37ee5a89d187f25b2d07d022238e0d60799f93fe 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4884,8 +4884,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4885,8 +4885,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -232,10 +232,10 @@ index 4fc5cf0ca116f75b46ce61f1315c6666c54e1009..ea3051dcced29ea08d557dd94b5bf255
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 01fdc6dd78c2238b634d78f5d7be45577cd18878..9b5f6d23b5c7af8b15ee519de7f874672e8c3f50 100644
|
||||
index a955b37b93ca0887f3fba1ebea4a3c89e62aa6bc..7b764a2f9a18a1650c88e2ab22ca4c2e9e73b7d8 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -152,8 +152,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -153,8 +153,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -246,7 +246,7 @@ index 01fdc6dd78c2238b634d78f5d7be45577cd18878..9b5f6d23b5c7af8b15ee519de7f87467
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 375d5b8c8046b66aff9c7b5e482c347e4820603e..89525e0b9c04105e0b1f4e664353731428bd5882 100644
|
||||
index 3938045d8028abff5f44ad347b514e4f823748cd..ac40cfdbd35ba560f5363f84122140833315e907 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -345,8 +345,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -324,7 +324,7 @@ index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 61f132263c03d95870ecdc5bf3bdebb918ad7b4f..4ecf934005d01463bee92b3caf82c9161dab97e3 100644
|
||||
index 16babdc7affdaef1af24850cf35494b8b4fe1479..1e77b091d94457c892788f7a441a83e7a96a49cc 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -452,8 +452,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Sat, 22 Feb 2025 13:15:39 -0600
|
||||
Subject: chore: remove conflicting allow_unsafe_libc_calls
|
||||
|
||||
We want builds to fail if a buffer warning comes from Electron code but
|
||||
not from code that we don't maintain (e.g. upstream Chromium code), so
|
||||
//electron/electron_unsafe_buffer_paths.txt turns off Chromium warnings.
|
||||
|
||||
There are some upstream files that generate warnings *and* also have
|
||||
pragmas that override //electron/electron_unsafe_buffer_paths.txt,
|
||||
forcing them to be tested. This breaks our build.
|
||||
|
||||
Files can be removed from this patch when upstream either removes the
|
||||
pragma or fixes the other warnings. This patch can be removed when no
|
||||
files are left.
|
||||
|
||||
diff --git a/net/cookies/parsed_cookie.cc b/net/cookies/parsed_cookie.cc
|
||||
index 7d5d0106a3675b3fa21b0e00a755f5c0ed11c87b..d26c645d70b54b31815c8140954ee6d0a34fa8af 100644
|
||||
--- a/net/cookies/parsed_cookie.cc
|
||||
+++ b/net/cookies/parsed_cookie.cc
|
||||
@@ -2,11 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-#ifdef UNSAFE_BUFFERS_BUILD
|
||||
-// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
|
||||
-#pragma allow_unsafe_libc_calls
|
||||
-#endif
|
||||
-
|
||||
// Portions of this code based on Mozilla:
|
||||
// (netwerk/cookie/src/nsCookieService.cpp)
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
|
||||
index 34ef2be4415825254c41d5970be33b1195a9a381..4a3462664c22f6d367e02ac03551c22c0db52a4d 100644
|
||||
--- a/net/http/http_response_headers.cc
|
||||
+++ b/net/http/http_response_headers.cc
|
||||
@@ -2,11 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-#ifdef UNSAFE_BUFFERS_BUILD
|
||||
-// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
|
||||
-#pragma allow_unsafe_libc_calls
|
||||
-#endif
|
||||
-
|
||||
// The rules for header parsing were borrowed from Firefox:
|
||||
// http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpResponseHead.cpp
|
||||
// The rules for parsing content-types were also borrowed from Firefox:
|
||||
@@ -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 6fd7e2dc34d676e2b00739935992172cb2ddb2cf..22787225d94d5370d61e059dc9a4919c738de88d 100644
|
||||
index 7142484a2afd4c3cef4cac613c5f68e3c52e8eab..0fcc5e54df1993d04c060be23815d991b6c51286 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -269,8 +269,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
|
||||
@@ -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 5d096402b44d0684ed861fee090f87177fa1ffb5..6feb46048f45271e72ff1137c33c4073d101f646 100644
|
||||
index ff25eb3670d2391c6fb41b7c612c30ee8798983f..116763b520713a5c61462b2e048a7358486831a2 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1964,6 +1964,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1969,6 +1969,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 5d096402b44d0684ed861fee090f87177fa1ffb5..6feb46048f45271e72ff1137c33c4073
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1983,9 +2003,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1988,9 +2008,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme_piece() == kChromeUIScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
@@ -49,7 +49,7 @@ index 5d096402b44d0684ed861fee090f87177fa1ffb5..6feb46048f45271e72ff1137c33c4073
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -1993,9 +2011,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1998,9 +2016,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 86886e94e9e2c52e297a82175f6071852e792148..bac05714537680f163d1a30a5fe9523a469abe6d 100644
|
||||
index a98631cbb6fde0a41dedbbcd642cc721d36ac88d..8e01ae3751e0d3698be4f0c6cb693780f2f24ded 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -559,7 +559,11 @@
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index aac39964c3aff5f58d473330c714051deec8e473..58ddbafd8a35b1e7246be65cb5e633b9ac629ed8 100644
|
||||
index 734e717d2cc5cf31473ed47f733a619dfacca39e..761469e3ca95ebe1269f005a2b3527cd1f4fdc56 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -819,6 +819,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -799,6 +799,10 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ index aac39964c3aff5f58d473330c714051deec8e473..58ddbafd8a35b1e7246be65cb5e633b9
|
||||
// Prompts should remain open and functional across tab switches.
|
||||
if (!delegate_->IsWaitingForPointerLockPrompt(this)) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 64b4e2fb0a2c2dff82f5fb03b098f0b16eaff8df..6cd7fd0b919c98146e21b033ba8b848ed87b8633 100644
|
||||
index c3429732757d87df1363a8ce10deee82ef674514..4cf7f44c7fd955cc4d19c11cc0015d3d8562d950 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1014,6 +1014,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -1010,6 +1010,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// Requests a commit and forced redraw in the renderer compositor.
|
||||
void ForceRedrawForTesting();
|
||||
|
||||
@@ -35,7 +35,7 @@ index 64b4e2fb0a2c2dff82f5fb03b098f0b16eaff8df..6cd7fd0b919c98146e21b033ba8b848e
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index eaf23665d72fccbf3cfb368d88418181aaa07285..e2d7bfcc45c6450de38a1dd1a743ac3de61f3d35 100644
|
||||
index 1d08f25b91496dbafc3a164e7fb3e66d1a48557b..92085aca6bd0c95a73b98e4173c0128d596b77f4 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index 12e7d81dcdaa1c0f5d5dbcad0ebbe4c9a8105e05..bba22cd1107e0970ada8b0b54cd12623142a55ed 100644
|
||||
index d05708d42a0dc1aea4faad3be19f558c93e93265..13dda0bf6560ca03c4c88e787cc4165dfe745b26 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1463,6 +1463,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1464,6 +1464,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index 12e7d81dcdaa1c0f5d5dbcad0ebbe4c9a8105e05..bba22cd1107e0970ada8b0b54cd12623
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1512,6 +1513,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1513,6 +1514,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ index 88d8d9985c6b4c7051f00cba9dfa51b3fcfa524b..2d05856687cd9669f72553d33c8033fd
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index f2668811d73c2211d81b753d5fcc117100a95a55..2aa793660fa963b719c2d7ee71ddf4698744d34c 100644
|
||||
index b3dc46c34f2aff45b3bd8ea041f2e55ba61d50f9..a802f4b710b6f8fa154d11846c061720a91e15e4 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -988,8 +988,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 20e6a7aec3702865916d8cd339e3a2caf1793917..e628e7e903f0d6ee808cb21ec2e7e678ace66f27 100644
|
||||
index b7bdda9141ba4ea3c3ab391ec68dff14a4ac717b..3d32e7dcc85abd315bae38f2f0a6504dc0cffe86 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1794,6 +1794,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1795,6 +1795,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index 20e6a7aec3702865916d8cd339e3a2caf1793917..e628e7e903f0d6ee808cb21ec2e7e678
|
||||
// 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 e1e6f9bf5ff44bcf5f71bae1ad43fbaf071851b1..e57968af00863af018a6a85a6256dc9e5a19a61e 100644
|
||||
index cc94073bc278af202cd6bbb47882b56f48a2ebbe..16f63000f1d7c62430ca762240bbacf4d9d11436 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -63,10 +63,10 @@ index e1e6f9bf5ff44bcf5f71bae1ad43fbaf071851b1..e57968af00863af018a6a85a6256dc9e
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 891a80b394671205765bddc622a12e1002c146ce..a46fb90c054c85f15dbe27226e6992d729636893 100644
|
||||
index 029287034d13f7c2bffa60900ecbbaa980330bf4..64688c3a31993dc2ae60f2c187d1fa1db1a40e19 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1261,6 +1261,9 @@ interface NetworkContext {
|
||||
@@ -1253,6 +1253,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
||||
@@ -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 bf141e3d121736ac38ae918cbe8400ee92325824..72fddbeb82f8b662381a10e7e01d4a54be15db9b 100644
|
||||
index 20b4be1d50eb00f36c545714b9a676246682a017..6852fed1b09408857d42727c5bcd422f0fe7322b 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -169,6 +169,7 @@
|
||||
|
||||
@@ -62,7 +62,7 @@ index 4e825d649919c88aad26e4c3b2fd80575ca57db0..de1d8fea0113b55065e5229b07f95d69
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index f9680f5f46180313ef98df97e242f72ac3dfd0dc..5571532504b4752faad2ed5712ba1ef813e32a84 100644
|
||||
index 2b2a12cd9d1ac17a245f049cf0775b46c0596531..350586d35b29fb8d772ea70615768d0e62dc5474 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -688,6 +688,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
|
||||
@@ -259,7 +259,7 @@ index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285
|
||||
+
|
||||
} // namespace content
|
||||
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
index e5f48a4e0a6059f9555516a3e824e2157e3b0b60..37cd9b6e15cbbc31a19ee8317786c9c5f09199e2 100644
|
||||
index 18a3609bfd344716ba7cd550f66d4c4700d227b0..106884585ba2c6e75053474dbd15c728c79fcac1 100644
|
||||
--- a/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
@@ -85,10 +85,10 @@ index 31a2a14a95540477297943df9b09b1e4659a884d..c02a81b1bd14a300dbbb47ad7aac2d2d
|
||||
DCHECK(GetZygoteForLaunch());
|
||||
// Environment variables could be supported in the future, but are not
|
||||
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
|
||||
index 6baede18711c3e2fddaccb66632ea11f33699748..15339f4b1ea0e11f1823c264ff31685652c8de71 100644
|
||||
index 1d981cec12769d145b694b61772b4c09616df9f0..cf9d9bfe7af12e16520354ebd1f7bc4050c57ec7 100644
|
||||
--- a/content/browser/child_process_launcher_helper_mac.cc
|
||||
+++ b/content/browser/child_process_launcher_helper_mac.cc
|
||||
@@ -110,7 +110,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
@@ -107,7 +107,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
'mojo', base::MachRendezvousPort(endpoint.TakeMachReceiveRight())));
|
||||
|
||||
options->environment = delegate_->GetEnvironment();
|
||||
@@ -98,7 +98,7 @@ index 6baede18711c3e2fddaccb66632ea11f33699748..15339f4b1ea0e11f1823c264ff316856
|
||||
options->disclaim_responsibility = delegate_->DisclaimResponsibility();
|
||||
options->enable_cpu_security_mitigations =
|
||||
delegate_->EnableCpuSecurityMitigations();
|
||||
@@ -177,6 +178,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
@@ -175,6 +176,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe));
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..f6082bada22c5f4e70af60ea6f555b0f
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index 517415f7db0eca691d366b299da259fc1fae0785..b87ff8e533963b0af2a9e71d75436620053c7f18 100644
|
||||
index 5521f41ee56e5fb46695e9f828a269a215eeedde..9fe00bd105d237cc411ce2e179a6ba6f91ded89b 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -184,11 +184,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
@@ -237,7 +237,7 @@ index 517415f7db0eca691d366b299da259fc1fae0785..b87ff8e533963b0af2a9e71d75436620
|
||||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -441,9 +467,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -442,9 +468,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
|
||||
|
||||
|
||||
@@ -522,7 +522,7 @@ index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109cc
|
||||
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 98b33c9def2596c820fc0fbf96de989f0b2cef02..6b915e3ebd9b96c68fe34a9f8c0e16bd0c2a9bee 100644
|
||||
index 2707617f5ba99783d604b32abe72b6d7220a58e5..8d0ab7d1d203371ae1f4269ece4e2aab394cb534 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -111,7 +111,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
|
||||
@@ -52,10 +52,10 @@ index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4
|
||||
|
||||
private:
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index b87ff8e533963b0af2a9e71d75436620053c7f18..c40792b43388d90b401450810e3d0f186ffc1f9f 100644
|
||||
index 9fe00bd105d237cc411ce2e179a6ba6f91ded89b..4b49a7e2c2693585b30bf031e32b40976c888e21 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -524,7 +524,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
@@ -525,7 +525,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
|
||||
// Take ownership of |client_| so the destructor doesn't notify it of
|
||||
// termination.
|
||||
auto client = std::move(client_);
|
||||
|
||||
@@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide
|
||||
access to these headers for loader clients created on the browser process.
|
||||
|
||||
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
|
||||
index 677e8db2114350e5368b56bd8857957a5d99b419..9b5a1b7b66542aca6cace76d40cd8a3409d11f23 100644
|
||||
index babcf42e01be00da8b853a1207e869614765b2bb..1c051a64d77e3ea8909dced73d93764d06ed7152 100644
|
||||
--- a/services/network/public/cpp/resource_request.cc
|
||||
+++ b/services/network/public/cpp/resource_request.cc
|
||||
@@ -170,6 +170,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
|
||||
@@ -177,6 +177,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
|
||||
allow_cookies_from_browser = other.allow_cookies_from_browser;
|
||||
include_request_cookies_with_response =
|
||||
other.include_request_cookies_with_response;
|
||||
@@ -28,7 +28,7 @@ index 677e8db2114350e5368b56bd8857957a5d99b419..9b5a1b7b66542aca6cace76d40cd8a34
|
||||
cookie_observer =
|
||||
Clone(&const_cast<mojo::PendingRemote<mojom::CookieAccessObserver>&>(
|
||||
other.cookie_observer));
|
||||
@@ -204,6 +205,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
|
||||
@@ -211,6 +212,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
|
||||
const TrustedParams& other) const {
|
||||
return isolation_info.IsEqualForTesting(other.isolation_info) &&
|
||||
disable_secure_dns == other.disable_secure_dns &&
|
||||
@@ -37,10 +37,10 @@ index 677e8db2114350e5368b56bd8857957a5d99b419..9b5a1b7b66542aca6cace76d40cd8a34
|
||||
allow_cookies_from_browser == other.allow_cookies_from_browser &&
|
||||
include_request_cookies_with_response ==
|
||||
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
|
||||
index 76e4130d4f84348af2ace1dfe809c48e4b4d4d6a..24c715db250227818dbe889597f4685778eff557 100644
|
||||
index 23762da9e9ff297007685662f45343b68d7aa351..cc4b067095a46ca34e5d409b10f0c91486b399a8 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -75,6 +75,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
@@ -76,6 +76,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
bool has_user_activation = false;
|
||||
bool allow_cookies_from_browser = false;
|
||||
bool include_request_cookies_with_response = false;
|
||||
|
||||
@@ -20,7 +20,7 @@ This patch will be removed when the deprecated sync api support is
|
||||
removed.
|
||||
|
||||
diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc
|
||||
index fa509af4793bc92cd6fe2ac937b3bc457b3e69a0..2c7ccc0f347b2cbca8662990d6a2617fb425bd07 100644
|
||||
index ce926b9da23df5dc9b36a447755c9251dac0c95b..97976ff9ce81bf4939a0f638f19be5691ceeab9d 100644
|
||||
--- a/components/permissions/permission_util.cc
|
||||
+++ b/components/permissions/permission_util.cc
|
||||
@@ -384,6 +384,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe(
|
||||
@@ -44,7 +44,7 @@ index e991887c103618b35688cf72307ca05fdb202e6e..54894f3412d42264eae80d767be5215e
|
||||
}
|
||||
}
|
||||
diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc
|
||||
index dfcd99a4336db5c5b8b722c6612b8abbf419a08f..9f074285203e6ee408abf8275f3070221b0d25c0 100644
|
||||
index 779b458094edfa866ac70d7e0ac6413cc700c6a5..b42cbc34f1d2e214d8cc6ed2aacfa9ae21c2569a 100644
|
||||
--- a/third_party/blink/common/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/common/permissions/permission_utils.cc
|
||||
@@ -99,6 +99,8 @@ std::string GetPermissionString(PermissionType permission) {
|
||||
@@ -65,7 +65,7 @@ index dfcd99a4336db5c5b8b722c6612b8abbf419a08f..9f074285203e6ee408abf8275f307022
|
||||
|
||||
case PermissionType::NUM:
|
||||
diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h
|
||||
index ae03b7f099d30c157cfda7d1beb7c535d3615471..ca287e7a5271ee83c393de6c1fe347973f4292ba 100644
|
||||
index f9b1db54dd367d1f0e42cdfcfd04255d452f0e1b..54b4b742298af03d8924f6ad613081f1b5dfae4d 100644
|
||||
--- a/third_party/blink/public/common/permissions/permission_utils.h
|
||||
+++ b/third_party/blink/public/common/permissions/permission_utils.h
|
||||
@@ -64,6 +64,7 @@ enum class PermissionType {
|
||||
|
||||
@@ -14,7 +14,7 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
|
||||
this use case in mind currently.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 3d1397ff82803c9ba45bdcee0b2c61ab5c8049a4..1e6a6715691e07c22202d865dce89c94b3e02d76 100644
|
||||
index 9888ac709c51cd30228e3bca6915f7d89071cb83..e7b2bc1905958d2ff9c34ed7a22eb53e7ea3b9b8 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -932,13 +932,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
|
||||
|
||||
@@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this
|
||||
change.
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696e823771c 100644
|
||||
index 458029244ad9db7beace040778117d82d90f4bea..66202201b11de10bf2d781a52640a81f25d04780 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -20,12 +20,16 @@
|
||||
@@ -36,7 +36,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "components/history/core/browser/history_service.h"
|
||||
#include "components/history/core/browser/history_types.h"
|
||||
@@ -263,11 +267,13 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -271,11 +275,13 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
|
||||
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
|
||||
// value of |IsWindowFullscreenForTabOrPending|.
|
||||
@@ -381,12 +387,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -389,12 +395,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
void FullscreenController::FullscreenTabOpeningPopup(
|
||||
content::WebContents* opener,
|
||||
content::WebContents* popup) {
|
||||
@@ -65,7 +65,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
}
|
||||
|
||||
void FullscreenController::OnTabDeactivated(
|
||||
@@ -476,10 +484,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
@@ -484,10 +492,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
|
||||
#endif // DCHECK_IS_ON()
|
||||
tab_fullscreen_target_display_id_ = display::kInvalidDisplayId;
|
||||
started_fullscreen_transition_ = false;
|
||||
@@ -78,7 +78,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
}
|
||||
|
||||
void FullscreenController::RunOrDeferUntilTransitionIsComplete(
|
||||
@@ -604,18 +614,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -612,18 +622,17 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
@@ -102,7 +102,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
if (option == TAB) {
|
||||
url = GetRequestingOrigin();
|
||||
tab_fullscreen_ = true;
|
||||
@@ -650,6 +659,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -658,6 +667,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
url = extension_caused_fullscreen_;
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
|
||||
fullscreen_start_time_ = base::TimeTicks::Now();
|
||||
if (option == BROWSER) {
|
||||
@@ -671,6 +681,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -679,6 +689,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
|
||||
if (fullscreen_start_time_ && exclusive_access_tab()) {
|
||||
ukm::SourceId source_id =
|
||||
@@ -682,15 +693,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
@@ -690,15 +701,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
|
||||
.Record(ukm::UkmRecorder::Get());
|
||||
fullscreen_start_time_.reset();
|
||||
}
|
||||
@@ -138,7 +138,7 @@ index 5ad01788be680f005f3179141995aef72e36bd0c..da05b9ee80d537cfa5e039f1e1a46696
|
||||
exclusive_access_manager()->context()->ExitFullscreen();
|
||||
extension_caused_fullscreen_ = GURL();
|
||||
exclusive_access_manager()->UpdateBubble(base::NullCallback());
|
||||
@@ -754,8 +766,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
@@ -762,8 +774,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
|
||||
void FullscreenController::RecordMetricsOnFullscreenApiRequested(
|
||||
content::RenderFrameHost* requesting_frame) {
|
||||
history::HistoryService* service =
|
||||
|
||||
@@ -12,7 +12,7 @@ ui problems (like dissapearing popup during typing in html's
|
||||
input list.
|
||||
|
||||
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
|
||||
index 95fb3d4996e91b84fc5f1438e35e7293cb672891..255cd7359cfb3a273edbca4bf238c36ca5d0577b 100644
|
||||
index 6dae25a61bfaf26c59f044628629771c36be73f3..2e76f18cf48303462c7489a01d002a3531695b83 100644
|
||||
--- a/ui/views/widget/widget.h
|
||||
+++ b/ui/views/widget/widget.h
|
||||
@@ -1201,6 +1201,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
|
||||
@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
|
||||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 2aa793660fa963b719c2d7ee71ddf4698744d34c..eddd85cfcfa0ca85bfee0fab1ae217e1b567b21a 100644
|
||||
index a802f4b710b6f8fa154d11846c061720a91e15e4..2bd015be3178ab8dea012d6b1f71d13dd0548c14 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3745,15 +3745,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
@@ -3747,15 +3747,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
|
||||
min_window_size = delegate_->DIPToScreenSize(min_window_size);
|
||||
max_window_size = delegate_->DIPToScreenSize(max_window_size);
|
||||
|
||||
@@ -28,17 +28,17 @@ The patch should be removed in favor of either:
|
||||
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 85044aec3ec4d3d03ff10b4c893a7ff257364d51..0c75e426cf32023ea35e6d5044abbfbec9845939 100644
|
||||
index e51bcccd6f63f01bc736721b1a7057d3380327e4..37191b945003289b90aa3d4c0473bd79ac4e1dd6 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10946,6 +10946,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10953,6 +10953,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
"blob");
|
||||
}
|
||||
|
||||
+ if (!IsInMainFrame() && !common_params().url.IsStandard()) {
|
||||
+ if (!common_params().url.IsStandard() && !common_params().url.IsAboutBlank()) {
|
||||
+ return std::make_pair(url::Origin::Resolve(common_params().url,
|
||||
+ url::Origin()),
|
||||
+ "url_non_standard");
|
||||
+ url::Origin()),
|
||||
+ "url_non_standard");
|
||||
+ }
|
||||
+
|
||||
// In cases not covered above, URLLoaderFactory should be associated with the
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 17 Jan 2022 23:47:54 +0100
|
||||
Subject: fix: crash when saving edited PDF files
|
||||
|
||||
Originally, this patch contained a code change. Since then, the code has
|
||||
been upstreamed[1] but placed behind a flag. This patch now enables the
|
||||
flag by default, therefore using the code fix from the original patch.
|
||||
|
||||
This flag will eventually be removed and the original code fix will be
|
||||
all that is left behind. When that happens, this patch will be safe to
|
||||
remove.
|
||||
|
||||
[1]: https://chromium-review.googlesource.com/c/chromium/src/+/6205762
|
||||
|
||||
Original patch description:
|
||||
|
||||
> This commit fixes a crash that persists any time a user attempts to
|
||||
> download an edited PDF. This was happening because the logic flow for
|
||||
> downloading of any edited PDF triggers a call to
|
||||
> chrome.fileSystem.chooseEntry, which we do not support and which
|
||||
> therefore causes unmapped page access crashes.
|
||||
>
|
||||
> This patch can be removed should we choose to support chrome.fileSystem
|
||||
> or support it enough to fix the crash.
|
||||
|
||||
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
index 0bab3a5c852357bb6dc7758e573093a080e06b79..594d168331eba048b4bc5d25ad6f6834e2e88360 100644
|
||||
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
|
||||
@@ -269,7 +269,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
|
||||
// <if expr="enable_pdf_ink2">
|
||||
protected pdfInk2Enabled_: boolean = false;
|
||||
// </if>
|
||||
- private pdfUseShowSaveFilePicker_: boolean = false;
|
||||
+ private pdfUseShowSaveFilePicker_: boolean = true;
|
||||
private pluginController_: PluginController = PluginController.getInstance();
|
||||
protected printingEnabled_: boolean = false;
|
||||
// <if expr="enable_pdf_ink2">
|
||||
diff --git a/pdf/pdf_features.cc b/pdf/pdf_features.cc
|
||||
index 387174b3ee8aa39f0e3c4c67274e8c6b738c889f..a8ee6d48009de8fb10eff8689a694ac2e60a3723 100644
|
||||
--- a/pdf/pdf_features.cc
|
||||
+++ b/pdf/pdf_features.cc
|
||||
@@ -55,7 +55,7 @@ BASE_FEATURE(kPdfTags, "PdfTags", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPdfUseShowSaveFilePicker,
|
||||
"PdfUseShowSaveFilePicker",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kPdfUseSkiaRenderer,
|
||||
"PdfUseSkiaRenderer",
|
||||
162
patches/chromium/fix_drag_and_drop_icons_on_windows.patch
Normal file
162
patches/chromium/fix_drag_and_drop_icons_on_windows.patch
Normal file
@@ -0,0 +1,162 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: David Sanders <dsanders11@ucsbalum.com>
|
||||
Date: Fri, 21 Feb 2025 00:46:48 -0800
|
||||
Subject: fix: drag and drop icons on Windows
|
||||
|
||||
This is a backport from Chromium of
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/6279834
|
||||
|
||||
Change-Id: Ic642228f3a0a073b9b45fbec68de37be6cfd3934
|
||||
|
||||
diff --git a/chrome/browser/ui/views/tabs/tab_close_button.cc b/chrome/browser/ui/views/tabs/tab_close_button.cc
|
||||
index 281d6c6fcccbf3bfc3396056e495ee8d19424f5a..ac335a68f3fd0e3931cb37c915de51e410734850 100644
|
||||
--- a/chrome/browser/ui/views/tabs/tab_close_button.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_close_button.cc
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/base/pointer/touch_ui_controller.h"
|
||||
-#include "ui/compositor/layer.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/gfx/geometry/insets.h"
|
||||
@@ -63,8 +62,6 @@ TabCloseButton::TabCloseButton(PressedCallback pressed_callback,
|
||||
views::InkDrop::Get(this)->GetInkDrop()->SetHoverHighlightFadeDuration(
|
||||
base::TimeDelta());
|
||||
|
||||
- image_container_view()->DestroyLayer();
|
||||
-
|
||||
// The ink drop highlight path is the same as the focus ring highlight path,
|
||||
// but needs to be explicitly mirrored for RTL.
|
||||
// TODO(http://crbug.com/1056490): Make ink drops in RTL work the same way as
|
||||
@@ -145,20 +142,6 @@ void TabCloseButton::OnGestureEvent(ui::GestureEvent* event) {
|
||||
event->SetHandled();
|
||||
}
|
||||
|
||||
-void TabCloseButton::AddLayerToRegion(ui::Layer* new_layer,
|
||||
- views::LayerRegion region) {
|
||||
- image_container_view()->SetPaintToLayer();
|
||||
- image_container_view()->layer()->SetFillsBoundsOpaquely(false);
|
||||
- ink_drop_container()->SetVisible(true);
|
||||
- ink_drop_container()->AddLayerToRegion(new_layer, region);
|
||||
-}
|
||||
-
|
||||
-void TabCloseButton::RemoveLayerFromRegions(ui::Layer* old_layer) {
|
||||
- ink_drop_container()->RemoveLayerFromRegions(old_layer);
|
||||
- ink_drop_container()->SetVisible(false);
|
||||
- image_container_view()->DestroyLayer();
|
||||
-}
|
||||
-
|
||||
gfx::Size TabCloseButton::CalculatePreferredSize(
|
||||
const views::SizeBounds& available_size) const {
|
||||
return kButtonSize;
|
||||
diff --git a/chrome/browser/ui/views/tabs/tab_close_button.h b/chrome/browser/ui/views/tabs/tab_close_button.h
|
||||
index f23bf862d987d8d6ba59aef781c51034e9a3debe..f688214ef883994d09b7a428b8af9b7f14c93af9 100644
|
||||
--- a/chrome/browser/ui/views/tabs/tab_close_button.h
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_close_button.h
|
||||
@@ -46,9 +46,6 @@ class TabCloseButton : public views::LabelButton,
|
||||
void OnMouseReleased(const ui::MouseEvent& event) override;
|
||||
void OnMouseMoved(const ui::MouseEvent& event) override;
|
||||
void OnGestureEvent(ui::GestureEvent* event) override;
|
||||
- void AddLayerToRegion(ui::Layer* new_layer,
|
||||
- views::LayerRegion region) override;
|
||||
- void RemoveLayerFromRegions(ui::Layer* old_layer) override;
|
||||
|
||||
protected:
|
||||
// Set/reset the image models for the icon with new colors.
|
||||
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
||||
index 9dc31a69ab252c2f71061b01aad878930bb6e4d5..116ba2220f0148c9799948e170fe51e5c235008d 100644
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
||||
@@ -124,6 +124,13 @@ ToolbarButton::ToolbarButton(PressedCallback callback,
|
||||
|
||||
SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
|
||||
views::FocusRing::Get(this)->SetOutsetFocusRingDisabled(true);
|
||||
+
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+ // Paint image(s) to a layer so that the canvas is snapped to pixel
|
||||
+ // boundaries.
|
||||
+ image_container_view()->SetPaintToLayer();
|
||||
+ image_container_view()->layer()->SetFillsBoundsOpaquely(false);
|
||||
+#endif
|
||||
}
|
||||
|
||||
ToolbarButton::~ToolbarButton() = default;
|
||||
@@ -753,6 +760,24 @@ ToolbarButton::GetActionViewInterface() {
|
||||
return std::make_unique<ToolbarButtonActionViewInterface>(this);
|
||||
}
|
||||
|
||||
+void ToolbarButton::AddLayerToRegion(ui::Layer* new_layer,
|
||||
+ views::LayerRegion region) {
|
||||
+#if !BUILDFLAG(IS_WIN)
|
||||
+ image_container_view()->SetPaintToLayer();
|
||||
+ image_container_view()->layer()->SetFillsBoundsOpaquely(false);
|
||||
+#endif
|
||||
+ ink_drop_container()->SetVisible(true);
|
||||
+ ink_drop_container()->AddLayerToRegion(new_layer, region);
|
||||
+}
|
||||
+
|
||||
+void ToolbarButton::RemoveLayerFromRegions(ui::Layer* old_layer) {
|
||||
+ ink_drop_container()->RemoveLayerFromRegions(old_layer);
|
||||
+ ink_drop_container()->SetVisible(false);
|
||||
+#if !BUILDFLAG(IS_WIN)
|
||||
+ image_container_view()->DestroyLayer();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
ToolbarButtonActionViewInterface::ToolbarButtonActionViewInterface(
|
||||
ToolbarButton* action_view)
|
||||
: views::LabelButtonActionViewInterface(action_view),
|
||||
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.h b/chrome/browser/ui/views/toolbar/toolbar_button.h
|
||||
index a6957be675eadd39707c0586ce79f7909cfbd675..4d9d985fe0a989555105b487a43669bbf025eb19 100644
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_button.h
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.h
|
||||
@@ -131,6 +131,9 @@ class ToolbarButton : public views::LabelButton,
|
||||
void OnMouseExited(const ui::MouseEvent& event) override;
|
||||
void OnGestureEvent(ui::GestureEvent* event) override;
|
||||
std::unique_ptr<views::ActionViewInterface> GetActionViewInterface() override;
|
||||
+ void AddLayerToRegion(ui::Layer* new_layer,
|
||||
+ views::LayerRegion region) override;
|
||||
+ void RemoveLayerFromRegions(ui::Layer* old_layer) override;
|
||||
|
||||
// When IPH is showing we suppress the tooltip text. This means that we must
|
||||
// provide an alternative accessible name, when this is the case. This is
|
||||
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
|
||||
index 07e805f154bd310a63bc89c95e52a9e7bada63b3..e4cbb2eb880663c11b7ed085639eb7a9aff53924 100644
|
||||
--- a/ui/views/controls/button/label_button.cc
|
||||
+++ b/ui/views/controls/button/label_button.cc
|
||||
@@ -78,13 +78,6 @@ LabelButton::LabelButton(
|
||||
SetTextInternal(text);
|
||||
SetLayoutManager(std::make_unique<DelegatingLayoutManager>(this));
|
||||
GetViewAccessibility().SetIsDefault(is_default_);
|
||||
-
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
- // Paint image(s) to a layer so that the canvas is snapped to pixel
|
||||
- // boundaries.
|
||||
- image_container_view()->SetPaintToLayer();
|
||||
- image_container_view()->layer()->SetFillsBoundsOpaquely(false);
|
||||
-#endif
|
||||
}
|
||||
|
||||
LabelButton::~LabelButton() {
|
||||
@@ -539,10 +532,8 @@ void LabelButton::UpdateImage() {
|
||||
|
||||
void LabelButton::AddLayerToRegion(ui::Layer* new_layer,
|
||||
views::LayerRegion region) {
|
||||
-#if !BUILDFLAG(IS_WIN)
|
||||
image_container_view()->SetPaintToLayer();
|
||||
image_container_view()->layer()->SetFillsBoundsOpaquely(false);
|
||||
-#endif
|
||||
ink_drop_container()->SetVisible(true);
|
||||
ink_drop_container()->AddLayerToRegion(new_layer, region);
|
||||
}
|
||||
@@ -550,9 +541,7 @@ void LabelButton::AddLayerToRegion(ui::Layer* new_layer,
|
||||
void LabelButton::RemoveLayerFromRegions(ui::Layer* old_layer) {
|
||||
ink_drop_container()->RemoveLayerFromRegions(old_layer);
|
||||
ink_drop_container()->SetVisible(false);
|
||||
-#if !BUILDFLAG(IS_WIN)
|
||||
image_container_view()->DestroyLayer();
|
||||
-#endif
|
||||
}
|
||||
|
||||
std::unique_ptr<ActionViewInterface> LabelButton::GetActionViewInterface() {
|
||||
@@ -9,10 +9,10 @@ focus node change via TextInputManager.
|
||||
chromium-bug: https://crbug.com/1369605
|
||||
|
||||
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 09a67ee96d89df82f14c4b10e2cf856feece66eb..d29c91350cc7b1c77b8159ddbb4af97bfcbfc655 100644
|
||||
index 9503beefcbcfe7d99674582ece10a7e551fae96d..32302e3dae2098319ed2d1f1403649fe8db2887e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -3212,6 +3212,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
|
||||
@@ -3229,6 +3229,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ index 09a67ee96d89df82f14c4b10e2cf856feece66eb..d29c91350cc7b1c77b8159ddbb4af97b
|
||||
RenderWidgetHostViewAura* popup_child_host_view) {
|
||||
popup_child_host_view_ = popup_child_host_view;
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
|
||||
index 5410c9d207bad1da2f733e153630400f50642617..1696658f38b965f69146c76c7f48d04a15a2cc8d 100644
|
||||
index 06fc7daf2761ae728f3adf9eb2ef3910a14cf827..8d34f9dfd9a8625a3fab397f7b96c12c87cb8a61 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
|
||||
@@ -651,6 +651,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
||||
@@ -653,6 +653,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
|
||||
RenderWidgetHostViewBase* updated_view) override;
|
||||
void OnTextSelectionChanged(TextInputManager* text_input_mangager,
|
||||
RenderWidgetHostViewBase* updated_view) override;
|
||||
@@ -87,10 +87,10 @@ index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f93
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 99fc1fde507e4594de8ffed7c3132150e226d475..b48b57fd851430b273d89efe23ba8287e238a992 100644
|
||||
index 432a62f63fe11ddb16c40223b9e4d794ec41e186..96c246c74529f01df55416d756245be60630f9ac 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9700,7 +9700,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -9701,7 +9701,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: reito <cnschwarzer@qq.com>
|
||||
Date: Wed, 12 Feb 2025 20:42:02 +0800
|
||||
Subject: fix: osr stutter in both cpu and gpu capture when page has animation.
|
||||
|
||||
https://crrev.org/c/6232721
|
||||
https://crbug.com/391118566
|
||||
There's bug in VideoCaptureOracle that cause stutter in both cpu and gpu capture when page has animation.
|
||||
The upstream has a fix, which will be available in Chromium M135.
|
||||
Backport this fix for Electron versions before that.
|
||||
|
||||
diff --git a/media/capture/content/video_capture_oracle.cc b/media/capture/content/video_capture_oracle.cc
|
||||
index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d7b454630 100644
|
||||
--- a/media/capture/content/video_capture_oracle.cc
|
||||
+++ b/media/capture/content/video_capture_oracle.cc
|
||||
@@ -118,8 +118,9 @@ void VideoCaptureOracle::SetCaptureSizeConstraints(
|
||||
void VideoCaptureOracle::SetAutoThrottlingEnabled(bool enabled) {
|
||||
const bool was_enabled =
|
||||
(capture_size_throttling_mode_ != kThrottlingDisabled);
|
||||
- if (was_enabled == enabled)
|
||||
+ if (was_enabled == enabled) {
|
||||
return;
|
||||
+ }
|
||||
capture_size_throttling_mode_ =
|
||||
enabled ? kThrottlingEnabled : kThrottlingDisabled;
|
||||
VLOG(1) << "Capture size auto-throttling is now "
|
||||
@@ -127,19 +128,22 @@ void VideoCaptureOracle::SetAutoThrottlingEnabled(bool enabled) {
|
||||
|
||||
// When not auto-throttling, have the CaptureResolutionChooser target the max
|
||||
// resolution within constraints.
|
||||
- if (!enabled)
|
||||
+ if (!enabled) {
|
||||
resolution_chooser_.SetTargetFrameArea(std::numeric_limits<int>::max());
|
||||
+ }
|
||||
|
||||
- if (next_frame_number_ > 0)
|
||||
+ if (next_frame_number_ > 0) {
|
||||
CommitCaptureSizeAndReset(GetFrameTimestamp(next_frame_number_ - 1));
|
||||
+ }
|
||||
}
|
||||
|
||||
void VideoCaptureOracle::SetSourceSize(const gfx::Size& source_size) {
|
||||
resolution_chooser_.SetSourceSize(source_size);
|
||||
// If the |resolution_chooser_| computed a new capture size, that will become
|
||||
// visible via a future call to ObserveEventAndDecideCapture().
|
||||
- source_size_change_time_ = (next_frame_number_ == 0) ?
|
||||
- base::TimeTicks() : GetFrameTimestamp(next_frame_number_ - 1);
|
||||
+ source_size_change_time_ = (next_frame_number_ == 0)
|
||||
+ ? base::TimeTicks()
|
||||
+ : GetFrameTimestamp(next_frame_number_ - 1);
|
||||
}
|
||||
|
||||
bool VideoCaptureOracle::ObserveEventAndDecideCapture(
|
||||
@@ -172,6 +176,15 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
|
||||
if (should_sample) {
|
||||
event_time = content_sampler_.frame_timestamp();
|
||||
duration_of_next_frame_ = content_sampler_.sampling_period();
|
||||
+ } else {
|
||||
+ // https://crbug.com/391118566
|
||||
+ // The content sampler may not sample the frame, if the
|
||||
+ // `detected_region_` does not match the `damage_rect`. In this case,
|
||||
+ // the capture may halt up to kNonAnimatingThreshold (250ms) and cause
|
||||
+ // the video stutter, until it recovers and do another animation
|
||||
+ // detection. To avoid this, we should use the smoothing sampler as a
|
||||
+ // fallback to prevent the bad output.
|
||||
+ should_sample = smoothing_sampler_.ShouldSample();
|
||||
}
|
||||
last_time_animation_was_detected_ = event_time;
|
||||
} else {
|
||||
@@ -198,8 +211,9 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
- if (!should_sample)
|
||||
+ if (!should_sample) {
|
||||
return false;
|
||||
+ }
|
||||
|
||||
// If the exact duration of the next frame has not been determined, estimate
|
||||
// it using the difference between the current and last frame.
|
||||
@@ -373,16 +387,18 @@ void VideoCaptureOracle::RecordConsumerFeedback(
|
||||
|
||||
// resource_utilization feedback.
|
||||
|
||||
- if (capture_size_throttling_mode_ == kThrottlingDisabled)
|
||||
+ if (capture_size_throttling_mode_ == kThrottlingDisabled) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (!std::isfinite(feedback.resource_utilization)) {
|
||||
LOG(DFATAL) << "Non-finite utilization provided by consumer for frame #"
|
||||
<< frame_number << ": " << feedback.resource_utilization;
|
||||
return;
|
||||
}
|
||||
- if (feedback.resource_utilization <= 0.0)
|
||||
+ if (feedback.resource_utilization <= 0.0) {
|
||||
return; // Non-positive values are normal, meaning N/A.
|
||||
+ }
|
||||
|
||||
if (capture_size_throttling_mode_ != kThrottlingActive) {
|
||||
VLOG(1) << "Received consumer feedback at frame #" << frame_number
|
||||
@@ -553,12 +569,14 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
|
||||
const int current_area = capture_size_.GetArea();
|
||||
const int increased_area =
|
||||
resolution_chooser_.FindLargerFrameSize(current_area, 1).GetArea();
|
||||
- if (increased_area <= current_area)
|
||||
+ if (increased_area <= current_area) {
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
// Determine whether the buffer pool could handle an increase in area.
|
||||
- if (!HasSufficientRecentFeedback(buffer_pool_utilization_, analyze_time))
|
||||
+ if (!HasSufficientRecentFeedback(buffer_pool_utilization_, analyze_time)) {
|
||||
return -1;
|
||||
+ }
|
||||
if (buffer_pool_utilization_.current() > 0.0) {
|
||||
const int buffer_capable_area = base::saturated_cast<int>(
|
||||
current_area / buffer_pool_utilization_.current());
|
||||
@@ -593,8 +611,9 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
|
||||
|
||||
// At this point, the system is currently under-utilized. Reset the start
|
||||
// time if the system was not under-utilized when the last analysis was made.
|
||||
- if (start_time_of_underutilization_.is_null())
|
||||
+ if (start_time_of_underutilization_.is_null()) {
|
||||
start_time_of_underutilization_ = analyze_time;
|
||||
+ }
|
||||
|
||||
// If the under-utilization started soon after the last source size change,
|
||||
// permit an immediate increase in the capture area. This allows the system
|
||||
diff --git a/media/capture/content/video_capture_oracle_unittest.cc b/media/capture/content/video_capture_oracle_unittest.cc
|
||||
index 066676fa998db6782270ddbf42fe176d88eb30d4..6cd7567e91bc8c496846a685aa1506c7548f3a21 100644
|
||||
--- a/media/capture/content/video_capture_oracle_unittest.cc
|
||||
+++ b/media/capture/content/video_capture_oracle_unittest.cc
|
||||
@@ -158,21 +158,26 @@ TEST(VideoCaptureOracleTest, TransitionsSmoothlyBetweenSamplers) {
|
||||
const bool provide_animated_content_event =
|
||||
(i % 100) >= 25 && (i % 100) < 75;
|
||||
|
||||
- // Only the few events that trigger the lock-out transition should be
|
||||
- // dropped, because the AnimatedContentSampler doesn't yet realize the
|
||||
- // animation ended. Otherwise, the oracle should always decide to sample
|
||||
- // because one of its samplers says to.
|
||||
- const bool require_oracle_says_sample = (i % 100) < 75 || (i % 100) >= 78;
|
||||
+ // https://crbug.com/391118566
|
||||
+ // Previously the AnimatedContentSampler has a bug that cause jank.
|
||||
+ // The oracle should always use SmoothEventSampler as a fallback. If
|
||||
+ // AnimatedContentSampler doesn't yet realize the animation ended or
|
||||
+ // doesn't keep up with the prediction it make, and it will wait for
|
||||
+ // kNonAnimatingThreshold before it lock-out and hand over to smooth
|
||||
+ // handler. This will cause the video to stutter and it is unacceptable.
|
||||
+ // So, when the AnimatedContentSampler goes into wrong state, we now
|
||||
+ // use SmoothEventSampler's decision as a fallback to prevent jank output
|
||||
+ // and still has a overall limit on capture frequency.
|
||||
const bool oracle_says_sample = oracle.ObserveEventAndDecideCapture(
|
||||
VideoCaptureOracle::kCompositorUpdate,
|
||||
provide_animated_content_event ? animation_damage_rect : gfx::Rect(),
|
||||
t);
|
||||
- if (require_oracle_says_sample)
|
||||
- ASSERT_TRUE(oracle_says_sample);
|
||||
- if (!oracle_says_sample) {
|
||||
- ASSERT_EQ(base::TimeDelta(), oracle.estimated_frame_duration());
|
||||
- continue;
|
||||
- }
|
||||
+
|
||||
+ // Because we now use SmoothEventSampler as a fallback, oracle should
|
||||
+ // always say sample. The previous AnimatedContentSampler lock-out
|
||||
+ // dropped frame are now revived by SmoothEventSampler, since this test's
|
||||
+ // capture frequency always meets min capture limit requirement.
|
||||
+ ASSERT_TRUE(oracle_says_sample);
|
||||
ASSERT_LT(base::TimeDelta(), oracle.estimated_frame_duration());
|
||||
|
||||
const int frame_number = oracle.next_frame_number();
|
||||
@@ -184,12 +189,9 @@ TEST(VideoCaptureOracleTest, TransitionsSmoothlyBetweenSamplers) {
|
||||
if (!last_frame_timestamp.is_null()) {
|
||||
const base::TimeDelta delta = frame_timestamp - last_frame_timestamp;
|
||||
EXPECT_LE(event_increment.InMicroseconds(), delta.InMicroseconds());
|
||||
- // Right after the AnimatedContentSampler lock-out transition, there were
|
||||
- // a few frames dropped, so allow a gap in the timestamps. Otherwise, the
|
||||
- // delta between frame timestamps should never be more than 2X the
|
||||
+ // The delta between frame timestamps should never be more than 2X the
|
||||
// |event_increment|.
|
||||
- const base::TimeDelta max_acceptable_delta =
|
||||
- (i % 100) == 78 ? event_increment * 5 : event_increment * 2;
|
||||
+ const base::TimeDelta max_acceptable_delta = event_increment * 2;
|
||||
EXPECT_GE(max_acceptable_delta.InMicroseconds(), delta.InMicroseconds());
|
||||
}
|
||||
last_frame_timestamp = frame_timestamp;
|
||||
@@ -444,9 +446,9 @@ void RunAutoThrottleTest(bool is_content_animating,
|
||||
// expect the resolution to remain constant. Repeat.
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
const gfx::Size starting_size = oracle.capture_size();
|
||||
- SCOPED_TRACE(::testing::Message() << "Stepping down from "
|
||||
- << starting_size.ToString()
|
||||
- << ", i=" << i);
|
||||
+ SCOPED_TRACE(::testing::Message()
|
||||
+ << "Stepping down from " << starting_size.ToString()
|
||||
+ << ", i=" << i);
|
||||
|
||||
gfx::Size stepped_down_size;
|
||||
end_t = t + base::Seconds(10);
|
||||
@@ -471,9 +473,10 @@ void RunAutoThrottleTest(bool is_content_animating,
|
||||
oracle.RecordCapture(with_consumer_feedback ? 0.25 : utilization);
|
||||
base::TimeTicks ignored;
|
||||
ASSERT_TRUE(oracle.CompleteCapture(frame_number, true, &ignored));
|
||||
- if (with_consumer_feedback)
|
||||
+ if (with_consumer_feedback) {
|
||||
oracle.RecordConsumerFeedback(frame_number,
|
||||
media::VideoCaptureFeedback(utilization));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,9 +485,9 @@ void RunAutoThrottleTest(bool is_content_animating,
|
||||
// utilization and expect the resolution to remain constant. Repeat.
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
const gfx::Size starting_size = oracle.capture_size();
|
||||
- SCOPED_TRACE(::testing::Message() << "Stepping up from "
|
||||
- << starting_size.ToString()
|
||||
- << ", i=" << i);
|
||||
+ SCOPED_TRACE(::testing::Message()
|
||||
+ << "Stepping up from " << starting_size.ToString()
|
||||
+ << ", i=" << i);
|
||||
|
||||
gfx::Size stepped_up_size;
|
||||
end_t = t + base::Seconds(is_content_animating ? 90 : 10);
|
||||
@@ -513,9 +516,10 @@ void RunAutoThrottleTest(bool is_content_animating,
|
||||
oracle.RecordCapture(with_consumer_feedback ? 0.25 : utilization);
|
||||
base::TimeTicks ignored;
|
||||
ASSERT_TRUE(oracle.CompleteCapture(frame_number, true, &ignored));
|
||||
- if (with_consumer_feedback)
|
||||
+ if (with_consumer_feedback) {
|
||||
oracle.RecordConsumerFeedback(frame_number,
|
||||
media::VideoCaptureFeedback(utilization));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ or resizing, but Electron does not seem to run into that issue
|
||||
for opaque frameless windows even with that block commented out.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index b33728cb13d07ad0805379ff2cf8f734b6cbf7cf..3d1397ff82803c9ba45bdcee0b2c61ab5c8049a4 100644
|
||||
index 759f00dd4e674d1dfca690b82e6e1820900ebf0c..9888ac709c51cd30228e3bca6915f7d89071cb83 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1786,7 +1786,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
|
||||
@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
|
||||
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index ce5ec54c97815522cf8df64c23849d3892c00d2c..01d87bfe0030e3977fe32045684cb440edb61d8c 100644
|
||||
index 6b36594994e8f4d7b2235757583a3297bdfa0381..a3cc7afa49d99e4b320ea546523e322e945210ac 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2103,9 +2103,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
@@ -2066,9 +2066,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
|
||||
// The resize message (which may not happen immediately) will carry with it
|
||||
// the screen info as well as the new size (if the screen has changed scale
|
||||
|
||||
@@ -8,7 +8,7 @@ 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 78b7f442e9ce0776b806c352f5ff8f38b4f87bf4..ed96d2d7f0aed6a0c87d2371bccd96c0d4983e02 100644
|
||||
index fc9cb7e68bdad4c40fab63f70243e09ad005ab80..199fbceda530da31aab9126d78b4bd213cbd3cf9 100644
|
||||
--- a/extensions/renderer/script_injection.cc
|
||||
+++ b/extensions/renderer/script_injection.cc
|
||||
@@ -317,6 +317,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
|
||||
@@ -20,7 +20,7 @@ index 78b7f442e9ce0776b806c352f5ff8f38b4f87bf4..ed96d2d7f0aed6a0c87d2371bccd96c0
|
||||
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
|
||||
}
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index a94b2a36c8fe789f9f2c5a7f6553d375f2783275..0e9b778184e78c639638a763a5523ded53a2b41c 100644
|
||||
index 8acbc0ba8f4ab4acd2b55339ba44d0d46087c155..edc0a323ec444c8a4f51ac632f49d27d76537812 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -459,6 +459,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
|
||||
@@ -59,7 +59,7 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
|
||||
|
||||
#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 62d2977d81f4d30aad1ddf41be524802876694d8..95396ac102c1fb9f2e431bb52a7043d505f7ff4c 100644
|
||||
index 79ec1e2b1274160cca97d14a69c36eac4bc36b0f..74997dd0f11fbfa3dee2e20b9b2ee895bb339b5a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3136,6 +3136,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -92,7 +92,7 @@ index 3feb24ec648ef98dd86d76ed9da55192ced42cb2..98b64770169bda80a10f15ba7cb6f223
|
||||
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 223fe3d3bb6bdb829421b20f70eab803bacfa8f1..2eedd1e9744e687b21d094533e683ce2acf5c1e5 100644
|
||||
index b77ad041a717ef8f317a9d15edd61af3c465b2aa..e3955c64ff894682b91c4cc3c49c672659e3a3bf 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
|
||||
@@ -964,6 +964,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
@@ -215,7 +215,7 @@ index c7ae64a16dbf0a15bb60276a2e1002d72621f889..28d375a355b31c6f764c3158e5948777
|
||||
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
|
||||
}
|
||||
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 7618ee53a1ae224c7a9ddf9c11bcd61611c3f097..43e496a8e52c43e06b3b92ac9003d3948e6dedf1 100644
|
||||
index ef62cdde31f6fce7e021f1efc3d484e6968fb3ea..b8eb13204bdbc7bb9b649aac32463910b34bcb84 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
|
||||
@@ -1097,14 +1097,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
@@ -237,7 +237,7 @@ index 7618ee53a1ae224c7a9ddf9c11bcd61611c3f097..43e496a8e52c43e06b3b92ac9003d394
|
||||
|
||||
bool WebLocalFrameImpl::IsInspectorConnected() {
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index c3aea00b1b83f2483d8076da99bdaf71f67214d6..a6a04374722289060b4f9ccc159eaab39aa2a058 100644
|
||||
index 151a530d610fa47d343994743ce21a2072837626..b254f83e0473de9ab3bebff2fbd968aa126b246c 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
|
||||
@@ -15,10 +15,10 @@ capturer was window or screen-specific, as the IDs remain valid for
|
||||
generic capturer as well.
|
||||
|
||||
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
|
||||
index 60eabf1a69089049d4cddb81f87efca4f096a3b6..6618477648b7148ba66f5bb695be8eb6da045849 100644
|
||||
index 56e7c4058bbdd4d13c5ac90eb41972ad63da8abf..f5d78bb1c70f656c91596fd389aa0b70533b6148 100644
|
||||
--- a/content/browser/media/capture/desktop_capture_device.cc
|
||||
+++ b/content/browser/media/capture/desktop_capture_device.cc
|
||||
@@ -811,8 +811,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
@@ -899,8 +899,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
|
||||
switch (source.type) {
|
||||
case DesktopMediaID::TYPE_SCREEN: {
|
||||
@@ -35,7 +35,7 @@ index 60eabf1a69089049d4cddb81f87efca4f096a3b6..6618477648b7148ba66f5bb695be8eb6
|
||||
if (screen_capturer && screen_capturer->SelectSource(source.id)) {
|
||||
capturer = std::make_unique<webrtc::DesktopAndCursorComposer>(
|
||||
std::move(screen_capturer), options);
|
||||
@@ -825,8 +831,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
@@ -913,8 +919,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
}
|
||||
|
||||
case DesktopMediaID::TYPE_WINDOW: {
|
||||
|
||||
29
patches/chromium/fix_win32_synchronous_spellcheck.patch
Normal file
29
patches/chromium/fix_win32_synchronous_spellcheck.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <khammond@slack-corp.com>
|
||||
Date: Wed, 19 Feb 2025 11:18:44 -0800
|
||||
Subject: fix: re-enable synchronous spellcheck on Windows
|
||||
|
||||
This fix partially reverts 6109477: Code Health:
|
||||
Clean up stale base::Feature "WinRetrieveSuggestionsOnlyOnDemand"
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/6109477
|
||||
by re-adding a synchronous call to FillSuggestionList.
|
||||
|
||||
This patch can be removed when an asynchronous spellcheck API
|
||||
option is added to Electron.
|
||||
|
||||
diff --git a/components/spellcheck/browser/windows_spell_checker.cc b/components/spellcheck/browser/windows_spell_checker.cc
|
||||
index f5a7411037758427eddc088b5426554b4a500d33..04b3edd4d8c58d38e260cc54beb0dab86368fc25 100644
|
||||
--- a/components/spellcheck/browser/windows_spell_checker.cc
|
||||
+++ b/components/spellcheck/browser/windows_spell_checker.cc
|
||||
@@ -239,6 +239,11 @@ std::vector<SpellCheckResult> BackgroundHelper::RequestTextCheckForAllLanguages(
|
||||
(action == CORRECTIVE_ACTION_GET_SUGGESTIONS ||
|
||||
action == CORRECTIVE_ACTION_REPLACE)) {
|
||||
std::vector<std::u16string> suggestions;
|
||||
+ // TODO (vertedinde): Perform the synchronous operation of retrieving
|
||||
+ // suggestions for all misspelled words while performing a text check.
|
||||
+ FillSuggestionList(it->first,
|
||||
+ text.substr(start_index, error_length),
|
||||
+ &suggestions);
|
||||
result_map[std::tuple<ULONG, ULONG>(start_index, error_length)]
|
||||
.push_back(suggestions);
|
||||
}
|
||||
@@ -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 d6c91f23000c5a15d791560f91a5aa235f2701c7..bf0e2979cf1534b9f72bb44c3e51fa5a41e49566 100644
|
||||
index 9dc296ce1ad3c24e0432f4a2fd7c529cf16f92b6..4d846a6f3e057ea9d855bec22d12c7cfa05789f3 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -4693,6 +4693,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -4697,6 +4697,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ index d6c91f23000c5a15d791560f91a5aa235f2701c7..bf0e2979cf1534b9f72bb44c3e51fa5a
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 7bda9f416d7399a3e9fe42ec22af374ba9c4130f..f718016e4ace49189c2920d98f92e2a857075ac9 100644
|
||||
index 045689f947f45e7d4c50850ba760b0861af79798..7be5a91c4f132ce73869e8680db85d43feed6cc0 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -344,6 +344,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
@@ -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 4b679c6ee3b585a4891ec57a9080e08f2b51ed4d..bbff85e3365a0d61473ce9ae8801f1c18f0609e5 100644
|
||||
index 80494b5bb318a9dc4b92b4d2fbb3fab84521d8a9..4d822431714e36e3883ca566802c97eece46c6f8 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1450,6 +1450,11 @@
|
||||
@@ -1463,6 +1463,11 @@
|
||||
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
|
||||
"META": {"sizes": {"messages": [2000],}},
|
||||
"messages": [10080],
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?David=20L=C3=B6nnhager?= <dv.lnh.d@gmail.com>
|
||||
Date: Fri, 17 Jan 2025 14:30:48 +0100
|
||||
Subject: Ignore parse errors for PKEY_AppUserModel_ToastActivatorCLSID
|
||||
|
||||
Some shortcuts store this as a string UUID as opposed to VT_CLSID,
|
||||
hitting NOTREACHED() and sometimes breaking parsing in Electron.
|
||||
Ignore this error instead.
|
||||
|
||||
Bug: N/A
|
||||
Change-Id: I9fc472212b2d3afac2c8e18a2159bc2d50bbdf98
|
||||
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index e96a3afdabc731afe355cda83eec4923ea780fec..0b1dc07aad197eab7b79344bc5aee702a2d580ab 100644
|
||||
--- a/AUTHORS
|
||||
+++ b/AUTHORS
|
||||
@@ -340,6 +340,7 @@ David Futcher <david.mike.futcher@gmail.com>
|
||||
David Jin <davidjin@amazon.com>
|
||||
David Lechner <david@pybricks.com>
|
||||
David Leen <davileen@amazon.com>
|
||||
+David Lönnhager <dv.lnh.d@gmail.com>
|
||||
David Manouchehri <david@davidmanouchehri.com>
|
||||
David McAllister <mcdavid@amazon.com>
|
||||
David Michael Barr <david.barr@samsung.com>
|
||||
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
|
||||
index 967e130e823f41c402411dfadb53b805e8a8c92b..3a9df7f31861ca69168fd24513ee554d0984798d 100644
|
||||
--- a/base/win/shortcut.cc
|
||||
+++ b/base/win/shortcut.cc
|
||||
@@ -356,8 +356,9 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
|
||||
*(pv_toast_activator_clsid.get().puuid));
|
||||
break;
|
||||
default:
|
||||
- NOTREACHED() << "Unexpected variant type: "
|
||||
- << pv_toast_activator_clsid.get().vt;
|
||||
+ // Shortcuts may use strings to represent the CLSID. This case is
|
||||
+ // ignored.
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ 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 36e980b9fe901e41a73d85e373c0eb471ff7070d..6fd7e2dc34d676e2b00739935992172cb2ddb2cf 100644
|
||||
index 93cbe4e3b64d466c24d7b267a802b8c38d034198..7142484a2afd4c3cef4cac613c5f68e3c52e8eab 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -290,11 +290,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
|
||||
@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index a4ae9c4c242551f6850cdcbb42551b676db76c95..22281156bcfdd6999d15d511c508415f8f3f9ac7 100644
|
||||
index 854457658bbdc09f21f61eb76928dfd423e1eedd..e9443d83d35786b09bc1ff70a0360f6f7e66a42e 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1028,6 +1028,7 @@ component("base") {
|
||||
@@ -192,10 +192,10 @@ index e12c1d078147d956a1d9b1bc498c1b1d6fe7b974..233362259dc4e728ed37435e65041764
|
||||
|
||||
} // namespace base
|
||||
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
|
||||
index bfb0d2f208170f77df96fb9f14c8525e9dec6e11..e234d95a862198148bae97b4b276d93922f3ca92 100644
|
||||
index ff1e356ff696d3830d02644969c36a71fdf32ff6..b39c716c52524b95f2d3417a98e60c0c41147c93 100644
|
||||
--- a/components/os_crypt/sync/BUILD.gn
|
||||
+++ b/components/os_crypt/sync/BUILD.gn
|
||||
@@ -43,6 +43,8 @@ component("os_crypt") {
|
||||
@@ -38,6 +38,8 @@ component("sync") {
|
||||
"os_crypt_mac.mm",
|
||||
]
|
||||
deps += [ "//crypto:mock_apple_keychain" ]
|
||||
@@ -354,7 +354,7 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..149de0175c2ec0e41e3ba40caad7019c
|
||||
+
|
||||
@end
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
index d55914779bc097cab8afb144f2c47c001bfa7350..e55db3f550b4c082aa087fbcab6760da237f8471 100644
|
||||
index 127a2829fafa04bfbab0b883304dfb815d7e1c22..61d7946e52862f3586b1e098d7d44a125656de81 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -382,7 +382,7 @@ index d55914779bc097cab8afb144f2c47c001bfa7350..e55db3f550b4c082aa087fbcab6760da
|
||||
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
|
||||
// can only be accomplished by overriding methods.
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
index 03ff0478f16f237e6b8082508d5399195bfdca44..9b74f6ca6de6ec057073e175170014b5512040b4 100644
|
||||
index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec89873549 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -449,7 +449,7 @@ index 03ff0478f16f237e6b8082508d5399195bfdca44..9b74f6ca6de6ec057073e175170014b5
|
||||
bool shouldShowWindowTitle = YES;
|
||||
if (_bridge)
|
||||
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 89aca4b47c202f137a5ffe8390986ef6dd62942a..59276806afa7659573eb276149ff8ed47ca72c1f 100644
|
||||
index 36c522793dc37f7c72f7cccde50895927b5560cb..689351b5a6e6e6013b808c1b4924b8848dcc0fa2 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
|
||||
@@ -41,6 +41,7 @@
|
||||
@@ -579,7 +579,7 @@ index a76028eed0249244d0559de102a756e3b2771b63..cb65efb56849d57e2e656f90d5b1d737
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 74ca66c0f38b4fc4448d50a9f3674cda6a078f0e..5c49a11dfbe1275f0f8cd21bf970d3b6b98cb71e 100644
|
||||
index fec51f705d1a8424fdbff13d33aa6a2b16a650e5..42f5feab06cf2ebb20f851a78111aa952e8bff55 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -329,6 +329,7 @@ source_set("browser") {
|
||||
@@ -591,7 +591,7 @@ index 74ca66c0f38b4fc4448d50a9f3674cda6a078f0e..5c49a11dfbe1275f0f8cd21bf970d3b6
|
||||
|
||||
public_deps = [
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d6c92c9e3 100644
|
||||
index 7e4bc62b4f0ea5ff4792831f012877c91787a345..a8aa56af877fa55dd497de1563ff5eed2de07ebc 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
@@ -23,6 +23,7 @@
|
||||
@@ -612,7 +612,7 @@ index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d
|
||||
@class RenderWidgetHostViewCocoa;
|
||||
|
||||
namespace content {
|
||||
@@ -691,9 +694,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
@@ -692,9 +695,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
// EnsureSurfaceSynchronizedForWebTest().
|
||||
uint32_t latest_capture_sequence_number_ = 0u;
|
||||
|
||||
@@ -625,7 +625,7 @@ index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d
|
||||
// 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 9185fd223c9611faee546570c0df36bc94cdb28c..86886e94e9e2c52e297a82175f6071852e792148 100644
|
||||
index 25eb1d0d4536cf6d336ea99ea9ff5d9d4b6ce9ac..a98631cbb6fde0a41dedbbcd642cc721d36ac88d 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -647,7 +647,7 @@ index 9185fd223c9611faee546570c0df36bc94cdb28c..86886e94e9e2c52e297a82175f607185
|
||||
|
||||
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
|
||||
// pointers. `ns_view_` gets reinitialized later in this method.
|
||||
@@ -1616,8 +1619,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1620,8 +1623,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -658,7 +658,7 @@ index 9185fd223c9611faee546570c0df36bc94cdb28c..86886e94e9e2c52e297a82175f607185
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1666,9 +1671,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1670,9 +1675,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -670,7 +670,7 @@ index 9185fd223c9611faee546570c0df36bc94cdb28c..86886e94e9e2c52e297a82175f607185
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2195,20 +2202,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2199,20 +2206,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
|
||||
GetRenderWidgetAccessibilityTokenCallback callback) {
|
||||
base::ProcessId pid = getpid();
|
||||
@@ -792,7 +792,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index 27adf4138c7ea1cb90460bdd21586163f7614a48..6b422c331bb14489b36a762ad2ced88544d21b60 100644
|
||||
index bb9096575a4e362f084d6d612319595f109f27a1..c0eaa67da879637e3adfd948d400ee6487512c00 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -652,6 +652,7 @@ static_library("test_support") {
|
||||
@@ -811,7 +811,7 @@ index 27adf4138c7ea1cb90460bdd21586163f7614a48..6b422c331bb14489b36a762ad2ced885
|
||||
}
|
||||
|
||||
mojom("content_test_mojo_bindings") {
|
||||
@@ -1924,6 +1926,7 @@ test("content_browsertests") {
|
||||
@@ -1934,6 +1936,7 @@ test("content_browsertests") {
|
||||
"//ui/shell_dialogs",
|
||||
"//ui/snapshot",
|
||||
"//ui/webui:test_support",
|
||||
@@ -819,7 +819,7 @@ index 27adf4138c7ea1cb90460bdd21586163f7614a48..6b422c331bb14489b36a762ad2ced885
|
||||
]
|
||||
|
||||
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
|
||||
@@ -3210,6 +3213,7 @@ test("content_unittests") {
|
||||
@@ -3222,6 +3225,7 @@ test("content_unittests") {
|
||||
"//ui/latency:test_support",
|
||||
"//ui/shell_dialogs:shell_dialogs",
|
||||
"//ui/webui:test_support",
|
||||
@@ -1023,18 +1023,18 @@ index 70d5665ad7b9ef62370497636af919ede2508ad4..f4dc3e2b8053cdb3e8c439ab1a1d6369
|
||||
}
|
||||
|
||||
diff --git a/sandbox/mac/BUILD.gn b/sandbox/mac/BUILD.gn
|
||||
index 4e53d573ff67615bc7dcee7db6f855c67094f414..8b061d66b1a854b51a5a38b6a71eadab6a7dbbec 100644
|
||||
index 453e2185fc85fcb29fa7af3f94cce5bda8118b0c..1c383675bb9113b5b1df9280b8ee994123794dfc 100644
|
||||
--- a/sandbox/mac/BUILD.gn
|
||||
+++ b/sandbox/mac/BUILD.gn
|
||||
@@ -39,6 +39,7 @@ component("seatbelt") {
|
||||
]
|
||||
public_deps = [ "//third_party/protobuf:protobuf_lite" ]
|
||||
@@ -25,6 +25,7 @@ component("seatbelt") {
|
||||
libs = [ "sandbox" ]
|
||||
deps = [ ":seatbelt_export" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
+ deps += ["//electron/build/config:generate_mas_config"]
|
||||
}
|
||||
|
||||
component("seatbelt_extension") {
|
||||
@@ -52,6 +53,7 @@ component("seatbelt_extension") {
|
||||
@@ -38,6 +39,7 @@ component("seatbelt_extension") {
|
||||
libs = [ "sandbox" ]
|
||||
public_deps = [ "//base" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
@@ -1042,7 +1042,7 @@ index 4e53d573ff67615bc7dcee7db6f855c67094f414..8b061d66b1a854b51a5a38b6a71eadab
|
||||
}
|
||||
|
||||
component("system_services") {
|
||||
@@ -66,6 +68,7 @@ component("system_services") {
|
||||
@@ -52,6 +54,7 @@ component("system_services") {
|
||||
deps = [ ":seatbelt_export" ]
|
||||
public_deps = [ "//base" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
@@ -1050,36 +1050,6 @@ index 4e53d573ff67615bc7dcee7db6f855c67094f414..8b061d66b1a854b51a5a38b6a71eadab
|
||||
}
|
||||
|
||||
source_set("sandbox_unittests") {
|
||||
diff --git a/sandbox/mac/sandbox_compiler.cc b/sandbox/mac/sandbox_compiler.cc
|
||||
index f35d9ef2a2df3db8ecbf1d7b909c7b1cf33f3cd9..5d52330d1bd70cd7b97ee3360721f10c8447c717 100644
|
||||
--- a/sandbox/mac/sandbox_compiler.cc
|
||||
+++ b/sandbox/mac/sandbox_compiler.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+#include "electron/mas.h"
|
||||
#include "sandbox/mac/seatbelt.h"
|
||||
|
||||
namespace sandbox {
|
||||
@@ -47,6 +48,7 @@ bool SandboxCompiler::SetParameter(const std::string& key,
|
||||
}
|
||||
|
||||
bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
|
||||
+#if !IS_MAS_BUILD()
|
||||
if (mode_ == Target::kSource) {
|
||||
std::vector<const char*> params;
|
||||
|
||||
@@ -67,6 +69,9 @@ bool SandboxCompiler::CompileAndApplyProfile(std::string& error) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
+#else
|
||||
+ return true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool SandboxCompiler::CompilePolicyToProto(mac::SandboxPolicy& policy,
|
||||
diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
|
||||
index 095c639b9893e885d8937e29ed7d47a7c28bc6b6..7e0cf9b9f94b16741358bdb45122f8b2bd68c0f9 100644
|
||||
--- a/sandbox/mac/sandbox_logging.cc
|
||||
@@ -1117,7 +1087,7 @@ index 095c639b9893e885d8937e29ed7d47a7c28bc6b6..7e0cf9b9f94b16741358bdb45122f8b2
|
||||
|
||||
// |error| is strerror(errno) when a P* logging function is called. Pass
|
||||
diff --git a/sandbox/mac/seatbelt.cc b/sandbox/mac/seatbelt.cc
|
||||
index 15c835e118456394c0a00ac98c11241c14ca75bd..a16faabe2bd63a5e0fbe9082a3b4b7c8aa0ea064 100644
|
||||
index 1960e1c8771fad615a098af09ff1f9a191f67764..29b97b352d08cd1fe73b17fd80cb41cc7e58dcaa 100644
|
||||
--- a/sandbox/mac/seatbelt.cc
|
||||
+++ b/sandbox/mac/seatbelt.cc
|
||||
@@ -4,12 +4,14 @@
|
||||
@@ -1220,14 +1190,21 @@ index 15c835e118456394c0a00ac98c11241c14ca75bd..a16faabe2bd63a5e0fbe9082a3b4b7c8
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -129,10 +147,14 @@ bool Seatbelt::InitWithParams(const char* profile,
|
||||
@@ -129,16 +147,21 @@ bool Seatbelt::InitWithParams(const std::string& profile,
|
||||
uint64_t flags,
|
||||
const char* const parameters[],
|
||||
const std::vector<std::string>& parameters,
|
||||
std::string* error) {
|
||||
+#if !IS_MAS_BUILD()
|
||||
std::vector<const char*> weak_params;
|
||||
for (const std::string& param : parameters) {
|
||||
weak_params.push_back(param.c_str());
|
||||
}
|
||||
// The parameters array must be null terminated.
|
||||
weak_params.push_back(nullptr);
|
||||
+
|
||||
char* errorbuf = nullptr;
|
||||
int rv =
|
||||
::sandbox_init_with_parameters(profile, flags, parameters, &errorbuf);
|
||||
int rv = ::sandbox_init_with_parameters(profile.c_str(), flags,
|
||||
weak_params.data(), &errorbuf);
|
||||
return HandleSandboxResult(rv, errorbuf, error);
|
||||
+#else
|
||||
+ return true;
|
||||
@@ -1235,7 +1212,7 @@ index 15c835e118456394c0a00ac98c11241c14ca75bd..a16faabe2bd63a5e0fbe9082a3b4b7c8
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -140,6 +162,7 @@ bool Seatbelt::Compile(const char* profile,
|
||||
@@ -146,6 +169,7 @@ bool Seatbelt::Compile(const char* profile,
|
||||
const Seatbelt::Parameters& params,
|
||||
std::string& compiled_profile,
|
||||
std::string* error) {
|
||||
@@ -1243,7 +1220,7 @@ index 15c835e118456394c0a00ac98c11241c14ca75bd..a16faabe2bd63a5e0fbe9082a3b4b7c8
|
||||
char* errorbuf = nullptr;
|
||||
sandbox_profile_t* sandbox_profile =
|
||||
::sandbox_compile_string(profile, params.params(), &errorbuf);
|
||||
@@ -149,33 +172,44 @@ bool Seatbelt::Compile(const char* profile,
|
||||
@@ -155,33 +179,44 @@ bool Seatbelt::Compile(const char* profile,
|
||||
compiled_profile.assign(reinterpret_cast<const char*>(sandbox_profile->data),
|
||||
sandbox_profile->size);
|
||||
::sandbox_free_profile(sandbox_profile);
|
||||
@@ -1392,7 +1369,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
|
||||
|
||||
} // namespace sandbox
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index 076ae475b3c4f0d2568e5efc9fedf2de7ccc82ad..b961c9c000bbb82c5f6ae63466c6d5d679d92de6 100644
|
||||
index 17b3ddd66513a01a631d77535cfeb1ae94881e0e..bde6c61489fe4f88abba79fd2fb809c292a3f99a 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -409,6 +409,7 @@ component("core") {
|
||||
@@ -1804,10 +1781,10 @@ index 29ae2da6a8a2c2a612dfb92f7f9c03ca5fa306b1..440c139a32a0c205e77b657d4aab6468
|
||||
// Query the display's refresh rate.
|
||||
if (@available(macos 12.0, *)) {
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index 6cf9f1a38ed76edc8f64500476b4b3014dc7677f..54dcf71bd0bf5a1455b31f3d042305f0fc3e345b 100644
|
||||
index 230a9e8266fa494f870ed7fc7dc444d1db5bbb48..99facff7a8e98cbc175354ae4e1d1f592197320a 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -331,6 +331,12 @@ component("gfx") {
|
||||
@@ -332,6 +332,12 @@ component("gfx") {
|
||||
"//ui/base:ui_data_pack",
|
||||
]
|
||||
|
||||
|
||||
@@ -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 0fb8b2747662373e913689a83dfe985bf0f29073..20e6a7aec3702865916d8cd339e3a2caf1793917 100644
|
||||
index e74079c81ddad694586647209755fdee9f861317..b7bdda9141ba4ea3c3ab391ec68dff14a4ac717b 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -158,6 +158,11 @@
|
||||
@@ -159,6 +159,11 @@
|
||||
#include "services/network/web_transport.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ index 0fb8b2747662373e913689a83dfe985bf0f29073..20e6a7aec3702865916d8cd339e3a2ca
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
// gn check does not account for BUILDFLAG(). So, for iOS builds, it will
|
||||
// complain about a missing dependency on the target exposing this header. Add a
|
||||
@@ -601,6 +606,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
|
||||
@@ -602,6 +607,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -122,7 +122,7 @@ index 0fb8b2747662373e913689a83dfe985bf0f29073..20e6a7aec3702865916d8cd339e3a2ca
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::NetworkContextHttpAuthPreferences::
|
||||
@@ -997,6 +1095,13 @@ void NetworkContext::SetClient(
|
||||
@@ -998,6 +1096,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ index 0fb8b2747662373e913689a83dfe985bf0f29073..20e6a7aec3702865916d8cd339e3a2ca
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2568,6 +2673,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2569,6 +2674,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
cert_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
std::make_unique<net::CoalescingCertVerifier>(
|
||||
std::move(cert_verifier)));
|
||||
@@ -148,7 +148,7 @@ index 0fb8b2747662373e913689a83dfe985bf0f29073..20e6a7aec3702865916d8cd339e3a2ca
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index ca3412783e1e754d1d197f61532c84c12ac97d68..e1e6f9bf5ff44bcf5f71bae1ad43fbaf071851b1 100644
|
||||
index 8fb2adb43ea3d9a47f4f27ae11fcdd986636a132..cc94073bc278af202cd6bbb47882b56f48a2ebbe 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -113,6 +113,7 @@ class URLMatcher;
|
||||
@@ -178,7 +178,7 @@ index ca3412783e1e754d1d197f61532c84c12ac97d68..e1e6f9bf5ff44bcf5f71bae1ad43fbaf
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index ca619101896f29cf2c2793c20968c17c11cd0bab..891a80b394671205765bddc622a12e1002c146ce 100644
|
||||
index c292e1472c724af3c07497c1f3a29e638a746829..029287034d13f7c2bffa60900ecbbaa980330bf4 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -307,6 +307,17 @@ struct SocketBrokerRemotes {
|
||||
@@ -199,7 +199,7 @@ index ca619101896f29cf2c2793c20968c17c11cd0bab..891a80b394671205765bddc622a12e10
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -943,6 +954,9 @@ interface NetworkContext {
|
||||
@@ -935,6 +946,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -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 ec78c36d4541d9d34f2109b880109ebe3bc817f8..67d92005e53cccbc9a4ae8a0db9c2c6220a09d88 100644
|
||||
index 5d7537144171d37a35f567e0a2de19189c3c66df..e3ed396e69f85b70621381266958cc509307180a 100644
|
||||
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
@@ -239,6 +239,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
@@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 9feaa88b28a0bf826813510524039cf21c89e0f5..160607287f4c780a7729c7e38c97bcdcd70751cc 100644
|
||||
index e49a7ccae6e07c60f2c3da927d6abc12d25f50ba..6e5a1fa6af3e0f4d3e9116088bdec5a31f59b29a 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2152,7 +2152,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2154,7 +2154,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index 9feaa88b28a0bf826813510524039cf21c89e0f5..160607287f4c780a7729c7e38c97bcdc
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2160,7 +2160,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2162,7 +2162,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -11,7 +11,7 @@ For resolving complex conflict please pin @reitowo
|
||||
For more reason please see: https://crrev.com/c/5465148
|
||||
|
||||
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
|
||||
index a7742298af440bf9f6bcfceb7a07a90f19ae8283..9d59397f2bed400e5131691778965ec1ecae1511 100644
|
||||
index f51591d21a0ce44028a3711cba72ceebb55b3567..31e01429e26f2856587b98a0213f1a5f80ddc52e 100644
|
||||
--- a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
|
||||
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
|
||||
@@ -178,7 +178,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer(
|
||||
|
||||
@@ -10,10 +10,10 @@ an about:blank check to this area.
|
||||
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 2778d916941effdf5b7c03794e0ffac5077f87a6..4b70fe8bc36131e0e72d661b02bee126a61073ad 100644
|
||||
index 66f6806030d01f6559b838d98a36959350337e3e..57f3cda1c8125f4a7dfb9a528ea242c450a019df 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -798,8 +798,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
@@ -799,8 +799,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
// TODO(crbug.com/40092527): Consider adding a separate boolean that
|
||||
// tracks this instead of piggybacking `origin_calculation_debug_info`.
|
||||
if (renderer_side_origin.opaque() &&
|
||||
|
||||
@@ -666,10 +666,10 @@ index 6809c4576c71bc1e1a6ad4e0a37707272a9a10f4..3aad10424a6a31dab2ca393d00149ec6
|
||||
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 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20e243570c 100644
|
||||
index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3b3ffe41c 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -53,6 +53,7 @@
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/page_number.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
@@ -677,7 +677,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
#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"
|
||||
@@ -1223,14 +1224,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1222,14 +1223,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
}
|
||||
|
||||
print_in_progress_ = true;
|
||||
@@ -694,7 +694,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
if (!weak_this) {
|
||||
return;
|
||||
}
|
||||
@@ -1261,12 +1262,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1260,12 +1261,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) {
|
||||
return;
|
||||
@@ -1283,9 +1286,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
@@ -1282,9 +1285,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
|
||||
is_loading_ = frame->WillPrintSoon();
|
||||
if (is_loading_) {
|
||||
@@ -726,7 +726,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
SetupOnStopLoadingTimeout();
|
||||
return;
|
||||
}
|
||||
@@ -1295,7 +1299,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
@@ -1294,7 +1298,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
@@ -735,7 +735,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
|
||||
if (render_frame_gone_) {
|
||||
return;
|
||||
@@ -1451,6 +1455,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1450,6 +1454,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
@@ -744,7 +744,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -2063,17 +2069,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2062,17 +2068,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
@@ -767,7 +767,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
DidFinishPrinting(PrintingResult::kFailPrintInit);
|
||||
return;
|
||||
}
|
||||
@@ -2094,8 +2102,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -784,7 +784,7 @@ index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20
|
||||
// Check if `this` is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2363,29 +2378,43 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2362,29 +2377,43 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
|
||||
@@ -881,10 +881,10 @@ index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 5c49a11dfbe1275f0f8cd21bf970d3b6b98cb71e..6e9632e8a67e5848c96af23aa2296607b5c0b2c3 100644
|
||||
index 42f5feab06cf2ebb20f851a78111aa952e8bff55..5048a28983ad629fba2f300f57fd869056fcb510 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -3081,8 +3081,9 @@ source_set("browser") {
|
||||
@@ -3085,8 +3085,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index ecb007b668458da1f8db4fca75f9c4428221dfbf..063007699b5b09ef8e6dbb39e044e4a1
|
||||
// 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 58ddbafd8a35b1e7246be65cb5e633b9ac629ed8..ce5ec54c97815522cf8df64c23849d3892c00d2c 100644
|
||||
index 761469e3ca95ebe1269f005a2b3527cd1f4fdc56..6b36594994e8f4d7b2235757583a3297bdfa0381 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2037,6 +2037,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -2000,6 +2000,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_) {
|
||||
view_->UpdateCursor(cursor);
|
||||
}
|
||||
@@ -44,10 +44,10 @@ index 58ddbafd8a35b1e7246be65cb5e633b9ac629ed8..ce5ec54c97815522cf8df64c23849d38
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index b76df2fa58a2f96d1b6dd13fec2cea420bb8ecb4..4fc5cf0ca116f75b46ce61f1315c6666c54e1009 100644
|
||||
index 61d09271ab44bbe4f19cfe7c5cf5b21c002d967e..393d05a3adc42cc960283b2572e52b80db9010eb 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5751,6 +5751,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -5752,6 +5752,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ index b76df2fa58a2f96d1b6dd13fec2cea420bb8ecb4..4fc5cf0ca116f75b46ce61f1315c6666
|
||||
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 504f0971e21d3c068f57be8d6cb1a0242fb9c960..fa047301662e86f770be433c498cff9935b8b718 100644
|
||||
index e94f3da32abdb79f6461f55790f4a7474c108eb0..601146957f33f866583243942f7d18ce5a62f492 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1167,6 +1167,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
|
||||
@@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
|
||||
to upstream this change to Chrome.
|
||||
|
||||
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
index fbe48d02d70452b1202ddcd23a9a36d50a0b12ae..2d09fefab7dfdb01981803975d4056b8161cbd63 100644
|
||||
index 12d3c0c19949eb288f34adb5c65747dcc6aa05f4..39cd83a86eced248944624da352ec831f9190948 100644
|
||||
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
@@ -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 d57eea97fcdff4c4008ea0d03259349ac27a49b8..351ea787052200013b7b14a460dc900ffae010c1 100644
|
||||
index 8754ee3db863e6346b891a7491b997d46644f3c2..ed480f47be04d5df18f01d45488537251ef6bcb6 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -634,7 +634,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
|
||||
@@ -638,7 +638,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
|
||||
execution_context);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index d57eea97fcdff4c4008ea0d03259349ac27a49b8..351ea787052200013b7b14a460dc900f
|
||||
v8::Local<v8::Context> context,
|
||||
v8::Local<v8::Data> v8_host_defined_options,
|
||||
v8::Local<v8::Value> v8_referrer_resource_url,
|
||||
@@ -712,7 +714,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
||||
@@ -716,7 +718,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
|
||||
@@ -30,7 +30,7 @@ index d57eea97fcdff4c4008ea0d03259349ac27a49b8..351ea787052200013b7b14a460dc900f
|
||||
v8::Local<v8::Module> module,
|
||||
v8::Local<v8::Object> meta) {
|
||||
v8::Isolate* isolate = context->GetIsolate();
|
||||
@@ -759,9 +761,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
|
||||
@@ -763,9 +765,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ index d57eea97fcdff4c4008ea0d03259349ac27a49b8..351ea787052200013b7b14a460dc900f
|
||||
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
// Set up garbage collection before setting up anything else as V8 may trigger
|
||||
// GCs during Blink setup.
|
||||
@@ -781,9 +780,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
@@ -785,9 +784,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
|
||||
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
|
||||
isolate->SetSharedArrayBufferConstructorEnabledCallback(
|
||||
SharedArrayBufferConstructorEnabledCallback);
|
||||
|
||||
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 036f36e0db1ca493bbeefc5f9bfcc1da743eabe6..1052df03ff2441543921502cb2a7a228b2bd6644 100644
|
||||
index 9ab2ef6e7c0c66b0405c5af38722c9a0c2dca4b5..acf470ac17cdf9da8f4d551b277b193fd7b3cb62 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9837,25 +9837,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -9838,25 +9838,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 51f836176bf924de5fc26081d8b968f918181947..641a9c7fa68328e868167cf2fcdfec01643fea18 100644
|
||||
index fc70d927f9692334607c178510c6181136c22a8c..04ac54d309e076124a672bbeace285626a0a56e4 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -639,6 +639,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
|
||||
@@ -643,6 +643,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
|
||||
host()->DidProcessFrame(frame_token, activation_time);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ index 51f836176bf924de5fc26081d8b968f918181947..641a9c7fa68328e868167cf2fcdfec01
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 2a2edc6063b49a313fb359e99b39cf608c6233d1..96e6777899154e73661fb17184b9727cce2eb0a3 100644
|
||||
index deb5325b14ef849be118f0e82a9d1fedc9f1541a..c5c22e6266436d992f7fc67f930f17052ac5b6df 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -29,8 +29,11 @@
|
||||
@@ -53,7 +53,7 @@ index 2a2edc6063b49a313fb359e99b39cf608c6233d1..96e6777899154e73661fb17184b9727c
|
||||
class DelegatedFrameHost;
|
||||
class SyntheticGestureTarget;
|
||||
|
||||
@@ -145,6 +150,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -146,6 +151,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
RenderWidgetHostViewBase* GetRootView() override;
|
||||
@@ -64,7 +64,7 @@ index 2a2edc6063b49a313fb359e99b39cf608c6233d1..96e6777899154e73661fb17184b9727c
|
||||
void OnAutoscrollStart() override;
|
||||
const viz::DisplayHitTestQueryMap& GetDisplayHitTestQuery() const override;
|
||||
|
||||
@@ -182,6 +191,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
@@ -183,6 +192,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
|
||||
const gfx::Rect& keyboard_rect) override {}
|
||||
bool IsHTMLFormPopup() const override;
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 576e94b4574276d123687fe027046d14c95a7a51..66ef563af7a9698ef76ac710824234885ecb6125 100644
|
||||
index 9bb34fe40f0cc08cb832ee6728ac8e32458c969b..1da9a118fedc612dfed638abba54e69b983d9185 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 576e94b4574276d123687fe027046d14c95a7a51..66ef563af7a9698ef76ac71082423488
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1586,6 +1586,12 @@ if (!is_android) {
|
||||
@@ -1585,6 +1585,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,59 @@ Refs: https://chromium-review.googlesource.com/c/chromium/src/+/6078344
|
||||
This partially (leaves the removal of the feature flag) reverts
|
||||
ef865130abd5539e7bce12308659b19980368f12.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.h b/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.h
|
||||
index 428902f90950b2e9434c8a624a313268ebb80cd4..afcc3bc481be6a16119f7e2af647276cb0dafa1e 100644
|
||||
--- a/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.h
|
||||
+++ b/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.h
|
||||
@@ -12,6 +12,8 @@
|
||||
#import "content/app_shim_remote_cocoa/web_contents_view_cocoa.h"
|
||||
#include "content/common/web_contents_ns_view_bridge.mojom.h"
|
||||
|
||||
+extern CONTENT_EXPORT const base::FeatureParam<bool>
|
||||
+ kEnhancedWindowOcclusionDetection;
|
||||
extern CONTENT_EXPORT const base::FeatureParam<bool>
|
||||
kDisplaySleepAndAppHideDetection;
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.mm b/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.mm
|
||||
index 32523e6a6f800de3917d18825f94c66ef4ea4388..634d68b9a2840d7c9e7c3b5e23d8b1b8ac02456b 100644
|
||||
--- a/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.mm
|
||||
+++ b/content/app_shim_remote_cocoa/web_contents_occlusion_checker_mac.mm
|
||||
@@ -19,6 +19,12 @@
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
|
||||
+using features::kMacWebContentsOcclusion;
|
||||
+
|
||||
+// Experiment features.
|
||||
+const base::FeatureParam<bool> kEnhancedWindowOcclusionDetection{
|
||||
+ &kMacWebContentsOcclusion, "EnhancedWindowOcclusionDetection", false};
|
||||
+
|
||||
namespace {
|
||||
|
||||
NSString* const kWindowDidChangePositionInWindowList =
|
||||
@@ -127,7 +133,8 @@ - (void)dealloc {
|
||||
|
||||
- (BOOL)isManualOcclusionDetectionEnabled {
|
||||
return [WebContentsOcclusionCheckerMac
|
||||
- manualOcclusionDetectionSupportedForCurrentMacOSVersion];
|
||||
+ manualOcclusionDetectionSupportedForCurrentMacOSVersion] &&
|
||||
+ kEnhancedWindowOcclusionDetection.Get();
|
||||
}
|
||||
|
||||
// Alternative implementation of orderWindow:relativeTo:. Replaces
|
||||
diff --git a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
|
||||
index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe119dd3bd33 100644
|
||||
index 2991489fae8a4eecad97b1ecb2271f096d9a9229..93b7aa620ad1da250ac06e3383ca689732de12cd 100644
|
||||
--- a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
|
||||
+++ b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
|
||||
@@ -126,13 +126,11 @@ @implementation WebContentsViewCocoa {
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "ui/resources/grit/ui_resources.h"
|
||||
|
||||
using content::DropData;
|
||||
+using features::kMacWebContentsOcclusion;
|
||||
using remote_cocoa::mojom::DraggingInfo;
|
||||
using remote_cocoa::mojom::SelectionDirection;
|
||||
|
||||
@@ -126,12 +127,15 @@ @implementation WebContentsViewCocoa {
|
||||
|
||||
gfx::Rect _windowControlsOverlayRect;
|
||||
|
||||
@@ -29,15 +77,25 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe11
|
||||
BOOL _willSetWebContentsOccludedAfterDelay;
|
||||
}
|
||||
|
||||
-+ (void)initialize {
|
||||
+ (void)initialize {
|
||||
- // Create the WebContentsOcclusionCheckerMac shared instance.
|
||||
- [WebContentsOcclusionCheckerMac sharedInstance];
|
||||
-}
|
||||
++ (void)initialize { }
|
||||
+ if (base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ // Create the WebContentsOcclusionCheckerMac shared instance.
|
||||
+ [WebContentsOcclusionCheckerMac sharedInstance];
|
||||
+ }
|
||||
}
|
||||
|
||||
- (instancetype)initWithViewsHostableView:(ui::ViewsHostableView*)v {
|
||||
self = [super initWithFrame:NSZeroRect tracking:YES];
|
||||
@@ -487,6 +485,20 @@ - (void)updateWebContentsVisibility {
|
||||
@@ -442,6 +446,7 @@ - (void)updateWebContentsVisibility:
|
||||
(remote_cocoa::mojom::Visibility)visibility {
|
||||
using remote_cocoa::mojom::Visibility;
|
||||
|
||||
+ DCHECK(base::FeatureList::IsEnabled(kMacWebContentsOcclusion));
|
||||
if (!_host)
|
||||
return;
|
||||
|
||||
@@ -487,6 +492,20 @@ - (void)updateWebContentsVisibility {
|
||||
[self updateWebContentsVisibility:visibility];
|
||||
}
|
||||
|
||||
@@ -58,10 +116,29 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe11
|
||||
- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
|
||||
// Subviews do not participate in auto layout unless the the size this view
|
||||
// changes. This allows RenderWidgetHostViewMac::SetBounds(..) to select a
|
||||
@@ -509,11 +521,20 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
|
||||
@@ -509,11 +528,39 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
|
||||
|
||||
NSWindow* oldWindow = [self window];
|
||||
|
||||
+ if (base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ if (oldWindow) {
|
||||
+ [notificationCenter
|
||||
+ removeObserver:self
|
||||
+ name:NSWindowDidChangeOcclusionStateNotification
|
||||
+ object:oldWindow];
|
||||
+ }
|
||||
+
|
||||
+ if (newWindow) {
|
||||
+ [notificationCenter
|
||||
+ addObserver:self
|
||||
+ selector:@selector(windowChangedOcclusionState:)
|
||||
+ name:NSWindowDidChangeOcclusionStateNotification
|
||||
+ object:newWindow];
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ _inFullScreenTransition = NO;
|
||||
if (oldWindow) {
|
||||
- [notificationCenter
|
||||
@@ -83,7 +160,7 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe11
|
||||
}
|
||||
|
||||
if (newWindow) {
|
||||
@@ -521,27 +542,49 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
|
||||
@@ -521,26 +568,66 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
|
||||
selector:@selector(windowChangedOcclusionState:)
|
||||
name:NSWindowDidChangeOcclusionStateNotification
|
||||
object:newWindow];
|
||||
@@ -114,7 +191,10 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe11
|
||||
- NSString* occlusionCheckerKey = [WebContentsOcclusionCheckerMac className];
|
||||
- if (userInfo[occlusionCheckerKey] != nil)
|
||||
- [self updateWebContentsVisibility];
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ if (!base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ return;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+- (void)fullscreenTransitionStarted:(NSNotification*)notification {
|
||||
@@ -126,18 +206,62 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe11
|
||||
}
|
||||
|
||||
- (void)viewDidMoveToWindow {
|
||||
- [self updateWebContentsVisibility];
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ if (!base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
[self updateWebContentsVisibility];
|
||||
}
|
||||
|
||||
- (void)viewDidHide {
|
||||
- [self updateWebContentsVisibility];
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ if (!base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
[self updateWebContentsVisibility];
|
||||
}
|
||||
|
||||
- (void)viewDidUnhide {
|
||||
- [self updateWebContentsVisibility];
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ if (!base::FeatureList::IsEnabled(kMacWebContentsOcclusion)) {
|
||||
+ [self legacyUpdateWebContentsVisibility];
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
[self updateWebContentsVisibility];
|
||||
}
|
||||
|
||||
// ViewsHostable protocol implementation.
|
||||
diff --git a/content/common/features.cc b/content/common/features.cc
|
||||
index 5323e486d6e1550195317275eb0226bd94ea8e35..d8ed1aba1c69bf3a78ba9cb681999c347cf4eb47 100644
|
||||
--- a/content/common/features.cc
|
||||
+++ b/content/common/features.cc
|
||||
@@ -256,6 +256,14 @@ BASE_FEATURE(kIOSurfaceCapturer,
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
+// Feature that controls whether WebContentsOcclusionChecker should handle
|
||||
+// occlusion notifications.
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+BASE_FEATURE(kMacWebContentsOcclusion,
|
||||
+ "MacWebContentsOcclusion",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+#endif
|
||||
+
|
||||
// If this feature is enabled, media-device enumerations use a cache that is
|
||||
// invalidated upon notifications sent by base::SystemMonitor. If disabled, the
|
||||
// cache is considered invalid on every enumeration request.
|
||||
diff --git a/content/common/features.h b/content/common/features.h
|
||||
index 0f9451fcad172e09adbe0d93d93e78332429acbe..751c8c8ad6d4cf57fab7f9fd62d3f6a8db1ab31f 100644
|
||||
--- a/content/common/features.h
|
||||
+++ b/content/common/features.h
|
||||
@@ -67,6 +67,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer);
|
||||
#endif
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+CONTENT_EXPORT BASE_DECLARE_FEATURE(kMacWebContentsOcclusion);
|
||||
+#endif
|
||||
CONTENT_EXPORT BASE_DECLARE_FEATURE(kMediaDevicesSystemMonitorCache);
|
||||
CONTENT_EXPORT BASE_DECLARE_FEATURE(kMediaStreamTrackTransfer);
|
||||
CONTENT_EXPORT BASE_DECLARE_FEATURE(kMojoDedicatedThread);
|
||||
|
||||
@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 160607287f4c780a7729c7e38c97bcdcd70751cc..c9c2e50bd1847217330398c1b100ccc0b053db4e 100644
|
||||
index 6e5a1fa6af3e0f4d3e9116088bdec5a31f59b29a..f414b719c6777575796ba009f695030266b41dac 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1762,6 +1762,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ea3051dcced29ea08d557dd94b5bf255aa828ddc..76b8f23f39b6de07359348e99b900f7f10d77437 100644
|
||||
index 37ee5a89d187f25b2d07d022238e0d60799f93fe..36c9d5343f72c64ca315639e9f40c866966121d5 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3829,6 +3829,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3830,6 +3830,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index ea3051dcced29ea08d557dd94b5bf255aa828ddc..76b8f23f39b6de07359348e99b900f7f
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3839,6 +3846,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3840,6 +3847,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ index ea3051dcced29ea08d557dd94b5bf255aa828ddc..76b8f23f39b6de07359348e99b900f7f
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 5e89cbf0ed5fda4d2d6cb38dcfda3e02bc496d20..0eb1f248423d0308e2205357cc4350cabba04a62 100644
|
||||
index 24afa41509becd05d331bccd2452019f90b419d8..bea85663723c7b2d54f6dce11172d9e33e144676 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -116,10 +116,13 @@ class BrowserPluginGuestDelegate;
|
||||
|
||||
@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index bf5c630c3e7f86f20bddd5d7c1953c10d3d0f323..2778d916941effdf5b7c03794e0ffac5077f87a6 100644
|
||||
index be846f0ff4d960d7d26071f4d3c9c34a3d99f233..66f6806030d01f6559b838d98a36959350337e3e 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8510,6 +8510,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -8714,6 +8714,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ index bf5c630c3e7f86f20bddd5d7c1953c10d3d0f323..2778d916941effdf5b7c03794e0ffac5
|
||||
if (had_fullscreen_token && !GetView()->HasFocus())
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 76b8f23f39b6de07359348e99b900f7f10d77437..99fc1fde507e4594de8ffed7c3132150e226d475 100644
|
||||
index 36c9d5343f72c64ca315639e9f40c866966121d5..432a62f63fe11ddb16c40223b9e4d794ec41e186 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4098,21 +4098,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
@@ -4099,21 +4099,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
@@ -78,7 +78,7 @@ index 76b8f23f39b6de07359348e99b900f7f10d77437..99fc1fde507e4594de8ffed7c3132150
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -4271,7 +4275,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -4272,7 +4276,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
@@ -88,7 +88,7 @@ index 76b8f23f39b6de07359348e99b900f7f10d77437..99fc1fde507e4594de8ffed7c3132150
|
||||
features::kAutomaticFullscreenContentSetting)) {
|
||||
// Ensure the window is made active to take input focus. The user may have
|
||||
diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
|
||||
index f28fe993fa4454d72757c93f7a78428a14d8e073..c1e5598ed3a703bacfe69a64f2df6f1e5169cb88 100644
|
||||
index ff00c91543259b5361a068e1b3cc409bea8a6db2..e27e8af9dfb9160167087d057f5bb0d49c287270 100644
|
||||
--- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
|
||||
+++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
|
||||
@@ -110,7 +110,7 @@ void FullscreenElementChanged(Document& document,
|
||||
|
||||
@@ -26,7 +26,7 @@ index 7a2d251ba2d13d0a34df176111e6524a27b87f55..cbbe0fbdd25a0f7859b113fdb3dcd9ce
|
||||
// An empty URL is returned if the URL is not overriden.
|
||||
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index a287771fc347f1636e1252e431149c5bc6737fd4..7fc8bff33b785aa3d42248c22477474e84819dee 100644
|
||||
index 0e94e8aded089c12ee187855e4d07b77552b2b72..077223f6ff92c3787b25fc032c5e3b88e4a50ed3 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -890,6 +890,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
|
||||
@@ -35,7 +35,7 @@ index cbbe0fbdd25a0f7859b113fdb3dcd9ce57e597d6..1345bb5008e1b4fc3a450f7e353d52ec
|
||||
// from the worker thread.
|
||||
virtual void WillDestroyWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 7fc8bff33b785aa3d42248c22477474e84819dee..c58892e82ba3d107742d40c8442947ab2a801ff2 100644
|
||||
index 077223f6ff92c3787b25fc032c5e3b88e4a50ed3..9188d84c92856fde03420fad39bc76cbcfbab8eb 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -902,6 +902,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
|
||||
@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
|
||||
patching legacy devtools code.
|
||||
|
||||
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
|
||||
index 841641447b98543eaca6ad33a00c1bc0a37be0c1..87f5a2ede480a4d598d04a205dd31bb228260a45 100644
|
||||
index 909cdc3c7869dc181f1f0a030a636791e0900845..9f84263d92eaa8276198230bbb8048013dbd5493 100644
|
||||
--- a/front_end/entrypoints/main/MainImpl.ts
|
||||
+++ b/front_end/entrypoints/main/MainImpl.ts
|
||||
@@ -789,6 +789,8 @@ export class MainImpl {
|
||||
@@ -787,6 +787,8 @@ export class MainImpl {
|
||||
globalThis.Main = globalThis.Main || {};
|
||||
// @ts-ignore Exported for Tests.js
|
||||
globalThis.Main.Main = MainImpl;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
expose_get_builtin_module_function.patch
|
||||
build_add_gn_build_files.patch
|
||||
fix_add_default_values_for_variables_in_common_gypi.patch
|
||||
fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch
|
||||
pass_all_globals_through_require.patch
|
||||
build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch
|
||||
refactor_allow_embedder_overriding_of_internal_fs_calls.patch
|
||||
@@ -10,7 +9,6 @@ fix_handle_boringssl_and_openssl_incompatibilities.patch
|
||||
fix_crypto_tests_to_run_with_bssl.patch
|
||||
fix_account_for_debugger_agent_race_condition.patch
|
||||
fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch
|
||||
fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch
|
||||
feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch
|
||||
support_v8_sandboxed_pointers.patch
|
||||
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
|
||||
@@ -22,7 +20,6 @@ test_formally_mark_some_tests_as_flaky.patch
|
||||
fix_do_not_resolve_electron_entrypoints.patch
|
||||
ci_ensure_node_tests_set_electron_run_as_node.patch
|
||||
fix_assert_module_in_the_renderer_process.patch
|
||||
test_make_test-node-output-v8-warning_generic.patch
|
||||
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
|
||||
fix_remove_deprecated_errno_constants.patch
|
||||
build_enable_perfetto.patch
|
||||
@@ -31,18 +28,18 @@ src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch
|
||||
test_update_v8-stats_test_for_v8_12_6.patch
|
||||
src_do_not_use_soon-to-be-deprecated_v8_api.patch
|
||||
src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch
|
||||
build_don_t_redefine_win32_lean_and_mean.patch
|
||||
build_compile_with_c_20_support.patch
|
||||
add_v8_taskpirority_to_foreground_task_runner_signature.patch
|
||||
cli_remove_deprecated_v8_flag.patch
|
||||
build_restore_clang_as_default_compiler_on_macos.patch
|
||||
fix_-wextra-semi_errors_in_nghttp2_helper_h.patch
|
||||
fix_remove_harmony-import-assertions_from_node_cc.patch
|
||||
win_almost_fix_race_detecting_esrch_in_uv_kill.patch
|
||||
chore_disable_deprecation_ftbfs_in_simdjson_header.patch
|
||||
src_provide_workaround_for_container-overflow.patch
|
||||
build_allow_unbundling_of_node_js_dependencies.patch
|
||||
test_use_static_method_names_in_call_stacks.patch
|
||||
build_use_third_party_simdutf.patch
|
||||
fix_remove_fastapitypedarray_usage.patch
|
||||
test_handle_explicit_resource_management_globals.patch
|
||||
build_remove_explicit_linker_call_to_libm_on_macos.patch
|
||||
linux_try_preadv64_pwritev64_before_preadv_pwritev_4683.patch
|
||||
build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch
|
||||
test_make_eval_snapshot_tests_more_flexible.patch
|
||||
|
||||
@@ -10,28 +10,8 @@ however those files were cherry-picked from main branch and do not
|
||||
really in 20/21. We have to wait until 22 is released to be able to
|
||||
build with upstream GN files.
|
||||
|
||||
diff --git a/deps/sqlite/unofficial.gni b/deps/sqlite/unofficial.gni
|
||||
index ebb3ffcd6d42b4c16b6865a91ccf4428cffe864b..00225afa1fb4205f1e02d9f185aeb97d642b3fd9 100644
|
||||
--- a/deps/sqlite/unofficial.gni
|
||||
+++ b/deps/sqlite/unofficial.gni
|
||||
@@ -18,8 +18,14 @@ template("sqlite_gn_build") {
|
||||
forward_variables_from(invoker, "*")
|
||||
public_configs = [ ":sqlite_config" ]
|
||||
sources = gypi_values.sqlite_sources
|
||||
+ cflags_c = [
|
||||
+ "-Wno-implicit-fallthrough",
|
||||
+ "-Wno-unreachable-code-break",
|
||||
+ "-Wno-unreachable-code-return",
|
||||
+ "-Wno-unreachable-code",
|
||||
+ ]
|
||||
if (is_win) {
|
||||
- cflags_c = [
|
||||
+ cflags_c += [
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-unused-but-set-variable",
|
||||
"-Wno-unused-function",
|
||||
diff --git a/node.gni b/node.gni
|
||||
index 9dca810decebd75aab427e306b3cc37c80fb55c9..32709b860ccb12d8d1e75342a65dda0b86129b21 100644
|
||||
index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3fd219be7d 100644
|
||||
--- a/node.gni
|
||||
+++ b/node.gni
|
||||
@@ -5,10 +5,10 @@
|
||||
@@ -41,13 +21,13 @@ index 9dca810decebd75aab427e306b3cc37c80fb55c9..32709b860ccb12d8d1e75342a65dda0b
|
||||
- node_path = "//node"
|
||||
+ node_path = "//third_party/electron_node"
|
||||
|
||||
# The location of V8, use the one from node's deps by default.
|
||||
# The location of V8 - use the one from node's deps by default.
|
||||
- node_v8_path = "$node_path/deps/v8"
|
||||
+ node_v8_path = "//v8"
|
||||
|
||||
# The NODE_MODULE_VERSION defined in node_version.h.
|
||||
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
|
||||
@@ -38,7 +38,7 @@ declare_args() {
|
||||
# The location of OpenSSL - use the one from node's deps by default.
|
||||
node_openssl_path = "$node_path/deps/openssl"
|
||||
@@ -44,7 +44,7 @@ declare_args() {
|
||||
node_openssl_system_ca_path = ""
|
||||
|
||||
# Initialize v8 platform during node.js startup.
|
||||
@@ -56,20 +36,89 @@ index 9dca810decebd75aab427e306b3cc37c80fb55c9..32709b860ccb12d8d1e75342a65dda0b
|
||||
|
||||
# Custom build tag.
|
||||
node_tag = ""
|
||||
@@ -58,7 +58,7 @@ declare_args() {
|
||||
@@ -64,10 +64,16 @@ declare_args() {
|
||||
# TODO(zcbenz): There are few broken things for now:
|
||||
# 1. cross-os compilation is not supported.
|
||||
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
|
||||
- node_use_node_snapshot = (host_os == target_os) && !(host_cpu == "arm64" && target_cpu == "x64")
|
||||
+ node_use_node_snapshot = false
|
||||
|
||||
# Build with Amaro (TypeScript utils).
|
||||
node_use_amaro = true
|
||||
+
|
||||
+ # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries.
|
||||
+ use_system_cares = false
|
||||
+ use_system_nghttp2 = false
|
||||
+ use_system_llhttp = false
|
||||
+ use_system_histogram = false
|
||||
}
|
||||
|
||||
assert(!node_enable_inspector || node_use_openssl,
|
||||
diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni
|
||||
index 5d87f3c901ab509e534598ed1eb0796a96355b5e..3d7aa148678b2646b88fa7c32abec91791b02b82 100644
|
||||
--- a/src/inspector/unofficial.gni
|
||||
+++ b/src/inspector/unofficial.gni
|
||||
@@ -13,7 +13,7 @@ template("inspector_gn_build") {
|
||||
}
|
||||
|
||||
node_gen_dir = get_label_info("../..", "target_gen_dir")
|
||||
- protocol_tool_path = "../../tools/inspector_protocol"
|
||||
+ protocol_tool_path = "../../deps/inspector_protocol"
|
||||
|
||||
gypi_values = exec_script(
|
||||
"../../tools/gypi_to_gn.py",
|
||||
@@ -35,6 +35,8 @@ template("inspector_gn_build") {
|
||||
]
|
||||
|
||||
args = [
|
||||
+ "--inspector_protocol_dir",
|
||||
+ rebase_path(protocol_tool_path, root_build_dir),
|
||||
"--jinja_dir",
|
||||
# jinja is in third_party.
|
||||
rebase_path("//third_party/", root_build_dir),
|
||||
@@ -72,4 +74,37 @@ template("inspector_gn_build") {
|
||||
outputs = [ "$node_gen_dir/src/{{source_name_part}}.json" ]
|
||||
args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir)
|
||||
}
|
||||
+
|
||||
+ config("crdtp_config") {
|
||||
+ include_dirs = [ protocol_tool_path ]
|
||||
+ }
|
||||
+
|
||||
+ static_library("crdtp") {
|
||||
+ public_configs = [ ":crdtp_config" ]
|
||||
+ sources = [
|
||||
+ "$protocol_tool_path/crdtp/cbor.cc",
|
||||
+ "$protocol_tool_path/crdtp/cbor.h",
|
||||
+ "$protocol_tool_path/crdtp/dispatch.cc",
|
||||
+ "$protocol_tool_path/crdtp/dispatch.h",
|
||||
+ "$protocol_tool_path/crdtp/error_support.cc",
|
||||
+ "$protocol_tool_path/crdtp/error_support.h",
|
||||
+ "$protocol_tool_path/crdtp/export.h",
|
||||
+ "$protocol_tool_path/crdtp/find_by_first.h",
|
||||
+ "$protocol_tool_path/crdtp/frontend_channel.h",
|
||||
+ "$protocol_tool_path/crdtp/glue.h",
|
||||
+ "$protocol_tool_path/crdtp/json.cc",
|
||||
+ "$protocol_tool_path/crdtp/json.h",
|
||||
+ "$protocol_tool_path/crdtp/parser_handler.h",
|
||||
+ "$protocol_tool_path/crdtp/protocol_core.cc",
|
||||
+ "$protocol_tool_path/crdtp/protocol_core.h",
|
||||
+ "$protocol_tool_path/crdtp/serializable.cc",
|
||||
+ "$protocol_tool_path/crdtp/serializable.h",
|
||||
+ "$protocol_tool_path/crdtp/span.cc",
|
||||
+ "$protocol_tool_path/crdtp/span.h",
|
||||
+ "$protocol_tool_path/crdtp/status.cc",
|
||||
+ "$protocol_tool_path/crdtp/status.h",
|
||||
+ "$protocol_tool_path/crdtp/json_platform.cc",
|
||||
+ "$protocol_tool_path/crdtp/json_platform.h",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
|
||||
index 2bc7155f7c075e5a22ece7159a64a1c9ba3d8ac9..48d29a0d05538cd1d992f3f086d826e78d0d8882 100644
|
||||
index 894fd515202cc3a1f933c2bbc618dd09869ad904..4f1ed661e9c432f3b50f2e7e348ad9794ff773d0 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -775,6 +775,7 @@ void BuiltinLoader::RegisterExternalReferences(
|
||||
@@ -781,6 +781,7 @@ void BuiltinLoader::RegisterExternalReferences(
|
||||
registry->Register(GetNatives);
|
||||
|
||||
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
|
||||
@@ -78,11 +127,11 @@ index 2bc7155f7c075e5a22ece7159a64a1c9ba3d8ac9..48d29a0d05538cd1d992f3f086d826e7
|
||||
|
||||
} // namespace builtins
|
||||
diff --git a/src/node_builtins.h b/src/node_builtins.h
|
||||
index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834e118ffcf 100644
|
||||
index a73de23a1debfdac66873e0baccf882e383bfc36..7ac5291be093773ee7efd39e77e01bf5d5ce5247 100644
|
||||
--- a/src/node_builtins.h
|
||||
+++ b/src/node_builtins.h
|
||||
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =
|
||||
// Generated by tools/js2c.py as node_javascript.cc
|
||||
// Generated by tools/js2c.cc as node_javascript.cc
|
||||
void RegisterExternalReferencesForInternalizedBuiltinCode(
|
||||
ExternalReferenceRegistry* registry);
|
||||
+void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode(
|
||||
@@ -90,24 +139,11 @@ index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834
|
||||
|
||||
// Handles compilation and caching of built-in JavaScript modules and
|
||||
// bootstrap scripts, whose source are bundled into the binary as static data.
|
||||
diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py
|
||||
index 45b3ac5006140fb55aad0e6b78084b753a947a76..8667857107e4f2481fd98032d4333b086fb7b479 100755
|
||||
--- a/tools/generate_config_gypi.py
|
||||
+++ b/tools/generate_config_gypi.py
|
||||
@@ -21,7 +21,7 @@ import getnapibuildversion
|
||||
GN_RE = re.compile(r'(\w+)\s+=\s+(.*?)$', re.MULTILINE)
|
||||
|
||||
if sys.platform == 'win32':
|
||||
- GN = 'gn.exe'
|
||||
+ GN = 'gn.bat'
|
||||
else:
|
||||
GN = 'gn'
|
||||
|
||||
diff --git a/tools/install.py b/tools/install.py
|
||||
index bf54249b66c0d4e179deaae5a9fd55568e694fe0..31b94d2e4b532d3b8202b512e2d2f41d29a2a546 100755
|
||||
index 17515720ba9c85d533465365188021074a8d30f4..7232be863d517c8445059a57c5938c2cbdeaf81b 100755
|
||||
--- a/tools/install.py
|
||||
+++ b/tools/install.py
|
||||
@@ -285,6 +285,7 @@ def headers(options, action):
|
||||
@@ -291,6 +291,7 @@ def headers(options, action):
|
||||
'include/v8-promise.h',
|
||||
'include/v8-proxy.h',
|
||||
'include/v8-regexp.h',
|
||||
@@ -118,10 +154,10 @@ index bf54249b66c0d4e179deaae5a9fd55568e694fe0..31b94d2e4b532d3b8202b512e2d2f41d
|
||||
diff --git a/tools/js2c.cc b/tools/js2c.cc
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd786f64bb
|
||||
index 21992cbe894a880e3223c379326b62db22f2f12d..1296a5457422099035ba34f2b02624f2e9dfb0f0
|
||||
--- a/tools/js2c.cc
|
||||
+++ b/tools/js2c.cc
|
||||
@@ -30,6 +30,7 @@ namespace js2c {
|
||||
@@ -28,6 +28,7 @@ namespace js2c {
|
||||
int Main(int argc, char* argv[]);
|
||||
|
||||
static bool is_verbose = false;
|
||||
@@ -129,7 +165,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
|
||||
void Debug(const char* format, ...) {
|
||||
va_list arguments;
|
||||
@@ -196,6 +197,7 @@ const char* kTemplate = R"(
|
||||
@@ -175,6 +176,7 @@ const char* kTemplate = R"(
|
||||
#include "node_builtins.h"
|
||||
#include "node_external_reference.h"
|
||||
#include "node_internals.h"
|
||||
@@ -137,7 +173,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
|
||||
namespace node {
|
||||
|
||||
@@ -211,7 +213,11 @@ const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
|
||||
@@ -190,7 +192,11 @@ const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
|
||||
} // anonymous namespace
|
||||
|
||||
void BuiltinLoader::LoadJavaScriptSource() {
|
||||
@@ -150,7 +186,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
}
|
||||
|
||||
void RegisterExternalReferencesForInternalizedBuiltinCode(
|
||||
@@ -228,6 +234,45 @@ UnionBytes BuiltinLoader::GetConfig() {
|
||||
@@ -207,6 +213,45 @@ UnionBytes BuiltinLoader::GetConfig() {
|
||||
} // namespace node
|
||||
)";
|
||||
|
||||
@@ -196,7 +232,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
Fragment Format(const Fragments& definitions,
|
||||
const Fragments& initializers,
|
||||
const Fragments& registrations) {
|
||||
@@ -237,13 +282,12 @@ Fragment Format(const Fragments& definitions,
|
||||
@@ -216,13 +261,12 @@ Fragment Format(const Fragments& definitions,
|
||||
size_t init_size = init_buf.size();
|
||||
std::vector<char> reg_buf = Join(registrations, "\n");
|
||||
size_t reg_size = reg_buf.size();
|
||||
@@ -213,7 +249,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
static_cast<int>(def_buf.size()),
|
||||
def_buf.data(),
|
||||
static_cast<int>(init_buf.size()),
|
||||
@@ -834,12 +878,15 @@ int JS2C(const FileList& js_files,
|
||||
@@ -846,12 +890,15 @@ int JS2C(const FileList& js_files,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +265,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
Fragment out = Format(definitions, initializers, registrations);
|
||||
return WriteIfChanged(out, dest);
|
||||
}
|
||||
@@ -865,6 +912,8 @@ int Main(int argc, char* argv[]) {
|
||||
@@ -877,6 +924,8 @@ int Main(int argc, char* argv[]) {
|
||||
std::string arg(argv[i]);
|
||||
if (arg == "--verbose") {
|
||||
is_verbose = true;
|
||||
@@ -238,7 +274,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
} else if (arg == "--root") {
|
||||
if (i == argc - 1) {
|
||||
fprintf(stderr, "--root must be followed by a path\n");
|
||||
@@ -913,6 +962,14 @@ int Main(int argc, char* argv[]) {
|
||||
@@ -925,6 +974,14 @@ int Main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +289,7 @@ index a536b5dcd857275d3b02e361bd7d37a939f6b573..b2d5678d58a79774d5aeedc15ac5d5fd
|
||||
// Should have exactly 3 types: `.js`, `.mjs` and `.gypi`.
|
||||
assert(file_map.size() == 3);
|
||||
auto gypi_it = file_map.find(".gypi");
|
||||
@@ -939,6 +996,7 @@ int Main(int argc, char* argv[]) {
|
||||
@@ -951,6 +1008,7 @@ int Main(int argc, char* argv[]) {
|
||||
std::sort(mjs_it->second.begin(), mjs_it->second.end());
|
||||
|
||||
return JS2C(js_it->second, mjs_it->second, gypi_it->second[0], output);
|
||||
@@ -274,10 +310,10 @@ index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index c3b311e4a7f5444b07d4d7028d4621806959804e..de6ff5548ca5282199b7d85c11941c1fa351a9d9 100644
|
||||
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5aeab1340d 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -139,6 +139,7 @@ template("node_gn_build") {
|
||||
@@ -145,6 +145,7 @@ template("node_gn_build") {
|
||||
public_deps = [
|
||||
"deps/ada",
|
||||
"deps/uv",
|
||||
@@ -285,15 +321,15 @@ index c3b311e4a7f5444b07d4d7028d4621806959804e..de6ff5548ca5282199b7d85c11941c1f
|
||||
"deps/simdjson",
|
||||
"$node_v8_path",
|
||||
]
|
||||
@@ -150,7 +151,6 @@ template("node_gn_build") {
|
||||
@@ -156,7 +157,6 @@ template("node_gn_build") {
|
||||
"deps/llhttp",
|
||||
"deps/nbytes",
|
||||
"deps/nghttp2",
|
||||
- "deps/ngtcp2",
|
||||
"deps/postject",
|
||||
"deps/simdutf",
|
||||
"deps/sqlite",
|
||||
@@ -159,7 +159,11 @@ template("node_gn_build") {
|
||||
"deps/uvwasi",
|
||||
@@ -165,7 +165,11 @@ template("node_gn_build") {
|
||||
"$node_v8_path:v8_libplatform",
|
||||
]
|
||||
|
||||
@@ -305,28 +341,29 @@ index c3b311e4a7f5444b07d4d7028d4621806959804e..de6ff5548ca5282199b7d85c11941c1f
|
||||
"$target_gen_dir/node_javascript.cc",
|
||||
] + gypi_values.node_sources
|
||||
|
||||
@@ -178,8 +182,10 @@ template("node_gn_build") {
|
||||
deps += [ "//third_party/icu" ]
|
||||
@@ -185,11 +189,12 @@ template("node_gn_build") {
|
||||
}
|
||||
if (node_use_openssl) {
|
||||
- deps += [ "deps/ncrypto" ]
|
||||
- public_deps += [ "deps/openssl" ]
|
||||
+ deps += [
|
||||
+ "deps/ncrypto",
|
||||
+ "//third_party/boringssl"
|
||||
+ ]
|
||||
deps += [ "deps/ncrypto" ]
|
||||
- public_deps += [ "$node_openssl_path" ]
|
||||
+ public_deps += [ "//third_party/boringssl" ]
|
||||
sources += gypi_values.node_crypto_sources
|
||||
}
|
||||
if (node_enable_inspector) {
|
||||
@@ -276,6 +282,7 @@ template("node_gn_build") {
|
||||
deps += [
|
||||
+ "src/inspector:crdtp",
|
||||
"src/inspector:node_protocol_generated_sources",
|
||||
"src/inspector:v8_inspector_compress_protocol_json",
|
||||
]
|
||||
@@ -282,6 +287,7 @@ template("node_gn_build") {
|
||||
}
|
||||
|
||||
executable("node_js2c") {
|
||||
+ defines = []
|
||||
deps = [
|
||||
"deps/simdutf",
|
||||
"deps/uv",
|
||||
@@ -286,26 +293,75 @@ template("node_gn_build") {
|
||||
"$node_simdutf_path",
|
||||
@@ -292,26 +298,75 @@ template("node_gn_build") {
|
||||
"src/embedded_data.cc",
|
||||
"src/embedded_data.h",
|
||||
]
|
||||
@@ -412,7 +449,7 @@ index c3b311e4a7f5444b07d4d7028d4621806959804e..de6ff5548ca5282199b7d85c11941c1f
|
||||
outputs = [ "$target_gen_dir/node_javascript.cc" ]
|
||||
|
||||
# Get the path to node_js2c executable of the host toolchain.
|
||||
@@ -319,11 +375,11 @@ template("node_gn_build") {
|
||||
@@ -325,11 +380,11 @@ template("node_gn_build") {
|
||||
get_label_info(":node_js2c($host_toolchain)", "name") +
|
||||
host_executable_suffix
|
||||
|
||||
|
||||
@@ -13,28 +13,11 @@ We don't need to do this for zlib, as the existing gn workflow uses the same
|
||||
|
||||
Upstreamed at https://github.com/nodejs/node/pull/55903
|
||||
|
||||
diff --git a/node.gni b/node.gni
|
||||
index 18d58591e3d0f1f3512db00033c3410a65702864..99ec540ec41ddf5682eed7618ba87d6935b3b982 100644
|
||||
--- a/node.gni
|
||||
+++ b/node.gni
|
||||
@@ -61,6 +61,12 @@ declare_args() {
|
||||
# 1. cross-os compilation is not supported.
|
||||
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
|
||||
node_use_node_snapshot = false
|
||||
+
|
||||
+ # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries.
|
||||
+ use_system_cares = false
|
||||
+ use_system_nghttp2 = false
|
||||
+ use_system_llhttp = false
|
||||
+ use_system_histogram = false
|
||||
}
|
||||
|
||||
assert(!node_enable_inspector || node_use_openssl,
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index 3d8b7957e791ce2fa2a8d0937a87b6010087803d..c23922a301a721662ff34bf6e54fd26b41f25ccc 100644
|
||||
index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d26c4db206 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -147,7 +147,6 @@ template("node_gn_build") {
|
||||
@@ -153,7 +153,6 @@ template("node_gn_build") {
|
||||
":run_node_js2c",
|
||||
"deps/cares",
|
||||
"deps/histogram",
|
||||
@@ -42,7 +25,7 @@ index 3d8b7957e791ce2fa2a8d0937a87b6010087803d..c23922a301a721662ff34bf6e54fd26b
|
||||
"deps/nbytes",
|
||||
"deps/nghttp2",
|
||||
"deps/postject",
|
||||
@@ -178,7 +177,17 @@ template("node_gn_build") {
|
||||
@@ -184,7 +183,17 @@ template("node_gn_build") {
|
||||
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
@@ -61,7 +44,7 @@ index 3d8b7957e791ce2fa2a8d0937a87b6010087803d..c23922a301a721662ff34bf6e54fd26b
|
||||
if (v8_enable_i18n_support) {
|
||||
deps += [ "//third_party/icu" ]
|
||||
}
|
||||
@@ -205,6 +214,19 @@ template("node_gn_build") {
|
||||
@@ -212,6 +221,19 @@ template("node_gn_build") {
|
||||
sources += node_inspector.node_inspector_sources +
|
||||
node_inspector.node_inspector_generated_sources
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 12 Feb 2025 15:31:07 +0100
|
||||
Subject: build: change crdtp::ProtocolTypeTraits signatures to avoid conflict
|
||||
|
||||
After https://github.com/nodejs/node/pull/56649 we see conflicts with the
|
||||
version in //third_party/inspector_protocol/crdtp/chromium/protocol_traits.cc
|
||||
|
||||
error: duplicate symbol: crdtp::ProtocolTypeTraits<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, void>::Serialize(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>>*)
|
||||
>>> defined in node_string.cc:28 (../../third_party/electron_node/src/inspector/node_string.cc:28)
|
||||
>>> obj/third_party/electron_node/libnode/node_string.o
|
||||
>>> defined in protocol_traits.cc:20 (../../third_party/inspector_protocol/crdtp/chromium/protocol_traits.cc:20)
|
||||
|
||||
Some distinguishing change should be upstreamed to Node.js.
|
||||
|
||||
diff --git a/src/inspector/node_string.cc b/src/inspector/node_string.cc
|
||||
index d83c53c81ca7745a31b200d5af3656af59f4f530..b2f6d412415e2988ead3c1e25b9557e1f0c91de3 100644
|
||||
--- a/src/inspector/node_string.cc
|
||||
+++ b/src/inspector/node_string.cc
|
||||
@@ -7,7 +7,8 @@
|
||||
namespace crdtp {
|
||||
|
||||
bool ProtocolTypeTraits<std::string>::Deserialize(DeserializerState* state,
|
||||
- std::string* value) {
|
||||
+ std::string* value,
|
||||
+ void* extra) {
|
||||
if (state->tokenizer()->TokenTag() == cbor::CBORTokenTag::STRING8) {
|
||||
span<uint8_t> cbor_span = state->tokenizer()->GetString8();
|
||||
value->assign(reinterpret_cast<const char*>(cbor_span.data()),
|
||||
@@ -24,12 +25,13 @@ bool ProtocolTypeTraits<std::string>::Deserialize(DeserializerState* state,
|
||||
}
|
||||
|
||||
void ProtocolTypeTraits<std::string>::Serialize(const std::string& value,
|
||||
- std::vector<uint8_t>* bytes) {
|
||||
+ std::vector<uint8_t>* bytes,
|
||||
+ void* extra) {
|
||||
cbor::EncodeString8(SpanFrom(value), bytes);
|
||||
}
|
||||
-
|
||||
} // namespace crdtp
|
||||
|
||||
+
|
||||
namespace node {
|
||||
namespace inspector {
|
||||
namespace protocol {
|
||||
diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h
|
||||
index d529d1337be0e2292202920446e841701d16b0b7..08e00f9b94918e3385aed18de80eec5c7ad81095 100644
|
||||
--- a/src/inspector/node_string.h
|
||||
+++ b/src/inspector/node_string.h
|
||||
@@ -15,8 +15,8 @@ namespace crdtp {
|
||||
|
||||
template <>
|
||||
struct ProtocolTypeTraits<std::string> {
|
||||
- static bool Deserialize(DeserializerState* state, std::string* value);
|
||||
- static void Serialize(const std::string& value, std::vector<uint8_t>* bytes);
|
||||
+ static bool Deserialize(DeserializerState* state, std::string* value, void* extra = nullptr);
|
||||
+ static void Serialize(const std::string& value, std::vector<uint8_t>* bytes, void* extra = nullptr);
|
||||
};
|
||||
|
||||
} // namespace crdtp
|
||||
@@ -10,7 +10,7 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
|
||||
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 74616453e2e047acbb9e25f2f93ebeab06011669..bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45 100644
|
||||
index 755bd203173a69564be203ad58c33eb50680b204..a7a0ffde7209de51ffcbf0db0ed7efcf09ad606d 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -518,7 +518,7 @@
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Fri, 23 Aug 2024 16:50:19 +0200
|
||||
Subject: build: don't redefine WIN32_LEAN_AND_MEAN
|
||||
|
||||
https://github.com/nodejs/node/pull/53722 added a new define for WIN32_LEAN_AND_MEAN
|
||||
without first checking to see if it was defined - other areas in c-ares do this so
|
||||
we should here as well. Compilation errors occur otherwise:
|
||||
|
||||
../../third_party/electron_node/deps/cares/include\ares_build.h(168,11): error: 'WIN32_LEAN_AND_MEAN' macro redefined [-Werror,-Wmacro-redefined]
|
||||
168 | # define WIN32_LEAN_AND_MEAN
|
||||
| ^
|
||||
<command line>(25,9): note: previous definition is here
|
||||
25 | #define WIN32_LEAN_AND_MEAN 1
|
||||
| ^
|
||||
1 error generated.
|
||||
[287 processes, 49437/51449 @ 48.5/s : 1018.562s] CC obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
|
||||
FAILED: obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
|
||||
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h
|
||||
index 18a92606a817145302c73b5081b4c989799bc620..bafd26d9210d2347fec41f028e9e65088b83c48c 100644
|
||||
--- a/deps/cares/include/ares_build.h
|
||||
+++ b/deps/cares/include/ares_build.h
|
||||
@@ -165,7 +165,9 @@
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
|
||||
#elif defined(_WIN32)
|
||||
-# define WIN32_LEAN_AND_MEAN
|
||||
+# ifndef WIN32_LEAN_AND_MEAN
|
||||
+# define WIN32_LEAN_AND_MEAN
|
||||
+# endif
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_HAVE_WINDOWS_H 1
|
||||
# define CARES_HAVE_SYS_TYPES_H 1
|
||||
@@ -64,7 +64,7 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327
|
||||
|
||||
module.exports = {
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index 11474953b186c7b3ec2edb0539f34572e6c551b7..eeaaef8a06cdc2d17e89f9c719f9922e6e04ce92 100644
|
||||
index d97004c8e148be6b63634dad5306756d503fb1f8..271fb4f76bc1e69baad0b1fafca128b3bca4a360 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -174,7 +174,6 @@
|
||||
@@ -84,10 +84,10 @@ index 11474953b186c7b3ec2edb0539f34572e6c551b7..eeaaef8a06cdc2d17e89f9c719f9922e
|
||||
'src/tracing/trace_event.h',
|
||||
'src/tracing/trace_event_common.h',
|
||||
diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc
|
||||
index e7b6d3b3ea63bdc80e569f56209e958b4fcde328..b52d5b1c7293539315626cd67f794cce4cfd1760 100644
|
||||
index 40c8aea35c931c46fc62b717c978eab0659645fd..348cdfb0b42aa18f352c220cea0b896c09f67753 100644
|
||||
--- a/src/inspector/tracing_agent.cc
|
||||
+++ b/src/inspector/tracing_agent.cc
|
||||
@@ -84,14 +84,14 @@ class InspectorTraceWriter : public node::tracing::AsyncTraceWriter {
|
||||
@@ -92,14 +92,14 @@ class InspectorTraceWriter : public node::tracing::AsyncTraceWriter {
|
||||
explicit InspectorTraceWriter(int frontend_object_id,
|
||||
std::shared_ptr<MainThreadHandle> main_thread)
|
||||
: frontend_object_id_(frontend_object_id), main_thread_(main_thread) {}
|
||||
@@ -264,27 +264,25 @@ index 18e4f43efaae3a60b924e697918867e604513194..7cbaf01235750138c680c8ec2ed5d206
|
||||
uint32_t current_chunk_seq_ = 1;
|
||||
uint32_t id_;
|
||||
diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc
|
||||
index 8f053efe93324b9acbb4e85f7b974b4f7712e200..e331ed5567caa39ade90ce28cea69f1d10533812 100644
|
||||
index 8f053efe93324b9acbb4e85f7b974b4f7712e200..1801594e727ec7a2ef3b89603975f507078b88a1 100644
|
||||
--- a/src/tracing/node_trace_writer.cc
|
||||
+++ b/src/tracing/node_trace_writer.cc
|
||||
@@ -95,7 +95,7 @@ void NodeTraceWriter::OpenNewFileForStreaming() {
|
||||
fd_ = -1;
|
||||
@@ -96,6 +96,7 @@ void NodeTraceWriter::OpenNewFileForStreaming() {
|
||||
}
|
||||
}
|
||||
-
|
||||
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
void NodeTraceWriter::AppendTraceEvent(TraceObject* trace_event) {
|
||||
Mutex::ScopedLock scoped_lock(stream_mutex_);
|
||||
// If this is the first trace event, open a new file for streaming.
|
||||
@@ -112,7 +112,7 @@ void NodeTraceWriter::AppendTraceEvent(TraceObject* trace_event) {
|
||||
@@ -112,6 +113,7 @@ void NodeTraceWriter::AppendTraceEvent(TraceObject* trace_event) {
|
||||
++total_traces_;
|
||||
json_trace_writer_->AppendTraceEvent(trace_event);
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
|
||||
void NodeTraceWriter::FlushPrivate() {
|
||||
std::string str;
|
||||
int highest_request_id;
|
||||
diff --git a/src/tracing/node_trace_writer.h b/src/tracing/node_trace_writer.h
|
||||
index cd965d77b7859ff2edcf781a934594b5a9b6d251..fe1714ba77fddef693d37eeb8c7a196ddfd15c26 100644
|
||||
--- a/src/tracing/node_trace_writer.h
|
||||
@@ -300,7 +298,7 @@ index cd965d77b7859ff2edcf781a934594b5a9b6d251..fe1714ba77fddef693d37eeb8c7a196d
|
||||
|
||||
static const int kTracesPerFile = 1 << 19;
|
||||
diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h
|
||||
index be0f55a409a71bf9c1763c36fdc252857228742e..827b5330b2f8c545338a46c548f8abf4aab7f50c 100644
|
||||
index a662a081dc3bf356bf93e4063fcb043e4d8df07b..c89cdfe2b2681fbf9946200a03d7d1f7bad21226 100644
|
||||
--- a/src/tracing/trace_event.h
|
||||
+++ b/src/tracing/trace_event.h
|
||||
@@ -69,8 +69,16 @@ enum CategoryGroupEnabledFlags {
|
||||
@@ -336,21 +334,23 @@ index be0f55a409a71bf9c1763c36fdc252857228742e..827b5330b2f8c545338a46c548f8abf4
|
||||
|
||||
// Adds a metadata event to the trace log. The |AppendValueAsTraceFormat| method
|
||||
// on the convertable value will be called at flush time.
|
||||
@@ -319,10 +332,13 @@ class TraceEventHelper {
|
||||
@@ -319,12 +332,15 @@ class TraceEventHelper {
|
||||
static void SetAgent(Agent* agent);
|
||||
|
||||
static inline const uint8_t* GetCategoryGroupEnabled(const char* group) {
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
v8::TracingController* controller = GetTracingController();
|
||||
static const uint8_t disabled = 0;
|
||||
if (UNLIKELY(controller == nullptr)) return &disabled;
|
||||
if (controller == nullptr) [[unlikely]] {
|
||||
return &disabled;
|
||||
}
|
||||
return controller->GetCategoryGroupEnabled(group);
|
||||
+#endif
|
||||
+ return 0;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -460,6 +476,7 @@ static inline uint64_t AddTraceEventImpl(
|
||||
@@ -462,6 +478,7 @@ static inline uint64_t AddTraceEventImpl(
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values, unsigned int flags) {
|
||||
@@ -358,14 +358,7 @@ index be0f55a409a71bf9c1763c36fdc252857228742e..827b5330b2f8c545338a46c548f8abf4
|
||||
std::unique_ptr<v8::ConvertableToTraceFormat> arg_convertibles[2];
|
||||
if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) {
|
||||
arg_convertibles[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
@@ -469,13 +486,14 @@ static inline uint64_t AddTraceEventImpl(
|
||||
arg_convertibles[1].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
static_cast<intptr_t>(arg_values[1])));
|
||||
}
|
||||
- // DCHECK(num_args, 2);
|
||||
v8::TracingController* controller =
|
||||
node::tracing::TraceEventHelper::GetTracingController();
|
||||
if (controller == nullptr) return 0;
|
||||
@@ -478,6 +495,8 @@ static inline uint64_t AddTraceEventImpl(
|
||||
return controller->AddTraceEvent(phase, category_group_enabled, name, scope, id,
|
||||
bind_id, num_args, arg_names, arg_types,
|
||||
arg_values, arg_convertibles, flags);
|
||||
@@ -374,25 +367,18 @@ index be0f55a409a71bf9c1763c36fdc252857228742e..827b5330b2f8c545338a46c548f8abf4
|
||||
}
|
||||
|
||||
static V8_INLINE uint64_t AddTraceEventWithTimestampImpl(
|
||||
@@ -483,6 +501,7 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl(
|
||||
@@ -485,6 +504,7 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl(
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values, unsigned int flags, int64_t timestamp) {
|
||||
+#ifndef V8_USE_PERFETTO
|
||||
std::unique_ptr<v8::ConvertableToTraceFormat> arg_convertables[2];
|
||||
std::unique_ptr<v8::ConvertableToTraceFormat> arg_convertibles[2];
|
||||
if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) {
|
||||
arg_convertables[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
@@ -492,19 +511,21 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl(
|
||||
arg_convertables[1].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
static_cast<intptr_t>(arg_values[1])));
|
||||
}
|
||||
- // DCHECK_LE(num_args, 2);
|
||||
v8::TracingController* controller =
|
||||
node::tracing::TraceEventHelper::GetTracingController();
|
||||
if (controller == nullptr) return 0;
|
||||
arg_convertibles[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
@@ -501,12 +521,15 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl(
|
||||
return controller->AddTraceEventWithTimestamp(
|
||||
phase, category_group_enabled, name, scope, id, bind_id, num_args,
|
||||
arg_names, arg_types, arg_values, arg_convertables, flags, timestamp);
|
||||
arg_names, arg_types, arg_values, arg_convertibles, flags, timestamp);
|
||||
+#endif
|
||||
+ return 0;
|
||||
}
|
||||
@@ -405,7 +391,7 @@ index be0f55a409a71bf9c1763c36fdc252857228742e..827b5330b2f8c545338a46c548f8abf4
|
||||
std::unique_ptr<v8::ConvertableToTraceFormat> arg_convertibles[2];
|
||||
if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) {
|
||||
arg_convertibles[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
|
||||
@@ -520,6 +541,7 @@ static V8_INLINE void AddMetadataEventImpl(
|
||||
@@ -522,6 +545,7 @@ static V8_INLINE void AddMetadataEventImpl(
|
||||
return agent->GetTracingController()->AddMetadataEvent(
|
||||
category_group_enabled, name, num_args, arg_names, arg_types, arg_values,
|
||||
arg_convertibles, flags);
|
||||
|
||||
@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
|
||||
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 229cb96c1385c597138719f2b01f78bd54ad44ab..74616453e2e047acbb9e25f2f93ebeab06011669 100644
|
||||
index 5d74876ab28f8c10bb9543f7652478514414d8d2..755bd203173a69564be203ad58c33eb50680b204 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -86,6 +86,8 @@
|
||||
@@ -40,10 +40,10 @@ index 229cb96c1385c597138719f2b01f78bd54ad44ab..74616453e2e047acbb9e25f2f93ebeab
|
||||
# list in v8/BUILD.gn.
|
||||
['v8_enable_v8_checks == 1', {
|
||||
diff --git a/configure.py b/configure.py
|
||||
index d03db1970fd7a1629a7a7719a5ff267402ab4a66..ce055fb5dfc84c75c486b99f01fea6b9531ff54b 100755
|
||||
index 712ed40f77e54d52d5b3c52bb68e2b7d48879812..6bcb7450975636b5dbc689470663ee37903874d5 100755
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -1634,6 +1634,7 @@ def configure_library(lib, output, pkgname=None):
|
||||
@@ -1644,6 +1644,7 @@ def configure_library(lib, output, pkgname=None):
|
||||
def configure_v8(o, configs):
|
||||
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)
|
||||
|
||||
@@ -52,7 +52,7 @@ index d03db1970fd7a1629a7a7719a5ff267402ab4a66..ce055fb5dfc84c75c486b99f01fea6b9
|
||||
o['variables']['v8_enable_javascript_promise_hooks'] = 1
|
||||
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
|
||||
diff --git a/src/node.h b/src/node.h
|
||||
index 0fec9477fd0f2a3c2aa68284131c510b0da0e025..c16204ad2a4787eeffe61eedda254d3a5509df8c 100644
|
||||
index 7726d3de1e82689655e8fceb4135eec303498572..120e3a1042e29590cbbf4be258a1cd2d3d4f0043 100644
|
||||
--- a/src/node.h
|
||||
+++ b/src/node.h
|
||||
@@ -22,6 +22,12 @@
|
||||
|
||||
@@ -10,7 +10,7 @@ JS errors and ensures embedder JS is loaded via LoadEmbedderJavaScriptSource.
|
||||
That method is generated by our modifications to js2c.cc in the BUILD.gn patch
|
||||
|
||||
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
|
||||
index f5ecc15159f457cd0b8069c0427b7c758c916c4e..c9ce67391f321989b0af48159b4da3ab8ffc3e65 100644
|
||||
index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b50ccca43 100644
|
||||
--- a/lib/internal/fs/watchers.js
|
||||
+++ b/lib/internal/fs/watchers.js
|
||||
@@ -292,12 +292,13 @@ function emitCloseNT(self) {
|
||||
@@ -34,7 +34,7 @@ index f5ecc15159f457cd0b8069c0427b7c758c916c4e..c9ce67391f321989b0af48159b4da3ab
|
||||
let kResistStopPropagation;
|
||||
|
||||
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
|
||||
index 48d29a0d05538cd1d992f3f086d826e78d0d8882..8987234c2d08449242b5fd037ed314b725bc42a5 100644
|
||||
index 4f1ed661e9c432f3b50f2e7e348ad9794ff773d0..16c95348ee254061d5c48f405968c1b0ee33bf82 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -34,6 +34,7 @@ using v8::Value;
|
||||
@@ -46,12 +46,12 @@ index 48d29a0d05538cd1d992f3f086d826e78d0d8882..8987234c2d08449242b5fd037ed314b7
|
||||
AddExternalizedBuiltin(
|
||||
"internal/deps/cjs-module-lexer/lexer",
|
||||
diff --git a/src/node_builtins.h b/src/node_builtins.h
|
||||
index cec9be01abd107e8612f70daf19b4834e118ffcf..3d9c6b962423555257bad4ebaad9ebd821d00042 100644
|
||||
index 7ac5291be093773ee7efd39e77e01bf5d5ce5247..c3c987d535285be84026ad0c633650bd2067d22d 100644
|
||||
--- a/src/node_builtins.h
|
||||
+++ b/src/node_builtins.h
|
||||
@@ -138,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
|
||||
|
||||
// Generated by tools/js2c.py as node_javascript.cc
|
||||
// Generated by tools/js2c.cc as node_javascript.cc
|
||||
void LoadJavaScriptSource(); // Loads data into source_
|
||||
+ void LoadEmbedderJavaScriptSource(); // Loads embedder data into source_
|
||||
UnionBytes GetConfig(); // Return data for config.gypi
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Mon, 3 Feb 2025 21:44:36 +0900
|
||||
Subject: build: remove explicit linker call to libm on macOS
|
||||
|
||||
/usr/lib/libm.tbd is available via libSystem.*.dylib and
|
||||
reexports sanitizer symbols. When building for asan
|
||||
this becomes an issue as the linker will resolve the symbols
|
||||
from the system library rather from libclang_rt.*
|
||||
|
||||
For V8 that rely on specific version of these symbols
|
||||
that get bundled as part of clang, for ex:
|
||||
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/heap/cppgc/platform.cc;l=93-97
|
||||
accepting nullptr for shadow_offset in `asan_get_shadow_mapping`,
|
||||
linking to system version that doesn't support this will lead to
|
||||
a crash.
|
||||
|
||||
Clang driver eventually links with `-lSystem`
|
||||
https://github.com/llvm/llvm-project/blob/e82f93890daefeb38fe2a22ee3db87a89948ec57/clang/lib/Driver/ToolChains/Darwin.cpp#L1628-L1631,
|
||||
this is done after linking the sanitizer libraries which
|
||||
ensures right order of resolution for the symbols.
|
||||
|
||||
PR-URL: https://github.com/nodejs/node/pull/56901
|
||||
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
||||
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
|
||||
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
|
||||
diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni
|
||||
index 5e07e106672a04508a77584c109c97a67926c858..91001fa43ea4807d061f296eaeccb7512e34863e 100644
|
||||
--- a/deps/brotli/unofficial.gni
|
||||
+++ b/deps/brotli/unofficial.gni
|
||||
@@ -25,7 +25,7 @@ template("brotli_gn_build") {
|
||||
} else if (target_os == "freebsd") {
|
||||
defines = [ "OS_FREEBSD" ]
|
||||
}
|
||||
- if (!is_win) {
|
||||
+ if (is_linux) {
|
||||
libs = [ "m" ]
|
||||
}
|
||||
if (is_clang || !is_win) {
|
||||
diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni
|
||||
index 348d2f0703e47ca7c5326a4b4c1d6ae31157eeb5..0944d6ddd241b113970ab6aa5804f9534fde882a 100644
|
||||
--- a/deps/uv/unofficial.gni
|
||||
+++ b/deps/uv/unofficial.gni
|
||||
@@ -87,11 +87,11 @@ template("uv_gn_build") {
|
||||
]
|
||||
}
|
||||
if (is_posix) {
|
||||
- libs = [ "m" ]
|
||||
ldflags = [ "-pthread" ]
|
||||
}
|
||||
if (is_linux) {
|
||||
- libs += [
|
||||
+ libs = [
|
||||
+ "m",
|
||||
"dl",
|
||||
"rt",
|
||||
]
|
||||
@@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment
|
||||
in which the binary got built.
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45..289ab5d282e93c795eafb5fb992c3bbc4790a687 100644
|
||||
index a7a0ffde7209de51ffcbf0db0ed7efcf09ad606d..20fd68eeb878b51f361d72070d87338db3d9a8d4 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -125,6 +125,7 @@
|
||||
|
||||
@@ -6,46 +6,15 @@ Subject: build: use third_party/simdutf
|
||||
use the Chromium version of simdutf to avoid duplicate symbols
|
||||
|
||||
diff --git a/node.gni b/node.gni
|
||||
index 99ec540ec41ddf5682eed7618ba87d6935b3b982..274e627fe27b318218f10e982ca5a0773a9075a5 100644
|
||||
index 56a554175b805c1703f13d62041f8c80d6e94dd9..203b4abbc44df9e58083c819f61f9025104abdc6 100644
|
||||
--- a/node.gni
|
||||
+++ b/node.gni
|
||||
@@ -12,6 +12,8 @@ declare_args() {
|
||||
|
||||
node_crypto_path = "//third_party/boringssl"
|
||||
@@ -14,7 +14,7 @@ declare_args() {
|
||||
node_openssl_path = "//third_party/boringssl"
|
||||
|
||||
# The location of simdutf - use the one from node's deps by default.
|
||||
- node_simdutf_path = "$node_path/deps/simdutf"
|
||||
+ node_simdutf_path = "//third_party/simdutf"
|
||||
+
|
||||
|
||||
# The NODE_MODULE_VERSION defined in node_version.h.
|
||||
node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value")
|
||||
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index c23922a301a721662ff34bf6e54fd26b41f25ccc..988dd1d73e72ccd3a6eb10b326b8dc7fcd8e257b 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -150,7 +150,7 @@ template("node_gn_build") {
|
||||
"deps/nbytes",
|
||||
"deps/nghttp2",
|
||||
"deps/postject",
|
||||
- "deps/simdutf",
|
||||
+ "$node_simdutf_path",
|
||||
"deps/sqlite",
|
||||
"deps/uvwasi",
|
||||
"//third_party/zlib",
|
||||
@@ -305,7 +305,7 @@ template("node_gn_build") {
|
||||
executable("node_js2c") {
|
||||
defines = []
|
||||
deps = [
|
||||
- "deps/simdutf",
|
||||
+ "$node_simdutf_path",
|
||||
"deps/uv",
|
||||
]
|
||||
sources = [
|
||||
@@ -412,7 +412,7 @@ template("node_gn_build") {
|
||||
"deps/googletest",
|
||||
"deps/googletest:gtest_main",
|
||||
"deps/nbytes",
|
||||
- "deps/simdutf",
|
||||
+ "$node_simdutf_path",
|
||||
]
|
||||
|
||||
sources = gypi_values.node_cctest_sources
|
||||
|
||||
@@ -8,30 +8,30 @@ they use themselves as the entry point. We should try to upstream some form
|
||||
of this.
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index d49941881e6cfd8647a6d44a57e0daaf1c874702..f696fb263b356a76b87cd4b6c4b1a0fd60a84afd 100644
|
||||
index 9b5772fe9b8babbb892c7a5ec79258472da55a76..3568fd6ea0816f62d97d46f5d497bb1b23bf4e25 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -1518,6 +1518,13 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
if (getOptionValue('--inspect-brk') && process._eval == null) {
|
||||
if (!resolvedArgv) {
|
||||
// We enter the repl if we're not given a filename argument.
|
||||
+ // process._firstFileName is used by Embedders to tell node what
|
||||
+ // the first "real" file is when they use themselves as the entry
|
||||
+ // point
|
||||
+ if (process._firstFileName) {
|
||||
+ resolvedArgv = process._firstFileName
|
||||
+ delete process._firstFileName
|
||||
+ } else
|
||||
if (process.argv[1]) {
|
||||
try {
|
||||
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
|
||||
@@ -1555,6 +1555,13 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
this[kIsExecuting] = true;
|
||||
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
|
||||
const { callAndPauseOnStart } = internalBinding('inspector');
|
||||
+ // process._firstFileName is used by Embedders to tell node what
|
||||
+ // the first "real" file is when they use themselves as the entry
|
||||
+ // point
|
||||
+ if (process._firstFileName) {
|
||||
+ resolvedArgv = process._firstFileName;
|
||||
+ delete process._firstFileName;
|
||||
+ }
|
||||
result = callAndPauseOnStart(compiledWrapper, thisValue, exports,
|
||||
require, module, filename, dirname,
|
||||
process, localGlobal, localBuffer);
|
||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||
index cb96fd1bc4fcdce750ce241ee5f47f2ae39cfdc6..c46b270109697f7cc1683f8f9f463575e5040216 100644
|
||||
index d1c05d1717cdc825c4e48885c963c9ed65bcf51c..278665921c5160ff10b3178db27d4df319fab6b3 100644
|
||||
--- a/lib/internal/process/pre_execution.js
|
||||
+++ b/lib/internal/process/pre_execution.js
|
||||
@@ -243,12 +243,14 @@ function patchProcessObject(expandArgv1) {
|
||||
if (expandArgv1 && process.argv[1] &&
|
||||
!StringPrototypeStartsWith(process.argv[1], '-')) {
|
||||
// the entry point.
|
||||
if (expandArgv1 && process.argv[1] && process.argv[1][0] !== '-') {
|
||||
// Expand process.argv[1] into a full path.
|
||||
- const path = require('path');
|
||||
- try {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user