mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
3 Commits
v35.0.0-ni
...
robo/add_w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3534815b0 | ||
|
|
8a394e16a4 | ||
|
|
e5a6036ce0 |
3
.github/actions/checkout/action.yml
vendored
3
.github/actions/checkout/action.yml
vendored
@@ -139,7 +139,10 @@ runs:
|
||||
run: |
|
||||
rm -rf src/android_webview
|
||||
rm -rf src/ios/chrome
|
||||
mv src/third_party/blink/web_tests/external/wpt ./wpt
|
||||
rm -rf src/third_party/blink/web_tests
|
||||
mkdir -p src/third_party/blink/web_tests/external
|
||||
mv ./wpt src/third_party/blink/web_tests/external/wpt
|
||||
rm -rf src/third_party/blink/perf_tests
|
||||
rm -rf src/chrome/test/data/xr/webvr_info
|
||||
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
||||
|
||||
2
.github/workflows/issue-opened.yml
vendored
2
.github/workflows/issue-opened.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
||||
// for now check for comma or space separated version.
|
||||
const versions = electronVersion.split(/, | /);
|
||||
for (const version of versions) {
|
||||
const major = semver.coerce(version, { loose: true })?.major;
|
||||
const major = semver.parse(version)?.major;
|
||||
if (major) {
|
||||
const versionLabel = `${major}-x-y`;
|
||||
let labelExists = false;
|
||||
|
||||
@@ -161,3 +161,53 @@ jobs:
|
||||
do
|
||||
sleep 60
|
||||
done
|
||||
wpt-tests:
|
||||
name: Run WPT Tests
|
||||
runs-on: electron-arc-linux-amd64-4core
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||
BUILD_TYPE: linux
|
||||
container: ${{ fromJSON(inputs.test-container) }}
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn install --frozen-lockfile
|
||||
- name: Download Generated Artifacts
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||
with:
|
||||
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||
- name: Download Src Artifacts
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||
with:
|
||||
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||
- name: Restore Generated Artifacts
|
||||
run: ./src/electron/script/actions/restore-artifacts.sh
|
||||
- name: Unzip Dist
|
||||
run: |
|
||||
cd src/out/Default
|
||||
unzip -:o dist.zip
|
||||
- name: Setup Linux for Headless Testing
|
||||
run: sh -e /etc/init.d/xvfb start
|
||||
- name: Run WPT Tests
|
||||
run: |
|
||||
cd src
|
||||
chown :builduser . && chmod g+w .
|
||||
chown -R :builduser ./electron && chmod -R g+w ./electron
|
||||
chmod 4755 ./out/Default/chrome-sandbox
|
||||
runuser -u builduser -- xvfb-run electron/script/actions/run-tests.sh electron/script/wpt-spec-runner.js
|
||||
- name: Wait for active SSH sessions
|
||||
if: always() && !cancelled()
|
||||
run: |
|
||||
while [ -f /var/.ssh-lock ]
|
||||
do
|
||||
sleep 60
|
||||
done
|
||||
|
||||
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
|
||||
uses: github/codeql-action/upload-sarif@ea9e4e37992a54ee68a9622e985e60c8e8f12d9f # v3.27.4
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
5
BUILD.gn
5
BUILD.gn
@@ -84,10 +84,7 @@ if (is_linux) {
|
||||
# from the gtk library. Function signatures for which stubs are
|
||||
# required should be declared in the sig files.
|
||||
generate_stubs("electron_gtk_stubs") {
|
||||
sigs = [
|
||||
"shell/browser/ui/electron_gdk.sigs",
|
||||
"shell/browser/ui/electron_gdk_pixbuf.sigs",
|
||||
]
|
||||
sigs = [ "shell/browser/ui/electron_gdk_pixbuf.sigs" ]
|
||||
extra_header = "shell/browser/ui/electron_gtk.fragment"
|
||||
output_name = "electron_gtk_stubs"
|
||||
public_deps = [ "//ui/gtk:gtk_config" ]
|
||||
|
||||
@@ -12,7 +12,7 @@ propose changes to this document in a pull request.
|
||||
|
||||
## [Issues](https://electronjs.org/docs/development/issues)
|
||||
|
||||
Issues are created [here](https://github.com/electron/electron/issues/new/choose).
|
||||
Issues are created [here](https://github.com/electron/electron/issues/new).
|
||||
|
||||
* [How to Contribute in Issues](https://electronjs.org/docs/development/issues#how-to-contribute-in-issues)
|
||||
* [Asking for General Help](https://electronjs.org/docs/development/issues#asking-for-general-help)
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'133.0.6852.0',
|
||||
'133.0.6846.0',
|
||||
'node_version':
|
||||
'v22.9.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-133.0.6852.0
|
||||
image: e-132.0.6834.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-133.0.6852.0
|
||||
image: e-132.0.6834.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -160,12 +160,14 @@ static_library("chrome") {
|
||||
"//chrome/browser/icon_loader_win.cc",
|
||||
"//chrome/browser/media/webrtc/window_icon_util_win.cc",
|
||||
"//chrome/browser/process_singleton_win.cc",
|
||||
"//chrome/browser/ui/frame/window_frame_util.h",
|
||||
"//chrome/browser/win/chrome_process_finder.cc",
|
||||
"//chrome/browser/win/chrome_process_finder.h",
|
||||
"//chrome/browser/win/chrome_select_file_dialog_factory.cc",
|
||||
"//chrome/browser/win/chrome_select_file_dialog_factory.h",
|
||||
"//chrome/browser/win/titlebar_config.cc",
|
||||
"//chrome/browser/win/titlebar_config.h",
|
||||
"//chrome/browser/win/titlebar_config.h",
|
||||
"//chrome/browser/win/util_win_service.cc",
|
||||
"//chrome/browser/win/util_win_service.h",
|
||||
"//chrome/child/v8_crashpad_support_win.cc",
|
||||
@@ -219,11 +221,7 @@ static_library("chrome") {
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
sources += [
|
||||
"//chrome/browser/extensions/global_shortcut_listener_linux.cc",
|
||||
"//chrome/browser/extensions/global_shortcut_listener_linux.h",
|
||||
"//chrome/browser/icon_loader_auralinux.cc",
|
||||
]
|
||||
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
|
||||
if (use_ozone) {
|
||||
deps += [ "//ui/ozone" ]
|
||||
sources += [
|
||||
|
||||
@@ -514,20 +514,20 @@ and `will-quit` events will not be emitted.
|
||||
* `args` string[] (optional)
|
||||
* `execPath` string (optional)
|
||||
|
||||
Relaunches the app when the current instance exits.
|
||||
Relaunches the app when current instance exits.
|
||||
|
||||
By default, the new instance will use the same working directory and command line
|
||||
arguments as the current instance. When `args` is specified, the `args` will be
|
||||
passed as the command line arguments instead. When `execPath` is specified, the
|
||||
`execPath` will be executed for the relaunch instead of the current app.
|
||||
arguments with current instance. When `args` is specified, the `args` will be
|
||||
passed as command line arguments instead. When `execPath` is specified, the
|
||||
`execPath` will be executed for relaunch instead of current app.
|
||||
|
||||
Note that this method does not quit the app when executed. You have to call
|
||||
Note that this method does not quit the app when executed, you have to call
|
||||
`app.quit` or `app.exit` after calling `app.relaunch` to make the app restart.
|
||||
|
||||
When `app.relaunch` is called multiple times, multiple instances will be
|
||||
started after the current instance exits.
|
||||
When `app.relaunch` is called for multiple times, multiple instances will be
|
||||
started after current instance exited.
|
||||
|
||||
An example of restarting the current instance immediately and adding a new command
|
||||
An example of restarting current instance immediately and adding a new command
|
||||
line argument to the new instance:
|
||||
|
||||
```js
|
||||
|
||||
@@ -68,7 +68,7 @@ Emitted when there is an error while updating.
|
||||
|
||||
### Event: 'checking-for-update'
|
||||
|
||||
Emitted when checking for an available update has started.
|
||||
Emitted when checking if an update has started.
|
||||
|
||||
### Event: 'update-available'
|
||||
|
||||
|
||||
@@ -144,24 +144,10 @@ _**Note**: There is a subtle difference between the behaviors of `window.onbefor
|
||||
Emitted when the window is closed. After you have received this event you should
|
||||
remove the reference to the window and avoid using it any more.
|
||||
|
||||
#### Event: 'query-session-end' _Windows_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` [WindowSessionEndEvent][window-session-end-event]
|
||||
|
||||
Emitted when a session is about to end due to a shutdown, machine restart, or user log-off.
|
||||
Calling `event.preventDefault()` can delay the system shutdown, though it’s generally best
|
||||
to respect the user’s choice to end the session. However, you may choose to use it if
|
||||
ending the session puts the user at risk of losing data.
|
||||
|
||||
#### Event: 'session-end' _Windows_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` [WindowSessionEndEvent][window-session-end-event]
|
||||
|
||||
Emitted when a session is about to end due to a shutdown, machine restart, or user log-off. Once this event fires, there is no way to prevent the session from ending.
|
||||
Emitted when window session is going to end due to force shutdown or machine restart
|
||||
or session log off.
|
||||
|
||||
#### Event: 'blur'
|
||||
|
||||
@@ -1443,4 +1429,3 @@ On Linux, the `symbolColor` is automatically calculated to have minimum accessib
|
||||
[vibrancy-docs]: https://developer.apple.com/documentation/appkit/nsvisualeffectview?preferredLanguage=objc
|
||||
[window-levels]: https://developer.apple.com/documentation/appkit/nswindow/level
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[window-session-end-event]:../api/structures/window-session-end-event.md
|
||||
|
||||
@@ -207,24 +207,10 @@ _**Note**: There is a subtle difference between the behaviors of `window.onbefor
|
||||
Emitted when the window is closed. After you have received this event you should
|
||||
remove the reference to the window and avoid using it any more.
|
||||
|
||||
#### Event: 'query-session-end' _Windows_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` [WindowSessionEndEvent][window-session-end-event]
|
||||
|
||||
Emitted when a session is about to end due to a shutdown, machine restart, or user log-off.
|
||||
Calling `event.preventDefault()` can delay the system shutdown, though it’s generally best
|
||||
to respect the user’s choice to end the session. However, you may choose to use it if
|
||||
ending the session puts the user at risk of losing data.
|
||||
|
||||
#### Event: 'session-end' _Windows_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` [WindowSessionEndEvent][window-session-end-event]
|
||||
|
||||
Emitted when a session is about to end due to a shutdown, machine restart, or user log-off. Once this event fires, there is no way to prevent the session from ending.
|
||||
Emitted when window session is going to end due to force shutdown or machine restart
|
||||
or session log off.
|
||||
|
||||
#### Event: 'unresponsive'
|
||||
|
||||
@@ -1686,4 +1672,3 @@ On Linux, the `symbolColor` is automatically calculated to have minimum accessib
|
||||
[vibrancy-docs]: https://developer.apple.com/documentation/appkit/nsvisualeffectview?preferredLanguage=objc
|
||||
[window-levels]: https://developer.apple.com/documentation/appkit/nswindow/level
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[window-session-end-event]:../api/structures/window-session-end-event.md
|
||||
|
||||
@@ -1509,11 +1509,9 @@ session is persisted on disk. For in memory sessions this returns `null`.
|
||||
#### `ses.clearData([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data. This
|
||||
can potentially include data types not explicitly listed here. (See Chromium's
|
||||
[`BrowsingDataRemover`][browsing-data-remover] for the full list.)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data.
|
||||
* `backgroundFetch` - Background Fetch
|
||||
* `cache` - Cache (includes `cachestorage` and `shadercache`)
|
||||
* `cache` - Cache
|
||||
* `cookies` - Cookies
|
||||
* `downloads` - Downloads
|
||||
* `fileSystems` - File Systems
|
||||
@@ -1537,7 +1535,7 @@ This method clears more types of data and is more thorough than the
|
||||
|
||||
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.
|
||||
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface][browsing-data-remover].
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h).
|
||||
|
||||
### Instance Properties
|
||||
|
||||
@@ -1603,5 +1601,3 @@ app.whenReady().then(async () => {
|
||||
console.log('Net-logs written to', path)
|
||||
})
|
||||
```
|
||||
|
||||
[browsing-data-remover]: https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# WindowSessionEndEvent Object extends `Event`
|
||||
|
||||
* `reasons` string[] - List of reasons for shutdown. Can be 'shutdown', 'close-app', 'critical', or 'logoff'.
|
||||
|
||||
Unfortunately, Windows does not offer a way to differentiate between a shutdown and a reboot, meaning the 'shutdown'
|
||||
reason is triggered in both scenarios. For more details on the `WM_ENDSESSION` message and its associated reasons,
|
||||
refer to the [MSDN documentation](https://learn.microsoft.com/en-us/windows/win32/shutdown/wm-endsession).
|
||||
@@ -37,10 +37,7 @@ Process: [Main](../glossary.md#main-process)<br />
|
||||
to load unsigned libraries. Unless you specifically need this capability, it is best to leave this disabled.
|
||||
Default is `false`.
|
||||
* `respondToAuthRequestsFromMainProcess` boolean (optional) - With this flag, all HTTP 401 and 407 network
|
||||
requests created via the [net module](net.md) will allow responding to them via the
|
||||
[`app#login`](app.md#event-login) event in the main process instead of the default
|
||||
[`login`](client-request.md#event-login) event on the [`ClientRequest`](client-request.md) object. Default is
|
||||
`false`.
|
||||
requests created via the [net module](net.md) will allow responding to them via the [`app#login`](app.md#event-login) event in the main process instead of the default [`login`](client-request.md#event-login) event on the [`ClientRequest`](client-request.md) object.
|
||||
|
||||
Returns [`UtilityProcess`](utility-process.md#class-utilityprocess)
|
||||
|
||||
|
||||
@@ -142,29 +142,6 @@ ipcRenderer.on('port', (e, msg) => {
|
||||
})
|
||||
```
|
||||
|
||||
#### `frame.collectJavaScriptCallStack()` _Experimental_
|
||||
|
||||
Returns `Promise<string> | Promise<void>` - A promise that resolves with the currently running JavaScript call
|
||||
stack. If no JavaScript runs in the frame, the promise will never resolve. In cases where the call stack is
|
||||
otherwise unable to be collected, it will return `undefined`.
|
||||
|
||||
This can be useful to determine why the frame is unresponsive in cases where there's long-running JavaScript.
|
||||
For more information, see the [proposed Crash Reporting API.](https://wicg.github.io/crash-reporting/)
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
|
||||
app.commandLine.appendSwitch('enable-features', 'DocumentPolicyIncludeJSCallStacksInCrashReports')
|
||||
|
||||
app.on('web-contents-created', (_, webContents) => {
|
||||
webContents.on('unresponsive', async () => {
|
||||
// Interrupt execution and collect call stack from unresponsive renderer
|
||||
const callStack = await webContents.mainFrame.collectJavaScriptCallStack()
|
||||
console.log('Renderer unresponsive\n', callStack)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
### Instance Properties
|
||||
|
||||
#### `frame.ipc` _Readonly_
|
||||
|
||||
@@ -128,14 +128,14 @@ The nonstandard `path` property of the Web `File` object was added in an early v
|
||||
```js
|
||||
// Before (renderer)
|
||||
|
||||
const file = document.querySelector('input[type=file]').files[0]
|
||||
const file = document.querySelector('input[type=file]')
|
||||
alert(`Uploaded file path was: ${file.path}`)
|
||||
```
|
||||
|
||||
```js
|
||||
// After (renderer)
|
||||
|
||||
const file = document.querySelector('input[type=file]').files[0]
|
||||
const file = document.querySelector('input[type=file]')
|
||||
electron.showFilePath(file)
|
||||
|
||||
// (preload)
|
||||
|
||||
@@ -13,7 +13,8 @@ security warnings.
|
||||
|
||||
Both Windows and macOS prevent users from running unsigned applications. It is
|
||||
possible to distribute applications without codesigning them - but in order to
|
||||
run them, users need to go through multiple advanced and manual steps.
|
||||
run them, users need to go through multiple advanced and manual steps to run
|
||||
them.
|
||||
|
||||
If you are building an Electron app that you intend to package and distribute,
|
||||
it should be code signed. The Electron ecosystem tooling makes codesigning your
|
||||
|
||||
@@ -9,10 +9,10 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | TBD | ✅ |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2024-Jan-07 | 2025-Jun-24 | M132 | TBD | ✅ |
|
||||
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | ✅ |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | ✅ |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-14 | M126 | v20.14 | ✅ |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-07 | M126 | v20.14 | ✅ |
|
||||
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.11 | 🚫 |
|
||||
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | 🚫 |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | 🚫 |
|
||||
|
||||
@@ -151,7 +151,6 @@ auto_filenames = {
|
||||
"docs/api/structures/web-request-filter.md",
|
||||
"docs/api/structures/web-source.md",
|
||||
"docs/api/structures/window-open-handler-response.md",
|
||||
"docs/api/structures/window-session-end-event.md",
|
||||
]
|
||||
|
||||
sandbox_bundle_deps = [
|
||||
|
||||
@@ -135,4 +135,3 @@ chore_partial_revert_of.patch
|
||||
fix_software_compositing_infinite_loop.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
build_disable_thin_lto_mac.patch
|
||||
support_bstr_pkey_appusermodel_id_in_windows_shortcuts.patch
|
||||
|
||||
@@ -23,7 +23,7 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index b5c6a366f6add4aeb5f4368c87dceb57686b5450..223bd96eaa6127b531da2ee2da42a34e05e38897 100644
|
||||
index 7d40a2d2db8082278832ff1b799a8653c105866e..a614112af549120e95cc8ea2f8b54c2d91cb4e28 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4793,6 +4793,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
|
||||
@@ -15,10 +15,10 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 7e564e9970ef5abf51a212130a8cfb3ec590c5ff..af48a64ae405ffe7d89c8bc074f614efde360b3a 100644
|
||||
index 2f33ec660a975522c473ecd50e633b5edaca707f..65221a51927d9f44bd6adbad88fa1144f2db3add 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
|
||||
DCHECK(!IsDetached());
|
||||
|
||||
@@ -33,7 +33,7 @@ index 7e564e9970ef5abf51a212130a8cfb3ec590c5ff..af48a64ae405ffe7d89c8bc074f614ef
|
||||
if (type == FrameDetachType::kRemove) {
|
||||
if (provisional_frame_) {
|
||||
provisional_frame_->Detach(FrameDetachType::kRemove);
|
||||
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -166,6 +158,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
GetWindowProxyManager()->ClearForSwap();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ This patch can (and should) be removed when we can prevent those symbols
|
||||
from being stripped in the release build.
|
||||
|
||||
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
|
||||
index 5b98b4aedab5b700d21d6a8eac11c81cc13f6b39..8ee6f54f67c300a52074f33f9d6fe08a68e3be4b 100644
|
||||
index c2cda80929d15c926c61225bdf5e0343bd5fd3b3..f792ec19a0692af0298064dd0439dc76d65ed893 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -79,7 +79,7 @@ declare_args() {
|
||||
@@ -82,7 +82,7 @@ declare_args() {
|
||||
# have the same LLVM revisions as us, making bitcode useless to them.
|
||||
use_thin_lto =
|
||||
is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
|
||||
|
||||
@@ -33,10 +33,10 @@ index 4a0c2d74f6ce439f562115ee382ea72b1ce6670b..a6562fd7ce1fb11458dfdc21abee462d
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index e2f5b44c7a44cce3f118fb773e7a7eefc08c9753..52fde8d99b53bf9159afca7f01a13f84013dc6e4 100644
|
||||
index 72aee16421957a0db9fcc5f5e9dd22bbcf623e72..3c6fa910ceadf5f704a72e5fa2bc7cc26b8ceffd 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4518,7 +4518,7 @@ static_library("browser") {
|
||||
@@ -4515,7 +4515,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index e2f5b44c7a44cce3f118fb773e7a7eefc08c9753..52fde8d99b53bf9159afca7f01a13f84
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 8cb7896b779932bb773870fe6693c614ae0c6a3e..cc0c37e7e9578787b3a4140449a463c3a9d950f6 100644
|
||||
index bfa1195a062597fff605155440dca91d20f11092..56f1a67ee991bfe0104cc1b7400bb7c8c4f5666d 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6876,9 +6876,12 @@ test("unit_tests") {
|
||||
@@ -6847,9 +6847,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index 8cb7896b779932bb773870fe6693c614ae0c6a3e..cc0c37e7e9578787b3a4140449a463c3
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -7813,6 +7816,10 @@ test("unit_tests") {
|
||||
@@ -7787,6 +7790,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index 8cb7896b779932bb773870fe6693c614ae0c6a3e..cc0c37e7e9578787b3a4140449a463c3
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -7865,7 +7872,6 @@ test("unit_tests") {
|
||||
@@ -7839,7 +7846,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
|
||||
everywhere, without having to import("//electron/.../flags.gni").
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index c01896919e5a4549bd5e1d2d8d54f69fcb2b8aa6..3c032756188714f68828060e693e5db96a4b5bba 100644
|
||||
index 8e0c3761f1634312dad5fe16a01653e5e80935f5..04038e0d1a0b4b5823a93762d93379bb9ab4adfc 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -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 f2cfa75ab9911ef640c3cf0a45b95ccc20ddb1d4..e494df87e6038a697b835e054b3320805730ff8a 100644
|
||||
index b22f297cfec19d2afc029c2c63c8451335c6156f..bf6e476bb9fbf7e5fc68bafc7703d00ecaeb4fa3 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9169,6 +9169,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9176,6 +9176,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 f2cfa75ab9911ef640c3cf0a45b95ccc20ddb1d4..e494df87e6038a697b835e054b332080
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 5e79c55732343ce97b0bc682389706f1e1f1c2e4..9c8aad2abea4b41dcb1c341f053e962e235d8d62 100644
|
||||
index 45cc80c684f5e6a721a6e015857f8e01e0497079..bdc268c2d378d65c4ddf2b9c4b0dae8b94f9521c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4911,6 +4911,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4890,6 +4890,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
|
||||
opener);
|
||||
|
||||
@@ -37,7 +37,7 @@ index 5e79c55732343ce97b0bc682389706f1e1f1c2e4..9c8aad2abea4b41dcb1c341f053e962e
|
||||
// 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
|
||||
@@ -4952,12 +4958,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4931,12 +4937,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -148,10 +148,10 @@ index c0be779a4c1d89426c30261aff72ea55be900087..7413c1bef86f5e4633db7220c5de4de7
|
||||
// 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 7cef17c62feec23ec33f11210919f859d73e60f1..b5c6a366f6add4aeb5f4368c87dceb57686b5450 100644
|
||||
index 60076b652253b30919467eb0f45e7775902d8dbb..7d40a2d2db8082278832ff1b799a8653c105866e 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6848,6 +6848,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6850,6 +6850,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -163,7 +163,7 @@ index 7cef17c62feec23ec33f11210919f859d73e60f1..b5c6a366f6add4aeb5f4368c87dceb57
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index 34cc88abebd1b686de6e74ab63cba3e7d10656e4..cf02c6fdd567175be31615a8176e2abd9f52adb7 100644
|
||||
index 7ee41873389eaa03331460bdc3195f53fe943816..b4eb16ccd451d181a34de9b65e8fa9ed035c1f21 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -524,6 +524,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -210,10 +210,10 @@ index c576ace24e81cc877aa2595d40e0a13a7af9f6a2..210fb97d44c19c29af424cc7b9cb3169
|
||||
|
||||
} // 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 d0c31388d403b99874bed968a1fca3b199e3c333..a7d38e72e6704998a886afe9abc1620c0032eabc 100644
|
||||
index 00a4ed4f0625981e3bef338399957419d2cffdf0..d0db7f8727dc2fbe0a9ae0489a6aa4e278e1cb34 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2235,6 +2235,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2234,6 +2234,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -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 2414e4c4dfadbe83e61968e8f7873b425ba99f4f..81305f3fe427b7d27d78e49de57390708753901c 100644
|
||||
index 3ed29244ad407c3fd41879dbf2f7a8554a05236c..c210645cd2a6f2314d648112b50fe02050f7320f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4837,9 +4837,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4816,9 +4816,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
bool renderer_started_hidden =
|
||||
params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB;
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index d4933a8ef8cb4113195669f65b9e5fde25d613b8..989f495aec48613e48e7a419cec828cf277a67d2 100644
|
||||
index 062921424cc68780749ce79b29e538a3a952162e..d427e011b996997dff46dc92e8ba19f9f33df0a5 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -211,7 +211,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
@@ -210,7 +210,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
BrowserContext* browser_context,
|
||||
const StoragePartitionConfig& partition_config) {
|
||||
DCHECK(browser_context);
|
||||
|
||||
@@ -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 73d0281f14c87ad7893e027b708193c4221350b6..ce3e5c5d8e9f672a76751274ddc6d15b1d6de373 100644
|
||||
index aeb43c34486e5c6e5a6e79487f1964ed3c3aee6f..6da96d1306afb5e6812ca1c9e3b4cafc9c9425bd 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4806,8 +4806,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4785,8 +4785,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -324,10 +324,10 @@ index 8df60108aeaabcb5fa6634e6a5e87d67d6b30e90..88a52eae92eb9b105c41b8d467cc7cd0
|
||||
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 18dfa0ac3f2a11f50818c75e432e4be799c46ea3..8bce8320bf6939bdbc5ea20aeec31b4e34be1538 100644
|
||||
index bd3bb10e2d6b1c78d3e5f8850aa0b51e66bfa489..8884095689c01fdc8cc13c39fa565ee3c5d01c1d 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
|
||||
@@ -435,8 +435,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -425,8 +425,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -338,10 +338,10 @@ index 18dfa0ac3f2a11f50818c75e432e4be799c46ea3..8bce8320bf6939bdbc5ea20aeec31b4e
|
||||
|
||||
return true;
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index 81fc85e5b096fde6d5e5f7eae1299ce7a22a972f..de5a846b39ba754a814fdd8284b7378faed0f83a 100644
|
||||
index 6bc6375433f3ad3f79f5762c15a2a2eb5d26590b..ead1a393dd897ef773d8bcfa089a52ac9d03f855 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -182,8 +182,7 @@ class MimeHandlerViewGuest
|
||||
@@ -181,8 +181,7 @@ class MimeHandlerViewGuest
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -352,10 +352,10 @@ index 81fc85e5b096fde6d5e5f7eae1299ce7a22a972f..de5a846b39ba754a814fdd8284b7378f
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
index 6668c3ec029dcb0d253492780c1cef70ae7f1ab7..80f9b3a55d7456d2f169c416cea4ac28db841ee3 100644
|
||||
index 4b6c999c4a2b907f4c3ec97e50218b67dad36e85..d270631108fa348feaf2fe65d8c1a9895c9355f8 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
@@ -575,8 +575,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -572,8 +572,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -11,20 +11,20 @@ and electron/electron@d2368d2d3b3de9eec4cc32b6aaf035cc89921bf1 as
|
||||
patches.
|
||||
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.cc b/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
||||
index b1c2751f6a6074f8876303a24fb716280cd794bb..37c86f81985a5522399e27d93f9b970b248cb082 100644
|
||||
index 2ac08809148beeb6bacccfc5e9f032c3a88eabe7..025082e5fa644f89cec42fd8a2b97d6f764f375f 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener_ozone.cc
|
||||
@@ -97,7 +97,8 @@ bool GlobalShortcutListenerOzone::RegisterAcceleratorImpl(
|
||||
@@ -58,7 +58,8 @@ bool GlobalShortcutListenerOzone::RegisterAcceleratorImpl(
|
||||
const bool registered =
|
||||
platform_global_shortcut_listener_->RegisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(),
|
||||
- accelerator.IsCtrlDown(), accelerator.IsShiftDown());
|
||||
+ accelerator.IsCtrlDown(), accelerator.IsShiftDown(),
|
||||
+ accelerator.IsCmdDown());
|
||||
if (registered) {
|
||||
if (registered)
|
||||
registered_hot_keys_.insert(accelerator);
|
||||
}
|
||||
@@ -112,14 +113,15 @@ void GlobalShortcutListenerOzone::UnregisterAcceleratorImpl(
|
||||
return registered;
|
||||
@@ -72,14 +73,15 @@ void GlobalShortcutListenerOzone::UnregisterAcceleratorImpl(
|
||||
|
||||
platform_global_shortcut_listener_->UnregisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
|
||||
@@ -40,23 +40,22 @@ index b1c2751f6a6074f8876303a24fb716280cd794bb..37c86f81985a5522399e27d93f9b970b
|
||||
+ bool is_shift_down,
|
||||
+ bool is_cmd_down) {
|
||||
int modifiers = 0;
|
||||
if (is_alt_down) {
|
||||
if (is_alt_down)
|
||||
modifiers |= ui::EF_ALT_DOWN;
|
||||
@@ -130,6 +132,9 @@ void GlobalShortcutListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
if (is_shift_down) {
|
||||
@@ -87,6 +89,8 @@ void GlobalShortcutListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
modifiers |= ui::EF_CONTROL_DOWN;
|
||||
if (is_shift_down)
|
||||
modifiers |= ui::EF_SHIFT_DOWN;
|
||||
}
|
||||
+ if (is_cmd_down) {
|
||||
+ if (is_cmd_down)
|
||||
+ modifiers |= ui::EF_COMMAND_DOWN;
|
||||
+ }
|
||||
|
||||
NotifyKeyPressed(ui::Accelerator(key_code, modifiers));
|
||||
}
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
index 90abe5d0bfa1ca0f541e42cb281b7b6385fc098e..4f3fa5107534cdeff2b416f9c2f833db97912b72 100644
|
||||
index 3c2fc1707e38345c114e140104ffc5a93d704918..40dac9fd7beb7a1a589a479a8035391d4a32cbb8 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener_ozone.h
|
||||
@@ -52,7 +52,8 @@ class GlobalShortcutListenerOzone
|
||||
@@ -46,7 +46,8 @@ class GlobalShortcutListenerOzone
|
||||
void OnKeyPressed(ui::KeyboardCode key_code,
|
||||
bool is_alt_down,
|
||||
bool is_ctrl_down,
|
||||
|
||||
@@ -9,7 +9,7 @@ rate-limiting, compression and global annotations.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
|
||||
index b6a2910848c66489e70acdce6e09237bf6188f94..744cca2d1b8856719b9ae5aed6c443e8752da75e 100644
|
||||
index 2284f329488bb85b155516d31f8618f6dbb495f1..43616a86908f0925c0345fadaa71cb4e0f9e776a 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.cc
|
||||
+++ b/components/crash/core/app/crash_reporter_client.cc
|
||||
@@ -119,6 +119,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
@@ -31,7 +31,7 @@ index b6a2910848c66489e70acdce6e09237bf6188f94..744cca2d1b8856719b9ae5aed6c443e8
|
||||
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
||||
return 100;
|
||||
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
|
||||
index 7c890b331be4aaaf20c7efe8a4bcc2f6e9012b7a..c573524d05c07ec67d35046bc8548cc1dfdd0df3 100644
|
||||
index 5f3b6d61110c1b02bb23a3a647dd51efa3444ed0..f2221953791ad3a6543c68ab32fe1334075b4a59 100644
|
||||
--- a/components/crash/core/app/crash_reporter_client.h
|
||||
+++ b/components/crash/core/app/crash_reporter_client.h
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -42,7 +42,7 @@ index 7c890b331be4aaaf20c7efe8a4bcc2f6e9012b7a..c573524d05c07ec67d35046bc8548cc1
|
||||
#include <string>
|
||||
|
||||
#include "build/build_config.h"
|
||||
@@ -141,6 +142,19 @@ class CrashReporterClient {
|
||||
@@ -132,6 +133,19 @@ class CrashReporterClient {
|
||||
// that case, |breakpad_enabled| is set to the value enforced by policies.
|
||||
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
|
||||
|
||||
@@ -63,7 +63,7 @@ index 7c890b331be4aaaf20c7efe8a4bcc2f6e9012b7a..c573524d05c07ec67d35046bc8548cc1
|
||||
// Used by WebView to sample crashes without generating the unwanted dumps. If
|
||||
// the returned value is less than 100, crash dumping will be sampled to that
|
||||
diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc
|
||||
index aff834c0a93716f769c24bcea7d9f6ed15761040..c29311266678522cfb992cc2b3fa0a0158731a36 100644
|
||||
index be28b8449b75b58bbcadc70a31a429f2aaf858c4..f2f09367d83788016d7e4bc3c9df5dfb44c0189c 100644
|
||||
--- a/components/crash/core/app/crashpad_linux.cc
|
||||
+++ b/components/crash/core/app/crashpad_linux.cc
|
||||
@@ -230,6 +230,7 @@ bool PlatformCrashpadInitialization(
|
||||
|
||||
@@ -50,7 +50,7 @@ index 2ea73bf0f0e16ad01e547bb0ec8082ddd02286c2..1ce0ff532976d5d2ac61d6ae14699d5c
|
||||
blink::TrialTokenValidator::SetOriginTrialPolicyGetter(
|
||||
base::BindRepeating([]() -> blink::OriginTrialPolicy* {
|
||||
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
|
||||
index b97149f792666bc5b4f180a1d544f4455e44456f..4dfdff22ec6f74b9ac034beac2fada861de9c8b3 100644
|
||||
index a5762a7ed48bb841a9a8a219f08e2f6703bd777a..991ce9ffa6fc89121d2fda3ece57ffa1f5af4a7c 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -60,8 +60,8 @@ index b97149f792666bc5b4f180a1d544f4455e44456f..4dfdff22ec6f74b9ac034beac2fada86
|
||||
+#include <string_view>
|
||||
+
|
||||
#include "base/check.h"
|
||||
#include "base/notreached.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
@@ -91,6 +93,10 @@ std::optional<int> ContentMainDelegate::PostEarlyInitialization(
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ index b97149f792666bc5b4f180a1d544f4455e44456f..4dfdff22ec6f74b9ac034beac2fada86
|
||||
return new ContentClient();
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c22910a67464 100644
|
||||
index 592199d119cbfc382f94a380f78d82b36d97dd41..de428aeb9ca856d4031c4f4718c08e625c8f70e9 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -84,8 +84,8 @@ index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c229
|
||||
+#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "base/notreached.h"
|
||||
@@ -174,6 +175,8 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
#include "build/build_config.h"
|
||||
@@ -173,6 +174,8 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
virtual bool ShouldHandleConsoleControlEvents();
|
||||
#endif
|
||||
|
||||
@@ -95,10 +95,10 @@ index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c229
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index ea22d21b80de2ffb99809df3abd7c0fa1a098481..4b3699bce4afc49acbdc2749aa70e69bf54d97b6 100644
|
||||
index 741eb0bfe9f624c3bb8edfe7dc8e36b19a281365..e7bae92bd94cf7bbadccf36e6cd7f87a2ae1f9ca 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -653,8 +653,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -655,8 +655,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -108,7 +108,7 @@ index ea22d21b80de2ffb99809df3abd7c0fa1a098481..4b3699bce4afc49acbdc2749aa70e69b
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -663,10 +662,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -665,10 +664,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -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 a0b2b43187e02321632a36fe9b388d903789603f..22962fe80da0550b2458289df3ad3eedb28e5709 100644
|
||||
index 53e54257aabbede66de278b0248c1c9959175143..69942e83c88d9c7eb99bd7b0eeae5c7b97356f17 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1433,6 +1433,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1435,6 +1435,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index a0b2b43187e02321632a36fe9b388d903789603f..22962fe80da0550b2458289df3ad3eed
|
||||
// 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 &&
|
||||
@@ -1482,6 +1483,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1484,6 +1485,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 59a81f614dffd1d6781e8986244d85d152d773bd..50188bcc72c2c7ead57f118600a852c29ad65dec 100644
|
||||
index c72e66a92d20a1366b750c976191c7d7628b1ebc..34a92171a8bc09470eb4486543d9836c3ae29825 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1793,6 +1793,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1794,6 +1794,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
|
||||
@@ -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 76cff9038fd48b7373f9a8df265fa8ed0648d1db..03f417e6b0aafc426e068a9bea1880524f983370 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() {
|
||||
@@ -440,9 +466,26 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ rendering with the viz compositor by way of a custom HostDisplayClient
|
||||
and LayeredWindowUpdater.
|
||||
|
||||
diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
|
||||
index b84296cc7e3bb9b7d3e10e476b14a59cf57bbc41..a5c79026c44b4f2c49e322fb53d1a263e76c632b 100644
|
||||
index abb381d76137d10888380cffc6708df494d3718f..f3da70523976e080c732f9c9dd7048d72b20cd65 100644
|
||||
--- a/components/viz/host/host_display_client.cc
|
||||
+++ b/components/viz/host/host_display_client.cc
|
||||
@@ -48,9 +48,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
|
||||
@@ -39,7 +39,7 @@ index b84296cc7e3bb9b7d3e10e476b14a59cf57bbc41..a5c79026c44b4f2c49e322fb53d1a263
|
||||
gpu::SurfaceHandle child_window) {
|
||||
NOTREACHED();
|
||||
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
|
||||
index 9e94f648060e9873a120f2c45591ad599a2e62df..93dabe09e44bda68644dcab568a827a92c550e4a 100644
|
||||
index 294f99f234006709363d5ae1c7d52aeb19691a7c..e5b9d104e157b588dcd0a2e856a1db2df1cfe658 100644
|
||||
--- a/components/viz/host/host_display_client.h
|
||||
+++ b/components/viz/host/host_display_client.h
|
||||
@@ -39,6 +39,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
@@ -90,10 +90,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index f0fc2f51860e38f546159f94d5d180aa04a85e79..f25fe82a15c5ef51e0c74d5ad68daa359ca75394 100644
|
||||
index 72c960319365abf42ac7279b4d06f3d2b81c6e71..b53a8c8752bca7bad0fb7cd35f5320bbcb61f806 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -171,6 +171,8 @@ viz_component("service") {
|
||||
@@ -172,6 +172,8 @@ viz_component("service") {
|
||||
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
|
||||
"display_embedder/skia_render_copy_results.cc",
|
||||
"display_embedder/skia_render_copy_results.h",
|
||||
@@ -117,10 +117,10 @@ index 7fbb05e606fc26364c674c6330b8a5eb9c016fb3..a190a42c2127011ab54aae937a3cab36
|
||||
virtual gpu::SharedImageManager* GetSharedImageManager() = 0;
|
||||
virtual gpu::SyncPointManager* GetSyncPointManager() = 0;
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7bd26771b 100644
|
||||
index d01e905f155e5e7a43e43a8383fcf9dba360600c..a7432b3192c93b5fdf6b754906f66e9916306b61 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "components/viz/service/display_embedder/server_shared_bitmap_manager.h"
|
||||
#include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h"
|
||||
#include "components/viz/service/display_embedder/skia_output_surface_impl.h"
|
||||
@@ -128,7 +128,7 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
|
||||
#include "components/viz/service/display_embedder/software_output_surface.h"
|
||||
#include "components/viz/service/gl/gpu_service_impl.h"
|
||||
#include "gpu/command_buffer/client/shared_memory_limits.h"
|
||||
@@ -31,6 +32,7 @@
|
||||
@@ -32,6 +33,7 @@
|
||||
#include "gpu/command_buffer/service/scheduler_sequence.h"
|
||||
#include "gpu/config/gpu_finch_features.h"
|
||||
#include "gpu/ipc/common/surface_handle.h"
|
||||
@@ -136,17 +136,17 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -94,7 +96,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
@@ -95,7 +97,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
mojom::DisplayClient* display_client,
|
||||
DisplayCompositorMemoryAndTaskController* gpu_dependency,
|
||||
const RendererSettings& renderer_settings,
|
||||
- const DebugRendererSettings* debug_settings) {
|
||||
+ const DebugRendererSettings* debug_settings,
|
||||
+ bool offscreen) {
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
if (surface_handle == gpu::kNullSurfaceHandle)
|
||||
return std::make_unique<OutputSurfaceUnified>();
|
||||
@@ -102,7 +105,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
@@ -103,7 +106,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
|
||||
if (!gpu_compositing) {
|
||||
return std::make_unique<SoftwareOutputSurface>(
|
||||
@@ -155,7 +155,7 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
|
||||
} else {
|
||||
DCHECK(gpu_dependency);
|
||||
|
||||
@@ -141,10 +144,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
@@ -142,10 +145,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
std::unique_ptr<SoftwareOutputDevice>
|
||||
OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
|
||||
gpu::SurfaceHandle surface_handle,
|
||||
@@ -521,10 +521,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
|
||||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 276664b44f2fd1995efbfedf76243b9904e12663..aac4bb2e229d9b96081f917c314091b77b68c21b 100644
|
||||
index 2538e963ef714148f2a944da8a73c832ecac69f4..ac73b420cf167a5e1b4ef917a156a6069e20f36b 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
|
||||
@@ -101,7 +101,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -102,7 +102,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
params->gpu_compositing, params->widget);
|
||||
auto output_surface = output_surface_provider->CreateOutputSurface(
|
||||
params->widget, params->gpu_compositing, display_client.get(),
|
||||
|
||||
@@ -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 03f417e6b0aafc426e068a9bea1880524f983370..6c6b5636d9b25093ff0a2cb1218d9fcc5ee1adfd 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) {
|
||||
@@ -523,7 +523,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 e0719720071002bc205516253fde64abf97a16a8..09d014c7d3050c940840af6dd363edab0f22438e 100644
|
||||
index 57713d234ec93e81ad5ee177f0e2978d7fe82e1d..535cb485455d6a2e23fea4042be4ad9174268bd1 100644
|
||||
--- a/services/network/public/cpp/resource_request.cc
|
||||
+++ b/services/network/public/cpp/resource_request.cc
|
||||
@@ -169,6 +169,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
|
||||
@@ -155,6 +155,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 e0719720071002bc205516253fde64abf97a16a8..09d014c7d3050c940840af6dd363edab
|
||||
cookie_observer =
|
||||
Clone(&const_cast<mojo::PendingRemote<mojom::CookieAccessObserver>&>(
|
||||
other.cookie_observer));
|
||||
@@ -203,6 +204,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
|
||||
@@ -185,6 +186,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
|
||||
const TrustedParams& other) const {
|
||||
return isolation_info.IsEqualForTesting(other.isolation_info) &&
|
||||
disable_secure_dns == other.disable_secure_dns &&
|
||||
|
||||
@@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 10b656ac9b5a940339094576c4bb2699e35d74a2..f56a0f13446d07f976f4a255cd4027d2e7f0c6b1 100644
|
||||
index 3fea2b30defa555a72425d8806129ea9a7a66646..1f5700ff184935d0e15eec3b550967df117557d5 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10849,6 +10849,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10822,6 +10822,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
"blob");
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned
|
||||
by the `ui::Compositor`.
|
||||
|
||||
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
|
||||
index b030f5c17cff0b5b75687b4379500fb832506837..6865785e12ea290159828d28bcdddc21bf7d4fe3 100644
|
||||
index 605ea1d0c30b534145e1629b47351ed42067a80f..bb533d1dab6b0cbd8cb624bbb155f566966027b0 100644
|
||||
--- a/ui/compositor/compositor.cc
|
||||
+++ b/ui/compositor/compositor.cc
|
||||
@@ -339,7 +339,8 @@ void Compositor::SetLayerTreeFrameSink(
|
||||
@@ -343,7 +343,8 @@ void Compositor::SetLayerTreeFrameSink(
|
||||
if (display_private_) {
|
||||
disabled_swap_until_resize_ = false;
|
||||
display_private_->Resize(size());
|
||||
@@ -25,7 +25,7 @@ index b030f5c17cff0b5b75687b4379500fb832506837..6865785e12ea290159828d28bcdddc21
|
||||
display_private_->SetDisplayColorSpaces(display_color_spaces_);
|
||||
display_private_->SetDisplayColorMatrix(
|
||||
gfx::SkM44ToTransform(display_color_matrix_));
|
||||
@@ -550,7 +551,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
@@ -554,7 +555,9 @@ void Compositor::SetVisible(bool visible) {
|
||||
// updated then. We need to call this even if the visibility hasn't changed,
|
||||
// for the same reason.
|
||||
if (display_private_)
|
||||
@@ -36,7 +36,7 @@ index b030f5c17cff0b5b75687b4379500fb832506837..6865785e12ea290159828d28bcdddc21
|
||||
|
||||
if (changed) {
|
||||
observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
|
||||
@@ -1001,6 +1004,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
@@ -1005,6 +1008,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
|
||||
host_begin_frame_observer_->GetBoundRemote());
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ counter to the design of globalShortcuts, and so we need to instead
|
||||
use `ui::MediaKeysListener`.
|
||||
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
index f5495cf896329e00ddd74f364f9f19b5c0321af2..9695f2f2f92e65d9500c53ca74f58d19003422e4 100644
|
||||
index 245f714c853e691ec359a30168559d5c1f98e6cf..d1088a00e5f94aa73f7b24a6eda494ff20085d08 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -46,11 +46,11 @@ index f5495cf896329e00ddd74f364f9f19b5c0321af2..9695f2f2f92e65d9500c53ca74f58d19
|
||||
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
if (IsShortcutHandlingSuspended())
|
||||
diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
index d2a3a6ddf10e646ea66dfc67c09ee949c1d2f171..de2df2f688ee8e06c2cf0ae46bcd718b5f9c5da4 100644
|
||||
index 06e65da05a218a8ecc641bbd749ace2b0832ce72..370dfdc9579a9e6b3a6bdc6f4526650a32f53b55 100644
|
||||
--- a/chrome/browser/extensions/global_shortcut_listener.h
|
||||
+++ b/chrome/browser/extensions/global_shortcut_listener.h
|
||||
@@ -40,6 +40,8 @@ class GlobalShortcutListener {
|
||||
// The instance may be nullptr.
|
||||
@@ -34,6 +34,8 @@ class GlobalShortcutListener {
|
||||
|
||||
static GlobalShortcutListener* GetInstance();
|
||||
|
||||
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
|
||||
|
||||
@@ -75,7 +75,7 @@ index 50f1b8711f7e9bd0aa31ba29f7e7be45eed2647c..869f36e70c48e80a0606d156f33fe05c
|
||||
|
||||
PictureInPictureOcclusionTracker*
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index e06c74b1eb242dd9ab7344901fbf694606866ea6..31823f3fa80e622c9b5f77d1de60a897677c1e15 100644
|
||||
index 55e298e5ba9209e192384c5a0d7dff314d0cd17c..838e4cd7a8f73c68bc1e5096e6d5904cf9f6612c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -399,11 +399,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
|
||||
@@ -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 d0bc4c6bff663456758d172054e73031837dd0fe..2414e4c4dfadbe83e61968e8f7873b425ba99f4f 100644
|
||||
index 3122f022de3345eb47de9964706e1e93c39e6420..3ed29244ad407c3fd41879dbf2f7a8554a05236c 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9432,7 +9432,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -9392,7 +9392,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -20,10 +20,10 @@ 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 9f660e8011cd46e164364dcfc786bdc5deb2387a..af9036bd2224d6d25d4046a507ffbec70f4d5394 100644
|
||||
index fba018e836f6e898c991a682ca034c9383818c41..5256839ee525ee6b133cddc2e6abf761172b594b 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 {
|
||||
@@ -455,6 +455,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
|
||||
mojom::EvaluationTiming,
|
||||
mojom::LoadEventBlockingOption,
|
||||
WebScriptExecutionCallback,
|
||||
@@ -204,10 +204,10 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
|
||||
const mojom::blink::UserActivationOption user_activation_option_;
|
||||
const mojom::blink::LoadEventBlockingOption blocking_option_;
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
index 0f1842e750c1609c3d579ebfcb4512f7be91eebb..92e8d59d5cff55e1e9a3e2e35e7e27063b9bb763 100644
|
||||
index 0802173ce891bcaca8b6bba2762ad2b80d4d5c75..6d31ccae7e6a9e204999d8475808afc11a0665c8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
@@ -290,6 +290,7 @@ void ExecuteScriptsInMainWorld(
|
||||
@@ -291,6 +291,7 @@ void ExecuteScriptsInMainWorld(
|
||||
DOMWrapperWorld::kMainWorldId, sources, user_gesture,
|
||||
mojom::blink::EvaluationTiming::kSynchronous,
|
||||
mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback),
|
||||
@@ -216,10 +216,10 @@ index 0f1842e750c1609c3d579ebfcb4512f7be91eebb..92e8d59d5cff55e1e9a3e2e35e7e2706
|
||||
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 d2f653fbfd11300ddd2cd5199fe46cd97829ff4d..de09672be6b9cf09f1ed5b5d71838ad6cad65dce 100644
|
||||
index 89cda107da09afeed4c77e91aed3b41dbe3f1fc6..653bc1c866a86f5853bb05338ad0faef1d315f2e 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(
|
||||
@@ -1096,14 +1096,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -238,10 +238,10 @@ index d2f653fbfd11300ddd2cd5199fe46cd97829ff4d..de09672be6b9cf09f1ed5b5d71838ad6
|
||||
|
||||
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 237de9996f9f9e17736f61470d1420d91267088d..c5b2599f6e6f18f75c1491520e33b540a04c2898 100644
|
||||
index dd114ccec84b96ac5d1c1152521534e02d9d4ecc..566d58c86a6e1ff48267514b884e12f6bed7c308 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
|
||||
@@ -198,6 +198,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
mojom::blink::EvaluationTiming,
|
||||
mojom::blink::LoadEventBlockingOption,
|
||||
WebScriptExecutionCallback,
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 326f5c53c5ef6f48a80e9d7da933a4a0ddaa8705..621965890c1092de064a83c6b3e734990259590a 100644
|
||||
index c90e1bc281095132f55e4165fb4e3fcfc31d576e..9f2c89f81cdadddb99e71145efff635005048ff1 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -4652,6 +4652,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -4644,6 +4644,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ index 7053a5619c6ff6bced75572d7a3336f532b8bb81..89bbc161b99846c1f9e9585e98dd9056
|
||||
// Returns whether `Initialize` has already been invoked in the process.
|
||||
// Initialization is a one-way operation (i.e., this method cannot return
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index c6664dd605587bb1d20f3f2c492999386c5d5446..ea22d21b80de2ffb99809df3abd7c0fa1a098481 100644
|
||||
index 6fd3a37ee0c8a0fd7ecee992e87e624ede64fa28..741eb0bfe9f624c3bb8edfe7dc8e36b19a281365 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -541,7 +541,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
@@ -543,7 +543,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
// static
|
||||
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
const std::string& js_command_line_flags,
|
||||
@@ -51,7 +51,7 @@ index c6664dd605587bb1d20f3f2c492999386c5d5446..ea22d21b80de2ffb99809df3abd7c0fa
|
||||
static bool v8_is_initialized = false;
|
||||
if (v8_is_initialized)
|
||||
return;
|
||||
@@ -551,7 +552,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
@@ -553,7 +554,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
// See https://crbug.com/v8/11043
|
||||
SetFlags(mode, js_command_line_flags);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 3eac27d6f3757fa704d446548c3070fe9a5a9bc2..fe6d53d0f227ef9f5f98824bb9e980a8337f670a 100644
|
||||
index b4c1a70fec7e571a17279e54ecf0deaec0a54b8b..99e11e5cb706cf3bff47a75ed59f91ecfc7b645c 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1403,6 +1403,11 @@
|
||||
|
||||
@@ -18,7 +18,7 @@ index 1ea983ca1f613a9a5b12375196fbf6a61960c90f..38d7d54ce7715ebe4e3b25e08c57d29f
|
||||
# on GTK.
|
||||
"//examples:peerconnection_client",
|
||||
diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn
|
||||
index 7f00b1d19430a36c879c109aabde0aabd89dbee3..2683d5e03288d093bc8e1e2535eed197fd964b4a 100644
|
||||
index 1307b3375f4f42f31b90393f65f169b6b0fe10ed..06b2940ad5f23e5c7c8e99b8922e89a799079259 100644
|
||||
--- a/ui/ozone/platform/x11/BUILD.gn
|
||||
+++ b/ui/ozone/platform/x11/BUILD.gn
|
||||
@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
|
||||
@@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were
|
||||
replaced with clean ozone native implementations.
|
||||
|
||||
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
index bc8ac7431f25d1fd6f026f8049d589cba01fa6fd..1bb0c95acf2df61975b1cc6423eb8514bb3488e4 100644
|
||||
index 50f3163e57544847f256869b14ed782b35dadd80..ff8364b40c733229d6a7ff1c63eb204b231faf32 100644
|
||||
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -193,6 +193,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
base::MessagePumpType::UI;
|
||||
properties->supports_vulkan_swap_chain = true;
|
||||
properties->skia_can_fall_back_to_x11 = true;
|
||||
|
||||
@@ -455,10 +455,10 @@ index 97f489043beb4260b1a3ca1781ce7ef67ec8c88a..569859297618cac39aa36655b9e30122
|
||||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index f51c287959ec74878100b80fb75b86b0045b744a..f0fc2f51860e38f546159f94d5d180aa04a85e79 100644
|
||||
index 1db2476ae1c2ad9c6d1306531fb9b3a697f3adca..72c960319365abf42ac7279b4d06f3d2b81c6e71 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -379,6 +379,7 @@ viz_component("service") {
|
||||
@@ -381,6 +381,7 @@ viz_component("service") {
|
||||
"frame_sinks/external_begin_frame_source_mac.h",
|
||||
]
|
||||
}
|
||||
@@ -466,7 +466,7 @@ index f51c287959ec74878100b80fb75b86b0045b744a..f0fc2f51860e38f546159f94d5d180aa
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -660,6 +661,7 @@ viz_source_set("unit_tests") {
|
||||
@@ -663,6 +664,7 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
@@ -560,10 +560,10 @@ index 6aa74c4137ac7a649e8f79eb628e297e9459b089..c89f25bf49d773f5f77b2434bd6fabcf
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 217a86df8151cfa274c56f4082e7ed3ced0ac872..71158b55dacc7a4ba1f08c8212b7f9322326ceb8 100644
|
||||
index bdde3bd488b2018241835436fdaf3548dc453ec2..e47794527c5912a43047cdca48df0f7deb9edf9b 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -327,6 +327,7 @@ source_set("browser") {
|
||||
@@ -325,6 +325,7 @@ source_set("browser") {
|
||||
"//ui/strings:ax_strings",
|
||||
"//ui/touch_selection",
|
||||
"//v8:v8_version",
|
||||
@@ -679,10 +679,10 @@ index 34fb29866785ef07c6dca4cfc85966df1c479b5f..e305d25a8f2a34ac90f4d503a9c74dcc
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index d8243ca31b40940f79892cf74a0d9dbbec7d8272..df320813ebc67ea16d6c93c7f2905196be5ef44f 100644
|
||||
index 0b346b5636b5cb62e8d4c9df17067c0d7cf20395..cebc10db18c9896a9ac47a134f9578babddfba14 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -286,6 +286,7 @@ source_set("common") {
|
||||
@@ -284,6 +284,7 @@ source_set("common") {
|
||||
"//ui/shell_dialogs",
|
||||
"//url",
|
||||
"//url/ipc:url_ipc",
|
||||
@@ -773,7 +773,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index f04eac209dc7103d8b3a985783166772b7bef8de..415457f192688821a4957fa83214dbcf32f5cd08 100644
|
||||
index 70deb00ddaf443ecb8bbc1b54b09f9b52ecd3f5a..ccae03f971b51f7388b1ebc23ff121a7a0ab118a 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -643,6 +643,7 @@ static_library("test_support") {
|
||||
@@ -800,7 +800,7 @@ index f04eac209dc7103d8b3a985783166772b7bef8de..415457f192688821a4957fa83214dbcf
|
||||
]
|
||||
|
||||
if (!(is_chromeos_ash && target_cpu == "arm64" && current_cpu == "arm")) {
|
||||
@@ -3246,6 +3249,7 @@ test("content_unittests") {
|
||||
@@ -3241,6 +3244,7 @@ test("content_unittests") {
|
||||
"//ui/latency:test_support",
|
||||
"//ui/shell_dialogs:shell_dialogs",
|
||||
"//ui/webui:test_support",
|
||||
@@ -1614,7 +1614,7 @@ index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..c2ac4da580e3e7f749a0a4de1e859af6
|
||||
// Accessible object
|
||||
if (AXElementWrapper::IsValidElement(value)) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 7ef725523fa1b660d589f20cc338052f82a9baf7..61a712df5c7829c320f0f80d859fcf9c840e8022 100644
|
||||
index eea697e433fad6ded98ee0db8b6f49760340c364..13351f20f8a965e097281fee9db4f33e29fe704e 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -358,6 +358,13 @@ component("base") {
|
||||
@@ -1631,7 +1631,7 @@ index 7ef725523fa1b660d589f20cc338052f82a9baf7..61a712df5c7829c320f0f80d859fcf9c
|
||||
if (is_ios) {
|
||||
sources += [
|
||||
"device_form_factor_ios.mm",
|
||||
@@ -508,6 +515,12 @@ component("base") {
|
||||
@@ -501,6 +508,12 @@ component("base") {
|
||||
"//url",
|
||||
]
|
||||
|
||||
|
||||
@@ -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 a7661d636b32e76141df078651e3c95a5166ca54..59a81f614dffd1d6781e8986244d85d152d773bd 100644
|
||||
index c0f354a0ed2ff8c931f7cf07a3bb68c318f892b7..c72e66a92d20a1366b750c976191c7d7628b1ebc 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -159,6 +159,11 @@
|
||||
@@ -160,6 +160,11 @@
|
||||
#include "services/network/web_transport.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ index a7661d636b32e76141df078651e3c95a5166ca54..59a81f614dffd1d6781e8986244d85d1
|
||||
#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
|
||||
@@ -603,6 +608,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
|
||||
@@ -604,6 +609,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -122,7 +122,7 @@ index a7661d636b32e76141df078651e3c95a5166ca54..59a81f614dffd1d6781e8986244d85d1
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::NetworkContextHttpAuthPreferences::
|
||||
@@ -1000,6 +1098,13 @@ void NetworkContext::SetClient(
|
||||
@@ -1001,6 +1099,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ index a7661d636b32e76141df078651e3c95a5166ca54..59a81f614dffd1d6781e8986244d85d1
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2569,6 +2674,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2570,6 +2675,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = std::move(cert_verifier_with_trust_anchors);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService
|
||||
so Electron can identify which renderer a notification came from.
|
||||
|
||||
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
index 8cf25ad02f187b60c72d3fc82f17ff7076f63fb7..2143ca591f3d1c389a95ae9ed388ff6070b3d557 100644
|
||||
index dac3a2fdfcdbcbd18b3ed029f1ad480973fd389a..279c9b489a8eafe293d0645e7a103656e2f061ef 100644
|
||||
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
@@ -221,6 +221,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
@@ -220,6 +220,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
|
||||
// TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close)
|
||||
void PlatformNotificationServiceImpl::DisplayNotification(
|
||||
@@ -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 f399a33a55a2432f70ab1ca0e3b02e09bda8b130..ffcaf056c52aa7138475bfa72f6bf2180d22f767 100644
|
||||
index 2f12a1dc6a97762089d2bcf0d900657bd80efefd..17ddd5003307663a37d741937ea2fb1859be11fe 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2107,7 +2107,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2106,7 +2106,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index f399a33a55a2432f70ab1ca0e3b02e09bda8b130..ffcaf056c52aa7138475bfa72f6bf218
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2115,7 +2115,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2114,7 +2114,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -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 da34c980765d4a1096844a3dfe1722a35abedc8f..48340066af03b92f53a80c578ce4a007da411308 100644
|
||||
index dc4ad54e8fc41bdb766c28cc8b56a47384272ea6..1f391a6a1cc6b7eede328b11a79dbbf06d2873c9 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
@@ -784,8 +784,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() &&
|
||||
|
||||
@@ -9,23 +9,23 @@ don't get errors for Chrome's generated resources, which are non-existent
|
||||
because we don't generate them in our build.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466215a13c1 100644
|
||||
index 91ef40b1c054ffceec006400c18d68b5ab393161..7a33b6e01b57b58a77ec54be59f6f3235dab936c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
@@ -5,9 +5,12 @@
|
||||
@@ -4,9 +4,12 @@
|
||||
|
||||
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
||||
|
||||
#include "base/feature_list.h"
|
||||
+#include "build/branding_buildflags.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
#include "media/base/media_switches.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
@@ -29,7 +32,10 @@ CloseImageButton::CloseImageButton(PressedCallback callback)
|
||||
#include "ui/base/models/image_model.h"
|
||||
@@ -26,7 +29,10 @@ CloseImageButton::CloseImageButton(PressedCallback callback)
|
||||
: OverlayWindowImageButton(std::move(callback)) {
|
||||
SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize));
|
||||
|
||||
@@ -38,7 +38,7 @@ index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466
|
||||
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
|
||||
kCloseButtonIconSize));
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index 013cd70a33a10b34df691a0ba7740d3404ebcc58..e06c74b1eb242dd9ab7344901fbf694606866ea6 100644
|
||||
index 32de1f4d7329ee8c0fb828a42849542265d7a4eb..55e298e5ba9209e192384c5a0d7dff314d0cd17c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -18,9 +18,11 @@
|
||||
|
||||
@@ -860,10 +860,10 @@ index b8c803184f267d87696c4e72c3d993ff3b69d95b..7278dfae56305cc8669fc2240563450f
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 71158b55dacc7a4ba1f08c8212b7f9322326ceb8..e51f38935bbab9e140b6083452f43dc0be7b31d5 100644
|
||||
index e47794527c5912a43047cdca48df0f7deb9edf9b..858a54fbbdf83a42a631fe4355fe66e26a85f6db 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -3035,8 +3035,9 @@ source_set("browser") {
|
||||
@@ -3025,8 +3025,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ index 6ad5dd5d062cc84b79b36572955a676cb5936ffd..4e7947551428495f1fc1b88a17195e8f
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 9c8aad2abea4b41dcb1c341f053e962e235d8d62..73d0281f14c87ad7893e027b708193c4221350b6 100644
|
||||
index bdc268c2d378d65c4ddf2b9c4b0dae8b94f9521c..aeb43c34486e5c6e5a6e79487f1964ed3c3aee6f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5636,6 +5636,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -5615,6 +5615,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index 9c8aad2abea4b41dcb1c341f053e962e235d8d62..73d0281f14c87ad7893e027b708193c4
|
||||
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 81e1c07ec234c72da694e6d77a8e8929573c8332..c230b284bea5f8e179fd0d0135d96295a828efa6 100644
|
||||
index a0b35bf72396331ac8c5a5126daef50fbea3e84e..d915536e03123360f9068e95c933fdca05c730c0 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1138,6 +1138,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
@@ -1131,6 +1131,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
@@ -72,7 +72,7 @@ index 81e1c07ec234c72da694e6d77a8e8929573c8332..c230b284bea5f8e179fd0d0135d96295
|
||||
RenderWidgetHostImpl* render_widget_host) override;
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index 7e7447b5af4662a6229b0e55f61856b28219aa7c..c6a7f8678620de4d59752a51626af7e846b92b2b 100644
|
||||
index f3284b11c2a9d020e85af2fea2057926de4cdd0b..9d58a654ddbabeecef2d9f17e0229c72c0afe6fd 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -37,6 +37,7 @@
|
||||
@@ -83,7 +83,7 @@ index 7e7447b5af4662a6229b0e55f61856b28219aa7c..c6a7f8678620de4d59752a51626af7e8
|
||||
#include "ui/base/page_transition_types.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
|
||||
@@ -635,6 +636,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
@@ -617,6 +618,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
|
||||
// Invoked when the primary main frame changes size.
|
||||
virtual void PrimaryMainFrameWasResized(bool width_changed) {}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
|
||||
to upstream this change to Chrome.
|
||||
|
||||
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
index 0826e6c794e7b8baa1ea4b12cfd6b7cd7ad44177..bca257578201985dd9191e80cd68018519f73180 100644
|
||||
index bc42d15e72e575c4ea34086b7e9406eb58042cdd..07fe508e4553080bbac44fdfca5d166b17dcf66d 100644
|
||||
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
|
||||
@@ -47,7 +47,6 @@
|
||||
@@ -19,7 +19,7 @@ index 0826e6c794e7b8baa1ea4b12cfd6b7cd7ad44177..bca257578201985dd9191e80cd680185
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
@@ -253,128 +252,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
|
||||
@@ -252,128 +251,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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 81305f3fe427b7d27d78e49de57390708753901c..2cd7295d1a0bc194b7dd453d7672c1a00a244889 100644
|
||||
index c210645cd2a6f2314d648112b50fe02050f7320f..d637599c1127bf7862566b8b119592caa30744c7 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9566,25 +9566,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -9526,25 +9526,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Thu, 21 Nov 2024 14:23:17 +0100
|
||||
Subject: Support BSTR PKEY_AppUserModel_ID in Windows Shortcuts
|
||||
|
||||
It's possible for a shortcut link on Windows to be BSTR format;
|
||||
this resulted in a DCHECK previously but as of the NOTREACHED
|
||||
fatal migration now will crash a given app. This has created an
|
||||
issue for Electron, which allows providing the shortcut information
|
||||
to end users. This CL thus allows for supporting VT_BSTR variants
|
||||
for PKEY_AppUserModel_ID and mitigates a crash. One such example
|
||||
is https://github.com/wez/wezterm, which after this change
|
||||
correctly gets an appUserModelId of 'org.wezfurlong.wezterm'.
|
||||
|
||||
Bug: N/A
|
||||
Change-Id: I5ad114bc345059637465b68a53a2f3f8c42de898
|
||||
|
||||
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
|
||||
index d4a54d1afdc121192f9c0321c6ced584ee066486..02f3e63d16c3324f546f6155d722900f0a81131a 100644
|
||||
--- a/base/win/shortcut.cc
|
||||
+++ b/base/win/shortcut.cc
|
||||
@@ -289,14 +289,22 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
|
||||
return false;
|
||||
}
|
||||
switch (pv_app_id.get().vt) {
|
||||
- case VT_EMPTY:
|
||||
+ case VT_EMPTY: {
|
||||
properties->set_app_id(std::wstring());
|
||||
break;
|
||||
- case VT_LPWSTR:
|
||||
+ }
|
||||
+ case VT_LPWSTR: {
|
||||
properties->set_app_id(pv_app_id.get().pwszVal);
|
||||
break;
|
||||
- default:
|
||||
+ }
|
||||
+ case VT_BSTR: {
|
||||
+ BSTR bs = pv_app_id.get().bstrVal;
|
||||
+ properties->set_app_id(std::wstring(bs, ::SysStringLen(bs)));
|
||||
+ break;
|
||||
+ }
|
||||
+ default: {
|
||||
NOTREACHED() << "Unexpected variant type: " << pv_app_id.get().vt;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index ffcaf056c52aa7138475bfa72f6bf2180d22f767..cf5bd44faed10e5d9ac43319193fd0e2cbc5bffc 100644
|
||||
index 17ddd5003307663a37d741937ea2fb1859be11fe..dda8404e020a8eecc3d78465c33eba5887737e6a 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1755,6 +1755,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1754,6 +1754,10 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), IsJitDisabled());
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ce3e5c5d8e9f672a76751274ddc6d15b1d6de373..b3e258f71f009ddcd52f4ad28eabad82726f31cf 100644
|
||||
index 6da96d1306afb5e6812ca1c9e3b4cafc9c9425bd..c54d73745e7bc8faf18ecd169fc10548a827d512 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3778,6 +3778,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3757,6 +3757,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 ce3e5c5d8e9f672a76751274ddc6d15b1d6de373..b3e258f71f009ddcd52f4ad28eabad82
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3788,6 +3795,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3767,6 +3774,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,10 +35,10 @@ index ce3e5c5d8e9f672a76751274ddc6d15b1d6de373..b3e258f71f009ddcd52f4ad28eabad82
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index c601698c6032d5b147c67b0ff7caf6a8747b3ece..973a3010d4eff81dfded3d5c7bc52a7976f279cf 100644
|
||||
index 025b7eb0aa7b9f8cc81bfb19a408e98f1870dc0f..7fa7378eccb890e01f48d95c2f3a9f5feaf688d5 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -113,10 +113,13 @@ class BrowserPluginGuestDelegate;
|
||||
@@ -112,10 +112,13 @@ class BrowserPluginGuestDelegate;
|
||||
class GuestPageHolder;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
@@ -52,7 +52,7 @@ index c601698c6032d5b147c67b0ff7caf6a8747b3ece..973a3010d4eff81dfded3d5c7bc52a79
|
||||
class WebUI;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -277,6 +280,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
@@ -276,6 +279,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
||||
network::mojom::WebSandboxFlags::kNone;
|
||||
|
||||
|
||||
@@ -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 e494df87e6038a697b835e054b3320805730ff8a..da34c980765d4a1096844a3dfe1722a35abedc8f 100644
|
||||
index bf6e476bb9fbf7e5fc68bafc7703d00ecaeb4fa3..dc4ad54e8fc41bdb766c28cc8b56a47384272ea6 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8276,6 +8276,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -8283,6 +8283,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ index e494df87e6038a697b835e054b3320805730ff8a..da34c980765d4a1096844a3dfe1722a3
|
||||
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 b3e258f71f009ddcd52f4ad28eabad82726f31cf..d0bc4c6bff663456758d172054e73031837dd0fe 100644
|
||||
index c54d73745e7bc8faf18ecd169fc10548a827d512..3122f022de3345eb47de9964706e1e93c39e6420 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4035,21 +4035,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
@@ -4014,21 +4014,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
|
||||
"WebContentsImpl::PreHandleKeyboardEvent");
|
||||
@@ -78,7 +78,7 @@ index b3e258f71f009ddcd52f4ad28eabad82726f31cf..d0bc4c6bff663456758d172054e73031
|
||||
}
|
||||
|
||||
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -4208,7 +4212,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -4187,7 +4191,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -6,6 +6,7 @@ pass_all_globals_through_require.patch
|
||||
build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch
|
||||
refactor_allow_embedder_overriding_of_internal_fs_calls.patch
|
||||
chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch
|
||||
chore_add_context_to_context_aware_module_prevention.patch
|
||||
fix_handle_boringssl_and_openssl_incompatibilities.patch
|
||||
fix_crypto_tests_to_run_with_bssl.patch
|
||||
fix_account_for_debugger_agent_race_condition.patch
|
||||
@@ -43,5 +44,3 @@ fix_remove_harmony-import-assertions_from_node_cc.patch
|
||||
win_almost_fix_race_detecting_esrch_in_uv_kill.patch
|
||||
chore_disable_deprecation_ftbfs_in_simdjson_header.patch
|
||||
src_provide_workaround_for_container-overflow.patch
|
||||
build_allow_unbundling_of_node_js_dependencies.patch
|
||||
test_use_static_method_names_in_call_stacks.patch
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Sun, 17 Nov 2024 22:33:19 +0100
|
||||
Subject: build: allow unbundling of Node.js dependencies
|
||||
|
||||
Linux distributions have guidelines on using distro-provided dependencies,
|
||||
rather than compiling them in statically.
|
||||
|
||||
This PR this enables downstream packagers to unbundle these dependencies.
|
||||
We don't need to do this for zlib, as the existing gn workflow uses the same
|
||||
//third_party/zlib, so unbundling zlib with Chromium tools in
|
||||
//build/linux/unbundle works already. This adds support for some of the others.
|
||||
|
||||
Upstreamed at https://github.com/nodejs/node/pull/55903
|
||||
|
||||
diff --git a/node.gni b/node.gni
|
||||
index 18d58591e3d0f1f3512db00033c3410a65702864..99ec540ec41ddf5682eed7618ba87d6935b3b982 100644
|
||||
--- a/node.gni
|
||||
+++ b/node.gni
|
||||
@@ -61,6 +61,12 @@ declare_args() {
|
||||
# 1. cross-os compilation is not supported.
|
||||
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
|
||||
node_use_node_snapshot = false
|
||||
+
|
||||
+ # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries.
|
||||
+ use_system_cares = false
|
||||
+ use_system_nghttp2 = false
|
||||
+ use_system_llhttp = false
|
||||
+ use_system_histogram = false
|
||||
}
|
||||
|
||||
assert(!node_enable_inspector || node_use_openssl,
|
||||
diff --git a/unofficial.gni b/unofficial.gni
|
||||
index 3d8b7957e791ce2fa2a8d0937a87b6010087803d..c23922a301a721662ff34bf6e54fd26b41f25ccc 100644
|
||||
--- a/unofficial.gni
|
||||
+++ b/unofficial.gni
|
||||
@@ -147,7 +147,6 @@ template("node_gn_build") {
|
||||
":run_node_js2c",
|
||||
"deps/cares",
|
||||
"deps/histogram",
|
||||
- "deps/llhttp",
|
||||
"deps/nbytes",
|
||||
"deps/nghttp2",
|
||||
"deps/postject",
|
||||
@@ -178,7 +177,17 @@ template("node_gn_build") {
|
||||
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
configs += [ "//build/config/gcc:symbol_visibility_default" ]
|
||||
}
|
||||
-
|
||||
+ if (use_system_llhttp) {
|
||||
+ libs += [ "llhttp" ]
|
||||
+ } else {
|
||||
+ deps += [ "deps/llhttp" ]
|
||||
+ }
|
||||
+ if (use_system_histogram) {
|
||||
+ libs += [ "hdr_histogram" ]
|
||||
+ include_dirs += [ "/usr/include/hdr" ]
|
||||
+ } else {
|
||||
+ deps += [ "deps/histogram" ]
|
||||
+ }
|
||||
if (v8_enable_i18n_support) {
|
||||
deps += [ "//third_party/icu" ]
|
||||
}
|
||||
@@ -205,6 +214,19 @@ template("node_gn_build") {
|
||||
sources += node_inspector.node_inspector_sources +
|
||||
node_inspector.node_inspector_generated_sources
|
||||
}
|
||||
+ if (is_linux) {
|
||||
+ import("//build/config/linux/pkg_config.gni")
|
||||
+ if (use_system_cares) {
|
||||
+ pkg_config("cares") {
|
||||
+ packages = [ "libcares" ]
|
||||
+ }
|
||||
+ }
|
||||
+ if (use_system_nghttp2) {
|
||||
+ pkg_config("nghttp2") {
|
||||
+ packages = [ "libnghttp2" ]
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
executable(target_name) {
|
||||
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Wed, 22 May 2019 13:34:18 -0700
|
||||
Subject: chore: add context to context aware module prevention
|
||||
|
||||
This patch adds extra context to why we prevent non-context-aware Node.js
|
||||
modules from being used in the renderer process. This should be upstreamed as
|
||||
a customizable error message.
|
||||
|
||||
diff --git a/src/node_binding.cc b/src/node_binding.cc
|
||||
index b5c0a93d83ab4d4f6792d0eb648e7198de874bcf..0fd01987c29b06b91944d18266ba67994c1fac45 100644
|
||||
--- a/src/node_binding.cc
|
||||
+++ b/src/node_binding.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "node_builtins.h"
|
||||
#include "node_errors.h"
|
||||
#include "node_external_reference.h"
|
||||
+#include "node_process.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <string>
|
||||
@@ -495,7 +496,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
|
||||
if (mp->nm_context_register_func == nullptr) {
|
||||
if (env->force_context_aware()) {
|
||||
dlib->Close();
|
||||
- THROW_ERR_NON_CONTEXT_AWARE_DISABLED(env);
|
||||
+ char errmsg[1024];
|
||||
+ snprintf(errmsg,
|
||||
+ sizeof(errmsg),
|
||||
+ "Loading non-context-aware native module in renderer: '%s'. See https://github.com/electron/electron/issues/18397.",
|
||||
+ *filename);
|
||||
+ env->ThrowError(errmsg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Maddock <smaddock@slack-corp.com>
|
||||
Date: Fri, 22 Nov 2024 15:18:05 -0500
|
||||
Subject: test: use static method names in call stacks
|
||||
|
||||
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5907815
|
||||
|
||||
diff --git a/test/message/assert_throws_stack.out b/test/message/assert_throws_stack.out
|
||||
index b1f3ea2108ba9c1a4f98928062b44b927eea31f2..897ddf36a04eb03edd01dd6b9a6fb4394cbdf114 100644
|
||||
--- a/test/message/assert_throws_stack.out
|
||||
+++ b/test/message/assert_throws_stack.out
|
||||
@@ -23,7 +23,7 @@ AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
|
||||
actual: Error: foo
|
||||
at assert.throws.bar (*assert_throws_stack.js:*)
|
||||
at getActual (node:assert:*)
|
||||
- at Function.throws (node:assert:*)
|
||||
+ at strict.throws (node:assert:*)
|
||||
at Object.<anonymous> (*assert_throws_stack.js:*:*)
|
||||
at *
|
||||
at *
|
||||
diff --git a/test/message/internal_assert_fail.out b/test/message/internal_assert_fail.out
|
||||
index 9fc86673262dbacb45e544340c81b4d14ee3f845..5f1026791f323d6a5965810917c0ef33ae4bfd53 100644
|
||||
--- a/test/message/internal_assert_fail.out
|
||||
+++ b/test/message/internal_assert_fail.out
|
||||
@@ -6,7 +6,7 @@ Error [ERR_INTERNAL_ASSERTION]: Unreachable!
|
||||
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
|
||||
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
|
||||
|
||||
- at Function.fail (node:internal/assert:*:*)
|
||||
+ at assert.fail (node:internal/assert:*:*)
|
||||
at * (*test*message*internal_assert_fail.js:7:8)
|
||||
at *
|
||||
at *
|
||||
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
|
||||
index d28af0f4833c4901e8542c8938cbcf51ff22464d..796ad3224c4dba06b53b2da14fc8469b158f206d 100644
|
||||
--- a/test/parallel/test-fs-promises.js
|
||||
+++ b/test/parallel/test-fs-promises.js
|
||||
@@ -58,7 +58,7 @@ assert.strictEqual(
|
||||
code: 'ENOENT',
|
||||
name: 'Error',
|
||||
message: /^ENOENT: no such file or directory, access/,
|
||||
- stack: /at async Function\.rejects/
|
||||
+ stack: /at async ok\.rejects/
|
||||
}
|
||||
).then(common.mustCall());
|
||||
|
||||
@@ -250,10 +250,10 @@ index dc27e91ad0da93a5b68053f132f219f95f641ca1..38ba1110da3f77df4681ccb0ebcee78d
|
||||
switch (c_signature->ReturnInfo().GetType()) {
|
||||
case CTypeInfo::Type::kVoid:
|
||||
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
||||
index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932dce4202bb 100644
|
||||
index f126b758d050236d88ec49a23b298c54eff50821..1282e2cf8a686475492b253138e367cc44d4f77f 100644
|
||||
--- a/test/cctest/test-api.cc
|
||||
+++ b/test/cctest/test-api.cc
|
||||
@@ -29761,6 +29761,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
|
||||
@@ -29762,6 +29762,16 @@ static Trivial* UnwrapTrivialObject(Local<Object> object) {
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
|
||||
void FastCallback2JSArray(v8::Local<v8::Object> receiver, int arg0,
|
||||
v8::Local<v8::Array> arg1) {
|
||||
Trivial* self = UnwrapTrivialObject(receiver);
|
||||
@@ -29778,10 +29788,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
|
||||
@@ -29779,10 +29789,103 @@ void FastCallback4Scalar(v8::Local<v8::Object> receiver, int arg0, float arg1) {
|
||||
void FastCallback5DifferentArity(v8::Local<v8::Object> receiver, int arg0,
|
||||
v8::Local<v8::Array> arg1, float arg2) {}
|
||||
|
||||
@@ -374,7 +374,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
|
||||
TEST(FastApiOverloadResolution) {
|
||||
#if !defined(V8_LITE_MODE) && defined(V8_ENABLE_TURBOFAN)
|
||||
if (i::v8_flags.jitless) return;
|
||||
@@ -29795,15 +29898,22 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29796,15 +29899,22 @@ TEST(FastApiOverloadResolution) {
|
||||
i::v8_flags.always_turbofan = false;
|
||||
i::FlagList::EnforceFlagImplications();
|
||||
|
||||
@@ -399,7 +399,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
|
||||
|
||||
v8::CFunction scalar_callback =
|
||||
v8::CFunctionBuilder().Fn(FastCallback4Scalar).Build();
|
||||
@@ -29811,7 +29921,7 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29812,7 +29922,7 @@ TEST(FastApiOverloadResolution) {
|
||||
// Check that resolving when there is a scalar at the difference position
|
||||
// is not possible.
|
||||
CHECK_EQ(v8::CFunction::OverloadResolution::kImpossible,
|
||||
@@ -408,7 +408,7 @@ index ac08efca24f42fff335baa0a383392176a6a3da2..74df3fde557f2c1aeae362e50d83932d
|
||||
|
||||
v8::CFunction diff_arity_callback =
|
||||
v8::CFunctionBuilder().Fn(FastCallback5DifferentArity).Build();
|
||||
@@ -29819,7 +29929,7 @@ TEST(FastApiOverloadResolution) {
|
||||
@@ -29820,7 +29930,7 @@ TEST(FastApiOverloadResolution) {
|
||||
// Check that overload resolution between different number of arguments
|
||||
// is possible.
|
||||
CHECK_EQ(v8::CFunction::OverloadResolution::kAtCompileTime,
|
||||
|
||||
@@ -604,7 +604,7 @@ index 2dec266f9e648391fe61a62931cca1ad20de719c..dc27e91ad0da93a5b68053f132f219f9
|
||||
V<T> Checked(V<Tuple<T, Word32>> result, Label<>& otherwise) {
|
||||
V<Word32> result_state = __ template Projection<1>(result);
|
||||
diff --git a/src/compiler/turboshaft/graph-builder.cc b/src/compiler/turboshaft/graph-builder.cc
|
||||
index 683604a0f5e2c0694f29e447e095417311ea37ec..cb3c976f0f0b9fc3fd799bc301d57f588b9c7ae6 100644
|
||||
index 806cb4533cc035ee4c95597ba2ab6bbfb6ac81f1..2b597b8798ed235afcd833efbc7a308b2f1db288 100644
|
||||
--- a/src/compiler/turboshaft/graph-builder.cc
|
||||
+++ b/src/compiler/turboshaft/graph-builder.cc
|
||||
@@ -1974,7 +1974,7 @@ OpIndex GraphBuilder::Process(
|
||||
@@ -669,10 +669,10 @@ index 683604a0f5e2c0694f29e447e095417311ea37ec..cb3c976f0f0b9fc3fd799bc301d57f58
|
||||
// There is one return in addition to the return value of the C function,
|
||||
// which indicates if a fast API call actually happened.
|
||||
diff --git a/src/compiler/turboshaft/operations.h b/src/compiler/turboshaft/operations.h
|
||||
index 1b3a33fde8d73fea2d1d022711b6472a77ad7a75..917b39db6eaba0d9795ab8986687d591821d6317 100644
|
||||
index 1b36c56008d4b3c5af0d15f2c6336d260fab56c8..f50f1fd3ba0d0ac1deae2510a483714172560b56 100644
|
||||
--- a/src/compiler/turboshaft/operations.h
|
||||
+++ b/src/compiler/turboshaft/operations.h
|
||||
@@ -6385,16 +6385,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
|
||||
@@ -6318,16 +6318,24 @@ struct Float64SameValueOp : FixedArityOperationT<2, Float64SameValueOp> {
|
||||
};
|
||||
|
||||
struct FastApiCallParameters : public NON_EXPORTED_BASE(ZoneObject) {
|
||||
@@ -705,10 +705,10 @@ index 1b3a33fde8d73fea2d1d022711b6472a77ad7a75..917b39db6eaba0d9795ab8986687d591
|
||||
};
|
||||
|
||||
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
||||
index 351705cbc6c054d38f8d9d93744701b9004fcd1c..4c13f51d4b61f17558c6b10a09f8de5aedc093a8 100644
|
||||
index b6ded4cd3e2a29af8589862ac31c97fdd0da0c71..14c3378470a34ef8bdda4a4df8211e5a6b8726f7 100644
|
||||
--- a/src/compiler/wasm-compiler.cc
|
||||
+++ b/src/compiler/wasm-compiler.cc
|
||||
@@ -8356,13 +8356,19 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
||||
@@ -8351,13 +8351,19 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
|
||||
wasm::ObjectAccess::ToTagged(
|
||||
FunctionTemplateInfo::kCallbackDataOffset));
|
||||
|
||||
@@ -734,7 +734,7 @@ index 351705cbc6c054d38f8d9d93744701b9004fcd1c..4c13f51d4b61f17558c6b10a09f8de5a
|
||||
return gasm_->AdaptLocalArgument(receiver_node);
|
||||
}
|
||||
diff --git a/src/d8/d8-test.cc b/src/d8/d8-test.cc
|
||||
index e231c93579e0ca8068a0c192e6351bc20648d7ae..cb4d43c95665f7ba7f94a9ff63557ab97a1eef5a 100644
|
||||
index fd21264ec893850086041c3d7392151a6add2b27..1bc455ed18920588d641cdf9f3a54a5f8f528484 100644
|
||||
--- a/src/d8/d8-test.cc
|
||||
+++ b/src/d8/d8-test.cc
|
||||
@@ -443,6 +443,20 @@ class FastCApiObject {
|
||||
@@ -758,7 +758,7 @@ index e231c93579e0ca8068a0c192e6351bc20648d7ae..cb4d43c95665f7ba7f94a9ff63557ab9
|
||||
#ifdef V8_USE_SIMULATOR_WITH_GENERIC_C_CALLS
|
||||
static AnyCType Add32BitIntFastCallbackPatch(AnyCType receiver,
|
||||
AnyCType arg_i32,
|
||||
@@ -1549,6 +1563,22 @@ Local<FunctionTemplate> Shell::CreateTestFastCApiTemplate(Isolate* isolate) {
|
||||
@@ -1551,6 +1565,22 @@ Local<FunctionTemplate> Shell::CreateTestFastCApiTemplate(Isolate* isolate) {
|
||||
signature, 1, ConstructorBehavior::kThrow,
|
||||
SideEffectType::kHasSideEffect, {add_all_overloads, 2}));
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ move_src_dirs_if_exist() {
|
||||
src/third_party/libc++ \
|
||||
src/third_party/libc++abi \
|
||||
src/out/Default/obj/buildtools/third_party \
|
||||
src/v8/tools/builtins-pgo
|
||||
src/v8/tools/builtins-pgo \
|
||||
src/third_party/blink/web_tests/external/wpt
|
||||
do
|
||||
if [ -d "$dir" ]; then
|
||||
mkdir -p src_artifacts/$(dirname $dir)
|
||||
|
||||
@@ -16,7 +16,8 @@ const HASH_VERSIONS = {
|
||||
const filesToHash = [
|
||||
path.resolve(__dirname, '../DEPS'),
|
||||
path.resolve(__dirname, '../yarn.lock'),
|
||||
path.resolve(__dirname, '../script/sysroots.json')
|
||||
path.resolve(__dirname, '../script/sysroots.json'),
|
||||
path.resolve(__dirname, '../.github/actions/checkout/action.yml')
|
||||
];
|
||||
|
||||
const addAllFiles = (dir) => {
|
||||
|
||||
29
script/wpt-spec-runner.js
Normal file
29
script/wpt-spec-runner.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const cp = require('node:child_process');
|
||||
const path = require('node:path');
|
||||
|
||||
const utils = require('./lib/utils');
|
||||
|
||||
const BASE = path.resolve(__dirname, '../..');
|
||||
const WPT_DIR = path.resolve(BASE, 'third_party', 'blink', 'web_tests', 'external', 'wpt');
|
||||
|
||||
if (!require.main) {
|
||||
throw new Error('Must call the wpt spec runner directly');
|
||||
}
|
||||
|
||||
async function main () {
|
||||
const testChild = cp.spawn(utils.getAbsoluteElectronExec(), [path.join(__dirname, 'wpt'), '--enable-logging=stderr'], {
|
||||
env: {
|
||||
...process.env,
|
||||
WPT_DIR
|
||||
},
|
||||
stdio: 'inherit'
|
||||
});
|
||||
testChild.on('exit', (testCode) => {
|
||||
process.exit(testCode);
|
||||
});
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
console.error('An unhandled error occurred in the wpt spec runner', err);
|
||||
process.exit(1);
|
||||
});
|
||||
5
script/wpt/package.json
Normal file
5
script/wpt/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "electron-test-wpt",
|
||||
"main": "start.mjs",
|
||||
"type": "module"
|
||||
}
|
||||
388
script/wpt/runner/runner.mjs
Normal file
388
script/wpt/runner/runner.mjs
Normal file
@@ -0,0 +1,388 @@
|
||||
import { utilityProcess } from 'electron';
|
||||
|
||||
import { EventEmitter, once } from 'node:events';
|
||||
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
||||
import { isAbsolute, join, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { colors, handlePipes, normalizeName, parseMeta, resolveStatusPath } from './util.mjs';
|
||||
|
||||
const basePath = fileURLToPath(join(import.meta.url, '../..'));
|
||||
const testPath = process.env.WPT_DIR;
|
||||
const statusPath = join(basePath, 'status');
|
||||
|
||||
// https://github.com/web-platform-tests/wpt/blob/b24eedd/resources/testharness.js#L3705
|
||||
function sanitizeUnpairedSurrogates (str) {
|
||||
return str.replace(
|
||||
/([\ud800-\udbff]+)(?![\udc00-\udfff])|(^|[^\ud800-\udbff])([\udc00-\udfff]+)/g,
|
||||
function (_, low, prefix, high) {
|
||||
let output = prefix || ''; // Prefix may be undefined
|
||||
const string = low || high; // Only one of these alternates can match
|
||||
for (let i = 0; i < string.length; i++) {
|
||||
output += codeUnitStr(string[i]);
|
||||
}
|
||||
return output;
|
||||
});
|
||||
}
|
||||
|
||||
function codeUnitStr (char) {
|
||||
return 'U+' + char.charCodeAt(0).toString(16);
|
||||
}
|
||||
|
||||
export class WPTRunner extends EventEmitter {
|
||||
/** @type {string} */
|
||||
#folderName;
|
||||
|
||||
/** @type {string} */
|
||||
#folderPath;
|
||||
|
||||
/** @type {string[]} */
|
||||
#files = [];
|
||||
|
||||
/** @type {string[]} */
|
||||
#initScripts = [];
|
||||
|
||||
/** @type {string} */
|
||||
#url;
|
||||
|
||||
/** @type {import('../../status/fetch.status.json')} */
|
||||
#status;
|
||||
|
||||
/** Tests that have expectedly failed mapped by file name */
|
||||
#statusOutput = {};
|
||||
|
||||
#uncaughtExceptions = [];
|
||||
|
||||
#stats = {
|
||||
completedTests: 0,
|
||||
failedTests: 0,
|
||||
passedTests: 0,
|
||||
expectedFailures: 0,
|
||||
failedFiles: 0,
|
||||
passedFiles: 0,
|
||||
skippedFiles: 0
|
||||
};
|
||||
|
||||
constructor (folder, url) {
|
||||
super();
|
||||
|
||||
this.#folderName = folder;
|
||||
this.#folderPath = join(testPath, folder);
|
||||
this.#files.push(
|
||||
...WPTRunner.walk(
|
||||
this.#folderPath,
|
||||
(file) => file.endsWith('.any.js')
|
||||
)
|
||||
);
|
||||
|
||||
this.#status = JSON.parse(readFileSync(join(statusPath, `${folder}.status.json`)));
|
||||
this.#url = url;
|
||||
|
||||
if (this.#files.length === 0) {
|
||||
queueMicrotask(() => {
|
||||
this.emit('completion');
|
||||
});
|
||||
}
|
||||
|
||||
this.once('completion', () => {
|
||||
for (const { error, test } of this.#uncaughtExceptions) {
|
||||
console.log(colors(`Uncaught exception in "${test}":`, 'red'));
|
||||
console.log(colors(`${error.stack}`, 'red'));
|
||||
console.log('='.repeat(96));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static walk (dir, fn) {
|
||||
const ini = new Set(readdirSync(dir));
|
||||
const files = new Set();
|
||||
|
||||
while (ini.size !== 0) {
|
||||
for (const d of ini) {
|
||||
const path = resolve(dir, d);
|
||||
ini.delete(d); // remove from set
|
||||
const stats = statSync(path);
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
for (const f of readdirSync(path)) {
|
||||
ini.add(resolve(path, f));
|
||||
}
|
||||
} else if (stats.isFile() && fn(d)) {
|
||||
files.add(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [...files].sort();
|
||||
}
|
||||
|
||||
async run () {
|
||||
const workerPath = fileURLToPath(join(import.meta.url, '../worker.mjs'));
|
||||
/** @type {Set<Worker>} */
|
||||
const activeWorkers = new Set();
|
||||
let finishedFiles = 1;
|
||||
let total = this.#files.length;
|
||||
|
||||
const files = this.#files.map((test) => {
|
||||
const code = test.includes('.sub.')
|
||||
? handlePipes(readFileSync(test, 'utf-8'), this.#url)
|
||||
: readFileSync(test, 'utf-8');
|
||||
const meta = this.resolveMeta(code, test);
|
||||
|
||||
if (meta.variant.length) {
|
||||
total += meta.variant.length - 1;
|
||||
}
|
||||
|
||||
return [test, code, meta];
|
||||
});
|
||||
|
||||
console.log('='.repeat(96));
|
||||
|
||||
for (const [test, code, meta] of files) {
|
||||
console.log(`Started ${test}`);
|
||||
|
||||
const status = resolveStatusPath(test, this.#status);
|
||||
|
||||
if (status.file.skip || status.topLevel.skip) {
|
||||
this.#stats.skippedFiles += 1;
|
||||
|
||||
console.log(colors(`[${finishedFiles}/${total}] SKIPPED - ${test}`, 'yellow'));
|
||||
console.log('='.repeat(96));
|
||||
|
||||
finishedFiles++;
|
||||
continue;
|
||||
}
|
||||
|
||||
const start = performance.now();
|
||||
|
||||
for (const variant of meta.variant.length ? meta.variant : ['']) {
|
||||
const url = new URL(this.#url);
|
||||
if (variant) {
|
||||
url.search = variant;
|
||||
}
|
||||
const worker = new utilityProcess.fork(workerPath, [], {
|
||||
stdio: 'pipe'
|
||||
});
|
||||
await once(worker, 'spawn');
|
||||
worker.postMessage({
|
||||
workerData: {
|
||||
// The test file.
|
||||
test: code,
|
||||
// Parsed META tag information
|
||||
meta,
|
||||
url: url.href,
|
||||
path: test
|
||||
}
|
||||
});
|
||||
|
||||
worker.stdout.pipe(process.stdout);
|
||||
worker.stderr.pipe(process.stderr);
|
||||
|
||||
const fileUrl = new URL(`/${this.#folderName}${test.slice(this.#folderPath.length)}`, 'http://wpt');
|
||||
fileUrl.pathname = fileUrl.pathname.replace(/\.js$/, '.html');
|
||||
fileUrl.search = variant;
|
||||
const result = {
|
||||
test: fileUrl.href.slice(fileUrl.origin.length),
|
||||
subtests: [],
|
||||
status: ''
|
||||
};
|
||||
|
||||
activeWorkers.add(worker);
|
||||
// These values come directly from the web-platform-tests
|
||||
const timeout = meta.timeout === 'long' ? 60_000 : 10_000;
|
||||
|
||||
worker.on('message', (message) => {
|
||||
if (message.type === 'result') {
|
||||
this.handleIndividualTestCompletion(message, status, test, meta, result);
|
||||
} else if (message.type === 'completion') {
|
||||
this.handleTestCompletion(worker, status, test);
|
||||
} else if (message.type === 'error') {
|
||||
this.#uncaughtExceptions.push({ error: message.error, test });
|
||||
this.#stats.failedTests += 1;
|
||||
this.#stats.passedTests -= 1;
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
await once(worker, 'exit', {
|
||||
signal: AbortSignal.timeout(timeout)
|
||||
});
|
||||
|
||||
if (result.subtests.some((subtest) => subtest?.isExpectedFailure === false)) {
|
||||
this.#stats.failedFiles += 1;
|
||||
console.log(colors(`[${finishedFiles}/${total}] FAILED - ${test}`, 'red'));
|
||||
} else {
|
||||
this.#stats.passedFiles += 1;
|
||||
console.log(colors(`[${finishedFiles}/${total}] PASSED - ${test}`, 'green'));
|
||||
}
|
||||
|
||||
if (variant) console.log('Variant:', variant);
|
||||
console.log(`File took ${(performance.now() - start).toFixed(2)}ms`);
|
||||
console.log('='.repeat(96));
|
||||
} catch (_) {
|
||||
// If the worker is terminated by the timeout signal, the test is marked as failed
|
||||
this.#stats.failedFiles += 1;
|
||||
console.log(colors(`[${finishedFiles}/${total}] FAILED - ${test}`, 'red'));
|
||||
|
||||
if (variant) console.log('Variant:', variant);
|
||||
console.log(`File timed out after ${timeout}ms`);
|
||||
console.log('='.repeat(96));
|
||||
} finally {
|
||||
finishedFiles++;
|
||||
activeWorkers.delete(worker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.handleRunnerCompletion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after a test has succeeded or failed.
|
||||
*/
|
||||
handleIndividualTestCompletion (message, status, path, meta, wptResult) {
|
||||
this.#stats.completedTests += 1;
|
||||
|
||||
const { file, topLevel } = status;
|
||||
const isFailure = message.result.status === 1;
|
||||
|
||||
const testResult = {
|
||||
status: isFailure ? 'FAIL' : 'PASS',
|
||||
name: sanitizeUnpairedSurrogates(message.result.name)
|
||||
};
|
||||
|
||||
if (isFailure) {
|
||||
let isExpectedFailure = false;
|
||||
this.#stats.failedTests += 1;
|
||||
|
||||
const name = normalizeName(message.result.name);
|
||||
const sanitizedMessage = sanitizeUnpairedSurrogates(message.result.message);
|
||||
|
||||
if (file.flaky?.includes(name)) {
|
||||
isExpectedFailure = true;
|
||||
this.#stats.expectedFailures += 1;
|
||||
wptResult?.subtests.push({ ...testResult, message: sanitizedMessage, isExpectedFailure });
|
||||
} else if (file.allowUnexpectedFailures || topLevel.allowUnexpectedFailures || file.fail?.includes(name)) {
|
||||
if (!file.allowUnexpectedFailures && !topLevel.allowUnexpectedFailures) {
|
||||
if (Array.isArray(file.fail)) {
|
||||
this.#statusOutput[path] ??= [];
|
||||
this.#statusOutput[path].push(name);
|
||||
}
|
||||
}
|
||||
|
||||
isExpectedFailure = true;
|
||||
this.#stats.expectedFailures += 1;
|
||||
wptResult?.subtests.push({ ...testResult, message: sanitizedMessage, isExpectedFailure });
|
||||
} else {
|
||||
wptResult?.subtests.push({ ...testResult, message: sanitizedMessage, isExpectedFailure });
|
||||
process.exitCode = 1;
|
||||
console.error(message.result);
|
||||
}
|
||||
if (!isExpectedFailure) {
|
||||
process._rawDebug(`Failed test: ${path}`);
|
||||
}
|
||||
} else {
|
||||
this.#stats.passedTests += 1;
|
||||
wptResult?.subtests.push(testResult);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after all the tests in a worker are completed.
|
||||
* @param {Worker} worker
|
||||
*/
|
||||
handleTestCompletion (worker, status, path) {
|
||||
worker.kill();
|
||||
|
||||
const { file } = status;
|
||||
const hasExpectedFailures = !!file.fail;
|
||||
const testHasFailures = !!this.#statusOutput?.[path];
|
||||
const failed = this.#statusOutput?.[path] ?? [];
|
||||
|
||||
if (hasExpectedFailures !== testHasFailures) {
|
||||
console.log({ expected: file.fail, failed });
|
||||
|
||||
if (failed.length === 0) {
|
||||
console.log(colors('Tests are marked as failure but did not fail, yay!', 'red'));
|
||||
} else if (!hasExpectedFailures) {
|
||||
console.log(colors('Test failed but there were no expected errors.', 'red'));
|
||||
}
|
||||
|
||||
process.exitCode = 1;
|
||||
} else if (hasExpectedFailures && testHasFailures) {
|
||||
const diff = [
|
||||
...file.fail.filter(x => !failed.includes(x)),
|
||||
...failed.filter(x => !file.fail.includes(x))
|
||||
];
|
||||
|
||||
if (diff.length) {
|
||||
console.log({ diff });
|
||||
console.log(colors('Expected failures did not match actual failures', 'red'));
|
||||
process.exitCode = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after every test has completed.
|
||||
*/
|
||||
handleRunnerCompletion () {
|
||||
// tests that failed
|
||||
if (Object.keys(this.#statusOutput).length !== 0) {
|
||||
console.log(this.#statusOutput);
|
||||
}
|
||||
|
||||
this.emit('completion');
|
||||
|
||||
const { passedFiles, failedFiles, skippedFiles } = this.#stats;
|
||||
console.log(
|
||||
`File results for folder [${this.#folderName}]: ` +
|
||||
`completed: ${this.#files.length}, passed: ${passedFiles}, failed: ${failedFiles}, ` +
|
||||
`skipped: ${skippedFiles}`
|
||||
);
|
||||
|
||||
const { completedTests, failedTests, passedTests, expectedFailures } = this.#stats;
|
||||
console.log(
|
||||
`Test results for folder [${this.#folderName}]: ` +
|
||||
`completed: ${completedTests}, failed: ${failedTests}, passed: ${passedTests}, ` +
|
||||
`expected failures: ${expectedFailures}, ` +
|
||||
`unexpected failures: ${failedTests - expectedFailures}`
|
||||
);
|
||||
|
||||
process.exit(failedTests - expectedFailures ? 1 : process.exitCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses META tags and resolves any script file paths.
|
||||
* @param {string} code
|
||||
* @param {string} path The absolute path of the test
|
||||
*/
|
||||
resolveMeta (code, path) {
|
||||
const meta = parseMeta(code);
|
||||
const scripts = meta.scripts.map((filePath) => {
|
||||
let content = '';
|
||||
|
||||
if (filePath === '/resources/WebIDLParser.js') {
|
||||
// See https://github.com/web-platform-tests/wpt/pull/731
|
||||
return readFileSync(join(testPath, '/resources/webidl2/lib/webidl2.js'), 'utf-8');
|
||||
} else if (isAbsolute(filePath)) {
|
||||
content = readFileSync(join(testPath, filePath), 'utf-8');
|
||||
} else {
|
||||
content = readFileSync(resolve(path, '..', filePath), 'utf-8');
|
||||
}
|
||||
|
||||
// If the file has any built-in pipes.
|
||||
if (filePath.includes('.sub.')) {
|
||||
content = handlePipes(content, this.#url);
|
||||
}
|
||||
|
||||
return content;
|
||||
});
|
||||
|
||||
return {
|
||||
...meta,
|
||||
resourcePaths: meta.scripts,
|
||||
scripts
|
||||
};
|
||||
}
|
||||
}
|
||||
172
script/wpt/runner/util.mjs
Normal file
172
script/wpt/runner/util.mjs
Normal file
@@ -0,0 +1,172 @@
|
||||
import assert from 'node:assert';
|
||||
import { sep } from 'node:path';
|
||||
import { exit } from 'node:process';
|
||||
import tty from 'node:tty';
|
||||
import { inspect } from 'node:util';
|
||||
|
||||
/**
|
||||
* Parse the `Meta:` tags sometimes included in tests.
|
||||
* These can include resources to inject, how long it should
|
||||
* take to timeout, and which globals to expose.
|
||||
* @example
|
||||
* // META: timeout=long
|
||||
* // META: global=window,worker
|
||||
* // META: script=/common/utils.js
|
||||
* // META: script=/common/get-host-info.sub.js
|
||||
* // META: script=../request/request-error.js
|
||||
* @see https://nodejs.org/api/readline.html#readline_example_read_file_stream_line_by_line
|
||||
* @param {string} fileContents
|
||||
*/
|
||||
export function parseMeta (fileContents) {
|
||||
const lines = fileContents.split(/\r?\n/g);
|
||||
|
||||
const meta = {
|
||||
/** @type {string|null} */
|
||||
timeout: null,
|
||||
/** @type {string[]} */
|
||||
global: [],
|
||||
/** @type {string[]} */
|
||||
scripts: [],
|
||||
/** @type {string[]} */
|
||||
variant: []
|
||||
};
|
||||
|
||||
for (const line of lines) {
|
||||
if (!line.startsWith('// META: ')) {
|
||||
break;
|
||||
}
|
||||
|
||||
const groups = /^\/\/ META: (?<type>.*?)=(?<match>.*)$/.exec(line)?.groups;
|
||||
|
||||
if (!groups) {
|
||||
console.log(`Failed to parse META tag: ${line}`);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
switch (groups.type) {
|
||||
case 'variant':
|
||||
meta[groups.type].push(groups.match);
|
||||
break;
|
||||
case 'title':
|
||||
case 'timeout': {
|
||||
meta[groups.type] = groups.match;
|
||||
break;
|
||||
}
|
||||
case 'global': {
|
||||
// window,worker -> ['window', 'worker']
|
||||
meta.global.push(...groups.match.split(','));
|
||||
break;
|
||||
}
|
||||
case 'script': {
|
||||
// A relative or absolute file path to the resources
|
||||
// needed for the current test.
|
||||
meta.scripts.push(groups.match);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
console.log(`Unknown META tag: ${groups.type}`);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return meta;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} sub
|
||||
*/
|
||||
function parseSubBlock (sub) {
|
||||
const subName = sub.includes('[') ? sub.slice(0, sub.indexOf('[')) : sub;
|
||||
const options = sub.matchAll(/\[(.*?)\]/gm);
|
||||
|
||||
return {
|
||||
sub: subName,
|
||||
options: [...options].map(match => match[1])
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://web-platform-tests.org/writing-tests/server-pipes.html?highlight=sub#built-in-pipes
|
||||
* @param {string} code
|
||||
* @param {string} url
|
||||
*/
|
||||
export function handlePipes (code, url) {
|
||||
const server = new URL(url);
|
||||
|
||||
// "Substitutions are marked in a file using a block delimited by
|
||||
// {{ and }}. Inside the block the following variables are available:"
|
||||
return code.replace(/{{(.*?)}}/gm, (_, match) => {
|
||||
const { sub } = parseSubBlock(match);
|
||||
|
||||
switch (sub) {
|
||||
// "The host name of the server excluding any subdomain part."
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case 'host':
|
||||
// "The domain name of a particular subdomain e.g.
|
||||
// {{domains[www]}} for the www subdomain."
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case 'domains':
|
||||
// "The domain name of a particular subdomain for a particular host.
|
||||
// The first key may be empty (designating the “default” host) or
|
||||
// the value alt; i.e., {{hosts[alt][]}} (designating the alternate
|
||||
// host)."
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case 'hosts': {
|
||||
return 'localhost';
|
||||
}
|
||||
// "The port number of servers, by protocol e.g. {{ports[http][0]}}
|
||||
// for the first (and, depending on setup, possibly only) http server"
|
||||
case 'ports': {
|
||||
return server.port;
|
||||
}
|
||||
default: {
|
||||
throw new TypeError(`Unknown substitute "${sub}".`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Some test names may contain characters that JSON cannot handle.
|
||||
* @param {string} name
|
||||
*/
|
||||
export function normalizeName (name) {
|
||||
return name.replace(/(\v)/g, (_, match) => {
|
||||
switch (inspect(match)) {
|
||||
case '\'\\x0B\'': return '\\x0B';
|
||||
default: return match;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function colors (str, color) {
|
||||
assert(Object.hasOwn(inspect.colors, color), `Missing color ${color}`);
|
||||
|
||||
if (!tty.WriteStream.prototype.hasColors()) {
|
||||
return str;
|
||||
}
|
||||
|
||||
const [start, end] = inspect.colors[color];
|
||||
|
||||
return `\u001b[${start}m${str}\u001b[${end}m`;
|
||||
}
|
||||
|
||||
/** @param {string} path */
|
||||
export function resolveStatusPath (path, status) {
|
||||
const paths = path
|
||||
.slice(process.cwd().length + sep.length)
|
||||
.split(sep)
|
||||
.slice(5); // [test, wpt, tests, fetch, b, c.js] -> [fetch, b, c.js]
|
||||
|
||||
// skip the first folder name
|
||||
for (let i = 1; i < paths.length - 1; i++) {
|
||||
status = status[paths[i]];
|
||||
|
||||
if (!status) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return { fullPath: path, topLevel: status ?? {}, file: status?.[paths.at(-1)] ?? {} };
|
||||
}
|
||||
128
script/wpt/runner/worker.mjs
Normal file
128
script/wpt/runner/worker.mjs
Normal file
@@ -0,0 +1,128 @@
|
||||
import { net } from 'electron';
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { runInThisContext } from 'node:vm';
|
||||
|
||||
const basePath = process.env.WPT_DIR;
|
||||
|
||||
process.on('uncaughtException', (err) => {
|
||||
console.log('uncaughtException', err);
|
||||
process.parentPort.postMessage({
|
||||
type: 'error',
|
||||
error: {
|
||||
message: err.message,
|
||||
name: err.name,
|
||||
stack: err.stack
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const globalPropertyDescriptors = {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
};
|
||||
|
||||
Object.defineProperties(globalThis, {
|
||||
fetch: {
|
||||
...globalPropertyDescriptors,
|
||||
enumerable: true,
|
||||
value: net.fetch
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: remove once Float16Array is added. Otherwise a test throws with an uncaught exception.
|
||||
globalThis.Float16Array ??= class Float16Array {};
|
||||
|
||||
process.parentPort.on('message', (message) => {
|
||||
const { meta, test, url, path } = message.data.workerData;
|
||||
const urlPath = path.slice(basePath.length);
|
||||
|
||||
// self is required by testharness
|
||||
// GLOBAL is required by self
|
||||
runInThisContext(`
|
||||
globalThis.self = globalThis
|
||||
globalThis.GLOBAL = {
|
||||
isWorker () {
|
||||
return false
|
||||
},
|
||||
isShadowRealm () {
|
||||
return false
|
||||
},
|
||||
isWindow () {
|
||||
return false
|
||||
}
|
||||
}
|
||||
globalThis.window = globalThis
|
||||
globalThis.location = new URL('${urlPath.replace(/\\/g, '/')}', '${url}')
|
||||
globalThis.Window = Object.getPrototypeOf(globalThis).constructor
|
||||
`);
|
||||
|
||||
if (meta.title) {
|
||||
runInThisContext(`globalThis.META_TITLE = "${meta.title.replace(/"/g, '\\"')}"`);
|
||||
}
|
||||
|
||||
const harness = readFileSync(join(basePath, '/resources/testharness.js'), 'utf-8');
|
||||
runInThisContext(harness);
|
||||
|
||||
// add_*_callback comes from testharness
|
||||
// stolen from node's wpt test runner
|
||||
// eslint-disable-next-line no-undef
|
||||
add_result_callback((result) => {
|
||||
process.parentPort.postMessage({
|
||||
type: 'result',
|
||||
result: {
|
||||
status: result.status,
|
||||
name: result.name,
|
||||
message: result.message,
|
||||
stack: result.stack
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
add_completion_callback((_, status) => {
|
||||
process.parentPort.postMessage({
|
||||
type: 'completion',
|
||||
status
|
||||
});
|
||||
});
|
||||
|
||||
const globalOrigin = Symbol.for('undici.globalOrigin.1');
|
||||
function setGlobalOrigin (newOrigin) {
|
||||
if (newOrigin === undefined) {
|
||||
Object.defineProperty(globalThis, globalOrigin, {
|
||||
value: undefined,
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const parsedURL = new URL(newOrigin);
|
||||
|
||||
if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {
|
||||
throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`);
|
||||
}
|
||||
|
||||
Object.defineProperty(globalThis, globalOrigin, {
|
||||
value: parsedURL,
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
}
|
||||
|
||||
setGlobalOrigin(globalThis.location);
|
||||
|
||||
// Inject any files from the META tags
|
||||
for (const script of meta.scripts) {
|
||||
runInThisContext(script);
|
||||
}
|
||||
|
||||
// Finally, run the test.
|
||||
runInThisContext(test);
|
||||
});
|
||||
3
script/wpt/server/constants.mjs
Normal file
3
script/wpt/server/constants.mjs
Normal file
@@ -0,0 +1,3 @@
|
||||
export const symbols = {
|
||||
kContent: Symbol('content')
|
||||
};
|
||||
104
script/wpt/server/routes/redirect.mjs
Normal file
104
script/wpt/server/routes/redirect.mjs
Normal file
@@ -0,0 +1,104 @@
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
|
||||
const stash = new Map();
|
||||
|
||||
/**
|
||||
* @see https://github.com/web-platform-tests/wpt/blob/master/fetch/connection-pool/resources/network-partition-key.py
|
||||
* @param {Parameters<import('http').RequestListener>[0]} req
|
||||
* @param {Parameters<import('http').RequestListener>[1]} res
|
||||
* @param {URL} fullUrl
|
||||
*/
|
||||
export async function route (req, res, fullUrl) {
|
||||
const { searchParams } = fullUrl;
|
||||
|
||||
let stashedData = { count: 0, preflight: 0 };
|
||||
let status = 302;
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
res.setHeader('Pragma', 'no-cache');
|
||||
|
||||
if (Object.hasOwn(req.headers, 'origin')) {
|
||||
res.setHeader('Access-Control-Allow-Origin', req.headers.origin ?? '');
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
} else {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
}
|
||||
|
||||
let token = null;
|
||||
if (searchParams.has('token')) {
|
||||
token = searchParams.get('token');
|
||||
const data = stash.get(token);
|
||||
stash.delete(token);
|
||||
if (data) {
|
||||
stashedData = data;
|
||||
}
|
||||
}
|
||||
|
||||
if (req.method === 'OPTIONS') {
|
||||
if (searchParams.has('allow_headers')) {
|
||||
res.setHeader('Access-Control-Allow-Headers', searchParams.get('allow_headers'));
|
||||
}
|
||||
|
||||
stashedData.preflight = '1';
|
||||
|
||||
if (!searchParams.has('redirect_preflight')) {
|
||||
if (token) {
|
||||
stash.set(searchParams.get('token'), stashedData);
|
||||
}
|
||||
|
||||
res.statusCode = 200;
|
||||
res.end('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (searchParams.has('redirect_status')) {
|
||||
status = parseInt(searchParams.get('redirect_status'));
|
||||
}
|
||||
|
||||
stashedData.count += 1;
|
||||
|
||||
if (searchParams.has('location')) {
|
||||
let url = decodeURIComponent(searchParams.get('location'));
|
||||
|
||||
if (!searchParams.has('simple')) {
|
||||
const scheme = new URL(url, fullUrl).protocol;
|
||||
|
||||
if (scheme === 'http:' || scheme === 'https:') {
|
||||
url += url.includes('?') ? '&' : '?';
|
||||
|
||||
for (const [key, value] of searchParams) {
|
||||
url += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(value);
|
||||
}
|
||||
|
||||
url += '&count=' + stashedData.count;
|
||||
}
|
||||
}
|
||||
|
||||
res.setHeader('location', url);
|
||||
}
|
||||
|
||||
if (searchParams.has('redirect_referrerpolicy')) {
|
||||
res.setHeader('Referrer-Policy', searchParams.get('redirect_referrerpolicy'));
|
||||
}
|
||||
|
||||
if (searchParams.has('delay')) {
|
||||
await setTimeout(parseFloat(searchParams.get('delay') ?? 0));
|
||||
}
|
||||
|
||||
if (token) {
|
||||
stash.set(searchParams.get('token'), stashedData);
|
||||
|
||||
if (searchParams.has('max_count')) {
|
||||
const maxCount = parseInt(searchParams.get('max_count'));
|
||||
|
||||
if (stashedData.count > maxCount) {
|
||||
res.end((stashedData.count - 1).toString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res.statusCode = status;
|
||||
res.end('');
|
||||
}
|
||||
350
script/wpt/server/server.mjs
Normal file
350
script/wpt/server/server.mjs
Normal file
@@ -0,0 +1,350 @@
|
||||
import { once } from 'node:events';
|
||||
import { createReadStream, readFileSync, existsSync } from 'node:fs';
|
||||
import { createServer } from 'node:http';
|
||||
import { join } from 'node:path';
|
||||
import process from 'node:process';
|
||||
import { setTimeout as sleep } from 'node:timers/promises';
|
||||
|
||||
import { symbols } from './constants.mjs';
|
||||
import { route as redirectRoute } from './routes/redirect.mjs';
|
||||
|
||||
const tests = process.env.WPT_DIR;
|
||||
|
||||
// https://web-platform-tests.org/tools/wptserve/docs/stash.html
|
||||
class Stash extends Map {
|
||||
take (key) {
|
||||
if (this.has(key)) {
|
||||
const value = this.get(key);
|
||||
|
||||
this.delete(key);
|
||||
return value.value;
|
||||
}
|
||||
}
|
||||
|
||||
put (key, value, path) {
|
||||
this.set(key, { value, path });
|
||||
}
|
||||
}
|
||||
|
||||
const stash = new Stash();
|
||||
|
||||
const server = createServer(async (req, res) => {
|
||||
const fullUrl = new URL(req.url, `http://localhost:${server.address().port}`);
|
||||
|
||||
switch (fullUrl.pathname) {
|
||||
case '/fetch/content-encoding/resources/big.text.gz':
|
||||
case '/fetch/content-encoding/resources/foo.octetstream.gz':
|
||||
case '/fetch/content-encoding/resources/foo.text.gz':
|
||||
case '/fetch/api/resources/cors-top.txt':
|
||||
case '/fetch/api/resources/top.txt':
|
||||
case '/fetch/data-urls/resources/base64.json':
|
||||
case '/fetch/data-urls/resources/data-urls.json':
|
||||
case '/fetch/api/resources/empty.txt':
|
||||
case '/fetch/api/resources/data.json': {
|
||||
// If this specific resources requires custom headers
|
||||
const customHeadersPath = join(tests, fullUrl.pathname + '.headers');
|
||||
if (existsSync(customHeadersPath)) {
|
||||
const headers = readFileSync(customHeadersPath, 'utf-8')
|
||||
.trim()
|
||||
.split(/\r?\n/g)
|
||||
.map((h) => h.split(': '));
|
||||
|
||||
for (const [key, value] of headers) {
|
||||
if (!key || !value) {
|
||||
console.warn(`Skipping ${key}:${value} header pair`);
|
||||
continue;
|
||||
}
|
||||
res.setHeader(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/web-platform-tests/wpt/blob/6ae3f702a332e8399fab778c831db6b7dca3f1c6/fetch/api/resources/data.json
|
||||
createReadStream(join(tests, fullUrl.pathname))
|
||||
.on('end', () => res.end())
|
||||
.pipe(res);
|
||||
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/trickle.py': {
|
||||
// Note: python's time.sleep(...) takes seconds, while setTimeout
|
||||
// takes ms.
|
||||
const delay = parseFloat(fullUrl.searchParams.get('ms') ?? 500);
|
||||
const count = parseInt(fullUrl.searchParams.get('count') ?? 50);
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for await (const chunk of req); // read request body
|
||||
|
||||
await sleep(delay);
|
||||
|
||||
if (!fullUrl.searchParams.has('notype')) {
|
||||
res.setHeader('Content-type', 'text/plain');
|
||||
}
|
||||
|
||||
res.statusCode = 200;
|
||||
await sleep(delay);
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
res.write('TEST_TRICKLE\n');
|
||||
await sleep(delay);
|
||||
}
|
||||
|
||||
res.end();
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/infinite-slow-response.py': {
|
||||
// https://github.com/web-platform-tests/wpt/blob/master/fetch/api/resources/infinite-slow-response.py
|
||||
const stateKey = fullUrl.searchParams.get('stateKey') ?? '';
|
||||
const abortKey = fullUrl.searchParams.get('abortKey') ?? '';
|
||||
|
||||
if (stateKey) {
|
||||
stash.put(stateKey, 'open', fullUrl.pathname);
|
||||
}
|
||||
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.statusCode = 200;
|
||||
|
||||
res.write('.'.repeat(2048));
|
||||
|
||||
while (true) {
|
||||
if (!res.write('.')) {
|
||||
break;
|
||||
} else if (abortKey && stash.take(abortKey)) {
|
||||
break;
|
||||
}
|
||||
|
||||
await sleep(100);
|
||||
}
|
||||
|
||||
if (stateKey) {
|
||||
stash.put(stateKey, 'closed', fullUrl.pathname);
|
||||
}
|
||||
|
||||
res.end();
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/stash-take.py': {
|
||||
// https://github.com/web-platform-tests/wpt/blob/6ae3f702a332e8399fab778c831db6b7dca3f1c6/fetch/api/resources/stash-take.py
|
||||
|
||||
const key = fullUrl.searchParams.get('key');
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
const took = stash.take(key, fullUrl.pathname) ?? null;
|
||||
|
||||
res.write(JSON.stringify(took));
|
||||
res.end();
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/echo-content.py': {
|
||||
res.setHeader('X-Request-Method', req.method);
|
||||
res.setHeader('X-Request-Content-Length', req.headers['content-length'] ?? 'NO');
|
||||
res.setHeader('X-Request-Content-Type', req.headers['content-type'] ?? 'NO');
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
|
||||
for await (const chunk of req) {
|
||||
res.write(chunk);
|
||||
}
|
||||
|
||||
res.end();
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/cache.py': {
|
||||
if (req.headers['if-none-match'] === '"123abc"') {
|
||||
res.statusCode = 304;
|
||||
res.statusMessage = 'Not Modified';
|
||||
res.setHeader('X-HTTP-STATUS', '304');
|
||||
res.end();
|
||||
} else {
|
||||
// cache miss, so respond with the actual content
|
||||
res.statusCode = 200;
|
||||
res.statusMessage = 'OK';
|
||||
res.setHeader('Content-Type', 'text/plain');
|
||||
res.setHeader('ETag', '"123abc"');
|
||||
res.end('lorem ipsum dolor sit amet');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/status.py': {
|
||||
const code = parseInt(fullUrl.searchParams.get('code') ?? 200);
|
||||
const text = fullUrl.searchParams.get('text') ?? 'OMG';
|
||||
const content = fullUrl.searchParams.get('content') ?? '';
|
||||
const type = fullUrl.searchParams.get('type') ?? '';
|
||||
res.statusCode = code;
|
||||
res.statusMessage = text;
|
||||
res.setHeader('Content-Type', type);
|
||||
res.setHeader('X-Request-Method', req.method);
|
||||
res.end(content);
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/inspect-headers.py': {
|
||||
const query = fullUrl.searchParams;
|
||||
const checkedHeaders = query.get('headers')
|
||||
?.split('|')
|
||||
.map(h => h.toLowerCase()) ?? [];
|
||||
|
||||
if (query.has('headers')) {
|
||||
for (const header of checkedHeaders) {
|
||||
if (Object.hasOwn(req.headers, header)) {
|
||||
res.setHeader(`x-request-${header}`, req.headers[header] ?? '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (query.has('cors')) {
|
||||
if (Object.hasOwn(req.headers, 'origin')) {
|
||||
res.setHeader('Access-Control-Allow-Origin', req.headers.origin ?? '');
|
||||
} else {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
}
|
||||
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, HEAD');
|
||||
const exposedHeaders = checkedHeaders.map(h => `x-request-${h}`).join(', ');
|
||||
res.setHeader('Access-Control-Expose-Headers', exposedHeaders);
|
||||
if (query.has('allow_headers')) {
|
||||
res.setHeader('Access-Control-Allow-Headers', query.get('allowed_headers'));
|
||||
} else {
|
||||
res.setHeader('Access-Control-Allow-Headers', Object.keys(req.headers).join(', '));
|
||||
}
|
||||
}
|
||||
|
||||
res.setHeader('content-type', 'text/plain');
|
||||
res.end('');
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/bad-chunk-encoding.py': {
|
||||
const query = fullUrl.searchParams;
|
||||
|
||||
const delay = parseFloat(query.get('ms') ?? 1000);
|
||||
const count = parseInt(query.get('count') ?? 50);
|
||||
await sleep(delay);
|
||||
res.socket.write(
|
||||
'HTTP/1.1 200 OK\r\ntransfer-encoding: chunked\r\n\r\n'
|
||||
);
|
||||
await sleep(delay);
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
res.socket.write('a\r\nTEST_CHUNK\r\n');
|
||||
await sleep(delay);
|
||||
}
|
||||
|
||||
res.end('garbage');
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/redirect.py': {
|
||||
redirectRoute(req, res, fullUrl);
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/method.py': {
|
||||
if (fullUrl.searchParams.has('cors')) {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, FOO');
|
||||
res.setHeader('Access-Control-Allow-Headers', 'x-test, x-foo');
|
||||
res.setHeader('Access-Control-Expose-Headers', 'x-request-method');
|
||||
}
|
||||
|
||||
res.setHeader('x-request-method', req.method);
|
||||
res.setHeader('x-request-content-type', req.headers['content-type'] ?? 'NO');
|
||||
res.setHeader('x-request-content-length', req.headers['content-length'] ?? 'NO');
|
||||
res.setHeader('x-request-content-encoding', req.headers['content-encoding'] ?? 'NO');
|
||||
res.setHeader('x-request-content-language', req.headers['content-language'] ?? 'NO');
|
||||
res.setHeader('x-request-content-location', req.headers['content-location'] ?? 'NO');
|
||||
|
||||
for await (const chunk of req) {
|
||||
res.write(chunk);
|
||||
}
|
||||
|
||||
res.end();
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/clean-stash.py': {
|
||||
const token = fullUrl.searchParams.get('token');
|
||||
const took = stash.take(token);
|
||||
|
||||
if (took) {
|
||||
res.end('1');
|
||||
} else {
|
||||
res.end('0');
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case '/fetch/content-encoding/resources/bad-gzip-body.py': {
|
||||
res.setHeader('Content-Encoding', 'gzip');
|
||||
res.end('not actually gzip');
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/dump-authorization-header.py': {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
|
||||
if (req.headers.origin) {
|
||||
res.setHeader('Access-Control-Allow-Origin', req.headers.origin);
|
||||
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
||||
} else {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
}
|
||||
|
||||
res.setHeader('Access-Control-Allow-Headers', 'Authorization');
|
||||
res.statusCode = 200;
|
||||
|
||||
if (req.headers.authorization) {
|
||||
res.end(req.headers.authorization);
|
||||
break;
|
||||
}
|
||||
|
||||
res.end('none');
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/authentication.py': {
|
||||
const auth = Buffer.from(req.headers.authorization.slice('Basic '.length), 'base64');
|
||||
const [user, password] = auth.toString().split(':');
|
||||
|
||||
if (user === 'user' && password === 'password') {
|
||||
res.end('Authentication done');
|
||||
break;
|
||||
}
|
||||
|
||||
const realm = fullUrl.searchParams.get('realm') ?? 'test';
|
||||
|
||||
res.statusCode = 401;
|
||||
res.setHeader('WWW-Authenticate', `Basic realm="${realm}"`);
|
||||
res.end('Please login with credentials \'user\' and \'password\'');
|
||||
break;
|
||||
}
|
||||
case '/fetch/api/resources/redirect-empty-location.py': {
|
||||
res.setHeader('location', '');
|
||||
res.statusCode = 302;
|
||||
res.end('');
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
res.statusCode = 200;
|
||||
res.end(fullUrl.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if (res[symbols.kContent]) {
|
||||
res.write(res[symbols.kContent]);
|
||||
}
|
||||
}).listen(0);
|
||||
|
||||
await once(server, 'listening');
|
||||
|
||||
const send = (message) => {
|
||||
if (typeof process.send === 'function') {
|
||||
process.send(message);
|
||||
}
|
||||
};
|
||||
|
||||
const url = `http://localhost:${server.address().port}`;
|
||||
console.log('server opened ' + url);
|
||||
send({ server: url });
|
||||
|
||||
process.on('message', (message) => {
|
||||
if (message === 'shutdown') {
|
||||
server.close((err) => process.exit(err ? 1 : 0));
|
||||
}
|
||||
});
|
||||
|
||||
export { server };
|
||||
32
script/wpt/start.mjs
Normal file
32
script/wpt/start.mjs
Normal file
@@ -0,0 +1,32 @@
|
||||
import { app } from 'electron';
|
||||
|
||||
import { fork } from 'node:child_process';
|
||||
import { on } from 'node:events';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { WPTRunner } from './runner/runner.mjs';
|
||||
|
||||
const serverPath = fileURLToPath(join(import.meta.url, '../server/server.mjs'));
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
const child = fork(serverPath, [], {
|
||||
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
|
||||
});
|
||||
|
||||
child.stdout.pipe(process.stdout);
|
||||
child.stderr.pipe(process.stderr);
|
||||
child.on('exit', (code) => process.exit(code));
|
||||
|
||||
for await (const [message] of on(child, 'message')) {
|
||||
if (message.server) {
|
||||
const runner = new WPTRunner('fetch', message.server);
|
||||
runner.run();
|
||||
runner.once('completion', () => {
|
||||
if (child.connected) {
|
||||
child.send('shutdown');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
578
script/wpt/status/fetch.status.json
Normal file
578
script/wpt/status/fetch.status.json
Normal file
@@ -0,0 +1,578 @@
|
||||
{
|
||||
"api": {
|
||||
"abort": {
|
||||
"general.any.js": {
|
||||
"fail": [
|
||||
"response.arrayBuffer() rejects if already aborted",
|
||||
"response.blob() rejects if already aborted",
|
||||
"response.formData() rejects if already aborted",
|
||||
"response.json() rejects if already aborted",
|
||||
"response.text() rejects if already aborted",
|
||||
"response.bytes() rejects if already aborted",
|
||||
"Call text() twice on aborted response",
|
||||
"Fetch aborted & connection closed when aborted after calling response.arrayBuffer()",
|
||||
"Fetch aborted & connection closed when aborted after calling response.blob()",
|
||||
"Fetch aborted & connection closed when aborted after calling response.formData()",
|
||||
"Fetch aborted & connection closed when aborted after calling response.json()",
|
||||
"Fetch aborted & connection closed when aborted after calling response.text()",
|
||||
"Fetch aborted & connection closed when aborted after calling response.bytes()",
|
||||
"Stream errors once aborted. Underlying connection closed.",
|
||||
"Stream errors once aborted, after reading. Underlying connection closed."
|
||||
]
|
||||
},
|
||||
"cache.https.any.js": {
|
||||
"note": "undici doesn't implement http caching",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"basic": {
|
||||
"accept-header.any.js": {
|
||||
"fail": [
|
||||
"Request through fetch should have 'accept' header with value '*/*'",
|
||||
"Request through fetch should have 'accept' header with value 'custom/*'",
|
||||
"Request through fetch should have a 'accept-language' header",
|
||||
"Request through fetch should have 'accept-language' header with value 'bzh'"
|
||||
]
|
||||
},
|
||||
"conditional-get.any.js": {
|
||||
"fail": [
|
||||
"Testing conditional GET with ETags"
|
||||
],
|
||||
"note": "undici doesn't keep track of etags"
|
||||
},
|
||||
"error-after-response.any.js": {
|
||||
"fail": [
|
||||
"Response reader read() promise should reject after a network error happening after resolving fetch promise",
|
||||
"Response reader closed promise should reject after a network error happening after resolving fetch promise"
|
||||
]
|
||||
},
|
||||
"header-value-combining.any.js": {
|
||||
"fail": [
|
||||
"response.headers.get('content-length') expects 0, 0",
|
||||
"response.headers.get('foo-test') expects 1, 2, 3",
|
||||
"response.headers.get('heya') expects , \\x0B\f, 1, , , 2"
|
||||
],
|
||||
"flaky": [
|
||||
"response.headers.get('content-length') expects 0",
|
||||
"response.headers.get('double-trouble') expects , ",
|
||||
"response.headers.get('www-authenticate') expects 1, 2, 3, 4"
|
||||
]
|
||||
},
|
||||
"header-value-null-byte.any.js": {
|
||||
"fail": [
|
||||
"Ensure fetch() rejects null bytes in headers"
|
||||
]
|
||||
},
|
||||
"http-response-code.any.js": {
|
||||
"fail": [
|
||||
"Fetch on 425 response should not be retried for non TLS early data."
|
||||
]
|
||||
},
|
||||
"integrity.sub.any.js": {
|
||||
"note": "Electron: integrity is not working",
|
||||
"skip": true
|
||||
},
|
||||
"keepalive.any.js": {
|
||||
"note": "document is not defined",
|
||||
"skip": true
|
||||
},
|
||||
"mode-no-cors.sub.any.js": {
|
||||
"note": "undici doesn't implement CORs",
|
||||
"skip": true
|
||||
},
|
||||
"mode-same-origin.any.js": {
|
||||
"note": "undici doesn't respect RequestInit.mode",
|
||||
"skip": true
|
||||
},
|
||||
"referrer.any.js": {
|
||||
"note": "Electron: fix referrrer handling",
|
||||
"skip": true
|
||||
},
|
||||
"request-forbidden-headers.any.js": {
|
||||
"note": "undici doesn't filter headers",
|
||||
"skip": true
|
||||
},
|
||||
"request-headers.any.js": {
|
||||
"note": "Electron: fix response type",
|
||||
"skip": true
|
||||
},
|
||||
"request-headers-case.any.js": {
|
||||
"note": "Electron: rework header generation",
|
||||
"skip": true
|
||||
},
|
||||
"request-private-network-headers.tentative.any.js": {
|
||||
"note": "undici doesn't filter headers",
|
||||
"skip": true
|
||||
},
|
||||
"request-referrer.any.js": {
|
||||
"note": "Electron: fix referrrer handling",
|
||||
"skip": true
|
||||
},
|
||||
"request-upload.any.js": {
|
||||
"note": "no Float16Array",
|
||||
"fail": [
|
||||
"Fetch with POST with Float16Array body",
|
||||
"Fetch with POST with text body on 421 response should be retried once on new connection."
|
||||
]
|
||||
},
|
||||
"request-upload.h2.any.js": {
|
||||
"note": "undici doesn't support http/2",
|
||||
"skip": true
|
||||
},
|
||||
"response-url.sub.any.js": {
|
||||
"note": "Electron: does not support response.url",
|
||||
"skip": true
|
||||
},
|
||||
"scheme-about.any.js": {
|
||||
"note": "Electron: does not handle about urls",
|
||||
"skip": true
|
||||
},
|
||||
"scheme-blob.sub.any.js": {
|
||||
"note": "Electron: does not support blob urls",
|
||||
"skip": true
|
||||
},
|
||||
"scheme-data.any.js": {
|
||||
"note": "Electron: does not support data urls",
|
||||
"skip": true
|
||||
},
|
||||
"scheme-others.sub.any.js": {
|
||||
"note": "Electron: does not support unknown urls",
|
||||
"skip": true
|
||||
},
|
||||
"status.h2.any.js": {
|
||||
"note": "undici doesn't support http/2",
|
||||
"skip": true
|
||||
},
|
||||
"stream-response.any.js": {
|
||||
"fail": [
|
||||
"Stream response's body when content-type is not present"
|
||||
]
|
||||
},
|
||||
"stream-safe-creation.any.js": {
|
||||
"note": "Electron: stream accessors are broken",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"mime-type.any.js": {
|
||||
"note": "fails on all platforms, https://wpt.fyi/results/fetch/api/body/mime-type.any.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&product=node.js&product=deno&aligned",
|
||||
"fail": [
|
||||
"Response: Extract a MIME type with clone"
|
||||
]
|
||||
}
|
||||
},
|
||||
"cors": {
|
||||
"note": "undici doesn't implement CORs",
|
||||
"skip": true
|
||||
},
|
||||
"credentials": {
|
||||
"authentication-basic.any.js": {
|
||||
"note": "Electron: fix response type",
|
||||
"skip": true
|
||||
},
|
||||
"authentication-redirection.any.js": {
|
||||
"note": "connects to https server",
|
||||
"fail": [
|
||||
"getAuthorizationHeaderValue - cross origin redirection",
|
||||
"getAuthorizationHeaderValue - same origin redirection"
|
||||
]
|
||||
},
|
||||
"cookies.any.js": {
|
||||
"note": "Electron: fix response type",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"fetch-later": {
|
||||
"note": "this is not part of the spec, only a proposal",
|
||||
"skip": true
|
||||
},
|
||||
"headers": {
|
||||
"header-setcookie.any.js": {
|
||||
"note": "undici doesn't filter headers",
|
||||
"fail": [
|
||||
"Set-Cookie is a forbidden response header"
|
||||
]
|
||||
},
|
||||
"header-values-normalize.any.js": {
|
||||
"note": "TODO(@KhafraDev): https://github.com/nodejs/undici/issues/1680",
|
||||
"fail": [
|
||||
"XMLHttpRequest with value %00",
|
||||
"XMLHttpRequest with value %01",
|
||||
"XMLHttpRequest with value %02",
|
||||
"XMLHttpRequest with value %03",
|
||||
"XMLHttpRequest with value %04",
|
||||
"XMLHttpRequest with value %05",
|
||||
"XMLHttpRequest with value %06",
|
||||
"XMLHttpRequest with value %07",
|
||||
"XMLHttpRequest with value %08",
|
||||
"XMLHttpRequest with value %09",
|
||||
"XMLHttpRequest with value %0A",
|
||||
"XMLHttpRequest with value %0D",
|
||||
"XMLHttpRequest with value %0E",
|
||||
"XMLHttpRequest with value %0F",
|
||||
"XMLHttpRequest with value %10",
|
||||
"XMLHttpRequest with value %11",
|
||||
"XMLHttpRequest with value %12",
|
||||
"XMLHttpRequest with value %13",
|
||||
"XMLHttpRequest with value %14",
|
||||
"XMLHttpRequest with value %15",
|
||||
"XMLHttpRequest with value %16",
|
||||
"XMLHttpRequest with value %17",
|
||||
"XMLHttpRequest with value %18",
|
||||
"XMLHttpRequest with value %19",
|
||||
"XMLHttpRequest with value %1A",
|
||||
"XMLHttpRequest with value %1B",
|
||||
"XMLHttpRequest with value %1C",
|
||||
"XMLHttpRequest with value %1D",
|
||||
"XMLHttpRequest with value %1E",
|
||||
"XMLHttpRequest with value %1F",
|
||||
"XMLHttpRequest with value %20",
|
||||
"fetch() with value %01",
|
||||
"fetch() with value %02",
|
||||
"fetch() with value %03",
|
||||
"fetch() with value %04",
|
||||
"fetch() with value %05",
|
||||
"fetch() with value %06",
|
||||
"fetch() with value %07",
|
||||
"fetch() with value %08",
|
||||
"fetch() with value %0E",
|
||||
"fetch() with value %0F",
|
||||
"fetch() with value %10",
|
||||
"fetch() with value %11",
|
||||
"fetch() with value %12",
|
||||
"fetch() with value %13",
|
||||
"fetch() with value %14",
|
||||
"fetch() with value %15",
|
||||
"fetch() with value %16",
|
||||
"fetch() with value %17",
|
||||
"fetch() with value %18",
|
||||
"fetch() with value %19",
|
||||
"fetch() with value %1A",
|
||||
"fetch() with value %1B",
|
||||
"fetch() with value %1C",
|
||||
"fetch() with value %1D",
|
||||
"fetch() with value %1E",
|
||||
"fetch() with value %1F"
|
||||
]
|
||||
},
|
||||
"header-values.any.js": {
|
||||
"fail": [
|
||||
"XMLHttpRequest with value x%00x needs to throw",
|
||||
"XMLHttpRequest with value x%0Ax needs to throw",
|
||||
"XMLHttpRequest with value x%0Dx needs to throw",
|
||||
"XMLHttpRequest with all valid values",
|
||||
"fetch() with all valid values"
|
||||
]
|
||||
},
|
||||
"headers-no-cors.any.js": {
|
||||
"note": "undici doesn't implement CORs",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"redirect": {
|
||||
"redirect-back-to-original-origin.any.js": {
|
||||
"note": "Electron: fix response type",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-count.any.js": {
|
||||
"note": "Electron: handle too many redirects",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-empty-location.any.js": {
|
||||
"note": "undici handles redirect: manual differently than browsers",
|
||||
"fail": [
|
||||
"redirect response with empty Location, manual mode",
|
||||
"redirect response with empty Location, follow mode"
|
||||
]
|
||||
},
|
||||
"redirect-keepalive.any.js": {
|
||||
"note": "document is not defined",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-keepalive.https.any.js": {
|
||||
"note": "document is not defined",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-location-escape.tentative.any.js": {
|
||||
"note": "TODO(@KhafraDev): crashes runner",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-location.any.js": {
|
||||
"note": "Electron: fix redirect handling",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-method.any.js": {
|
||||
"note": "Electron: fix response type",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-mode.any.js": {
|
||||
"note": "mode isn't respected",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-origin.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-referrer-override.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-referrer.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-schemes.any.js": {
|
||||
"note": "Electron: fix redirect handling",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-to-dataurl.any.js": {
|
||||
"note": "Electron: does not support data urls",
|
||||
"skip": true
|
||||
},
|
||||
"redirect-upload.h2.any.js": {
|
||||
"note": "undici doesn't support http/2",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"request": {
|
||||
"request-cache-default-conditional.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-default.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-force-cache.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-no-cache.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-no-store.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-only-if-cached.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-cache-reload.any.js": {
|
||||
"note": "undici doesn't implement an http cache",
|
||||
"skip": true
|
||||
},
|
||||
"request-consume-empty.any.js": {
|
||||
"note": "the semantics about this test are being discussed - https://github.com/web-platform-tests/wpt/pull/3950",
|
||||
"fail": [
|
||||
"Consume empty FormData request body as text"
|
||||
]
|
||||
},
|
||||
"request-disturbed.any.js": {
|
||||
"note": "this test fails in all other platforms - https://wpt.fyi/results/fetch/api/request/request-disturbed.any.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&product=deno&aligned&view=subtest",
|
||||
"fail": [
|
||||
"Input request used for creating new request became disturbed even if body is not used"
|
||||
]
|
||||
},
|
||||
"request-headers.any.js": {
|
||||
"note": "undici doesn't filter headers",
|
||||
"fail": [
|
||||
"Adding invalid request header \"Accept-Charset: KO\"",
|
||||
"Adding invalid request header \"accept-charset: KO\"",
|
||||
"Adding invalid request header \"ACCEPT-ENCODING: KO\"",
|
||||
"Adding invalid request header \"Accept-Encoding: KO\"",
|
||||
"Adding invalid request header \"Access-Control-Request-Headers: KO\"",
|
||||
"Adding invalid request header \"Access-Control-Request-Method: KO\"",
|
||||
"Adding invalid request header \"Connection: KO\"",
|
||||
"Adding invalid request header \"Content-Length: KO\"",
|
||||
"Adding invalid request header \"Cookie: KO\"",
|
||||
"Adding invalid request header \"Cookie2: KO\"",
|
||||
"Adding invalid request header \"Date: KO\"",
|
||||
"Adding invalid request header \"DNT: KO\"",
|
||||
"Adding invalid request header \"Expect: KO\"",
|
||||
"Adding invalid request header \"Host: KO\"",
|
||||
"Adding invalid request header \"Keep-Alive: KO\"",
|
||||
"Adding invalid request header \"Origin: KO\"",
|
||||
"Adding invalid request header \"Referer: KO\"",
|
||||
"Adding invalid request header \"Set-Cookie: KO\"",
|
||||
"Adding invalid request header \"TE: KO\"",
|
||||
"Adding invalid request header \"Trailer: KO\"",
|
||||
"Adding invalid request header \"Transfer-Encoding: KO\"",
|
||||
"Adding invalid request header \"Upgrade: KO\"",
|
||||
"Adding invalid request header \"Via: KO\"",
|
||||
"Adding invalid request header \"Proxy-: KO\"",
|
||||
"Adding invalid request header \"proxy-a: KO\"",
|
||||
"Adding invalid request header \"Sec-: KO\"",
|
||||
"Adding invalid request header \"sec-b: KO\"",
|
||||
"Adding invalid no-cors request header \"Content-Type: KO\"",
|
||||
"Adding invalid no-cors request header \"Potato: KO\"",
|
||||
"Adding invalid no-cors request header \"proxy: KO\"",
|
||||
"Adding invalid no-cors request header \"proxya: KO\"",
|
||||
"Adding invalid no-cors request header \"sec: KO\"",
|
||||
"Adding invalid no-cors request header \"secb: KO\"",
|
||||
"Adding invalid no-cors request header \"Empty-Value: \"",
|
||||
"Check that request constructor is filtering headers provided as init parameter",
|
||||
"Check that no-cors request constructor is filtering headers provided as init parameter",
|
||||
"Check that no-cors request constructor is filtering headers provided as part of request parameter"
|
||||
]
|
||||
},
|
||||
"request-init-priority.any.js": {
|
||||
"note": "undici doesn't implement priority hints, yet(?)",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"json.any.js": {
|
||||
"note": "Electron: does not support data urls",
|
||||
"skip": true
|
||||
},
|
||||
"response-blob-realm.any.js": {
|
||||
"note": "onload is not defined (globalThis does not extend EventTarget)",
|
||||
"fail": [
|
||||
"realm of the Uint8Array from Response bytes()"
|
||||
]
|
||||
},
|
||||
"response-clone.any.js": {
|
||||
"note": "Node streams are too buggy currently.",
|
||||
"skip": true
|
||||
},
|
||||
"response-consume-empty.any.js": {
|
||||
"fail": [
|
||||
"Consume empty FormData response body as text"
|
||||
]
|
||||
},
|
||||
"response-consume-stream.any.js": {
|
||||
"note": "only fail in node v18",
|
||||
"flaky": [
|
||||
"Read blob response's body as readableStream with mode=byob",
|
||||
"Read text response's body as readableStream with mode=byob",
|
||||
"Read URLSearchParams response's body as readableStream with mode=byob",
|
||||
"Read array buffer response's body as readableStream with mode=byob",
|
||||
"Read form data response's body as readableStream with mode=byob"
|
||||
]
|
||||
},
|
||||
"response-headers-guard.any.js": {
|
||||
"fail": [
|
||||
"Ensure response headers are immutable"
|
||||
]
|
||||
},
|
||||
"response-stream-with-broken-then.any.js": {
|
||||
"note": "this is a bug in webstreams, see https://github.com/nodejs/node/issues/46786",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"idlharness.any.js": {
|
||||
"note": "Electron: fix idl generation",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"content-encoding": {
|
||||
"br": {
|
||||
"bad-br-body.https.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"Consuming the body of a resource with bad br content with arrayBuffer() should reject"
|
||||
]
|
||||
},
|
||||
"big-br-body.https.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"large br data should be decompressed successfully",
|
||||
"large br data should be decompressed successfully with byte stream"
|
||||
]
|
||||
},
|
||||
"br-body.https.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"fetched br data with content type text should be decompressed.",
|
||||
"fetched br data with content type octetstream should be decompressed."
|
||||
]
|
||||
}
|
||||
},
|
||||
"gzip": {
|
||||
"bad-gzip-body.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"Consuming the body of a resource with bad gzip content with arrayBuffer() should reject",
|
||||
"Consuming the body of a resource with bad gzip content with blob() should reject",
|
||||
"Consuming the body of a resource with bad gzip content with json() should reject",
|
||||
"Consuming the body of a resource with bad gzip content with text() should reject"
|
||||
]
|
||||
},
|
||||
"gzip-body.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"fetched gzip data with content type text should be decompressed.",
|
||||
"fetched gzip data with content type octetstream should be decompressed."
|
||||
]
|
||||
},
|
||||
"big-gzip-body.https.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate failure",
|
||||
"fail": [
|
||||
"large gzip data should be decompressed successfully",
|
||||
"large gzip data should be decompressed successfully with byte stream"
|
||||
]
|
||||
}
|
||||
},
|
||||
"zstd": {
|
||||
"note": "node does not have zstd yet",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"content-length": {
|
||||
"api-and-duplicate-headers.any.js": {
|
||||
"fail": [
|
||||
"XMLHttpRequest and duplicate Content-Length/Content-Type headers",
|
||||
"fetch() and duplicate Content-Length/Content-Type headers"
|
||||
]
|
||||
}
|
||||
},
|
||||
"cross-origin-resource-policy": {
|
||||
"note": "undici doesn't implement CORs",
|
||||
"skip": true
|
||||
},
|
||||
"data-urls": {
|
||||
"note": "Electron: does not support data urls",
|
||||
"skip": true
|
||||
},
|
||||
"http-cache": {
|
||||
"note": "undici doesn't implement http caching",
|
||||
"skip": true
|
||||
},
|
||||
"metadata": {
|
||||
"note": "undici doesn't respect RequestInit.mode",
|
||||
"skip": true
|
||||
},
|
||||
"orb": {
|
||||
"tentative": {
|
||||
"note": "undici doesn't implement orb",
|
||||
"skip": true
|
||||
}
|
||||
},
|
||||
"range": {
|
||||
"note": "undici doesn't respect range header",
|
||||
"skip": true
|
||||
},
|
||||
"security": {
|
||||
"1xx-response.any.js": {
|
||||
"note": "TODO(@KhafraDev): investigate timeout",
|
||||
"skip": true,
|
||||
"fail": [
|
||||
"Status(100) should be ignored.",
|
||||
"Status(101) should be accepted, with removing body.",
|
||||
"Status(103) should be ignored.",
|
||||
"Status(199) should be ignored."
|
||||
]
|
||||
}
|
||||
},
|
||||
"stale-while-revalidate": {
|
||||
"note": "undici doesn't implement http caching",
|
||||
"skip": true
|
||||
},
|
||||
"idlharness.any.js": {
|
||||
"flaky": [
|
||||
"Window interface: operation fetch(RequestInfo, optional RequestInit)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ chrome-sandbox
|
||||
chrome_100_percent.pak
|
||||
chrome_200_percent.pak
|
||||
chrome_crashpad_handler
|
||||
clang_x86_v8_arm/icudtl.dat
|
||||
clang_x86_v8_arm/snapshot_blob.bin
|
||||
electron
|
||||
icudtl.dat
|
||||
libEGL.so
|
||||
|
||||
@@ -4,6 +4,8 @@ chrome-sandbox
|
||||
chrome_100_percent.pak
|
||||
chrome_200_percent.pak
|
||||
chrome_crashpad_handler
|
||||
clang_x64_v8_arm64/icudtl.dat
|
||||
clang_x64_v8_arm64/snapshot_blob.bin
|
||||
electron
|
||||
icudtl.dat
|
||||
libEGL.so
|
||||
|
||||
@@ -71,3 +71,5 @@ vk_swiftshader.dll
|
||||
vulkan-1.dll
|
||||
v8_context_snapshot.bin
|
||||
version
|
||||
win_clang_x64/icudtl.dat
|
||||
win_clang_x64/snapshot_blob.bin
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/containers/extend.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "content/public/common/content_constants.h"
|
||||
@@ -99,6 +98,21 @@ bool IsWidevineAvailable(
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_WIDEVINE)
|
||||
|
||||
void AppendDelimitedSwitchToVector(const std::string_view cmd_switch,
|
||||
std::vector<std::string>* append_me) {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
auto switch_value = command_line->GetSwitchValueASCII(cmd_switch);
|
||||
if (!switch_value.empty()) {
|
||||
constexpr std::string_view delimiter{",", 1};
|
||||
auto tokens =
|
||||
base::SplitString(switch_value, delimiter, base::TRIM_WHITESPACE,
|
||||
base::SPLIT_WANT_NONEMPTY);
|
||||
append_me->reserve(append_me->size() + tokens.size());
|
||||
std::move(std::begin(tokens), std::end(tokens),
|
||||
std::back_inserter(*append_me));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
ElectronContentClient::ElectronContentClient() = default;
|
||||
@@ -135,19 +149,16 @@ void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
//
|
||||
// We use this for registration to network utility process
|
||||
if (IsUtilityProcess()) {
|
||||
const auto& cmd = *base::CommandLine::ForCurrentProcess();
|
||||
auto append_cli_schemes = [&cmd](auto& appendme, const auto key) {
|
||||
base::Extend(appendme, base::SplitString(cmd.GetSwitchValueASCII(key),
|
||||
",", base::TRIM_WHITESPACE,
|
||||
base::SPLIT_WANT_NONEMPTY));
|
||||
};
|
||||
|
||||
using namespace switches;
|
||||
append_cli_schemes(schemes->cors_enabled_schemes, kCORSSchemes);
|
||||
append_cli_schemes(schemes->csp_bypassing_schemes, kBypassCSPSchemes);
|
||||
append_cli_schemes(schemes->secure_schemes, kSecureSchemes);
|
||||
append_cli_schemes(schemes->service_worker_schemes, kServiceWorkerSchemes);
|
||||
append_cli_schemes(schemes->standard_schemes, kStandardSchemes);
|
||||
AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes,
|
||||
&schemes->service_worker_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kStandardSchemes,
|
||||
&schemes->standard_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kSecureSchemes,
|
||||
&schemes->secure_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kBypassCSPSchemes,
|
||||
&schemes->csp_bypassing_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kCORSSchemes,
|
||||
&schemes->cors_enabled_schemes);
|
||||
}
|
||||
|
||||
if (electron::fuses::IsGrantFileProtocolExtraPrivilegesEnabled()) {
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::string_view kRelauncherProcess = "relauncher";
|
||||
const char kRelauncherProcess[] = "relauncher";
|
||||
|
||||
constexpr std::string_view kElectronDisableSandbox{"ELECTRON_DISABLE_SANDBOX"};
|
||||
constexpr std::string_view kElectronEnableStackDumping{
|
||||
|
||||
@@ -776,7 +776,7 @@ base::OnceClosure App::SelectClientCertificate(
|
||||
std::move((*shared_identities)[0]),
|
||||
base::BindRepeating(&GotPrivateKey, shared_delegate, std::move(cert)));
|
||||
}
|
||||
return {};
|
||||
return base::OnceClosure();
|
||||
}
|
||||
|
||||
void App::OnGpuInfoUpdate() {
|
||||
@@ -944,7 +944,7 @@ std::string App::GetSystemLocale(gin_helper::ErrorThrower thrower) const {
|
||||
thrower.ThrowError(
|
||||
"app.getSystemLocale() can only be called "
|
||||
"after app is ready");
|
||||
return {};
|
||||
return std::string();
|
||||
}
|
||||
return static_cast<BrowserProcessImpl*>(g_browser_process)->GetSystemLocale();
|
||||
}
|
||||
@@ -1011,6 +1011,8 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) {
|
||||
if (HasSingleInstanceLock())
|
||||
return true;
|
||||
|
||||
std::string program_name = electron::Browser::Get()->GetName();
|
||||
|
||||
base::FilePath user_dir;
|
||||
base::PathService::Get(chrome::DIR_USER_DATA, &user_dir);
|
||||
// The user_dir may not have been created yet.
|
||||
@@ -1021,7 +1023,6 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) {
|
||||
blink::CloneableMessage additional_data_message;
|
||||
args->GetNext(&additional_data_message);
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
const std::string program_name = electron::Browser::Get()->GetName();
|
||||
bool app_is_sandboxed =
|
||||
IsSandboxEnabled(base::CommandLine::ForCurrentProcess());
|
||||
process_singleton_ = std::make_unique<ProcessSingleton>(
|
||||
|
||||
@@ -177,37 +177,8 @@ void BaseWindow::OnWindowClosed() {
|
||||
FROM_HERE, GetDestroyClosure());
|
||||
}
|
||||
|
||||
void BaseWindow::OnWindowQueryEndSession(
|
||||
const std::vector<std::string>& reasons,
|
||||
bool* prevent_default) {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
gin::Handle<gin_helper::internal::Event> event =
|
||||
gin_helper::internal::Event::New(isolate);
|
||||
v8::Local<v8::Object> event_object = event.ToV8().As<v8::Object>();
|
||||
|
||||
gin::Dictionary dict(isolate, event_object);
|
||||
dict.Set("reasons", reasons);
|
||||
|
||||
EmitWithoutEvent("query-session-end", event);
|
||||
if (event->GetDefaultPrevented()) {
|
||||
*prevent_default = true;
|
||||
}
|
||||
}
|
||||
|
||||
void BaseWindow::OnWindowEndSession(const std::vector<std::string>& reasons) {
|
||||
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
||||
gin::Handle<gin_helper::internal::Event> event =
|
||||
gin_helper::internal::Event::New(isolate);
|
||||
v8::Local<v8::Object> event_object = event.ToV8().As<v8::Object>();
|
||||
|
||||
gin::Dictionary dict(isolate, event_object);
|
||||
dict.Set("reasons", reasons);
|
||||
|
||||
EmitWithoutEvent("session-end", event);
|
||||
void BaseWindow::OnWindowEndSession() {
|
||||
Emit("session-end");
|
||||
}
|
||||
|
||||
void BaseWindow::OnWindowBlur() {
|
||||
@@ -669,7 +640,7 @@ void BaseWindow::SetBackgroundColor(const std::string& color_name) {
|
||||
window_->SetBackgroundColor(color);
|
||||
}
|
||||
|
||||
std::string BaseWindow::GetBackgroundColor() const {
|
||||
std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) const {
|
||||
return ToRGBHex(window_->GetBackgroundColor());
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
// NativeWindowObserver:
|
||||
void WillCloseWindow(bool* prevent_default) override;
|
||||
void OnWindowClosed() override;
|
||||
void OnWindowQueryEndSession(const std::vector<std::string>& reasons,
|
||||
bool* prevent_default) override;
|
||||
void OnWindowEndSession(const std::vector<std::string>& reasons) override;
|
||||
void OnWindowEndSession() override;
|
||||
void OnWindowBlur() override;
|
||||
void OnWindowFocus() override;
|
||||
void OnWindowShow() override;
|
||||
@@ -164,7 +162,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||
bool IsKiosk() const;
|
||||
bool IsTabletMode() const;
|
||||
virtual void SetBackgroundColor(const std::string& color_name);
|
||||
std::string GetBackgroundColor() const;
|
||||
std::string GetBackgroundColor(gin_helper::Arguments* args) const;
|
||||
void InvalidateShadow();
|
||||
void SetHasShadow(bool has_shadow);
|
||||
bool HasShadow() const;
|
||||
|
||||
@@ -168,7 +168,7 @@ void FilterCookieWithStatuses(
|
||||
// Parse dictionary property to CanonicalCookie time correctly.
|
||||
base::Time ParseTimeProperty(const std::optional<double>& value) {
|
||||
if (!value) // empty time means ignoring the parameter
|
||||
return {};
|
||||
return base::Time();
|
||||
if (*value == 0) // FromSecondsSinceUnixEpoch would convert 0 to empty Time
|
||||
return base::Time::UnixEpoch();
|
||||
return base::Time::FromSecondsSinceUnixEpoch(*value);
|
||||
@@ -292,8 +292,8 @@ std::string StringToCookieSameSite(const std::string* str_ptr,
|
||||
|
||||
gin::WrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Cookies::Cookies(ElectronBrowserContext* browser_context)
|
||||
: browser_context_{browser_context} {
|
||||
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
cookie_change_subscription_ =
|
||||
browser_context_->cookie_change_notifier()->RegisterCookieChangeCallback(
|
||||
base::BindRepeating(&Cookies::OnCookieChanged,
|
||||
@@ -458,7 +458,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
|
||||
// static
|
||||
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new Cookies{browser_context});
|
||||
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
|
||||
}
|
||||
|
||||
gin::ObjectTemplateBuilder Cookies::GetObjectTemplateBuilder(
|
||||
|
||||
@@ -50,7 +50,7 @@ class Cookies final : public gin::Wrappable<Cookies>,
|
||||
Cookies& operator=(const Cookies&) = delete;
|
||||
|
||||
protected:
|
||||
explicit Cookies(ElectronBrowserContext* browser_context);
|
||||
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Cookies() override;
|
||||
|
||||
v8::Local<v8::Promise> Get(v8::Isolate*,
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/to_vector.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -99,7 +98,7 @@ std::string ReadClientId() {
|
||||
if (GetClientIdPath(&client_id_path) &&
|
||||
(!base::ReadFileToStringWithMaxSize(client_id_path, &client_id, 36) ||
|
||||
client_id.size() != 36))
|
||||
return {};
|
||||
return std::string();
|
||||
return client_id;
|
||||
}
|
||||
|
||||
@@ -221,17 +220,18 @@ v8::Local<v8::Value> GetUploadedReports(v8::Isolate* isolate) {
|
||||
list->LoadSync();
|
||||
}
|
||||
|
||||
auto to_obj = [isolate](const UploadList::UploadInfo* upload) {
|
||||
return gin::DataObjectBuilder{isolate}
|
||||
.Set("date", upload->upload_time)
|
||||
.Set("id", upload->upload_id)
|
||||
.Build();
|
||||
};
|
||||
|
||||
constexpr size_t kMaxUploadReportsToList = std::numeric_limits<size_t>::max();
|
||||
return gin::ConvertToV8(
|
||||
isolate,
|
||||
base::ToVector(list->GetUploads(kMaxUploadReportsToList), to_obj));
|
||||
const std::vector<const UploadList::UploadInfo*> uploads =
|
||||
list->GetUploads(kMaxUploadReportsToList);
|
||||
std::vector<v8::Local<v8::Object>> result;
|
||||
for (auto* const upload : uploads) {
|
||||
result.push_back(gin::DataObjectBuilder(isolate)
|
||||
.Set("date", upload->upload_time)
|
||||
.Set("id", upload->upload_id)
|
||||
.Build());
|
||||
}
|
||||
v8::Local<v8::Value> v8_result = gin::ConvertToV8(isolate, result);
|
||||
return v8_result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ gin::Handle<DataPipeHolder> DataPipeHolder::From(v8::Isolate* isolate,
|
||||
if (gin::ConvertFromV8(isolate, object.ToLocalChecked(), &handle))
|
||||
return handle;
|
||||
}
|
||||
return {};
|
||||
return gin::Handle<DataPipeHolder>();
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -209,7 +209,7 @@ const GURL& DownloadItem::GetURL() const {
|
||||
|
||||
v8::Local<v8::Value> DownloadItem::GetURLChain() const {
|
||||
if (!CheckAlive())
|
||||
return {};
|
||||
return v8::Local<v8::Value>();
|
||||
return gin::ConvertToV8(isolate_, download_item_->GetUrlChain());
|
||||
}
|
||||
|
||||
|
||||
@@ -61,11 +61,6 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
|
||||
accelerator_callback_map_[accelerator].Run();
|
||||
}
|
||||
|
||||
void GlobalShortcut::ExecuteCommand(const extensions::ExtensionId& extension_id,
|
||||
const std::string& command_id) {
|
||||
// Ignore extension commands
|
||||
}
|
||||
|
||||
bool GlobalShortcut::RegisterAll(
|
||||
const std::vector<ui::Accelerator>& accelerators,
|
||||
const base::RepeatingClosure& callback) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "chrome/browser/extensions/global_shortcut_listener.h"
|
||||
#include "extensions/common/extension_id.h"
|
||||
#include "gin/wrappable.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
|
||||
@@ -56,8 +55,6 @@ class GlobalShortcut final
|
||||
|
||||
// GlobalShortcutListener::Observer implementation.
|
||||
void OnKeyPressed(const ui::Accelerator& accelerator) override;
|
||||
void ExecuteCommand(const extensions::ExtensionId& extension_id,
|
||||
const std::string& command_id) override;
|
||||
|
||||
AcceleratorCallbackMap accelerator_callback_map_;
|
||||
};
|
||||
|
||||
@@ -70,8 +70,6 @@ Menu::~Menu() {
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
bool InvokeBoolMethod(const Menu* menu,
|
||||
const char* method,
|
||||
int command_id,
|
||||
@@ -86,8 +84,6 @@ bool InvokeBoolMethod(const Menu* menu,
|
||||
return gin::ConvertFromV8(isolate, val, &ret) ? ret : default_value;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool Menu::IsCommandIdChecked(int command_id) const {
|
||||
return InvokeBoolMethod(this, "_isCommandIdChecked", command_id);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,8 @@ scoped_refptr<base::SequencedTaskRunner> CreateFileTaskRunner() {
|
||||
}
|
||||
|
||||
base::File OpenFileForWriting(base::FilePath path) {
|
||||
return {path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE};
|
||||
return base::File(path,
|
||||
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
|
||||
}
|
||||
|
||||
void ResolvePromiseWithNetError(gin_helper::Promise<void> promise,
|
||||
@@ -92,7 +93,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
|
||||
gin::Arguments* args) {
|
||||
if (log_path.empty()) {
|
||||
args->ThrowTypeError("The first parameter must be a valid string");
|
||||
return {};
|
||||
return v8::Local<v8::Promise>();
|
||||
}
|
||||
|
||||
net::NetLogCaptureMode capture_mode = net::NetLogCaptureMode::kDefault;
|
||||
@@ -105,7 +106,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
|
||||
if (!gin::ConvertFromV8(args->isolate(), capture_mode_v8,
|
||||
&capture_mode)) {
|
||||
args->ThrowTypeError("Invalid value for captureMode");
|
||||
return {};
|
||||
return v8::Local<v8::Promise>();
|
||||
}
|
||||
}
|
||||
v8::Local<v8::Value> max_file_size_v8;
|
||||
@@ -113,14 +114,14 @@ v8::Local<v8::Promise> NetLog::StartLogging(base::FilePath log_path,
|
||||
if (!gin::ConvertFromV8(args->isolate(), max_file_size_v8,
|
||||
&max_file_size)) {
|
||||
args->ThrowTypeError("Invalid value for maxFileSize");
|
||||
return {};
|
||||
return v8::Local<v8::Promise>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (net_log_exporter_) {
|
||||
args->ThrowTypeError("There is already a net log running");
|
||||
return {};
|
||||
return v8::Local<v8::Promise>();
|
||||
}
|
||||
|
||||
pending_start_promise_ =
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user