mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
38 Commits
v35.0.0-be
...
v35.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -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
|
||||
|
||||
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.13.1',
|
||||
'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"
|
||||
|
||||
@@ -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()`
|
||||
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,3 +140,9 @@ 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
|
||||
check_for_unit_to_activate_before_notifying_about_success.patch
|
||||
|
||||
@@ -23,10 +23,10 @@ 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 256275528ddbdbc22736e73e43d385d9cdfca264..a0884192a3137dade6704f3a26d726105478bf72 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,
|
||||
@@ -4779,6 +4779,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 c25e9ec643e715f4545f44ca1ed827b5a6cf7d96..ee083e550adf7533531ebf2834e400a84e692c41 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 c3394f059fa284ebcfd3597951343b2e375c72f3..65576f0ba3335f8ede68037bf1a490f64ea495d7 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6997,9 +6997,12 @@ test("unit_tests") {
|
||||
@@ -7000,9 +7000,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") {
|
||||
@@ -7960,6 +7963,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") {
|
||||
@@ -8020,7 +8027,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 339bc872c7bb179090cac4391a90f86d6303ce43..a60d567f805ca44dd000527b3bc0c47b163503b7 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(
|
||||
@@ -9582,6 +9582,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 5ff43afce429c2445517b305bc18975a031e52ae..170e5700311f8f03950bd3b5f6eb2c013bdce3c3 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 25fe6dddeea88878cf17dc945aa245cf3fcdc368..256275528ddbdbc22736e73e43d385d9cdfca264 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6891,6 +6891,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6892,6 +6892,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 160c43f32c88cf81fa75ec1047579d5aef6e34c5..25307da79dfaa828971e537d99968132ee04a0f4 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,
|
||||
@@ -2266,6 +2266,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -0,0 +1,497 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maksim Sisov <msisov@igalia.com>
|
||||
Date: Tue, 7 Jan 2025 23:46:56 -0800
|
||||
Subject: Check for unit to activate before notifying about success
|
||||
|
||||
Portal's globalShortcuts interface relies on the unit name to
|
||||
properly assign a client for the bound commands. However, in
|
||||
some scenarious, there is a race between the service to be
|
||||
created, changed its name and activated. As a result, shortcuts
|
||||
might be bound before the name is changed. As a result, shortcuts
|
||||
might not correctly work and the client will not receive any
|
||||
signals.
|
||||
|
||||
This is mostly not an issue for Chromium as it creates the
|
||||
global shortcuts portal linux object way earlier than it gets
|
||||
commands from the command service. But downstream project, which
|
||||
try to bind shortcuts at the same time as that instance is created,
|
||||
may experience this issue. As a result, they might not have
|
||||
shortcuts working correctly after system reboot or app restart as
|
||||
there is a race between those operations.
|
||||
|
||||
Bug: None
|
||||
Change-Id: I8346d65e051d9587850c76ca0b8807669c161667
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110782
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Commit-Queue: Maksim Sisov <msisov@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1403434}
|
||||
|
||||
diff --git a/components/dbus/xdg/systemd.cc b/components/dbus/xdg/systemd.cc
|
||||
index 362a16447bf578923cb8a84674c277ae6c98228f..3cd9a55d540c07a4c53f5a62bec5cbea37c11838 100644
|
||||
--- a/components/dbus/xdg/systemd.cc
|
||||
+++ b/components/dbus/xdg/systemd.cc
|
||||
@@ -4,9 +4,12 @@
|
||||
|
||||
#include "components/dbus/xdg/systemd.h"
|
||||
|
||||
+#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/environment.h"
|
||||
+#include "base/functional/bind.h"
|
||||
+#include "base/functional/callback_helpers.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/sequence_checker.h"
|
||||
@@ -17,7 +20,9 @@
|
||||
#include "components/dbus/utils/name_has_owner.h"
|
||||
#include "dbus/bus.h"
|
||||
#include "dbus/message.h"
|
||||
+#include "dbus/object_path.h"
|
||||
#include "dbus/object_proxy.h"
|
||||
+#include "dbus/property.h"
|
||||
#include "third_party/abseil-cpp/absl/types/variant.h"
|
||||
|
||||
namespace dbus_xdg {
|
||||
@@ -37,6 +42,10 @@ constexpr char kServiceNameSystemd[] = "org.freedesktop.systemd1";
|
||||
constexpr char kObjectPathSystemd[] = "/org/freedesktop/systemd1";
|
||||
constexpr char kInterfaceSystemdManager[] = "org.freedesktop.systemd1.Manager";
|
||||
constexpr char kMethodStartTransientUnit[] = "StartTransientUnit";
|
||||
+constexpr char kMethodGetUnit[] = "GetUnit";
|
||||
+
|
||||
+constexpr char kInterfaceSystemdUnit[] = "org.freedesktop.systemd1.Unit";
|
||||
+constexpr char kActiveStateProp[] = "ActiveState";
|
||||
|
||||
constexpr char kUnitNameFormat[] = "app-$1$2-$3.scope";
|
||||
|
||||
@@ -67,6 +76,81 @@ const char* GetAppNameSuffix(const std::string& channel) {
|
||||
return "";
|
||||
}
|
||||
|
||||
+// Declare this helper for SystemdUnitActiveStateWatcher to be used.
|
||||
+void SetStateAndRunCallbacks(SystemdUnitStatus result);
|
||||
+
|
||||
+// Watches the object to become active and fires callbacks via
|
||||
+// SetStateAndRunCallbacks. The callbacks are fired whenever a response with the
|
||||
+// state being "active" or "failed" (or similar) comes.
|
||||
+//
|
||||
+// PS firing callbacks results in destroying this object. So any references
|
||||
+// to this become invalid.
|
||||
+class SystemdUnitActiveStateWatcher : public dbus::PropertySet {
|
||||
+ public:
|
||||
+ SystemdUnitActiveStateWatcher(scoped_refptr<dbus::Bus> bus,
|
||||
+ dbus::ObjectProxy* object_proxy)
|
||||
+ : dbus::PropertySet(object_proxy,
|
||||
+ kInterfaceSystemdUnit,
|
||||
+ base::BindRepeating(
|
||||
+ &SystemdUnitActiveStateWatcher::OnPropertyChanged,
|
||||
+ base::Unretained(this))),
|
||||
+ bus_(bus) {
|
||||
+ RegisterProperty(kActiveStateProp, &active_state_);
|
||||
+ ConnectSignals();
|
||||
+ GetAll();
|
||||
+ }
|
||||
+
|
||||
+ ~SystemdUnitActiveStateWatcher() override {
|
||||
+ bus_->RemoveObjectProxy(kServiceNameSystemd, object_proxy()->object_path(),
|
||||
+ base::DoNothing());
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ void OnPropertyChanged(const std::string& property_name) {
|
||||
+ DCHECK(active_state_.is_valid());
|
||||
+ const std::string state_value = active_state_.value();
|
||||
+ if (callbacks_called_ || state_value == "activating" ||
|
||||
+ state_value == "reloading") {
|
||||
+ // Ignore if callbacks have already been fired or continue waiting until
|
||||
+ // the state changes to something else.
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // There are other states as failed, inactive, and deactivating. Treat all
|
||||
+ // of them as failed.
|
||||
+ callbacks_called_ = true;
|
||||
+ SetStateAndRunCallbacks(state_value == "active"
|
||||
+ ? SystemdUnitStatus::kUnitStarted
|
||||
+ : SystemdUnitStatus::kFailedToStart);
|
||||
+ MaybeDeleteSelf();
|
||||
+ }
|
||||
+
|
||||
+ void OnGetAll(dbus::Response* response) override {
|
||||
+ dbus::PropertySet::OnGetAll(response);
|
||||
+ keep_alive_ = false;
|
||||
+ MaybeDeleteSelf();
|
||||
+ }
|
||||
+
|
||||
+ void MaybeDeleteSelf() {
|
||||
+ if (!keep_alive_ && callbacks_called_) {
|
||||
+ delete this;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Registered property that this listens updates to.
|
||||
+ dbus::Property<std::string> active_state_;
|
||||
+
|
||||
+ // Indicates whether callbacks for the unit's state have been called.
|
||||
+ bool callbacks_called_ = false;
|
||||
+
|
||||
+ // Control variable that helps to defer the destruction of |this| as deleting
|
||||
+ // self when the state changes to active during |OnGetAll| will result in a
|
||||
+ // segfault.
|
||||
+ bool keep_alive_ = true;
|
||||
+
|
||||
+ scoped_refptr<dbus::Bus> bus_;
|
||||
+};
|
||||
+
|
||||
// Global state for cached result or pending callbacks.
|
||||
StatusOrCallbacks& GetUnitNameState() {
|
||||
static base::NoDestructor<StatusOrCallbacks> state(
|
||||
@@ -83,10 +167,52 @@ void SetStateAndRunCallbacks(SystemdUnitStatus result) {
|
||||
}
|
||||
}
|
||||
|
||||
-void OnStartTransientUnitResponse(dbus::Response* response) {
|
||||
+void OnGetPathResponse(scoped_refptr<dbus::Bus> bus, dbus::Response* response) {
|
||||
+ dbus::MessageReader reader(response);
|
||||
+ dbus::ObjectPath obj_path;
|
||||
+ if (!response || !reader.PopObjectPath(&obj_path) || !obj_path.IsValid()) {
|
||||
+ // We didn't get a valid response. Treat this as failed service.
|
||||
+ SetStateAndRunCallbacks(SystemdUnitStatus::kFailedToStart);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ dbus::ObjectProxy* unit_proxy =
|
||||
+ bus->GetObjectProxy(kServiceNameSystemd, obj_path);
|
||||
+ // Create the active state property watcher. It will destroy itself once
|
||||
+ // it gets notified about the state change.
|
||||
+ std::unique_ptr<SystemdUnitActiveStateWatcher> active_state_watcher =
|
||||
+ std::make_unique<SystemdUnitActiveStateWatcher>(bus, unit_proxy);
|
||||
+ active_state_watcher.release();
|
||||
+}
|
||||
+
|
||||
+void WaitUnitActivateAndRunCallbacks(scoped_refptr<dbus::Bus> bus,
|
||||
+ std::string unit_name) {
|
||||
+ // Get the path of the unit, which looks similar to
|
||||
+ // /org/freedesktop/systemd1/unit/app_2dorg_2echromium_2eChromium_2d3182191_2escope
|
||||
+ // and then wait for it activation.
|
||||
+ dbus::ObjectProxy* systemd = bus->GetObjectProxy(
|
||||
+ kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
|
||||
+
|
||||
+ dbus::MethodCall method_call(kInterfaceSystemdManager, kMethodGetUnit);
|
||||
+ dbus::MessageWriter writer(&method_call);
|
||||
+ writer.AppendString(unit_name);
|
||||
+
|
||||
+ systemd->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
|
||||
+ base::BindOnce(&OnGetPathResponse, std::move(bus)));
|
||||
+}
|
||||
+
|
||||
+void OnStartTransientUnitResponse(scoped_refptr<dbus::Bus> bus,
|
||||
+ std::string unit_name,
|
||||
+ dbus::Response* response) {
|
||||
SystemdUnitStatus result = response ? SystemdUnitStatus::kUnitStarted
|
||||
: SystemdUnitStatus::kFailedToStart;
|
||||
- SetStateAndRunCallbacks(result);
|
||||
+ // If the start of the unit failed, immediately notify the client. Otherwise,
|
||||
+ // wait for its activation.
|
||||
+ if (result == SystemdUnitStatus::kFailedToStart) {
|
||||
+ SetStateAndRunCallbacks(result);
|
||||
+ } else {
|
||||
+ WaitUnitActivateAndRunCallbacks(std::move(bus), unit_name);
|
||||
+ }
|
||||
}
|
||||
|
||||
void OnNameHasOwnerResponse(scoped_refptr<dbus::Bus> bus,
|
||||
@@ -128,8 +254,9 @@ void OnNameHasOwnerResponse(scoped_refptr<dbus::Bus> bus,
|
||||
properties.Write(&writer);
|
||||
// No auxiliary units.
|
||||
Dict<VarDict>().Write(&writer);
|
||||
- systemd->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
|
||||
- base::BindOnce(&OnStartTransientUnitResponse));
|
||||
+ systemd->CallMethod(
|
||||
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
|
||||
+ base::BindOnce(&OnStartTransientUnitResponse, std::move(bus), unit_name));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
diff --git a/components/dbus/xdg/systemd_unittest.cc b/components/dbus/xdg/systemd_unittest.cc
|
||||
index 2e3baecabc4b479000c78d4f6bd30cb1f6e61d2e..67278d7033664d52fbbda02749a2aaa43352f402 100644
|
||||
--- a/components/dbus/xdg/systemd_unittest.cc
|
||||
+++ b/components/dbus/xdg/systemd_unittest.cc
|
||||
@@ -16,7 +16,9 @@
|
||||
#include "dbus/message.h"
|
||||
#include "dbus/mock_bus.h"
|
||||
#include "dbus/mock_object_proxy.h"
|
||||
+#include "dbus/object_path.h"
|
||||
#include "dbus/object_proxy.h"
|
||||
+#include "dbus/property.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
@@ -32,6 +34,27 @@ constexpr char kServiceNameSystemd[] = "org.freedesktop.systemd1";
|
||||
constexpr char kObjectPathSystemd[] = "/org/freedesktop/systemd1";
|
||||
constexpr char kInterfaceSystemdManager[] = "org.freedesktop.systemd1.Manager";
|
||||
constexpr char kMethodStartTransientUnit[] = "StartTransientUnit";
|
||||
+constexpr char kMethodGetUnit[] = "GetUnit";
|
||||
+
|
||||
+constexpr char kFakeUnitPath[] = "/fake/unit/path";
|
||||
+constexpr char kActiveState[] = "ActiveState";
|
||||
+constexpr char kStateActive[] = "active";
|
||||
+constexpr char kStateInactive[] = "inactive";
|
||||
+
|
||||
+std::unique_ptr<dbus::Response> CreateActiveStateGetAllResponse(
|
||||
+ const std::string& state) {
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ dbus::MessageWriter array_writer(nullptr);
|
||||
+ dbus::MessageWriter dict_entry_writer(nullptr);
|
||||
+ writer.OpenArray("{sv}", &array_writer);
|
||||
+ array_writer.OpenDictEntry(&dict_entry_writer);
|
||||
+ dict_entry_writer.AppendString(kActiveState);
|
||||
+ dict_entry_writer.AppendVariantOfString(state);
|
||||
+ array_writer.CloseContainer(&dict_entry_writer);
|
||||
+ writer.CloseContainer(&array_writer);
|
||||
+ return response;
|
||||
+}
|
||||
|
||||
class SetSystemdScopeUnitNameForXdgPortalTest : public ::testing::Test {
|
||||
public:
|
||||
@@ -124,17 +147,48 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, StartTransientUnitSuccess) {
|
||||
|
||||
EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
dbus::ObjectPath(kObjectPathSystemd)))
|
||||
- .WillOnce(Return(mock_systemd_proxy.get()));
|
||||
+ .Times(2)
|
||||
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
|
||||
+
|
||||
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
|
||||
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
+ dbus::ObjectPath(kFakeUnitPath)))
|
||||
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
|
||||
|
||||
EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
|
||||
.WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ // Expect kMethodStartTransientUnit first.
|
||||
EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
|
||||
|
||||
// Simulate a successful response
|
||||
auto response = dbus::Response::CreateEmpty();
|
||||
std::move(*callback).Run(response.get());
|
||||
+ }))
|
||||
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
|
||||
+ dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ // Then expect kMethodGetUnit. A valid path must be provided.
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
|
||||
+
|
||||
+ // Simulate a successful response and provide a fake path to the object.
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
|
||||
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
|
||||
+ // Simulate a successful response with "active" state.
|
||||
+ auto response = CreateActiveStateGetAllResponse(kStateActive);
|
||||
+ std::move(*callback).Run(response.get());
|
||||
}));
|
||||
|
||||
std::optional<SystemdUnitStatus> status;
|
||||
@@ -189,6 +243,142 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, StartTransientUnitFailure) {
|
||||
EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
|
||||
}
|
||||
|
||||
+TEST_F(SetSystemdScopeUnitNameForXdgPortalTest,
|
||||
+ StartTransientUnitInvalidUnitPath) {
|
||||
+ scoped_refptr<dbus::MockBus> bus =
|
||||
+ base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
|
||||
+
|
||||
+ auto mock_dbus_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS));
|
||||
+
|
||||
+ EXPECT_CALL(
|
||||
+ *bus, GetObjectProxy(DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS)))
|
||||
+ .WillRepeatedly(Return(mock_dbus_proxy.get()));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_dbus_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ writer.AppendBool(true);
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ auto mock_systemd_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
|
||||
+
|
||||
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
+ dbus::ObjectPath(kObjectPathSystemd)))
|
||||
+ .Times(2)
|
||||
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
|
||||
+
|
||||
+ // Simulate a successful response
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
|
||||
+
|
||||
+ // Simulate a failure response.
|
||||
+ std::move(*callback).Run(nullptr);
|
||||
+ }));
|
||||
+
|
||||
+ std::optional<SystemdUnitStatus> status;
|
||||
+
|
||||
+ SetSystemdScopeUnitNameForXdgPortal(
|
||||
+ bus.get(), base::BindLambdaForTesting(
|
||||
+ [&](SystemdUnitStatus result) { status = result; }));
|
||||
+
|
||||
+ EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
|
||||
+}
|
||||
+
|
||||
+TEST_F(SetSystemdScopeUnitNameForXdgPortalTest,
|
||||
+ StartTransientUnitFailToActivate) {
|
||||
+ scoped_refptr<dbus::MockBus> bus =
|
||||
+ base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
|
||||
+
|
||||
+ auto mock_dbus_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS));
|
||||
+
|
||||
+ EXPECT_CALL(
|
||||
+ *bus, GetObjectProxy(DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS)))
|
||||
+ .WillRepeatedly(Return(mock_dbus_proxy.get()));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_dbus_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ writer.AppendBool(true);
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ auto mock_systemd_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
|
||||
+
|
||||
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
+ dbus::ObjectPath(kObjectPathSystemd)))
|
||||
+ .Times(2)
|
||||
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
|
||||
+
|
||||
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
|
||||
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
+ dbus::ObjectPath(kFakeUnitPath)))
|
||||
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
|
||||
+
|
||||
+ // Simulate a successful response
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }))
|
||||
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
|
||||
+ dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
|
||||
+
|
||||
+ // Simulate a successful response
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ // Then expect kMethodGetUnit. A valid path must be provided.
|
||||
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
|
||||
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
|
||||
+
|
||||
+ // Simulate a successful response, but with inactive state.
|
||||
+ auto response = CreateActiveStateGetAllResponse(kStateInactive);
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ std::optional<SystemdUnitStatus> status;
|
||||
+
|
||||
+ SetSystemdScopeUnitNameForXdgPortal(
|
||||
+ bus.get(), base::BindLambdaForTesting(
|
||||
+ [&](SystemdUnitStatus result) { status = result; }));
|
||||
+
|
||||
+ EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
|
||||
+}
|
||||
+
|
||||
TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
|
||||
scoped_refptr<dbus::MockBus> bus =
|
||||
base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
|
||||
@@ -220,7 +410,14 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
|
||||
|
||||
EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
dbus::ObjectPath(kObjectPathSystemd)))
|
||||
- .WillOnce(Return(mock_systemd_proxy.get()));
|
||||
+ .Times(2)
|
||||
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
|
||||
+
|
||||
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
|
||||
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
|
||||
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
|
||||
+ dbus::ObjectPath(kFakeUnitPath)))
|
||||
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
|
||||
|
||||
EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
|
||||
.WillOnce(Invoke([&](dbus::MethodCall* method_call, int timeout_ms,
|
||||
@@ -256,6 +453,30 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
|
||||
|
||||
auto response = dbus::Response::CreateEmpty();
|
||||
std::move(*callback).Run(response.get());
|
||||
+ }))
|
||||
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
|
||||
+ dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
|
||||
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
|
||||
+
|
||||
+ // Simulate a successful response
|
||||
+ auto response = dbus::Response::CreateEmpty();
|
||||
+ dbus::MessageWriter writer(response.get());
|
||||
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
|
||||
+ std::move(*callback).Run(response.get());
|
||||
+ }));
|
||||
+
|
||||
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
|
||||
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
|
||||
+ dbus::ObjectProxy::ResponseCallback* callback) {
|
||||
+ // Then expect kMethodGetUnit. A valid path must be provided.
|
||||
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
|
||||
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
|
||||
+
|
||||
+ // Simulate a successful response
|
||||
+ auto response = CreateActiveStateGetAllResponse(kStateActive);
|
||||
+ std::move(*callback).Run(response.get());
|
||||
}));
|
||||
|
||||
std::optional<SystemdUnitStatus> status;
|
||||
@@ -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 e7f78b970f433a232cbcb172904d0ab993c5ac6a..62a4a28afb27c802ce24dd10d941e77cfbca0b02 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 6befbf14c4a95e37a3423be7743655e2fc365a77..f943c010b449dd5d941da4f61da3a01ba5e49a8b 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,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 130fb82767d534988c51b4e60244f7c73b3ba770..88d8676fe67a61dfe4c3bfad0a94225d4cae81d3 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 286e3d89a6c241b1243908db4b26b66726e197e8..1d617f9c0be6ec770c778d6749ecceb53cac2821 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
|
||||
@@ -1009,6 +1009,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 612d67d06d766d7ff2f923175c65f24480b87f42..c25e9ec643e715f4545f44ca1ed827b5a6cf7d96 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 84b894ac879b5a0ada509da98294db75eebe7fd7..976b8ee4a6f9529727209a3e3a44524c62d0c798 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10946,6 +10946,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10947,6 +10947,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
|
||||
|
||||
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 10256f53f4f158150daa2fda406dceea9d171f07..74e63d3d0d35d3b72228f262b3557ed9b7ce5b95 100644
|
||||
--- a/ui/views/controls/button/label_button.cc
|
||||
+++ b/ui/views/controls/button/label_button.cc
|
||||
@@ -79,13 +79,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() {
|
||||
@@ -540,10 +533,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);
|
||||
}
|
||||
@@ -551,9 +542,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 ee083e550adf7533531ebf2834e400a84e692c41..33e73a6bbdf77f776271de6bb05e7d869fe938b5 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(
|
||||
@@ -3218,6 +3218,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 5cf853b42371e044197e998bcf91b5cd2350ee43..e7f78b970f433a232cbcb172904d0ab993c5ac6a 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 4d489a14d3f759ca9464c9a594d5800690943119..f3f8fee8c81e19c0dfa5c3649abe274112dbd0fd 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() {
|
||||
@@ -2063,9 +2063,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(
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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 60e844376f968681fe5ef23c339361b0f95d1f3e..0727a4dbb76230d6c4574c4f014f3a0a6f3f043b 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1450,6 +1450,11 @@
|
||||
@@ -1461,6 +1461,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") {
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 90b86b13237a7b8333bd91eae7f50c2e60c71835..c47c5469c1f9f4a99fd8580ffc966d390c2ca672 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 88d8676fe67a61dfe4c3bfad0a94225d4cae81d3..4d489a14d3f759ca9464c9a594d5800690943119 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) {
|
||||
@@ -1997,6 +1997,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 170e5700311f8f03950bd3b5f6eb2c013bdce3c3..6befbf14c4a95e37a3423be7743655e2fc365a77 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 fdcb9aafed94e99188aeb2390b673c8ad0e569b0..4855e1eaa8f3b7647aa1610faac40f79e8ce3c93 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
|
||||
|
||||
@@ -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 62a4a28afb27c802ce24dd10d941e77cfbca0b02..8caf6addef613d41df3187fef747e9968d0aed37 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);
|
||||
|
||||
@@ -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 be5847985950e9136fc975fdbc021308f48f41b5..a5062c8fb5c5d9f1427819131b71ad6896e9d1df 100644
|
||||
--- a/content/common/features.cc
|
||||
+++ b/content/common/features.cc
|
||||
@@ -262,6 +262,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 06562dd07ac4f1cad1011d99aed6c09958044486..9748070bc26f8314faec99afdb20a5d91bc9dde2 100644
|
||||
--- a/content/common/features.h
|
||||
+++ b/content/common/features.h
|
||||
@@ -68,6 +68,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 f943c010b449dd5d941da4f61da3a01ba5e49a8b..a15580413a64b91acba8a3c975c276c119859499 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_);
|
||||
}
|
||||
|
||||
@@ -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 a60d567f805ca44dd000527b3bc0c47b163503b7..90b86b13237a7b8333bd91eae7f50c2e60c71835 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(
|
||||
@@ -8691,6 +8691,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 a15580413a64b91acba8a3c975c276c119859499..5cf853b42371e044197e998bcf91b5cd2350ee43 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;
|
||||
|
||||
@@ -39,4 +39,7 @@ 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,17 +10,6 @@ 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/simdjson/unofficial.gni b/deps/simdjson/unofficial.gni
|
||||
index d6909b95886f4de3f0b953c2a2992f69066b7434..972955f9144aafcd3a3fe278b7aaad401cadddda 100644
|
||||
--- a/deps/simdjson/unofficial.gni
|
||||
+++ b/deps/simdjson/unofficial.gni
|
||||
@@ -18,5 +18,6 @@ template("simdjson_gn_build") {
|
||||
forward_variables_from(invoker, "*")
|
||||
public_configs = [ ":simdjson_config" ]
|
||||
sources = gypi_values.simdjson_sources
|
||||
+ cflags_c = [ "-Wdeprecated-literal-operator" ]
|
||||
}
|
||||
}
|
||||
diff --git a/node.gni b/node.gni
|
||||
index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3fd219be7d 100644
|
||||
--- a/node.gni
|
||||
@@ -65,11 +54,71 @@ index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3f
|
||||
}
|
||||
|
||||
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 9aaf5626fcfe4a9b168e069df0265df7b535b76e..ece9c4656919d8dc408112142367791628dd5f8b 100644
|
||||
index 894fd515202cc3a1f933c2bbc618dd09869ad904..4f1ed661e9c432f3b50f2e7e348ad9794ff773d0 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -779,6 +779,7 @@ void BuiltinLoader::RegisterExternalReferences(
|
||||
@@ -781,6 +781,7 @@ void BuiltinLoader::RegisterExternalReferences(
|
||||
registry->Register(GetNatives);
|
||||
|
||||
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
|
||||
@@ -261,7 +310,7 @@ index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f7c87f00e 100644
|
||||
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5aeab1340d 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -145,6 +145,7 @@ template("node_gn_build") {
|
||||
@@ -292,7 +341,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
|
||||
"$target_gen_dir/node_javascript.cc",
|
||||
] + gypi_values.node_sources
|
||||
|
||||
@@ -185,7 +189,7 @@ template("node_gn_build") {
|
||||
@@ -185,11 +189,12 @@ template("node_gn_build") {
|
||||
}
|
||||
if (node_use_openssl) {
|
||||
deps += [ "deps/ncrypto" ]
|
||||
@@ -301,7 +350,12 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
|
||||
sources += gypi_values.node_crypto_sources
|
||||
}
|
||||
if (node_enable_inspector) {
|
||||
@@ -282,6 +286,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") {
|
||||
@@ -309,7 +363,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
|
||||
deps = [
|
||||
"deps/uv",
|
||||
"$node_simdutf_path",
|
||||
@@ -292,26 +297,75 @@ template("node_gn_build") {
|
||||
@@ -292,26 +298,75 @@ template("node_gn_build") {
|
||||
"src/embedded_data.cc",
|
||||
"src/embedded_data.h",
|
||||
]
|
||||
@@ -395,7 +449,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
|
||||
outputs = [ "$target_gen_dir/node_javascript.cc" ]
|
||||
|
||||
# Get the path to node_js2c executable of the host toolchain.
|
||||
@@ -325,11 +379,11 @@ template("node_gn_build") {
|
||||
@@ -325,11 +380,11 @@ template("node_gn_build") {
|
||||
get_label_info(":node_js2c($host_toolchain)", "name") +
|
||||
host_executable_suffix
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ 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/unofficial.gni b/unofficial.gni
|
||||
index 08a4ed939fb1482a897def94128282fdfd63dc62..23367db388ce9e83e123d4c6e8c6325266dd52dc 100644
|
||||
index 08603eaef2da51fd92f9bf977647b56409eff48c..cd0eae52ca9bf244e43643a2034fa9d26c4db206 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -153,7 +153,6 @@ template("node_gn_build") {
|
||||
@@ -44,7 +44,7 @@ index 08a4ed939fb1482a897def94128282fdfd63dc62..23367db388ce9e83e123d4c6e8c63252
|
||||
if (v8_enable_i18n_support) {
|
||||
deps += [ "//third_party/icu" ]
|
||||
}
|
||||
@@ -211,6 +220,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
|
||||
@@ -64,7 +64,7 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327
|
||||
|
||||
module.exports = {
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index b21cfbf2fad024445e8d1ef8a6781141f788eb1a..55c6e01d9e879ce63524ec1504f8a23e00a2aa29 100644
|
||||
index d97004c8e148be6b63634dad5306756d503fb1f8..271fb4f76bc1e69baad0b1fafca128b3bca4a360 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -174,7 +174,6 @@
|
||||
@@ -84,10 +84,10 @@ index b21cfbf2fad024445e8d1ef8a6781141f788eb1a..55c6e01d9e879ce63524ec1504f8a23e
|
||||
'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) {}
|
||||
|
||||
@@ -34,7 +34,7 @@ index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b
|
||||
let kResistStopPropagation;
|
||||
|
||||
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
|
||||
index ece9c4656919d8dc408112142367791628dd5f8b..c6a5f8cab45e9c3503ae1bb576cf94b4ca817e2a 100644
|
||||
index 4f1ed661e9c432f3b50f2e7e348ad9794ff773d0..16c95348ee254061d5c48f405968c1b0ee33bf82 100644
|
||||
--- a/src/node_builtins.cc
|
||||
+++ b/src/node_builtins.cc
|
||||
@@ -34,6 +34,7 @@ using v8::Value;
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
|
||||
of this.
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index ccd038dc136480cdd84a13e58f4012b71cd40928..5be90bc3df67751b55e67a05ac1c5b9a12d9c585 100644
|
||||
index 9b5772fe9b8babbb892c7a5ec79258472da55a76..3568fd6ea0816f62d97d46f5d497bb1b23bf4e25 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -1563,6 +1563,13 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
@@ -1555,6 +1555,13 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
this[kIsExecuting] = true;
|
||||
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
|
||||
const { callAndPauseOnStart } = internalBinding('inspector');
|
||||
@@ -26,7 +26,7 @@ index ccd038dc136480cdd84a13e58f4012b71cd40928..5be90bc3df67751b55e67a05ac1c5b9a
|
||||
require, module, filename, dirname,
|
||||
process, localGlobal, localBuffer);
|
||||
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
|
||||
index 5d67892bb8e1fd265df414b3f41e62cdabbec873..89660076c41e1c05b26c17609a62a028c1e2ec5a 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) {
|
||||
|
||||
@@ -40,19 +40,19 @@ index 99061e62976e7cb24be81e8632b0e21d1e9adf9a..bbc9311c059e8ab0328c5f92b21a6be5
|
||||
|
||||
/**
|
||||
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
|
||||
index 8be6dbd1d0262ccbb2318de1d98e344e9b21a510..1509fc54fe9767e101b107509b4b2d6c821ce95d 100644
|
||||
index 649ec428e2dd6fbf0082b3f1ba9fdfbfab892a94..168912fe6ede3b71ab3029c292ba430915fd79d8 100644
|
||||
--- a/src/module_wrap.cc
|
||||
+++ b/src/module_wrap.cc
|
||||
@@ -823,7 +823,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
|
||||
@@ -832,7 +832,7 @@ MaybeLocal<Module> ModuleWrap::ResolveModuleCallback(
|
||||
return module->module_.Get(isolate);
|
||||
}
|
||||
|
||||
-static MaybeLocal<Promise> ImportModuleDynamically(
|
||||
+MaybeLocal<Promise> ImportModuleDynamically(
|
||||
Local<Context> context,
|
||||
Local<v8::Data> host_defined_options,
|
||||
Local<Data> host_defined_options,
|
||||
Local<Value> resource_name,
|
||||
@@ -888,12 +888,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
@@ -897,12 +897,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
|
||||
Realm* realm = Realm::GetCurrent(args);
|
||||
HandleScope handle_scope(isolate);
|
||||
|
||||
@@ -68,7 +68,7 @@ index 8be6dbd1d0262ccbb2318de1d98e344e9b21a510..1509fc54fe9767e101b107509b4b2d6c
|
||||
}
|
||||
|
||||
void ModuleWrap::HostInitializeImportMetaObjectCallback(
|
||||
@@ -935,13 +936,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
@@ -944,13 +945,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
|
||||
Realm* realm = Realm::GetCurrent(args);
|
||||
Isolate* isolate = realm->isolate();
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ Reviewed-By: Michaël Zasso <targos@protonmail.com>
|
||||
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
|
||||
|
||||
diff --git a/doc/api/cli.md b/doc/api/cli.md
|
||||
index 770d2ca4fcf003352c2c12815ac885a7a5e67b7f..4af66f690e626b0159a88d58f6ee81391573ebab 100644
|
||||
index 8105592764abca6036e8e029ca9b6a32402e7156..431a6aa7a2cf4d537cb719f15c2749254e0433b3 100644
|
||||
--- a/doc/api/cli.md
|
||||
+++ b/doc/api/cli.md
|
||||
@@ -3232,7 +3232,6 @@ V8 options that are allowed are:
|
||||
@@ -3270,7 +3270,6 @@ V8 options that are allowed are:
|
||||
* `--disallow-code-generation-from-strings`
|
||||
* `--enable-etw-stack-walking`
|
||||
* `--expose-gc`
|
||||
@@ -30,10 +30,10 @@ index 770d2ca4fcf003352c2c12815ac885a7a5e67b7f..4af66f690e626b0159a88d58f6ee8139
|
||||
* `--jitless`
|
||||
* `--max-old-space-size`
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index ec419cf96a14989338e3261b85c92b81ba8b50d9..5a4d536ff0d090fa6b43ea4cbd403d4aa23171c1 100644
|
||||
index 620776c06d835eb1bfeed060751c570e8d435b29..866f2a39a5e51a8bf434ccd54d76c685bcdd1502 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -970,11 +970,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
|
||||
@@ -980,11 +980,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
|
||||
"disallow eval and friends",
|
||||
V8Option{},
|
||||
kAllowedInEnvvar);
|
||||
@@ -46,10 +46,10 @@ index ec419cf96a14989338e3261b85c92b81ba8b50d9..5a4d536ff0d090fa6b43ea4cbd403d4a
|
||||
"disable runtime allocation of executable memory",
|
||||
V8Option{},
|
||||
diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
|
||||
index 03ffe7aa03f48156f04bb527316221ec10e7e0df..69bf136559c1a8a18a7bfc444a439d161f622635 100644
|
||||
index b1d5c44ceeeebc674938d85736aace2a6ef570e2..9e89200e9f6dfd89340cd04afb76e271ffc82b54 100644
|
||||
--- a/test/parallel/test-cli-node-options.js
|
||||
+++ b/test/parallel/test-cli-node-options.js
|
||||
@@ -72,7 +72,6 @@ if (common.hasCrypto) {
|
||||
@@ -73,7 +73,6 @@ if (common.hasCrypto) {
|
||||
expect('--abort_on-uncaught_exception', 'B\n');
|
||||
expect('--disallow-code-generation-from-strings', 'B\n');
|
||||
expect('--expose-gc', 'B\n');
|
||||
|
||||
@@ -58,10 +58,10 @@ index fc9b056d2f7e25109100fbde5f3ab0aebc8c619a..32fc075e97eebca6c47e796ac5308915
|
||||
}
|
||||
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index f70e0917f6caa66210107cdb2ef891685563ba96..ec419cf96a14989338e3261b85c92b81ba8b50d9 100644
|
||||
index 3608ab2b4aeb09e985ca98e23f2dff23567ade71..620776c06d835eb1bfeed060751c570e8d435b29 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -1517,14 +1517,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -1527,14 +1527,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
|
||||
|
||||
@@ -11,19 +11,19 @@ before it's acceptable to upstream, as this patch comments out a couple
|
||||
of tests that upstream probably cares about.
|
||||
|
||||
diff --git a/test/common/index.js b/test/common/index.js
|
||||
index d1eaf6e69f603b0a7037e44be6ef185283972090..e3f26d32dbad2e4ccb47dea028dbf1a855525cfb 100644
|
||||
index 92c7294e6f6298f511b5a289e1e0e3a4be68cc77..63a350c5ed912a785b042a238c064c98ed423af4 100644
|
||||
--- a/test/common/index.js
|
||||
+++ b/test/common/index.js
|
||||
@@ -65,6 +65,8 @@ const opensslVersionNumber = (major = 0, minor = 0, patch = 0) => {
|
||||
return (major << 28) | (minor << 20) | (patch << 4);
|
||||
};
|
||||
@@ -56,6 +56,8 @@ const hasCrypto = Boolean(process.versions.openssl) &&
|
||||
|
||||
const hasQuic = hasCrypto && !!process.config.variables.openssl_quic;
|
||||
|
||||
+const openSSLIsBoringSSL = process.versions.openssl === '0.0.0';
|
||||
+
|
||||
let OPENSSL_VERSION_NUMBER;
|
||||
const hasOpenSSL = (major = 0, minor = 0, patch = 0) => {
|
||||
if (!hasCrypto) return false;
|
||||
@@ -1008,6 +1010,7 @@ const common = {
|
||||
function parseTestFlags(filename = process.argv[1]) {
|
||||
// The copyright notice is relatively big and the flags could come afterwards.
|
||||
const bytesToRead = 1500;
|
||||
@@ -889,6 +891,7 @@ const common = {
|
||||
mustNotMutateObjectDeep,
|
||||
mustSucceed,
|
||||
nodeProcessAborted,
|
||||
@@ -95,10 +95,10 @@ index 4a5f1f149fe6c739f7f1d2ee17df6e61a942d621..b3287f428ce6b3fde11d449c601a57ff
|
||||
|
||||
{
|
||||
diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js
|
||||
index 3e3632203af72c54f2795d8de0cf345862a043bb..a066bbb803d41d9d1f26a02e41115b71233988d6 100644
|
||||
index 88d07c3b957f57b85861542d174a0fd0ba8ceb66..1f430197579ff5f31322bfa0fa5e92e4c58588e2 100644
|
||||
--- a/test/parallel/test-crypto-cipheriv-decipheriv.js
|
||||
+++ b/test/parallel/test-crypto-cipheriv-decipheriv.js
|
||||
@@ -60,6 +60,10 @@ function testCipher2(key, iv) {
|
||||
@@ -62,6 +62,10 @@ function testCipher2(key, iv) {
|
||||
|
||||
|
||||
function testCipher3(key, iv) {
|
||||
@@ -123,10 +123,10 @@ index 81a469c226c261564dee1e0b06b6571b18a41f1f..58b66045dba4201b7ebedd78b129420f
|
||||
|
||||
const availableCurves = new Set(crypto.getCurves());
|
||||
diff --git a/test/parallel/test-crypto-dh-errors.js b/test/parallel/test-crypto-dh-errors.js
|
||||
index 476ca64b4425b5b8b0fa2dc8352ee6f03d563813..2250a8f24a875d6af198426891870b450078ee5f 100644
|
||||
index 0af4db0310750cea9350ecff7fc44404c6df6c83..85ab03f6019989ad4fe93b779c3b4772ce1f5130 100644
|
||||
--- a/test/parallel/test-crypto-dh-errors.js
|
||||
+++ b/test/parallel/test-crypto-dh-errors.js
|
||||
@@ -32,9 +32,9 @@ for (const bits of [-1, 0, 1]) {
|
||||
@@ -33,9 +33,9 @@ for (const bits of [-1, 0, 1]) {
|
||||
});
|
||||
} else {
|
||||
assert.throws(() => crypto.createDiffieHellman(bits), {
|
||||
@@ -139,12 +139,12 @@ index 476ca64b4425b5b8b0fa2dc8352ee6f03d563813..2250a8f24a875d6af198426891870b45
|
||||
}
|
||||
}
|
||||
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
|
||||
index 9ebe14011eed223994e0901bc22dcc582b4b0739..e78f90eb76380916ce7098fb517c83a954edb053 100644
|
||||
index d7ffbe5eca92734aa2380f482c7f9bfe7e2a36c7..21ab2333431ea70bdf98dde43624e0b712566395 100644
|
||||
--- a/test/parallel/test-crypto-dh.js
|
||||
+++ b/test/parallel/test-crypto-dh.js
|
||||
@@ -55,18 +55,17 @@ const crypto = require('crypto');
|
||||
@@ -60,18 +60,17 @@ const {
|
||||
let wrongBlockLength;
|
||||
if (common.hasOpenSSL3) {
|
||||
if (hasOpenSSL3) {
|
||||
wrongBlockLength = {
|
||||
- message: 'error:1C80006B:Provider routines::wrong final block length',
|
||||
- code: 'ERR_OSSL_WRONG_FINAL_BLOCK_LENGTH',
|
||||
@@ -169,9 +169,9 @@ index 9ebe14011eed223994e0901bc22dcc582b4b0739..e78f90eb76380916ce7098fb517c83a9
|
||||
};
|
||||
}
|
||||
|
||||
@@ -93,17 +92,23 @@ const crypto = require('crypto');
|
||||
@@ -98,17 +97,23 @@ const {
|
||||
dh3.computeSecret('');
|
||||
}, { message: common.hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ?
|
||||
}, { message: hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ?
|
||||
'Unspecified validation error' :
|
||||
- 'Supplied key is too small' });
|
||||
+ 'Supplied key is invalid' });
|
||||
@@ -237,43 +237,36 @@ index d22281abbd5c3cab3aaa3ac494301fa6b4a8a968..5f0c6a4aed2e868a1a1049212edf2187
|
||||
s.pipe(h).on('data', common.mustCall(function(c) {
|
||||
assert.strictEqual(c, expect);
|
||||
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
|
||||
index 83218c105a4596e0ae0381136f176bb8d759899e..afb3c8c592d2a8e2a053fd44f455af06c592a85e 100644
|
||||
index 61145aee0727fbe0b9781acdb3eeb641e7010729..fd7d4bd7d3f86caa30ffd03ea880eeac023bbcbb 100644
|
||||
--- a/test/parallel/test-crypto-hash.js
|
||||
+++ b/test/parallel/test-crypto-hash.js
|
||||
@@ -182,6 +182,7 @@ assert.throws(
|
||||
@@ -183,7 +183,7 @@ assert.throws(
|
||||
}
|
||||
|
||||
// Test XOF hash functions and the outputLength option.
|
||||
{
|
||||
+ /*
|
||||
// Default outputLengths.
|
||||
assert.strictEqual(crypto.createHash('shake128').digest('hex'),
|
||||
'7f9c2ba4e88f827d616045507605853e');
|
||||
@@ -236,6 +237,7 @@ assert.throws(
|
||||
assert.strictEqual(superLongHash.length, 2 * 1024 * 1024);
|
||||
assert.ok(superLongHash.endsWith('193414035ddba77bf7bba97981e656ec'));
|
||||
assert.ok(superLongHash.startsWith('a2a28dbc49cfd6e5d6ceea3d03e77748'));
|
||||
+ */
|
||||
|
||||
// Non-XOF hash functions should accept valid outputLength options as well.
|
||||
assert.strictEqual(crypto.createHash('sha224', { outputLength: 28 })
|
||||
-{
|
||||
+if (!common.openSSLIsBoringSSL) {
|
||||
// Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory
|
||||
if (!hasOpenSSL(3, 4)) {
|
||||
assert.strictEqual(crypto.createHash('shake128').digest('hex'),
|
||||
diff --git a/test/parallel/test-crypto-hkdf.js b/test/parallel/test-crypto-hkdf.js
|
||||
index ff3abdf291efcd076b36e755de4147b0aad0b345..d29854cf0c0ce89f84c912def672e7c4e11427a3 100644
|
||||
index 3f7e61e9b2ebc0ca7c367d7c229afe9ab87762b8..36bd78105d153b75b42e4736f11d80a257916607 100644
|
||||
--- a/test/parallel/test-crypto-hkdf.js
|
||||
+++ b/test/parallel/test-crypto-hkdf.js
|
||||
@@ -124,8 +124,6 @@ const algorithms = [
|
||||
@@ -125,7 +125,7 @@ const algorithms = [
|
||||
['sha256', '', 'salt', '', 10],
|
||||
['sha512', 'secret', 'salt', '', 15],
|
||||
];
|
||||
-if (!common.hasOpenSSL3)
|
||||
- algorithms.push(['whirlpool', 'secret', '', 'info', 20]);
|
||||
-if (!hasOpenSSL3)
|
||||
+if (!hasOpenSSL3 && !common.openSSLIsBoringSSL)
|
||||
algorithms.push(['whirlpool', 'secret', '', 'info', 20]);
|
||||
|
||||
algorithms.forEach(([ hash, secret, salt, info, length ]) => {
|
||||
{
|
||||
diff --git a/test/parallel/test-crypto-padding.js b/test/parallel/test-crypto-padding.js
|
||||
index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ceed84e6f7 100644
|
||||
index 48cd1ed4df61aaddeee8785cb90f83bdd9628187..a18aeb2bdffcc7a7e9ef12328b849994e39d6c27 100644
|
||||
--- a/test/parallel/test-crypto-padding.js
|
||||
+++ b/test/parallel/test-crypto-padding.js
|
||||
@@ -87,10 +87,9 @@ assert.throws(function() {
|
||||
@@ -88,10 +88,9 @@ assert.throws(function() {
|
||||
code: 'ERR_OSSL_WRONG_FINAL_BLOCK_LENGTH',
|
||||
reason: 'wrong final block length',
|
||||
} : {
|
||||
@@ -287,7 +280,7 @@ index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ce
|
||||
}
|
||||
);
|
||||
|
||||
@@ -114,10 +113,9 @@ assert.throws(function() {
|
||||
@@ -115,10 +114,9 @@ assert.throws(function() {
|
||||
reason: 'bad decrypt',
|
||||
code: 'ERR_OSSL_BAD_DECRYPT',
|
||||
} : {
|
||||
@@ -301,11 +294,29 @@ index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ce
|
||||
});
|
||||
|
||||
// No-pad encrypted string should return the same:
|
||||
diff --git a/test/parallel/test-crypto-prime.js b/test/parallel/test-crypto-prime.js
|
||||
index 5ffdc1394282be046150e3759f82f8787f5604f7..e1c7a7b4824a2df20a405355696022398216fa4f 100644
|
||||
--- a/test/parallel/test-crypto-prime.js
|
||||
+++ b/test/parallel/test-crypto-prime.js
|
||||
@@ -259,11 +259,11 @@ for (const checks of [-(2 ** 31), -1, 2 ** 31, 2 ** 32 - 1, 2 ** 32, 2 ** 50]) {
|
||||
bytes[0] = 0x1;
|
||||
assert.throws(() => checkPrime(bytes, common.mustNotCall()), {
|
||||
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
|
||||
- message: /bignum too long/
|
||||
+ message: /bignum[_ ]too[_ ]long/i
|
||||
});
|
||||
assert.throws(() => checkPrimeSync(bytes), {
|
||||
code: 'ERR_OSSL_BN_BIGNUM_TOO_LONG',
|
||||
- message: /bignum too long/
|
||||
+ message: /bignum[_ ]too[_ ]long/i
|
||||
});
|
||||
}
|
||||
|
||||
diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js
|
||||
index 5f4fafdfffbf726b7cb39c472baa3df25c9794cf..d52376da2cddd90adcdf8a9b7dcd03e348d9f2b4 100644
|
||||
index dcd5045daaf58c60e27c1e2f7941033302241339..6ac75565792b92a97c622baba73f821d754b8d01 100644
|
||||
--- a/test/parallel/test-crypto-rsa-dsa.js
|
||||
+++ b/test/parallel/test-crypto-rsa-dsa.js
|
||||
@@ -28,12 +28,11 @@ const dsaPkcs8KeyPem = fixtures.readKey('dsa_private_pkcs8.pem');
|
||||
@@ -29,12 +29,11 @@ const dsaPkcs8KeyPem = fixtures.readKey('dsa_private_pkcs8.pem');
|
||||
const ec = new TextEncoder();
|
||||
|
||||
const openssl1DecryptError = {
|
||||
@@ -322,34 +333,25 @@ index 5f4fafdfffbf726b7cb39c472baa3df25c9794cf..d52376da2cddd90adcdf8a9b7dcd03e3
|
||||
+ library: /digital envelope routines|Cipher functions/,
|
||||
};
|
||||
|
||||
const decryptError = common.hasOpenSSL3 ?
|
||||
@@ -222,7 +221,8 @@ function test_rsa(padding, encryptOaepHash, decryptOaepHash) {
|
||||
const decryptError = hasOpenSSL3 ?
|
||||
@@ -223,7 +222,7 @@ function test_rsa(padding, encryptOaepHash, decryptOaepHash) {
|
||||
}, bufferToEncrypt);
|
||||
|
||||
|
||||
- if (padding === constants.RSA_PKCS1_PADDING) {
|
||||
+ // BoringSSL does not support RSA_PKCS1_PADDING.
|
||||
+ if (false) {
|
||||
+ if (!common.openSSLIsBoringSSL) {
|
||||
if (!process.config.variables.node_shared_openssl) {
|
||||
assert.throws(() => {
|
||||
crypto.privateDecrypt({
|
||||
@@ -466,10 +466,10 @@ assert.throws(() => {
|
||||
assert.strictEqual(verify2.verify(publicKey, signature, 'hex'), true);
|
||||
}
|
||||
|
||||
-
|
||||
@@ -471,7 +470,7 @@ assert.throws(() => {
|
||||
//
|
||||
// Test DSA signing and verification
|
||||
//
|
||||
-{
|
||||
+if (!common.openSSLIsBoringSSL) {
|
||||
{
|
||||
const input = 'I AM THE WALRUS';
|
||||
|
||||
@@ -541,3 +541,4 @@ const input = 'I AM THE WALRUS';
|
||||
|
||||
assert.strictEqual(verify.verify(dsaPubPem, signature, 'hex'), true);
|
||||
}
|
||||
+}
|
||||
// DSA signatures vary across runs so there is no static string to verify
|
||||
diff --git a/test/parallel/test-crypto-scrypt.js b/test/parallel/test-crypto-scrypt.js
|
||||
index 338a19b0e88ad6f08d2f6b6a5d38b9980996ce11..a4ee215575d072450ba66c558ddca88bfb23d85f 100644
|
||||
--- a/test/parallel/test-crypto-scrypt.js
|
||||
@@ -364,10 +366,10 @@ index 338a19b0e88ad6f08d2f6b6a5d38b9980996ce11..a4ee215575d072450ba66c558ddca88b
|
||||
};
|
||||
assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),
|
||||
diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js
|
||||
index 8a263ec3350f5540591ac02e70fa2f552b9ac477..dcc4c2ec816d28f1b27df1c358cfce66f1a3a03b 100644
|
||||
index 0589d60736e377f24dc8550f87a6b7624173fc44..547f22cdc130cf0c68d117f92068e3ac53a0efc2 100644
|
||||
--- a/test/parallel/test-crypto-sign-verify.js
|
||||
+++ b/test/parallel/test-crypto-sign-verify.js
|
||||
@@ -29,7 +29,7 @@ const keySize = 2048;
|
||||
@@ -33,7 +33,7 @@ const keySize = 2048;
|
||||
}
|
||||
|
||||
// Test handling of exceptional conditions
|
||||
@@ -376,10 +378,10 @@ index 8a263ec3350f5540591ac02e70fa2f552b9ac477..dcc4c2ec816d28f1b27df1c358cfce66
|
||||
const library = {
|
||||
configurable: true,
|
||||
set() {
|
||||
@@ -341,15 +341,17 @@ assert.throws(
|
||||
@@ -345,15 +345,15 @@ assert.throws(
|
||||
padding: crypto.constants.RSA_PKCS1_OAEP_PADDING
|
||||
});
|
||||
}, common.hasOpenSSL3 ? {
|
||||
}, hasOpenSSL3 ? {
|
||||
- code: 'ERR_OSSL_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE',
|
||||
- message: /illegal or unsupported padding mode/,
|
||||
+ code: /^ERR_OSSL_(RSA|EVP)_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE$/,
|
||||
@@ -387,18 +389,18 @@ index 8a263ec3350f5540591ac02e70fa2f552b9ac477..dcc4c2ec816d28f1b27df1c358cfce66
|
||||
} : {
|
||||
- code: 'ERR_OSSL_RSA_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE',
|
||||
- message: /illegal or unsupported padding mode/,
|
||||
- opensslErrorStack: [
|
||||
+ code: /^ERR_OSSL_(RSA|EVP)_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE$/,
|
||||
+ message: /illegal or unsupported padding mode|ILLEGAL_OR_UNSUPPORTED_PADDING_MODE/,
|
||||
+ /*
|
||||
opensslErrorStack: [
|
||||
+ /*opensslErrorStack: [
|
||||
'error:06089093:digital envelope routines:EVP_PKEY_CTX_ctrl:' +
|
||||
'command not supported',
|
||||
],
|
||||
+ */
|
||||
- ],
|
||||
+ ],*/
|
||||
});
|
||||
}
|
||||
|
||||
@@ -419,10 +421,12 @@ assert.throws(
|
||||
@@ -423,10 +423,12 @@ assert.throws(
|
||||
public: fixtures.readKey('ed25519_public.pem', 'ascii'),
|
||||
algo: null,
|
||||
sigLen: 64 },
|
||||
@@ -411,7 +413,7 @@ index 8a263ec3350f5540591ac02e70fa2f552b9ac477..dcc4c2ec816d28f1b27df1c358cfce66
|
||||
{ private: fixtures.readKey('rsa_private_2048.pem', 'ascii'),
|
||||
public: fixtures.readKey('rsa_public_2048.pem', 'ascii'),
|
||||
algo: 'sha1',
|
||||
@@ -493,7 +497,7 @@ assert.throws(
|
||||
@@ -497,7 +499,7 @@ assert.throws(
|
||||
|
||||
{
|
||||
const data = Buffer.from('Hello world');
|
||||
@@ -421,10 +423,10 @@ index 8a263ec3350f5540591ac02e70fa2f552b9ac477..dcc4c2ec816d28f1b27df1c358cfce66
|
||||
for (const [file, length] of keys) {
|
||||
const privKey = fixtures.readKey(file);
|
||||
diff --git a/test/parallel/test-crypto-stream.js b/test/parallel/test-crypto-stream.js
|
||||
index 008ab129f0e019c659eecf5a76b7eb412c947fe3..6688f5d916f50e1e4fcfff1619c8634a3233f820 100644
|
||||
index 62be4eaf6edfb01ce275e7db3e56b51d09ac66ce..3fb6cd833d959d1c3c8522ebacc8f18352672628 100644
|
||||
--- a/test/parallel/test-crypto-stream.js
|
||||
+++ b/test/parallel/test-crypto-stream.js
|
||||
@@ -76,10 +76,10 @@ cipher.pipe(decipher)
|
||||
@@ -78,10 +78,10 @@ cipher.pipe(decipher)
|
||||
library: 'Provider routines',
|
||||
reason: 'bad decrypt',
|
||||
} : {
|
||||
@@ -440,10 +442,10 @@ index 008ab129f0e019c659eecf5a76b7eb412c947fe3..6688f5d916f50e1e4fcfff1619c8634a
|
||||
|
||||
cipher.end('Papaya!'); // Should not cause an unhandled exception.
|
||||
diff --git a/test/parallel/test-crypto-x509.js b/test/parallel/test-crypto-x509.js
|
||||
index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f694bd00c6 100644
|
||||
index f75e1d63470bfb7ce7fb354118b87a1a6fe5e4cc..5c0852e83a466ab4b255e8c9c9a33aca1beb9b94 100644
|
||||
--- a/test/parallel/test-crypto-x509.js
|
||||
+++ b/test/parallel/test-crypto-x509.js
|
||||
@@ -96,8 +96,10 @@ const der = Buffer.from(
|
||||
@@ -97,8 +97,10 @@ const der = Buffer.from(
|
||||
assert.strictEqual(x509.infoAccess, infoAccessCheck);
|
||||
assert.strictEqual(x509.validFrom, 'Sep 3 21:40:37 2022 GMT');
|
||||
assert.strictEqual(x509.validTo, 'Jun 17 21:40:37 2296 GMT');
|
||||
@@ -454,7 +456,7 @@ index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f6
|
||||
assert.strictEqual(
|
||||
x509.fingerprint,
|
||||
'8B:89:16:C4:99:87:D2:13:1A:64:94:36:38:A5:32:01:F0:95:3B:53');
|
||||
@@ -325,6 +327,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI=
|
||||
@@ -326,6 +328,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI=
|
||||
legacyObjectCheck.serialNumberPattern);
|
||||
}
|
||||
|
||||
@@ -462,7 +464,7 @@ index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f6
|
||||
{
|
||||
// This X.509 Certificate can be parsed by OpenSSL because it contains a
|
||||
// structurally sound TBSCertificate structure. However, the SPKI field of the
|
||||
@@ -363,6 +366,7 @@ UcXd/5qu2GhokrKU2cPttU+XAN2Om6a0
|
||||
@@ -364,6 +367,7 @@ UcXd/5qu2GhokrKU2cPttU+XAN2Om6a0
|
||||
|
||||
assert.strictEqual(cert.checkIssued(cert), false);
|
||||
}
|
||||
@@ -470,7 +472,7 @@ index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f6
|
||||
|
||||
{
|
||||
// Test date parsing of `validFromDate` and `validToDate` fields, according to RFC 5280.
|
||||
@@ -400,8 +404,10 @@ UidvpWWipVLZgK+oDks+bKTobcoXGW9oXobiIYqslXPy
|
||||
@@ -401,8 +405,10 @@ UidvpWWipVLZgK+oDks+bKTobcoXGW9oXobiIYqslXPy
|
||||
-----END CERTIFICATE-----`.trim();
|
||||
const c1 = new X509Certificate(certPemUTCTime);
|
||||
|
||||
@@ -481,7 +483,7 @@ index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f6
|
||||
|
||||
// The GeneralizedTime format is used for dates in 2050 or later.
|
||||
const certPemGeneralizedTime = `-----BEGIN CERTIFICATE-----
|
||||
@@ -435,6 +441,8 @@ CWwQO8JZjJqFtqtuzy2n+gLCvqePgG/gmSqHOPm2ZbLW
|
||||
@@ -436,6 +442,8 @@ CWwQO8JZjJqFtqtuzy2n+gLCvqePgG/gmSqHOPm2ZbLW
|
||||
-----END CERTIFICATE-----`.trim();
|
||||
const c2 = new X509Certificate(certPemGeneralizedTime);
|
||||
|
||||
@@ -491,10 +493,10 @@ index bd906c25b9ee194ff34fe5fb8ecb68d7a672138c..5b631a32d07bd916ff7cd847e52b26f6
|
||||
+ }
|
||||
}
|
||||
diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js
|
||||
index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87e561bffa 100644
|
||||
index 93644e016de447d2aadc519123f18cd72b7a5750..8b16c83cd47bd8969654242296c987ecc97ccaeb 100644
|
||||
--- a/test/parallel/test-crypto.js
|
||||
+++ b/test/parallel/test-crypto.js
|
||||
@@ -61,7 +61,7 @@ assert.throws(() => {
|
||||
@@ -62,7 +62,7 @@ assert.throws(() => {
|
||||
// Throws general Error, so there is no opensslErrorStack property.
|
||||
return err instanceof Error &&
|
||||
err.name === 'Error' &&
|
||||
@@ -503,7 +505,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
!('opensslErrorStack' in err);
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ assert.throws(() => {
|
||||
@@ -72,7 +72,7 @@ assert.throws(() => {
|
||||
// Throws general Error, so there is no opensslErrorStack property.
|
||||
return err instanceof Error &&
|
||||
err.name === 'Error' &&
|
||||
@@ -512,7 +514,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
!('opensslErrorStack' in err);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ assert.throws(() => {
|
||||
@@ -82,7 +82,7 @@ assert.throws(() => {
|
||||
// Throws general Error, so there is no opensslErrorStack property.
|
||||
return err instanceof Error &&
|
||||
err.name === 'Error' &&
|
||||
@@ -521,7 +523,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
!('opensslErrorStack' in err);
|
||||
});
|
||||
|
||||
@@ -144,8 +144,6 @@ assert(crypto.getHashes().includes('sha1'));
|
||||
@@ -145,8 +145,6 @@ assert(crypto.getHashes().includes('sha1'));
|
||||
assert(crypto.getHashes().includes('sha256'));
|
||||
assert(!crypto.getHashes().includes('SHA1'));
|
||||
assert(!crypto.getHashes().includes('SHA256'));
|
||||
@@ -530,7 +532,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
validateList(crypto.getHashes());
|
||||
// Make sure all of the hashes are supported by OpenSSL
|
||||
for (const algo of crypto.getHashes())
|
||||
@@ -196,6 +194,7 @@ assert.throws(
|
||||
@@ -197,6 +195,7 @@ assert.throws(
|
||||
}
|
||||
);
|
||||
|
||||
@@ -538,7 +540,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
assert.throws(() => {
|
||||
const priv = [
|
||||
'-----BEGIN RSA PRIVATE KEY-----',
|
||||
@@ -216,10 +215,10 @@ assert.throws(() => {
|
||||
@@ -217,10 +216,10 @@ assert.throws(() => {
|
||||
library: 'rsa routines',
|
||||
} : {
|
||||
name: 'Error',
|
||||
@@ -553,7 +555,7 @@ index 4271121881379b6c6892e89e520345f77e4181df..7a17285deee18ffbccf1d01d9d1b7b87
|
||||
code: 'ERR_OSSL_RSA_DIGEST_TOO_BIG_FOR_RSA_KEY'
|
||||
});
|
||||
return true;
|
||||
@@ -252,7 +251,7 @@ if (!common.hasOpenSSL3) {
|
||||
@@ -253,7 +252,7 @@ if (!hasOpenSSL3) {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -585,10 +587,10 @@ index 543ee176fb6af38874fee9f14be76f3fdda11060..fef9f1bc2f9fc6c220cf47847e86e038
|
||||
}
|
||||
|
||||
diff --git a/test/parallel/test-https-agent-session-eviction.js b/test/parallel/test-https-agent-session-eviction.js
|
||||
index e0986e53c1103b63cf15002a7fa4ce8bc4844d90..33c8a2aa72c56dd4a98558aab2102f03fae2b3cf 100644
|
||||
index 6f88e81e9ff29defe73800fc038b0d96d1ebd846..c0b92e2bdf86d3d2638c973f8be3110d5ae31f78 100644
|
||||
--- a/test/parallel/test-https-agent-session-eviction.js
|
||||
+++ b/test/parallel/test-https-agent-session-eviction.js
|
||||
@@ -14,7 +14,7 @@ const options = {
|
||||
@@ -17,7 +17,7 @@ const options = {
|
||||
key: readKey('agent1-key.pem'),
|
||||
cert: readKey('agent1-cert.pem'),
|
||||
secureOptions: SSL_OP_NO_TICKET,
|
||||
@@ -598,10 +600,10 @@ index e0986e53c1103b63cf15002a7fa4ce8bc4844d90..33c8a2aa72c56dd4a98558aab2102f03
|
||||
|
||||
// Create TLS1.2 server
|
||||
diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js
|
||||
index a9c8775e2f112f2b5e1f4e80f22264f219bf6a9d..4550d28125379e6043962826b8e97b692d63804b 100644
|
||||
index b1eab88fd6517e3698934dea17752ef2bb8d8d54..3ad6db20316baa8490e3787dd55903b58a54ad06 100644
|
||||
--- a/test/parallel/test-tls-getprotocol.js
|
||||
+++ b/test/parallel/test-tls-getprotocol.js
|
||||
@@ -27,7 +27,7 @@ const clientConfigs = [
|
||||
@@ -29,7 +29,7 @@ const clientConfigs = [
|
||||
|
||||
const serverConfig = {
|
||||
secureProtocol: 'TLS_method',
|
||||
@@ -708,10 +710,10 @@ index d1ca571af4be713082d32093bfb8a65f2aef9800..57b8df2ce18df58ff54b2d828af67e3c
|
||||
|
||||
function generateWrappingKeys() {
|
||||
diff --git a/test/parallel/test-x509-escaping.js b/test/parallel/test-x509-escaping.js
|
||||
index e6ae4d886908cbc0e56787009db855dad8b12ba7..a17147daa0576ec49e560c05448f1ed0ae8d5640 100644
|
||||
index b507af88e1f7f3424b7b5d6d683a295b9d208e5e..825ba4c8dce775f401080a0522565bb7a087bcc3 100644
|
||||
--- a/test/parallel/test-x509-escaping.js
|
||||
+++ b/test/parallel/test-x509-escaping.js
|
||||
@@ -447,7 +447,7 @@ const { hasOpenSSL3 } = common;
|
||||
@@ -448,7 +448,7 @@ const { hasOpenSSL3 } = require('../common/crypto');
|
||||
assert.strictEqual(certX509.checkHost(servername, { subject: 'default' }),
|
||||
undefined);
|
||||
assert.strictEqual(certX509.checkHost(servername, { subject: 'always' }),
|
||||
@@ -720,7 +722,7 @@ index e6ae4d886908cbc0e56787009db855dad8b12ba7..a17147daa0576ec49e560c05448f1ed0
|
||||
assert.strictEqual(certX509.checkHost(servername, { subject: 'never' }),
|
||||
undefined);
|
||||
|
||||
@@ -482,11 +482,11 @@ const { hasOpenSSL3 } = common;
|
||||
@@ -483,11 +483,11 @@ const { hasOpenSSL3 } = require('../common/crypto');
|
||||
assert.strictEqual(certX509.subjectAltName, 'IP Address:1.2.3.4');
|
||||
|
||||
// The newer X509Certificate API allows customizing this behavior:
|
||||
|
||||
@@ -19,10 +19,10 @@ index c9d4a3536d0f60375ae623b48ca2fa7095c88d42..d818320fbbc430d06a0c2852e4723981
|
||||
context = { __proto__: context, source };
|
||||
}
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 0f138b1099b4833176e8a0ce681c745422efc24a..c7dd203e4bd5d611186300d9c0f2255afdf81684 100644
|
||||
index 0caba80bb213e0edfb1f834250f895ccc05d0d1c..6feab19d24a3524e36c5ed3bbac53cba0fa298c7 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -287,6 +287,9 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
@@ -286,6 +286,9 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
if (module && module[kModuleExportNames] !== undefined) {
|
||||
return { module, exportNames: module[kModuleExportNames] };
|
||||
}
|
||||
|
||||
@@ -46,19 +46,18 @@ index 5ba13096b98047ff33e4d44167c2a069ccc5e69d..a00b5979e3b5deb4ba315b4635c7e5d2
|
||||
}
|
||||
}
|
||||
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
|
||||
index 61c043e35c6ce9ef9d7255e009162289e80eaf4d..0c41492aa9652112df0b839361570a832daf3b13 100644
|
||||
index bfd9bd3d127404de1cbb6f30c43ab0342590759d..9e7d8ef0adef3b68a3ec186e4b218f591aa69266 100644
|
||||
--- a/lib/internal/modules/esm/resolve.js
|
||||
+++ b/lib/internal/modules/esm/resolve.js
|
||||
@@ -791,6 +791,8 @@ function parsePackageName(specifier, base) {
|
||||
return { packageName, packageSubpath, isScoped };
|
||||
@@ -751,6 +751,7 @@ function packageImportsResolve(name, base, conditions) {
|
||||
throw importNotDefined(name, packageJSONUrl, base);
|
||||
}
|
||||
|
||||
+const electronTypes = ['electron', 'electron/main', 'electron/common', 'electron/renderer'];
|
||||
+
|
||||
|
||||
/**
|
||||
* Resolves a package specifier to a URL.
|
||||
* @param {string} specifier - The package specifier to resolve.
|
||||
@@ -804,6 +806,11 @@ function packageResolve(specifier, base, conditions) {
|
||||
@@ -765,6 +766,11 @@ function packageResolve(specifier, base, conditions) {
|
||||
return new URL('node:' + specifier);
|
||||
}
|
||||
|
||||
@@ -67,11 +66,11 @@ index 61c043e35c6ce9ef9d7255e009162289e80eaf4d..0c41492aa9652112df0b839361570a83
|
||||
+ return new URL('electron:electron');
|
||||
+ }
|
||||
+
|
||||
const { packageName, packageSubpath, isScoped } =
|
||||
parsePackageName(specifier, base);
|
||||
const { packageJSONUrl, packageJSONPath, packageSubpath } = packageJsonReader.getPackageJSONURL(specifier, base);
|
||||
|
||||
const packageConfig = packageJsonReader.read(packageJSONPath, { __proto__: null, specifier, base, isESM: true });
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 491dc3f450733a9181096a145cfa508767682658..23ed971daebdda3cb627907ffa3626daaa5b5b7b 100644
|
||||
index a587246e329b41f33a3fdfe5ef92910915911611..1b94d923b6d83cc7806d793497a4f9f978c5938c 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -182,7 +182,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) {
|
||||
@@ -106,7 +105,7 @@ index 491dc3f450733a9181096a145cfa508767682658..23ed971daebdda3cb627907ffa3626da
|
||||
// This translator function must be sync, as `require` is sync.
|
||||
translators.set('require-commonjs-typescript', (url, source, isMain) => {
|
||||
diff --git a/lib/internal/url.js b/lib/internal/url.js
|
||||
index 14b0ef61d2f91cf48bba9aceefc55751e7ed5db2..6d6b32f65131d1d55aeeae27dd2970440d99b4bd 100644
|
||||
index f6e58e196860fc9321e3367f8461ec2647d7e8f8..a80ecee888222e02f5d03f42f7af2c1ab9750cab 100644
|
||||
--- a/lib/internal/url.js
|
||||
+++ b/lib/internal/url.js
|
||||
@@ -1505,6 +1505,8 @@ function fileURLToPath(path, options = kEmptyObject) {
|
||||
|
||||
@@ -17,7 +17,7 @@ Upstreams:
|
||||
- https://github.com/nodejs/node/pull/39136
|
||||
|
||||
diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc
|
||||
index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93ea5075700 100644
|
||||
index ce2e7b384eb1987ddb081f79884fb8cb62ade60b..bffdb0259eeed7389adb54a8ff13a1ac4e767d90 100644
|
||||
--- a/deps/ncrypto/ncrypto.cc
|
||||
+++ b/deps/ncrypto/ncrypto.cc
|
||||
@@ -11,9 +11,6 @@
|
||||
@@ -30,7 +30,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
|
||||
namespace ncrypto {
|
||||
namespace {
|
||||
@@ -708,7 +705,7 @@ bool SafeX509SubjectAltNamePrint(const BIOPointer& out, X509_EXTENSION* ext) {
|
||||
@@ -789,7 +786,7 @@ bool SafeX509SubjectAltNamePrint(const BIOPointer& out, X509_EXTENSION* ext) {
|
||||
|
||||
bool ok = true;
|
||||
|
||||
@@ -39,7 +39,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
GENERAL_NAME* gen = sk_GENERAL_NAME_value(names, i);
|
||||
|
||||
if (i != 0) BIO_write(out.get(), ", ", 2);
|
||||
@@ -732,7 +729,7 @@ bool SafeX509InfoAccessPrint(const BIOPointer& out, X509_EXTENSION* ext) {
|
||||
@@ -813,7 +810,7 @@ bool SafeX509InfoAccessPrint(const BIOPointer& out, X509_EXTENSION* ext) {
|
||||
|
||||
bool ok = true;
|
||||
|
||||
@@ -48,7 +48,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
ACCESS_DESCRIPTION* desc = sk_ACCESS_DESCRIPTION_value(descs, i);
|
||||
|
||||
if (i != 0) BIO_write(out.get(), "\n", 1);
|
||||
@@ -874,13 +871,17 @@ BIOPointer X509View::getValidTo() const {
|
||||
@@ -955,13 +952,17 @@ BIOPointer X509View::getValidTo() const {
|
||||
|
||||
int64_t X509View::getValidToTime() const {
|
||||
struct tm tp;
|
||||
@@ -67,7 +67,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
return PortableTimeGM(&tp);
|
||||
}
|
||||
|
||||
@@ -1085,7 +1086,11 @@ BIOPointer BIOPointer::NewMem() {
|
||||
@@ -1236,7 +1237,11 @@ BIOPointer BIOPointer::NewMem() {
|
||||
}
|
||||
|
||||
BIOPointer BIOPointer::NewSecMem() {
|
||||
@@ -80,7 +80,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
}
|
||||
|
||||
BIOPointer BIOPointer::New(const BIO_METHOD* method) {
|
||||
@@ -1149,8 +1154,10 @@ BignumPointer DHPointer::FindGroup(const std::string_view name,
|
||||
@@ -1306,8 +1311,10 @@ BignumPointer DHPointer::FindGroup(const std::string_view name,
|
||||
#define V(n, p) \
|
||||
if (EqualNoCase(name, n)) return BignumPointer(p(nullptr));
|
||||
if (option != FindGroupOption::NO_SMALL_PRIMES) {
|
||||
@@ -91,7 +91,7 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
V("modp5", BN_get_rfc3526_prime_1536);
|
||||
}
|
||||
V("modp14", BN_get_rfc3526_prime_2048);
|
||||
@@ -1223,11 +1230,13 @@ DHPointer::CheckPublicKeyResult DHPointer::checkPublicKey(
|
||||
@@ -1383,11 +1390,13 @@ DHPointer::CheckPublicKeyResult DHPointer::checkPublicKey(
|
||||
int codes = 0;
|
||||
if (DH_check_pub_key(dh_.get(), pub_key.get(), &codes) != 1)
|
||||
return DHPointer::CheckPublicKeyResult::CHECK_FAILED;
|
||||
@@ -106,11 +106,59 @@ index ac2d771555126a4f43b8c3a3fd299d40019e6622..769fe636ef2b5d02ecc9ff753e64d93e
|
||||
return DHPointer::CheckPublicKeyResult::INVALID;
|
||||
}
|
||||
return CheckPublicKeyResult::NONE;
|
||||
@@ -2330,7 +2339,7 @@ const std::string_view SSLPointer::getClientHelloAlpn() const {
|
||||
const unsigned char* buf;
|
||||
size_t len;
|
||||
size_t rem;
|
||||
-
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_client_hello_get0_ext(
|
||||
get(),
|
||||
TLSEXT_TYPE_application_layer_protocol_negotiation,
|
||||
@@ -2343,6 +2352,8 @@ const std::string_view SSLPointer::getClientHelloAlpn() const {
|
||||
len = (buf[0] << 8) | buf[1];
|
||||
if (len + 2 != rem) return {};
|
||||
return reinterpret_cast<const char*>(buf + 3);
|
||||
+#endif
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
const std::string_view SSLPointer::getClientHelloServerName() const {
|
||||
@@ -2350,7 +2361,7 @@ const std::string_view SSLPointer::getClientHelloServerName() const {
|
||||
const unsigned char* buf;
|
||||
size_t len;
|
||||
size_t rem;
|
||||
-
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_client_hello_get0_ext(get(), TLSEXT_TYPE_server_name, &buf, &rem) ||
|
||||
rem <= 2) {
|
||||
return {};
|
||||
@@ -2366,6 +2377,8 @@ const std::string_view SSLPointer::getClientHelloServerName() const {
|
||||
len = (*(buf + 3) << 8) | *(buf + 4);
|
||||
if (len + 2 > rem) return {};
|
||||
return reinterpret_cast<const char*>(buf + 5);
|
||||
+#endif
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
std::optional<const std::string_view> SSLPointer::GetServerName(
|
||||
@@ -2399,8 +2412,11 @@ bool SSLPointer::isServer() const {
|
||||
EVPKeyPointer SSLPointer::getPeerTempKey() const {
|
||||
if (!ssl_) return {};
|
||||
EVP_PKEY* raw_key = nullptr;
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_get_peer_tmp_key(get(), &raw_key)) return {};
|
||||
return EVPKeyPointer(raw_key);
|
||||
+#endif
|
||||
+ return {};
|
||||
}
|
||||
|
||||
SSLCtxPointer::SSLCtxPointer(SSL_CTX* ctx) : ctx_(ctx) {}
|
||||
diff --git a/deps/ncrypto/ncrypto.h b/deps/ncrypto/ncrypto.h
|
||||
index fffa75ec718facc61cebf48f33ddc3909b9b9413..19757016a4f50e2f656a76bf60cb87e601845afe 100644
|
||||
index e5bf2b529bf23914677e25d7468aad58a4684557..9a3c6029ff3319cce58c79782a7bd5d1fcd467f9 100644
|
||||
--- a/deps/ncrypto/ncrypto.h
|
||||
+++ b/deps/ncrypto/ncrypto.h
|
||||
@@ -516,17 +516,21 @@ class DHPointer final {
|
||||
@@ -623,17 +623,21 @@ class DHPointer final {
|
||||
UNABLE_TO_CHECK_GENERATOR = DH_UNABLE_TO_CHECK_GENERATOR,
|
||||
NOT_SUITABLE_GENERATOR = DH_NOT_SUITABLE_GENERATOR,
|
||||
Q_NOT_PRIME = DH_CHECK_Q_NOT_PRIME,
|
||||
@@ -147,10 +195,10 @@ index 245a43920c7baf000ba63192a84a4c3fd219be7d..56a554175b805c1703f13d62041f8c80
|
||||
# The location of simdutf - use the one from node's deps by default.
|
||||
node_simdutf_path = "$node_path/deps/simdutf"
|
||||
diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc
|
||||
index c7588583530cf291946d01cec807390d987706cf..495fb92355a7eadc2f7ec885a3b529988bb3bd02 100644
|
||||
index 1754d1f71b8adbcb584bfe4606e2a341836fb671..ac0f529e75c30add0708dc20470846f2f56e4b86 100644
|
||||
--- a/src/crypto/crypto_cipher.cc
|
||||
+++ b/src/crypto/crypto_cipher.cc
|
||||
@@ -1080,7 +1080,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -1033,7 +1033,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
|
||||
if (EVP_PKEY_decrypt_init(ctx.get()) <= 0) {
|
||||
return ThrowCryptoError(env, ERR_get_error());
|
||||
}
|
||||
@@ -159,7 +207,7 @@ index c7588583530cf291946d01cec807390d987706cf..495fb92355a7eadc2f7ec885a3b52998
|
||||
int rsa_pkcs1_implicit_rejection =
|
||||
EVP_PKEY_CTX_ctrl_str(ctx.get(), "rsa_pkcs1_implicit_rejection", "1");
|
||||
// From the doc -2 means that the option is not supported.
|
||||
@@ -1095,6 +1095,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -1048,6 +1048,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
|
||||
env,
|
||||
"RSA_PKCS1_PADDING is no longer supported for private decryption");
|
||||
}
|
||||
@@ -168,45 +216,10 @@ index c7588583530cf291946d01cec807390d987706cf..495fb92355a7eadc2f7ec885a3b52998
|
||||
|
||||
const EVP_MD* digest = nullptr;
|
||||
diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc
|
||||
index 43a126f863779d3f364f92bd237039474b489845..77a3caee93049f65faef37e93b871c467ebca7e5 100644
|
||||
index d94f6e1c82c4a62547b3b395f375c86ce4deb5de..b81b9005365272217c77e2b9289bd9f877c0e77c 100644
|
||||
--- a/src/crypto/crypto_common.cc
|
||||
+++ b/src/crypto/crypto_common.cc
|
||||
@@ -134,7 +134,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) {
|
||||
const unsigned char* buf;
|
||||
size_t len;
|
||||
size_t rem;
|
||||
-
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_client_hello_get0_ext(
|
||||
ssl.get(),
|
||||
TLSEXT_TYPE_application_layer_protocol_negotiation,
|
||||
@@ -147,13 +147,15 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) {
|
||||
len = (buf[0] << 8) | buf[1];
|
||||
if (len + 2 != rem) return nullptr;
|
||||
return reinterpret_cast<const char*>(buf + 3);
|
||||
+#endif
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
const char* GetClientHelloServerName(const SSLPointer& ssl) {
|
||||
const unsigned char* buf;
|
||||
size_t len;
|
||||
size_t rem;
|
||||
-
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_client_hello_get0_ext(
|
||||
ssl.get(),
|
||||
TLSEXT_TYPE_server_name,
|
||||
@@ -175,6 +177,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) {
|
||||
if (len + 2 > rem)
|
||||
return nullptr;
|
||||
return reinterpret_cast<const char*>(buf + 5);
|
||||
+#endif
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
const char* GetServerName(SSL* ssl) {
|
||||
@@ -282,7 +286,7 @@ StackOfX509 CloneSSLCerts(X509Pointer&& cert,
|
||||
@@ -124,7 +124,7 @@ StackOfX509 CloneSSLCerts(X509Pointer&& cert,
|
||||
if (!peer_certs) return StackOfX509();
|
||||
if (cert && !sk_X509_push(peer_certs.get(), cert.release()))
|
||||
return StackOfX509();
|
||||
@@ -215,52 +228,30 @@ index 43a126f863779d3f364f92bd237039474b489845..77a3caee93049f65faef37e93b871c46
|
||||
X509Pointer cert(X509_dup(sk_X509_value(ssl_certs, i)));
|
||||
if (!cert || !sk_X509_push(peer_certs.get(), cert.get()))
|
||||
return StackOfX509();
|
||||
@@ -298,7 +302,7 @@ MaybeLocal<Object> AddIssuerChainToObject(X509Pointer* cert,
|
||||
@@ -140,7 +140,7 @@ MaybeLocal<Object> AddIssuerChainToObject(X509Pointer* cert,
|
||||
Environment* const env) {
|
||||
cert->reset(sk_X509_delete(peer_certs.get(), 0));
|
||||
for (;;) {
|
||||
- int i;
|
||||
+ size_t i;
|
||||
for (i = 0; i < sk_X509_num(peer_certs.get()); i++) {
|
||||
ncrypto::X509View ca(sk_X509_value(peer_certs.get(), i));
|
||||
X509View ca(sk_X509_value(peer_certs.get(), i));
|
||||
if (!cert->view().isIssuedBy(ca)) continue;
|
||||
@@ -384,14 +388,14 @@ MaybeLocal<Array> GetClientHelloCiphers(
|
||||
Environment* env,
|
||||
const SSLPointer& ssl) {
|
||||
EscapableHandleScope scope(env->isolate());
|
||||
- const unsigned char* buf;
|
||||
- size_t len = SSL_client_hello_get0_ciphers(ssl.get(), &buf);
|
||||
+ // const unsigned char* buf = nullptr;
|
||||
+ size_t len = 0; // SSL_client_hello_get0_ciphers(ssl.get(), &buf);
|
||||
size_t count = len / 2;
|
||||
MaybeStackBuffer<Local<Value>, 16> ciphers(count);
|
||||
int j = 0;
|
||||
for (size_t n = 0; n < len; n += 2) {
|
||||
- const SSL_CIPHER* cipher = SSL_CIPHER_find(ssl.get(), buf);
|
||||
- buf += 2;
|
||||
+ const SSL_CIPHER* cipher = nullptr; // SSL_CIPHER_find(ssl.get(), buf);
|
||||
+ // buf += 2;
|
||||
Local<Object> obj = Object::New(env->isolate());
|
||||
if (!Set(env->context(),
|
||||
obj,
|
||||
@@ -444,8 +448,11 @@ MaybeLocal<Object> GetEphemeralKey(Environment* env, const SSLPointer& ssl) {
|
||||
|
||||
EscapableHandleScope scope(env->isolate());
|
||||
Local<Object> info = Object::New(env->isolate());
|
||||
+#ifndef OPENSSL_IS_BORINGSSL
|
||||
if (!SSL_get_peer_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info);
|
||||
-
|
||||
+#else
|
||||
+ if (!SSL_get_server_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info);
|
||||
+#endif
|
||||
Local<Context> context = env->context();
|
||||
crypto::EVPKeyPointer key(raw_key);
|
||||
|
||||
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
|
||||
index aa5fc61f19e435b4833f3f49df10fa1edf2142c7..0a338b018a4ec20cb5bce250faf60d3f3bf192d4 100644
|
||||
index c89d591c6804ab7d41199d61452d10d12cdf7398..05740c7dc599954bca0779b8c8d6bd615183288a 100644
|
||||
--- a/src/crypto/crypto_context.cc
|
||||
+++ b/src/crypto/crypto_context.cc
|
||||
@@ -94,7 +94,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
|
||||
@@ -26,7 +26,9 @@ using ncrypto::BIOPointer;
|
||||
using ncrypto::ClearErrorOnReturn;
|
||||
using ncrypto::CryptoErrorList;
|
||||
using ncrypto::DHPointer;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyPointer;
|
||||
using ncrypto::MarkPopErrorOnReturn;
|
||||
using ncrypto::SSLPointer;
|
||||
@@ -105,7 +107,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
|
||||
// the CA certificates.
|
||||
SSL_CTX_clear_extra_chain_certs(ctx);
|
||||
|
||||
@@ -269,7 +260,7 @@ index aa5fc61f19e435b4833f3f49df10fa1edf2142c7..0a338b018a4ec20cb5bce250faf60d3f
|
||||
X509* ca = sk_X509_value(extra_certs, i);
|
||||
|
||||
// NOTE: Increments reference count on `ca`
|
||||
@@ -920,11 +920,12 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -931,11 +933,12 @@ void SecureContext::SetDHParam(const FunctionCallbackInfo<Value>& args) {
|
||||
// If the user specified "auto" for dhparams, the JavaScript layer will pass
|
||||
// true to this function instead of the original string. Any other string
|
||||
// value will be interpreted as custom DH parameters below.
|
||||
@@ -283,7 +274,7 @@ index aa5fc61f19e435b4833f3f49df10fa1edf2142c7..0a338b018a4ec20cb5bce250faf60d3f
|
||||
DHPointer dh;
|
||||
{
|
||||
BIOPointer bio(LoadBIO(env, args[0]));
|
||||
@@ -1150,7 +1151,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -1161,7 +1164,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
|
||||
// Add CA certs too
|
||||
@@ -293,7 +284,7 @@ index aa5fc61f19e435b4833f3f49df10fa1edf2142c7..0a338b018a4ec20cb5bce250faf60d3f
|
||||
|
||||
X509_STORE_add_cert(sc->GetCertStoreOwnedByThisSecureContext(), ca);
|
||||
diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc
|
||||
index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d77b98958 100644
|
||||
index 7041eb985d9f6d163098a94342aec976cb6c2bb9..5387d9625a28bb7d11f7f0f05a5f07d1fee2c216 100644
|
||||
--- a/src/crypto/crypto_dh.cc
|
||||
+++ b/src/crypto/crypto_dh.cc
|
||||
@@ -7,7 +7,9 @@
|
||||
@@ -306,7 +297,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
#include "openssl/dh.h"
|
||||
#include "threadpoolwork-inl.h"
|
||||
#include "v8.h"
|
||||
@@ -86,11 +88,7 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -88,11 +90,7 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
if (args[0]->IsInt32()) {
|
||||
int32_t bits = args[0].As<Int32>()->Value();
|
||||
if (bits < 2) {
|
||||
@@ -319,7 +310,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
return ThrowCryptoError(env, ERR_get_error(), "Invalid prime length");
|
||||
}
|
||||
|
||||
@@ -103,7 +101,7 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -105,7 +103,7 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
int32_t generator = args[1].As<Int32>()->Value();
|
||||
if (generator < 2) {
|
||||
@@ -328,7 +319,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
return ThrowCryptoError(env, ERR_get_error(), "Invalid generator");
|
||||
}
|
||||
|
||||
@@ -132,12 +130,12 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -134,12 +132,12 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
if (args[1]->IsInt32()) {
|
||||
int32_t generator = args[1].As<Int32>()->Value();
|
||||
if (generator < 2) {
|
||||
@@ -343,7 +334,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
return ThrowCryptoError(env, ERR_get_error(), "Invalid generator");
|
||||
}
|
||||
} else {
|
||||
@@ -146,11 +144,11 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -148,11 +146,11 @@ void New(const FunctionCallbackInfo<Value>& args) {
|
||||
return THROW_ERR_OUT_OF_RANGE(env, "generator is too big");
|
||||
bn_g = BignumPointer(reinterpret_cast<uint8_t*>(arg1.data()), arg1.size());
|
||||
if (!bn_g) {
|
||||
@@ -357,7 +348,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
return ThrowCryptoError(env, ERR_get_error(), "Invalid generator");
|
||||
}
|
||||
}
|
||||
@@ -258,15 +256,17 @@ void ComputeSecret(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -260,15 +258,17 @@ void ComputeSecret(const FunctionCallbackInfo<Value>& args) {
|
||||
BignumPointer key(key_buf.data(), key_buf.size());
|
||||
|
||||
switch (dh.checkPublicKey(key)) {
|
||||
@@ -377,7 +368,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
case DHPointer::CheckPublicKeyResult::NONE:
|
||||
break;
|
||||
}
|
||||
@@ -398,9 +398,11 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
|
||||
@@ -400,9 +400,11 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
|
||||
key_params = EVPKeyPointer::New();
|
||||
CHECK(key_params);
|
||||
CHECK_EQ(EVP_PKEY_assign_DH(key_params.get(), dh.release()), 1);
|
||||
@@ -390,7 +381,7 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
if (!param_ctx ||
|
||||
EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 ||
|
||||
EVP_PKEY_CTX_set_dh_paramgen_prime_len(
|
||||
@@ -414,6 +416,9 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
|
||||
@@ -416,6 +418,9 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
|
||||
}
|
||||
|
||||
key_params = EVPKeyPointer(raw_params);
|
||||
@@ -401,10 +392,10 @@ index d760a0d3ea1d12184a558f5e87cb22043d26a0f5..f973941b3b9ea954f35f2ea135f8ee3d
|
||||
UNREACHABLE();
|
||||
}
|
||||
diff --git a/src/crypto/crypto_dsa.cc b/src/crypto/crypto_dsa.cc
|
||||
index b557de774117e442d7f429e92d63a6e1faa236fd..0aca233ced39269b09c383e5b32d85cf36260a1e 100644
|
||||
index 471fee77531139ce988292470dff443fdfb05b07..931f7c2ae3d7e12afce471545d610d22f63412d7 100644
|
||||
--- a/src/crypto/crypto_dsa.cc
|
||||
+++ b/src/crypto/crypto_dsa.cc
|
||||
@@ -40,7 +40,7 @@ namespace crypto {
|
||||
@@ -43,7 +43,7 @@ namespace crypto {
|
||||
EVPKeyCtxPointer DsaKeyGenTraits::Setup(DsaKeyPairGenConfig* params) {
|
||||
EVPKeyCtxPointer param_ctx(EVP_PKEY_CTX_new_id(EVP_PKEY_DSA, nullptr));
|
||||
EVP_PKEY* raw_params = nullptr;
|
||||
@@ -413,7 +404,7 @@ index b557de774117e442d7f429e92d63a6e1faa236fd..0aca233ced39269b09c383e5b32d85cf
|
||||
if (!param_ctx ||
|
||||
EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 ||
|
||||
EVP_PKEY_CTX_set_dsa_paramgen_bits(
|
||||
@@ -55,7 +55,9 @@ EVPKeyCtxPointer DsaKeyGenTraits::Setup(DsaKeyPairGenConfig* params) {
|
||||
@@ -58,7 +58,9 @@ EVPKeyCtxPointer DsaKeyGenTraits::Setup(DsaKeyPairGenConfig* params) {
|
||||
return EVPKeyCtxPointer();
|
||||
}
|
||||
}
|
||||
@@ -425,10 +416,10 @@ index b557de774117e442d7f429e92d63a6e1faa236fd..0aca233ced39269b09c383e5b32d85cf
|
||||
return EVPKeyCtxPointer();
|
||||
|
||||
diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc
|
||||
index ac4103400e1e293909e7c524f4a1422c5f04e707..c44c11cbd533350d8bf149032c658d5585303b7d 100644
|
||||
index f66c57b1079af6cd040dc6d11e72f353507b75e5..abd2bccb9669e06dd8355f66220f8b06c8e863dc 100644
|
||||
--- a/src/crypto/crypto_keys.cc
|
||||
+++ b/src/crypto/crypto_keys.cc
|
||||
@@ -945,6 +945,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
|
||||
@@ -949,6 +949,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
|
||||
}
|
||||
|
||||
bool KeyObjectHandle::CheckEcKeyData() const {
|
||||
@@ -436,7 +427,7 @@ index ac4103400e1e293909e7c524f4a1422c5f04e707..c44c11cbd533350d8bf149032c658d55
|
||||
MarkPopErrorOnReturn mark_pop_error_on_return;
|
||||
|
||||
const auto& key = data_.GetAsymmetricKey();
|
||||
@@ -961,6 +962,9 @@ bool KeyObjectHandle::CheckEcKeyData() const {
|
||||
@@ -965,6 +966,9 @@ bool KeyObjectHandle::CheckEcKeyData() const {
|
||||
#else
|
||||
return EVP_PKEY_public_check(ctx.get()) == 1;
|
||||
#endif
|
||||
@@ -447,10 +438,10 @@ index ac4103400e1e293909e7c524f4a1422c5f04e707..c44c11cbd533350d8bf149032c658d55
|
||||
|
||||
void KeyObjectHandle::CheckEcKeyData(const FunctionCallbackInfo<Value>& args) {
|
||||
diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc
|
||||
index b59e394d9a7e2c19fdf1f2b0177753ff488da0fa..91218f49da5392c6f769495ee7f9275a47ce09b1 100644
|
||||
index cb96698aa644c3b6c506c0979910f2b4421d63ad..b9b21329199b49c9e41f9ae708296e5b0edb39b0 100644
|
||||
--- a/src/crypto/crypto_random.cc
|
||||
+++ b/src/crypto/crypto_random.cc
|
||||
@@ -134,7 +134,7 @@ Maybe<void> RandomPrimeTraits::AdditionalConfig(
|
||||
@@ -143,7 +143,7 @@ Maybe<void> RandomPrimeTraits::AdditionalConfig(
|
||||
|
||||
params->bits = bits;
|
||||
params->safe = safe;
|
||||
@@ -460,10 +451,10 @@ index b59e394d9a7e2c19fdf1f2b0177753ff488da0fa..91218f49da5392c6f769495ee7f9275a
|
||||
THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime");
|
||||
return Nothing<void>();
|
||||
diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc
|
||||
index 6d360554b31d53a597d61fcbd660f703a903ca21..86fafe98222d4c18f062032d80104f3ef00dbc01 100644
|
||||
index 05a3882c7e17d78e27aabb29891aa250789a47c0..1f2fccce6ed8f14525557644e0bdd130eedf3337 100644
|
||||
--- a/src/crypto/crypto_rsa.cc
|
||||
+++ b/src/crypto/crypto_rsa.cc
|
||||
@@ -608,10 +608,13 @@ Maybe<void> GetRsaKeyDetail(Environment* env,
|
||||
@@ -612,10 +612,13 @@ Maybe<void> GetRsaKeyDetail(Environment* env,
|
||||
}
|
||||
|
||||
if (params->saltLength != nullptr) {
|
||||
@@ -478,10 +469,20 @@ index 6d360554b31d53a597d61fcbd660f703a903ca21..86fafe98222d4c18f062032d80104f3e
|
||||
|
||||
if (target
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index 12ee0cde0897024bccb0face49053544a0bcfcd7..8a6a36a3c31532ed585c287ba8cee14026d315b4 100644
|
||||
index e255288f6e013ce122f317c415d73d9c93d38580..25fa9af8153852f49d5289aa253f3c8f7268d89c 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -495,24 +495,15 @@ Maybe<void> Decorate(Environment* env,
|
||||
@@ -29,7 +29,9 @@ namespace node {
|
||||
using ncrypto::BignumPointer;
|
||||
using ncrypto::BIOPointer;
|
||||
using ncrypto::CryptoErrorList;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyCtxPointer;
|
||||
using v8::ArrayBuffer;
|
||||
using v8::BackingStore;
|
||||
@@ -502,24 +504,15 @@ Maybe<void> Decorate(Environment* env,
|
||||
V(BIO) \
|
||||
V(PKCS7) \
|
||||
V(X509V3) \
|
||||
@@ -507,7 +508,7 @@ index 12ee0cde0897024bccb0face49053544a0bcfcd7..8a6a36a3c31532ed585c287ba8cee140
|
||||
V(USER) \
|
||||
|
||||
#define V(name) case ERR_LIB_##name: lib = #name "_"; break;
|
||||
@@ -654,7 +645,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -661,7 +654,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
CHECK(args[0]->IsUint32());
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
uint32_t len = args[0].As<Uint32>()->Value();
|
||||
@@ -516,7 +517,7 @@ index 12ee0cde0897024bccb0face49053544a0bcfcd7..8a6a36a3c31532ed585c287ba8cee140
|
||||
if (data == nullptr) {
|
||||
// There's no memory available for the allocation.
|
||||
// Return nothing.
|
||||
@@ -665,7 +656,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -672,7 +665,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
data,
|
||||
len,
|
||||
[](void* data, size_t len, void* deleter_data) {
|
||||
@@ -525,7 +526,7 @@ index 12ee0cde0897024bccb0face49053544a0bcfcd7..8a6a36a3c31532ed585c287ba8cee140
|
||||
},
|
||||
data);
|
||||
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
|
||||
@@ -673,10 +664,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -680,10 +673,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
}
|
||||
|
||||
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -539,7 +540,7 @@ index 12ee0cde0897024bccb0face49053544a0bcfcd7..8a6a36a3c31532ed585c287ba8cee140
|
||||
} // namespace
|
||||
|
||||
diff --git a/src/env.h b/src/env.h
|
||||
index 16312e548e526b80ec9a230bc3c772f45685b61f..0a3f09ebc7e2e7c1f8b9499d4439e2ca90b86810 100644
|
||||
index 1239cbdbf2d375a50ada37ee0ed5592c751d4c5c..aed066852d7c257076cc7ca8b173fd2a3a353a00 100644
|
||||
--- a/src/env.h
|
||||
+++ b/src/env.h
|
||||
@@ -50,7 +50,7 @@
|
||||
@@ -551,7 +552,7 @@ index 16312e548e526b80ec9a230bc3c772f45685b61f..0a3f09ebc7e2e7c1f8b9499d4439e2ca
|
||||
#include <openssl/evp.h>
|
||||
#endif
|
||||
|
||||
@@ -1062,7 +1062,7 @@ class Environment final : public MemoryRetainer {
|
||||
@@ -1071,7 +1071,7 @@ class Environment final : public MemoryRetainer {
|
||||
kExitInfoFieldCount
|
||||
};
|
||||
|
||||
@@ -574,7 +575,7 @@ index c59e65ad1fe3fac23f1fc25ca77e6133d1ccaccd..f2f07434e076e2977755ef7dac7d489a
|
||||
#if NODE_OPENSSL_HAS_QUIC
|
||||
#include <openssl/quic.h>
|
||||
diff --git a/src/node_options.cc b/src/node_options.cc
|
||||
index a03daec2bd74d7857d38238ea0479e36e054a7a3..f70e0917f6caa66210107cdb2ef891685563ba96 100644
|
||||
index 1d81079a9b7d8a69ad2d87835090be88ae507bd8..3608ab2b4aeb09e985ca98e23f2dff23567ade71 100644
|
||||
--- a/src/node_options.cc
|
||||
+++ b/src/node_options.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -587,7 +588,7 @@ index a03daec2bd74d7857d38238ea0479e36e054a7a3..f70e0917f6caa66210107cdb2ef89168
|
||||
#endif
|
||||
|
||||
diff --git a/src/node_options.h b/src/node_options.h
|
||||
index ab6ea77b2e9ce54af44e21c29fcba929f117c41b..23923ccd645e810d84b0a08e57e486d012b5796b 100644
|
||||
index 621f5eca96b10685734a39e56cce7cee6c8a25bf..41dd04f5e2b1cd54c32df70830389d44d7b39aa2 100644
|
||||
--- a/src/node_options.h
|
||||
+++ b/src/node_options.h
|
||||
@@ -11,7 +11,7 @@
|
||||
@@ -600,7 +601,7 @@ index ab6ea77b2e9ce54af44e21c29fcba929f117c41b..23923ccd645e810d84b0a08e57e486d0
|
||||
#endif
|
||||
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index 3632d5bd21e277fcbd8d62dc65598a7f7c87f00e..08a4ed939fb1482a897def94128282fdfd63dc62 100644
|
||||
index a2f3a769ceaa08db6d7438223884dc5aeab1340d..08603eaef2da51fd92f9bf977647b56409eff48c 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -151,7 +151,6 @@ template("node_gn_build") {
|
||||
|
||||
@@ -38,7 +38,7 @@ index a00b5979e3b5deb4ba315b4635c7e5d2801c376e..c9d4a3536d0f60375ae623b48ca2fa70
|
||||
const result = dataURLProcessor(url);
|
||||
if (result === 'failure') {
|
||||
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
|
||||
index 0c41492aa9652112df0b839361570a832daf3b13..f2fbb576da23fc0a48b0c979a263aa2dbe3600eb 100644
|
||||
index 9e7d8ef0adef3b68a3ec186e4b218f591aa69266..2879e5cf541fb4d226cfd7cc0fe367ca448fb926 100644
|
||||
--- a/lib/internal/modules/esm/resolve.js
|
||||
+++ b/lib/internal/modules/esm/resolve.js
|
||||
@@ -25,7 +25,7 @@ const {
|
||||
@@ -60,7 +60,7 @@ index 0c41492aa9652112df0b839361570a832daf3b13..f2fbb576da23fc0a48b0c979a263aa2d
|
||||
});
|
||||
const { search, hash } = resolved;
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 23ed971daebdda3cb627907ffa3626daaa5b5b7b..0f138b1099b4833176e8a0ce681c745422efc24a 100644
|
||||
index 1b94d923b6d83cc7806d793497a4f9f978c5938c..0caba80bb213e0edfb1f834250f895ccc05d0d1c 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -24,7 +24,7 @@ const {
|
||||
@@ -72,7 +72,7 @@ index 23ed971daebdda3cb627907ffa3626daaa5b5b7b..0f138b1099b4833176e8a0ce681c7454
|
||||
const { dirname, extname, isAbsolute } = require('path');
|
||||
const {
|
||||
assertBufferSource,
|
||||
@@ -269,7 +269,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) {
|
||||
@@ -268,7 +268,7 @@ translators.set('commonjs', function commonjsStrategy(url, source, isMain) {
|
||||
|
||||
try {
|
||||
// We still need to read the FS to detect the exports.
|
||||
@@ -81,7 +81,7 @@ index 23ed971daebdda3cb627907ffa3626daaa5b5b7b..0f138b1099b4833176e8a0ce681c7454
|
||||
} catch {
|
||||
// Continue regardless of error.
|
||||
}
|
||||
@@ -336,7 +336,7 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
@@ -335,7 +335,7 @@ function cjsPreparseModuleExports(filename, source) {
|
||||
isAbsolute(resolved)) {
|
||||
// TODO: this should be calling the `load` hook chain to get the source
|
||||
// (and fallback to reading the FS only if the source is nullish).
|
||||
|
||||
@@ -45,7 +45,7 @@ index 127278ef916161a96e23e645927d16bedfdaca5b..b36da3daa5744e6f994e32d9d82aaef6
|
||||
# define UV__EUNATCH UV__ERR(EUNATCH)
|
||||
#else
|
||||
diff --git a/src/node_constants.cc b/src/node_constants.cc
|
||||
index 149c7c107322919dfeea1dfe89dc223f78b0e979..e4e8dac6b8b5924a7eae83935031e09142554747 100644
|
||||
index 13263149c111beede83b7063fa54f56655aea54c..99068098e1867af4846e18a5d039a25689722a4a 100644
|
||||
--- a/src/node_constants.cc
|
||||
+++ b/src/node_constants.cc
|
||||
@@ -241,10 +241,6 @@ void DefineErrnoConstants(Local<Object> target) {
|
||||
@@ -86,10 +86,10 @@ index 149c7c107322919dfeea1dfe89dc223f78b0e979..e4e8dac6b8b5924a7eae83935031e091
|
||||
NODE_DEFINE_CONSTANT(target, ETIMEDOUT);
|
||||
#endif
|
||||
diff --git a/src/node_errors.cc b/src/node_errors.cc
|
||||
index 65f95c3157add2afca26a133183b65ccba6e9924..81091d364d32094dc91c7abb0c5fe9963d100a8b 100644
|
||||
index 609601328f7f5ff5f121151e81c2df82e7ef4253..6b9b944c11af917fe4e296961e6ed7df7b89a123 100644
|
||||
--- a/src/node_errors.cc
|
||||
+++ b/src/node_errors.cc
|
||||
@@ -857,10 +857,6 @@ const char* errno_string(int errorno) {
|
||||
@@ -862,10 +862,6 @@ const char* errno_string(int errorno) {
|
||||
ERRNO_CASE(ENOBUFS);
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ index 65f95c3157add2afca26a133183b65ccba6e9924..81091d364d32094dc91c7abb0c5fe996
|
||||
#ifdef ENODEV
|
||||
ERRNO_CASE(ENODEV);
|
||||
#endif
|
||||
@@ -899,14 +895,6 @@ const char* errno_string(int errorno) {
|
||||
@@ -904,14 +900,6 @@ const char* errno_string(int errorno) {
|
||||
ERRNO_CASE(ENOSPC);
|
||||
#endif
|
||||
|
||||
@@ -115,7 +115,7 @@ index 65f95c3157add2afca26a133183b65ccba6e9924..81091d364d32094dc91c7abb0c5fe996
|
||||
#ifdef ENOSYS
|
||||
ERRNO_CASE(ENOSYS);
|
||||
#endif
|
||||
@@ -989,10 +977,6 @@ const char* errno_string(int errorno) {
|
||||
@@ -994,10 +982,6 @@ const char* errno_string(int errorno) {
|
||||
ERRNO_CASE(ESTALE);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ index 8d49a119c218323674e29a522ecf71bd22cdaf1b..d39693f2f45f39e45960453112b0f646
|
||||
// This class manages the external references from the V8 heap
|
||||
// to the C++ addresses in Node.js.
|
||||
diff --git a/src/util.h b/src/util.h
|
||||
index b1f316eebc7199a3737f05a5f9a1dd7fc289490c..23a0a486244ce38277ef11df5806da1266b901ac 100644
|
||||
index 0d4676ddade8d91d101b6aeb8763886a234f0bae..7af9ed01a919927ae3897d4989206ec23cfe50d3 100644
|
||||
--- a/src/util.h
|
||||
+++ b/src/util.h
|
||||
@@ -59,6 +59,7 @@
|
||||
@@ -257,7 +257,7 @@ index b1f316eebc7199a3737f05a5f9a1dd7fc289490c..23a0a486244ce38277ef11df5806da12
|
||||
|
||||
#ifdef _WIN32
|
||||
/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */
|
||||
@@ -576,6 +577,16 @@ class BufferValue : public MaybeStackBuffer<char> {
|
||||
@@ -579,6 +580,16 @@ class BufferValue : public MaybeStackBuffer<char> {
|
||||
static_cast<char*>(name->Buffer()->Data()) + name##_offset; \
|
||||
if (name##_length > 0) CHECK_NE(name##_data, nullptr);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ to recognize asar files.
|
||||
This reverts commit 9cf2e1f55b8446a7cde23699d00a3be73aa0c8f1.
|
||||
|
||||
diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js
|
||||
index f2fbb576da23fc0a48b0c979a263aa2dbe3600eb..97d3b4e9bd9303e1271bb62b1c9851da1100e019 100644
|
||||
index 2879e5cf541fb4d226cfd7cc0fe367ca448fb926..8bd68839878427d58d4c61e19c8ec339df4911cd 100644
|
||||
--- a/lib/internal/modules/esm/resolve.js
|
||||
+++ b/lib/internal/modules/esm/resolve.js
|
||||
@@ -28,14 +28,13 @@ const { BuiltinModule } = require('internal/bootstrap/realm');
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: Pass all globals through "require"
|
||||
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
|
||||
|
||||
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
|
||||
index 236b2484049c43ee9d6b9c728561b80813b12982..ccd038dc136480cdd84a13e58f4012b71cd40928 100644
|
||||
index 62c33730ed17cb98b6dd8d69b61360a419518ba5..9b5772fe9b8babbb892c7a5ec79258472da55a76 100644
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -182,6 +182,13 @@ const {
|
||||
@@ -185,6 +185,13 @@ const {
|
||||
CHAR_FORWARD_SLASH,
|
||||
} = require('internal/constants');
|
||||
|
||||
@@ -23,7 +23,7 @@ index 236b2484049c43ee9d6b9c728561b80813b12982..ccd038dc136480cdd84a13e58f4012b7
|
||||
const {
|
||||
isProxy,
|
||||
} = require('internal/util/types');
|
||||
@@ -1557,10 +1564,12 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
@@ -1549,10 +1556,12 @@ Module.prototype._compile = function(content, filename, format) {
|
||||
if (this[kIsMainSymbol] && getOptionValue('--inspect-brk')) {
|
||||
const { callAndPauseOnStart } = internalBinding('inspector');
|
||||
result = callAndPauseOnStart(compiledWrapper, thisValue, exports,
|
||||
|
||||
@@ -7,7 +7,7 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were
|
||||
a real filesystem.
|
||||
|
||||
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
|
||||
index 11d585bc5b3e47b36877ca8306b72f571acb7d09..65d42428c70a3242f7076f1c1a4cec027a9c9829 100644
|
||||
index f5c0208864084a234a05898e793845681b6e80cc..48d809f61eaf09097acb3e996e956e39cf7b4ef3 100644
|
||||
--- a/lib/internal/bootstrap/node.js
|
||||
+++ b/lib/internal/bootstrap/node.js
|
||||
@@ -134,6 +134,10 @@ process.domain = null;
|
||||
|
||||
@@ -33,7 +33,7 @@ Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
|
||||
Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
|
||||
diff --git a/src/node_process_object.cc b/src/node_process_object.cc
|
||||
index a13f8d15724cb00fe0e9d722395bd9b9514a3943..3f8a4fbd1a65971645e6785e469bc887a1afbad1 100644
|
||||
index 7dd24545fee674b25503b0fcff9b9af0d5c6a26a..5de8be7f8ed97e6b110e397fc4cacb9a246892b6 100644
|
||||
--- a/src/node_process_object.cc
|
||||
+++ b/src/node_process_object.cc
|
||||
@@ -13,7 +13,6 @@
|
||||
@@ -44,7 +44,7 @@ index a13f8d15724cb00fe0e9d722395bd9b9514a3943..3f8a4fbd1a65971645e6785e469bc887
|
||||
using v8::EscapableHandleScope;
|
||||
using v8::Function;
|
||||
using v8::FunctionCallbackInfo;
|
||||
@@ -188,13 +187,12 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -186,13 +185,12 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
// process.title
|
||||
CHECK(process
|
||||
@@ -59,7 +59,7 @@ index a13f8d15724cb00fe0e9d722395bd9b9514a3943..3f8a4fbd1a65971645e6785e469bc887
|
||||
None,
|
||||
SideEffectType::kHasNoSideEffect)
|
||||
.FromJust());
|
||||
@@ -213,9 +211,15 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -211,9 +209,15 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
READONLY_PROPERTY(process, "pid",
|
||||
Integer::New(isolate, uv_os_getpid()));
|
||||
|
||||
@@ -78,7 +78,7 @@ index a13f8d15724cb00fe0e9d722395bd9b9514a3943..3f8a4fbd1a65971645e6785e469bc887
|
||||
|
||||
// --security-revert flags
|
||||
#define V(code, _, __) \
|
||||
@@ -240,12 +244,15 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -238,12 +242,15 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
// process.debugPort
|
||||
CHECK(process
|
||||
|
||||
@@ -16,7 +16,7 @@ patch:
|
||||
(cherry picked from commit 30329d06235a9f9733b1d4da479b403462d1b326)
|
||||
|
||||
diff --git a/src/env-inl.h b/src/env-inl.h
|
||||
index c460018af954e6333cd937059ae5dc81f179d8ca..d266eca6fc3300e657383feb4bb7a7194da79275 100644
|
||||
index 49c3513ee9b67b407a2bb6609ac89a5959a78cd1..9a8216354e646e86d692b25c2bed5134e267528c 100644
|
||||
--- a/src/env-inl.h
|
||||
+++ b/src/env-inl.h
|
||||
@@ -62,31 +62,6 @@ inline uv_loop_t* IsolateData::event_loop() const {
|
||||
@@ -52,7 +52,7 @@ index c460018af954e6333cd937059ae5dc81f179d8ca..d266eca6fc3300e657383feb4bb7a719
|
||||
return &(wrapper_data_->cppgc_id);
|
||||
}
|
||||
diff --git a/src/env.cc b/src/env.cc
|
||||
index adb6cc1c2f1c0100b64e688d13e5ca81b1ae2775..579a15f0e1fdd97184ec81873dbc4547e747ec1d 100644
|
||||
index b428c922ed218cbdf19cdba50d18b1f81a56b8ca..1c1062a3996f2bb7de9e91f7f4385c8f8d20f490 100644
|
||||
--- a/src/env.cc
|
||||
+++ b/src/env.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
@@ -71,7 +71,7 @@ index adb6cc1c2f1c0100b64e688d13e5ca81b1ae2775..579a15f0e1fdd97184ec81873dbc4547
|
||||
using worker::Worker;
|
||||
|
||||
int const ContextEmbedderTag::kNodeContextTag = 0x6e6f64;
|
||||
@@ -531,6 +531,14 @@ void IsolateData::CreateProperties() {
|
||||
@@ -527,6 +527,14 @@ void IsolateData::CreateProperties() {
|
||||
CreateEnvProxyTemplate(this);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ index adb6cc1c2f1c0100b64e688d13e5ca81b1ae2775..579a15f0e1fdd97184ec81873dbc4547
|
||||
constexpr uint16_t kDefaultCppGCEmbedderID = 0x90de;
|
||||
Mutex IsolateData::isolate_data_mutex_;
|
||||
std::unordered_map<uint16_t, std::unique_ptr<PerIsolateWrapperData>>
|
||||
@@ -568,36 +576,16 @@ IsolateData::IsolateData(Isolate* isolate,
|
||||
@@ -564,36 +572,16 @@ IsolateData::IsolateData(Isolate* isolate,
|
||||
v8::CppHeap* cpp_heap = isolate->GetCppHeap();
|
||||
|
||||
uint16_t cppgc_id = kDefaultCppGCEmbedderID;
|
||||
@@ -130,7 +130,7 @@ index adb6cc1c2f1c0100b64e688d13e5ca81b1ae2775..579a15f0e1fdd97184ec81873dbc4547
|
||||
|
||||
{
|
||||
// GC could still be run after the IsolateData is destroyed, so we store
|
||||
@@ -629,11 +617,12 @@ IsolateData::~IsolateData() {
|
||||
@@ -625,11 +613,12 @@ IsolateData::~IsolateData() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ index adb6cc1c2f1c0100b64e688d13e5ca81b1ae2775..579a15f0e1fdd97184ec81873dbc4547
|
||||
|
||||
void IsolateData::MemoryInfo(MemoryTracker* tracker) const {
|
||||
diff --git a/src/env.h b/src/env.h
|
||||
index 0a3f09ebc7e2e7c1f8b9499d4439e2ca90b86810..d6f412cb13460f97f9444af397c8025c7a8bd290 100644
|
||||
index aed066852d7c257076cc7ca8b173fd2a3a353a00..1f8dc8f88d40ca95ba13d6517b2b5ed83184e1ce 100644
|
||||
--- a/src/env.h
|
||||
+++ b/src/env.h
|
||||
@@ -175,10 +175,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user