Compare commits

..

19 Commits

Author SHA1 Message Date
Sudowoodo Release Bot
cb08a466ac Bump v21.0.0-beta.6 2022-09-15 13:31:46 -07:00
trop[bot]
afd392b921 docs: add back docs about asar archives (#35667)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2022-09-15 13:17:39 -07:00
Keeley Hammond
908751b4f1 chore: update filenames.libcxx.gni (#35689)
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2022-09-15 13:17:05 -07:00
electron-roller[bot]
5e7ff852f3 chore: bump chromium to 106.0.5249.40 (21-x-y) (#35686)
* chore: bump chromium in DEPS to 106.0.5249.40

* chore: update patches

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-09-15 13:13:25 -07:00
trop[bot]
cbf5843c9a fix: WCO occlusion of DevTools (#35688)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-15 19:06:18 +02:00
Sudowoodo Release Bot
a2c687fcc3 Revert "Bump v21.0.0-beta.6"
This reverts commit b0b8fc2688.
2022-09-15 09:38:03 -07:00
Sudowoodo Release Bot
b0b8fc2688 Bump v21.0.0-beta.6 2022-09-15 06:30:59 -07:00
trop[bot]
12992b253c chore: make macOS spellchecker fns formal no-ops (#35679)
* chore: make macOS spellchecker fns formal no-ops

* docs: correct no-op note

* test: add no-op specs

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2022-09-14 16:53:53 -07:00
trop[bot]
8becf52f11 fix: allow maximizing when window enters tablet mode with WCO (#35664)
* fix: Backport CL 3753528 for WCO

* Update comment

* Update shell/browser/ui/views/win_caption_button_container.cc

Co-authored-by: Robo <hop2deep@gmail.com>

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2022-09-14 02:29:38 -07:00
trop[bot]
fad97e0b06 docs: improve registerFileProtocol example (#35599)
docs: improve registerFileProtocol example (#35580)

* improve registerFileProtocol example

* link ProtocolResponse

* kick lint

Co-authored-by: Kishan Bagaria <hi@kishan.info>
2022-09-13 13:51:45 -07:00
trop[bot]
672464d900 docs: fix typescript error in code samples (#35656)
Fixed typescript error

Co-authored-by: Leon Schwanitz <leon@28minds.com>
2022-09-13 13:36:23 -07:00
electron-roller[bot]
aaf560817b chore: bump chromium to 106.0.5249.30 (21-x-y) (#35423) 2022-09-13 09:36:58 -07:00
trop[bot]
f9b2608f2c docs: update sandbox renderer defaults for Electron 20 (#35615)
docs: update sandbox renderer defaults for Electron 20 (#35379)

* docs: update E20 sandbox rendering defaults

* docs: update tutorial

* simplify paragraph

* dont mention context isolation

Co-authored-by: Erick Zhao <erick@hotmail.ca>
2022-09-13 09:33:40 -07:00
trop[bot]
135c8c34ec fix: ensure history navigations are sandboxed-iframe-aware (#35623)
Co-authored-by: Jeremy Spiegel <jeremy.spiegel@frontapp.com>
2022-09-13 08:14:46 -07:00
trop[bot]
fb4990a537 docs: fix misspelling in fuses (#35620)
Co-authored-by: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com>
2022-09-13 08:12:05 -07:00
trop[bot]
8ce7209b9b fix: potential "Object has been destroyed" error in BrowserWindow.getFocusedWindow (#35646)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2022-09-13 08:06:19 -07:00
trop[bot]
a1e792f48a docs: Use inline image link in faq.md (#35648)
* Use absolute URL in faq.md image link

The relative link is rendered relative to the host domain, which works fine when viewing it on Github, but since you also use the same generated HTML in your doc site, the link is broken. See here: https://www.electronjs.org/docs/latest/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do

Using an absolute URL here should fix the issue on the main site.

* Use inline image reference for subpixel rendering example

As suggested by @dsanders11

Co-authored-by: Adrian Petrescu <adrian@apetre.sc>
2022-09-13 08:04:49 -07:00
Sudowoodo Release Bot
91969330dd Bump v21.0.0-beta.5 2022-09-12 06:31:02 -07:00
trop[bot]
686a554c6a fix: Set background for WCO container (#35612)
* fix: Set background for WCO container

* Add background when invalidating as well

Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2022-09-08 09:59:16 -07:00
123 changed files with 1316 additions and 874 deletions

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'106.0.5216.0',
'106.0.5249.40',
'node_version':
'v16.16.0',
'nan_version':

View File

@@ -1 +1 @@
21.0.0-beta.4
21.0.0-beta.6

View File

@@ -156,10 +156,7 @@ static_library("chrome") {
"//services/strings",
]
deps = [
"//chrome/browser:resource_prefetch_predictor_proto",
"//components/optimization_guide/proto:optimization_guide_proto",
]
deps = [ "//chrome/browser:resource_prefetch_predictor_proto" ]
if (is_linux) {
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
@@ -232,6 +229,8 @@ static_library("chrome") {
"//chrome/browser/printing/printer_query.h",
"//chrome/browser/printing/printing_service.cc",
"//chrome/browser/printing/printing_service.h",
"//components/printing/browser/print_to_pdf/pdf_print_job.cc",
"//components/printing/browser/print_to_pdf/pdf_print_job.h",
"//components/printing/browser/print_to_pdf/pdf_print_utils.cc",
"//components/printing/browser/print_to_pdf/pdf_print_utils.h",
]

View File

@@ -68,6 +68,7 @@ an issue:
* [Mac App Store](tutorial/mac-app-store-submission-guide.md)
* [Windows Store](tutorial/windows-store-guide.md)
* [Snapcraft](tutorial/snapcraft.md)
* [ASAR Archives](tutorial/asar-archives.md)
* [Updates](tutorial/updates.md)
* [Getting Support](tutorial/support.md)

View File

@@ -10,11 +10,12 @@ An example of implementing a protocol that has the same effect as the
```javascript
const { app, protocol } = require('electron')
const path = require('path')
const url = require('url')
app.whenReady().then(() => {
protocol.registerFileProtocol('atom', (request, callback) => {
const url = request.url.substr(7)
callback({ path: path.normalize(`${__dirname}/${url}`) })
const filePath = url.fileURLToPath('file://' + request.url.slice('atom://'.length))
callback(filePath)
})
})
```
@@ -175,7 +176,7 @@ property.
* `handler` Function
* `request` [ProtocolRequest](structures/protocol-request.md)
* `callback` Function
* `response` ProtocolResponse
* `response` [ProtocolResponse](structures/protocol-response.md)
Returns `boolean` - Whether the protocol was successfully registered

View File

@@ -932,7 +932,7 @@ Returns `string[]` - An array of language codes the spellchecker is enabled for.
will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this
setting with the current OS locale. This setting is persisted across restarts.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. On macOS, this API will return whichever languages have been configured by the OS.
#### `ses.setSpellCheckerDictionaryDownloadURL(url)`

View File

@@ -1626,6 +1626,8 @@ Opens the devtools.
When `contents` is a `<webview>` tag, the `mode` would be `detach` by default,
explicitly passing an empty `mode` can force using last used dock state.
On Windows, if Windows Control Overlay is enabled, Devtools will be opened with `mode: 'detach'`.
#### `contents.closeDevTools()`
Closes the devtools.

View File

@@ -135,7 +135,7 @@ is only available in renderer processes.
If [sub-pixel anti-aliasing](https://alienryderflex.com/sub_pixel/) is deactivated, then fonts on LCD screens can look blurry. Example:
![subpixel rendering example]
![Subpixel rendering example](images/subpixel-rendering-screenshot.gif)
Sub-pixel anti-aliasing needs a non-transparent background of the layer containing the font glyphs. (See [this issue](https://github.com/electron/electron/issues/6344#issuecomment-420371918) for more info).
@@ -161,4 +161,3 @@ Notice that just setting the background in the CSS does not have the desired eff
[indexed-db]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
[message-port]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
[browser-window]: api/browser-window.md
[subpixel rendering example]: images/subpixel-rendering-screenshot.gif

View File

@@ -33,12 +33,16 @@ function createWindow () {
if (permission === 'serial' && details.securityOrigin === 'file:///') {
return true
}
return false
})
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
if (details.deviceType === 'serial' && details.origin === 'file://') {
return true
}
return false
})
mainWindow.loadFile('index.html')

View File

@@ -0,0 +1,175 @@
---
title: ASAR Archives
description: What is ASAR archive and how does it affect the application.
slug: asar-archives
hide_title: false
---
After creating an [application distribution](application-distribution.md), the
app's source code are usually bundled into an [ASAR
archive](https://github.com/electron/asar), which is a simple extensive archive
format designed for Electron apps. By bundling the app we can mitigate issues
around long path names on Windows, speed up `require` and conceal your source
code from cursory inspection.
The bundled app runs in a virtual file system and most APIs would just work
normally, but for some cases you might want to work on ASAR archives explicitly
due to a few caveats.
## Using ASAR Archives
In Electron there are two sets of APIs: Node APIs provided by Node.js and Web
APIs provided by Chromium. Both APIs support reading files from ASAR archives.
### Node API
With special patches in Electron, Node APIs like `fs.readFile` and `require`
treat ASAR archives as virtual directories, and the files in it as normal
files in the filesystem.
For example, suppose we have an `example.asar` archive under `/path/to`:
```sh
$ asar list /path/to/example.asar
/app.js
/file.txt
/dir/module.js
/static/index.html
/static/main.css
/static/jquery.min.js
```
Read a file in the ASAR archive:
```javascript
const fs = require('fs')
fs.readFileSync('/path/to/example.asar/file.txt')
```
List all files under the root of the archive:
```javascript
const fs = require('fs')
fs.readdirSync('/path/to/example.asar')
```
Use a module from the archive:
```javascript
require('./path/to/example.asar/dir/module.js')
```
You can also display a web page in an ASAR archive with `BrowserWindow`:
```javascript
const { BrowserWindow } = require('electron')
const win = new BrowserWindow()
win.loadURL('file:///path/to/example.asar/static/index.html')
```
### Web API
In a web page, files in an archive can be requested with the `file:` protocol.
Like the Node API, ASAR archives are treated as directories.
For example, to get a file with `$.get`:
```html
<script>
let $ = require('./jquery.min.js')
$.get('file:///path/to/example.asar/file.txt', (data) => {
console.log(data)
})
</script>
```
### Treating an ASAR archive as a Normal File
For some cases like verifying the ASAR archive's checksum, we need to read the
content of an ASAR archive as a file. For this purpose you can use the built-in
`original-fs` module which provides original `fs` APIs without `asar` support:
```javascript
const originalFs = require('original-fs')
originalFs.readFileSync('/path/to/example.asar')
```
You can also set `process.noAsar` to `true` to disable the support for `asar` in
the `fs` module:
```javascript
const fs = require('fs')
process.noAsar = true
fs.readFileSync('/path/to/example.asar')
```
## Limitations of the Node API
Even though we tried hard to make ASAR archives in the Node API work like
directories as much as possible, there are still limitations due to the
low-level nature of the Node API.
### Archives Are Read-only
The archives can not be modified so all Node APIs that can modify files will not
work with ASAR archives.
### Working Directory Can Not Be Set to Directories in Archive
Though ASAR archives are treated as directories, there are no actual
directories in the filesystem, so you can never set the working directory to
directories in ASAR archives. Passing them as the `cwd` option of some APIs
will also cause errors.
### Extra Unpacking on Some APIs
Most `fs` APIs can read a file or get a file's information from ASAR archives
without unpacking, but for some APIs that rely on passing the real file path to
underlying system calls, Electron will extract the needed file into a
temporary file and pass the path of the temporary file to the APIs to make them
work. This adds a little overhead for those APIs.
APIs that requires extra unpacking are:
* `child_process.execFile`
* `child_process.execFileSync`
* `fs.open`
* `fs.openSync`
* `process.dlopen` - Used by `require` on native modules
### Fake Stat Information of `fs.stat`
The `Stats` object returned by `fs.stat` and its friends on files in `asar`
archives is generated by guessing, because those files do not exist on the
filesystem. So you should not trust the `Stats` object except for getting file
size and checking file type.
### Executing Binaries Inside ASAR archive
There are Node APIs that can execute binaries like `child_process.exec`,
`child_process.spawn` and `child_process.execFile`, but only `execFile` is
supported to execute binaries inside ASAR archive.
This is because `exec` and `spawn` accept `command` instead of `file` as input,
and `command`s are executed under shell. There is no reliable way to determine
whether a command uses a file in asar archive, and even if we do, we can not be
sure whether we can replace the path in command without side effects.
## Adding Unpacked Files to ASAR archives
As stated above, some Node APIs will unpack the file to the filesystem when
called. Apart from the performance issues, various anti-virus scanners might
be triggered by this behavior.
As a workaround, you can leave various files unpacked using the `--unpack` option.
In the following example, shared libraries of native Node.js modules will not be
packed:
```sh
$ asar pack app app.asar --unpack *.node
```
After running the command, you will notice that a folder named `app.asar.unpacked`
was created together with the `app.asar` file. It contains the unpacked files
and should be shipped together with the `app.asar` archive.

View File

@@ -52,7 +52,7 @@ For more information on how to use asar integrity validation please read the [As
**Default:** Disabled
**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar`
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asasr`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
## How do I flip the fuses?

View File

@@ -12,28 +12,10 @@ the GPU service and the network service.
See Chromium's [Sandbox design document][sandbox] for more information.
## Electron's sandboxing policies
Electron comes with a mixed sandbox environment, meaning sandboxed processes can run
alongside privileged ones. By default, renderer processes are not sandboxed, but
utility processes are. Note that as in Chromium, the main (browser) process is
privileged and cannot be sandboxed.
Historically, this mixed sandbox approach was established because having Node.js available
in the renderer is an extremely powerful tool for app developers. Unfortunately, this
feature is also an equally massive security vulnerability.
Theoretically, unsandboxed renderers are not a problem for desktop applications that
only display trusted code, but they make Electron less secure than Chromium for
displaying untrusted web content. However, even purportedly trusted code may be
dangerous — there are countless attack vectors that malicious actors can use, from
cross-site scripting to content injection to man-in-the-middle attacks on remotely loaded
websites, just to name a few. For this reason, we recommend enabling renderer sandboxing
for the vast majority of cases under an abundance of caution.
<!--TODO: update this guide when #28466 is either solved or closed -->
Note that there is an active discussion in the issue tracker to enable renderer sandboxing
by default. See [#28466][issue-28466]) for details.
Starting from Electron 20, the sandbox is enabled for renderer processes without any
further configuration. If you want to disable the sandbox for a process, see the
[Disabling the sandbox for a single process](#disabling-the-sandbox-for-a-single-process)
section.
## Sandbox behaviour in Electron
@@ -46,12 +28,17 @@ When renderer processes in Electron are sandboxed, they behave in the same way a
regular Chrome renderer would. A sandboxed renderer won't have a Node.js
environment initialized.
<!-- TODO(erickzhao): when we have a solid guide for IPC, link it here -->
Therefore, when the sandbox is enabled, renderer processes can only perform privileged
tasks (such as interacting with the filesystem, making changes to the system, or spawning
subprocesses) by delegating these tasks to the main process via inter-process
communication (IPC).
:::note
For more info on inter-process communication, check out our [IPC guide](./ipc.md).
:::
### Preload scripts
In order to allow renderer processes to communicate with the main process, preload
@@ -66,7 +53,7 @@ but can only import a subset of Electron and Node's built-in modules:
In addition, the preload script also polyfills certain Node.js primitives as globals:
* [`Buffer`](https://nodejs.org/api/Buffer.html)
* [`Buffer`](https://nodejs.org/api/buffer.html)
* [`process`](../api/process.md)
* [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate)
* [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args)
@@ -83,13 +70,17 @@ privileged APIs to untrusted code running in the renderer process unless
## Configuring the sandbox
### Enabling the sandbox for a single process
For most apps, sandboxing is the best choice. In certain use cases that are incompatible with
the sandbox (for instance, when using native node modules in the renderer),
it is possible to disable the sandbox for specific processes. This comes with security
risks, especially if any untrusted code or content is present in the unsandboxed process.
In Electron, renderer sandboxing can be enabled on a per-process basis with
the `sandbox: true` preference in the [`BrowserWindow`][browser-window] constructor.
### Disabling the sandbox for a single process
```js
// main.js
In Electron, renderer sandboxing can be disabled on a per-process basis with
the `sandbox: false` preference in the [`BrowserWindow`][browser-window] constructor.
```js title='main.js'
app.whenReady().then(() => {
const win = new BrowserWindow({
webPreferences: {
@@ -100,17 +91,30 @@ app.whenReady().then(() => {
})
```
Sandboxing is also disabled whenever Node.js integration is enabled in the renderer.
This can be done through the BrowserWindow constructor with the `nodeIntegration: true` flag.
```js title='main.js'
app.whenReady().then(() => {
const win = new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
})
win.loadURL('https://google.com')
})
```
### Enabling the sandbox globally
If you want to force sandboxing for all renderers, you can also use the
[`app.enableSandbox`][enable-sandbox] API. Note that this API has to be called before the
app's `ready` event.
```js
// main.js
```js title='main.js'
app.enableSandbox()
app.whenReady().then(() => {
// no need to pass `sandbox: true` since `app.enableSandbox()` was called.
// any sandbox:false calls are overridden since `app.enableSandbox()` was called.
const win = new BrowserWindow()
win.loadURL('https://google.com')
})
@@ -139,16 +143,16 @@ issues:
have, to inherit everything we can from Chromium, and to respond quickly to
security issues, but Electron cannot be as secure as Chromium without the
resources that Chromium is able to dedicate.
2. Some security features in Chrome (such as Safe Browsing and Certificate
1. Some security features in Chrome (such as Safe Browsing and Certificate
Transparency) require a centralized authority and dedicated servers, both of
which run counter to the goals of the Electron project. As such, we disable
those features in Electron, at the cost of the associated security they
would otherwise bring.
3. There is only one Chromium, whereas there are many thousands of apps built
1. There is only one Chromium, whereas there are many thousands of apps built
on Electron, all of which behave slightly differently. Accounting for those
differences can yield a huge possibility space, and make it challenging to
ensure the security of the platform in unusual use cases.
4. We can't push security updates to users directly, so we rely on app vendors
1. We can't push security updates to users directly, so we rely on app vendors
to upgrade the version of Electron underlying their app in order for
security updates to reach users.

View File

@@ -38,7 +38,25 @@ called a **preload**.
## Augmenting the renderer with a preload script
A BrowserWindow's preload script runs in a context that has access to both the HTML DOM
and a Node.js environment. Preload scripts are injected before a web page loads in the renderer,
and a limited subset of Node.js and Electron APIs.
:::info Preload script sandboxing
From Electron 20 onwards, preload scripts are **sandboxed** by default and no longer have access
to a full Node.js environment. Practically, this means that you have a polyfilled `require`
function that only has access to a limited set of APIs.
| Available API | Details |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Electron modules | Renderer process modules |
| Node.js modules | [`events`](https://nodejs.org/api/events.html), [`timers`](https://nodejs.org/api/timers.html), [`url`](https://nodejs.org/api/url.html) |
| Polyfilled globals | [`Buffer`](https://nodejs.org/api/buffer.html), [`process`](../api/process.md), [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate), [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args) |
For more information, check out the [Process Sandboxing](./sandbox.md) guide.
:::
Preload scripts are injected before a web page loads in the renderer,
similar to a Chrome extension's [content scripts][content-script]. To add features to your renderer
that require privileged access, you can define [global] objects through the
[contextBridge][contextbridge] API.

View File

@@ -1,7 +1,6 @@
libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/CMakeLists.txt",
"//buildtools/third_party/libc++/trunk/include/__algorithm/adjacent_find.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/algorithm_family.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/all_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/any_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/binary_search.h",
@@ -74,6 +73,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_all_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_any_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_binary_search.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_clamp.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_backward.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_if.h",
@@ -98,6 +98,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap_until.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_partitioned.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted_until.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_iterator_concept.h",
@@ -114,6 +115,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move_backward.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_next_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_none_of.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_nth_element.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort.h",
@@ -122,6 +124,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_point.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_pop_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_prev_permutation.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_push_heap.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy.h",
@@ -133,7 +136,9 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_if.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sample.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search_n.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_difference.h",
@@ -179,6 +184,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/stable_sort.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/swap_ranges.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/transform.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/uniform_random_bit_generator_adaptor.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h",
@@ -328,6 +334,8 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h",
"//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h",
"//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/hash.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/pair.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/span.h",
"//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h",
"//buildtools/third_party/libc++/trunk/include/__hash_table",
@@ -514,6 +522,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_union.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/alignment_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/apply_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/can_extract_key.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/conditional.h",
@@ -521,6 +530,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cvref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/decay.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/dependent_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/disjunction.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/enable_if.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/extent.h",
@@ -535,6 +545,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_base_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_bounded_array.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_callable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_char_like_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_class.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_compound.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_const.h",
@@ -552,6 +563,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_floating_point.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_function.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_fundamental.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_implicitly_default_constructible.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_integral.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_literal_type.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_function_pointer.h",
@@ -583,6 +595,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed_integer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_standard_layout.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_swappable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivial.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_assignable.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_constructible.h",
@@ -602,20 +615,24 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_volatile.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/lazy.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_32_64_or_128_bit.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_const_lvalue_ref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_signed.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_unsigned.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/maybe_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/nat.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/negation.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/promote.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/rank.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_all_extents.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const_ref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cv.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cvref.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_extent.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_pointer.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_reference.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_volatile.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/result_of.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_identity.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_list.h",
"//buildtools/third_party/libc++/trunk/include/__type_traits/underlying_type.h",
@@ -624,6 +641,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__utility/as_const.h",
"//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h",
"//buildtools/third_party/libc++/trunk/include/__utility/cmp.h",
"//buildtools/third_party/libc++/trunk/include/__utility/convert_to_integral.h",
"//buildtools/third_party/libc++/trunk/include/__utility/declval.h",
"//buildtools/third_party/libc++/trunk/include/__utility/exchange.h",
"//buildtools/third_party/libc++/trunk/include/__utility/forward.h",
@@ -639,6 +657,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__utility/transaction.h",
"//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h",
"//buildtools/third_party/libc++/trunk/include/__variant/monostate.h",
"//buildtools/third_party/libc++/trunk/include/__verbose_abort",
"//buildtools/third_party/libc++/trunk/include/algorithm",
"//buildtools/third_party/libc++/trunk/include/any",
"//buildtools/third_party/libc++/trunk/include/array",

View File

@@ -72,9 +72,8 @@ BrowserWindow.getAllWindows = () => {
BrowserWindow.getFocusedWindow = () => {
for (const window of BrowserWindow.getAllWindows()) {
const hasWC = window.webContents && !window.webContents.isDestroyed();
if (!window.isDestroyed() && hasWC) {
if (window.isFocused() || window.isDevToolsFocused()) return window;
if (!window.isDestroyed() && window.webContents && !window.webContents.isDestroyed()) {
if (window.isFocused() || window.webContents.isDevToolsFocused()) return window;
}
}
return null;

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "21.0.0-beta.4",
"version": "21.0.0-beta.6",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -118,4 +118,6 @@ revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch
add_electron_deps_to_license_credits_file.patch
feat_add_set_can_resize_mutator.patch
fix_revert_emulationhandler_update_functions_to_early_return.patch
cherry-pick-9b5207569882.patch
fix_return_v8_value_from_localframe_requestexecutescript.patch
disable_optimization_guide_for_preconnect_feature.patch
fix_the_gn_gen_for_components_segmentation_platform.patch

View File

@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= and Ctrl-Plus show up as such
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a1f702d8b 100644
index e032433d7096a941132c25528781ecbf375eb9af..33d88f947bc9a0a4795f1584e114952f942b277b 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -11,6 +11,7 @@
@@ -44,7 +44,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a
}
#if BUILDFLAG(IS_MAC)
@@ -447,7 +457,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -445,7 +455,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
const std::u16string& shortcut) const {
std::u16string result = shortcut;
@@ -53,7 +53,7 @@ index 9fca6ff3e62204095ff0edc6fafce3a61cd2ff5c..089f8b818018a600cc8c90811f09374a
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
@@ -455,7 +465,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
@@ -453,7 +463,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);

View File

@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf46257123 100644
index d435206f773dd30086ae81868412bc28029935d8..a0856c214d962199a2e51c7bd14f0f676d35507e 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -24,16 +24,16 @@ index b692a49b71661b8394c1126250fb150653aece97..c087c0f99a15edd3a9c776a68c76b2cf
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -337,7 +341,6 @@ int GpuMain(MainFunctionParams parameters) {
ChildProcess gpu_process(io_thread_type);
DCHECK(base::ThreadPoolInstance::Get()->WasStarted());
@@ -323,7 +327,6 @@ int GpuMain(MainFunctionParams parameters) {
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
const bool dead_on_arrival = !init_success;
- auto* client = GetContentClient()->gpu();
if (client)
client->PostIOThreadCreated(gpu_process.io_task_runner());
if (client) {
client->PostSandboxInitialized();
}
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index 04274b751b498456fc4b269bfbc6399b4f27d3ed..2fb98baf0df4e191e5e18fd7055cc2d92a2156df 100644
index a5d868b9e409c986bc85dfd71bb0363b5fa22145..9abe1cf5b2cc8ce60387ddf81b7c13aff9c178c4 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -29,6 +29,10 @@ class CONTENT_EXPORT ContentGpuClient {

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ede21d73be 100644
index 7d169540590b83924766b1d423dc1bc46ab35250..f5bbb6ab26bd714d667236071a2eb0a5794a5631 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index 5a7d3da58451f491ed6dfabd3bc31a645843bb60..36cbf8c5c01330acc8b3a708bd6481ed
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c275ff0dc6 100644
index 8199122b2d759aa8b27affabe67b108fb9a16c38..97cf24ad5f4a64322f242b0c339a807e3edb23fc 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4294,6 +4294,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4345,6 +4345,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 33497b7afbe1fa196a596a2cb384a81a973de026..b6b63c182980b09987e82911f72282c2
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21760ac96d 100644
index c8e822502d1b18c701a303024c3cba7e434d7829..89a048fbdaec8a8ea184790b78b0c63cfda7d171 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -585,6 +585,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -588,6 +588,8 @@ class CONTENT_EXPORT RenderFrameImpl
uint32_t ng_call_count) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 19eae2c0b98ecf27c6d8196c7accc44bdb24a543..40b2dc79e13080d15094a3db235e2e21
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 544ea3f5cd705d61dd0b99f2e0f541d98ca75c53..d863681a4297cbf2844469a1baae2a81cb0d1238 100644
index 4ef7353157272a623cea6b086b84da72ca795fca..548f6afd429695088bd83743fa6f6c1cd4197276 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -579,6 +579,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -584,6 +584,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -92,7 +92,7 @@ index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index f40f022ff8ff88f1f128d4996f4460b8fdea1d95..480503e245dbb28dffc8ac9d2843d541793db534 100644
index 2ac22a0410eea7f67cc7eb066879da649f7c6a0e..53ec3d177afbd75b4e67c6ab847094994c291dcb 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -123,10 +123,10 @@ index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index d44adfd65bd9a71996cdd323a5220d2dcaa09de2..1011a318a7d79186abe556d03f78badc725c802a 100644
index a2d7e97958d378dc5d37524f2f5516205c010749..e3f605938b3eea7f1c4dfac8e3c25014ebd15476 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -367,6 +367,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -29,7 +29,7 @@ index 1eb1d0fe4696f26e7de43fc8797c283e9e6db042..766f8d8df866ce7fbc337cecceb715cc
objects_.clear();
platform_representations_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index c47909313da0d7cd8a2b3cd670327011af66e3fb..0d259c21507f38124dfa46aceeacfda76cfd4a38 100644
index 96f5bf8b6b5f3ed5ab25e15845f0de455eb68e0b..e6718a893e1bc5c970245c8265c95dda5d5fa2ff 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {

View File

@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a162891935d5c4b7 100644
index 5c03f1194643c6f7302131404f7d869502f1e18b..fa990e6a444d5321213d956b01ba89ef21d57bd2 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -658,6 +658,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -659,6 +659,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -22,10 +22,10 @@ index 00f570d90db1279a486c3c0a34146e59b902c10f..373309f79a97ca58d2d291b6a1628919
return is_active();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d10b35bf4 100644
index dfefe47c77c723c1cfdc6abe0e8ff96bc5ec6ddd..8d195ec46b9a6ea830c1ff36ee740b3b8be2b341 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl
void EnablePreferredSizeMode() override;
void WriteIntoTrace(perfetto::TracedProto<TraceProto> context) const override;
@@ -34,7 +34,7 @@ index 3ccc771a82992ae70c770fa6d2dde92904aa17db..505091e9006f7d41fa8d02e603afef1d
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da4689b7a2 100644
index 2e4af843d7d0bbef5b7e6357de73355068b38948..77c69de4a541c56389ae11330f67c5fb6bbc4d2a 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -77,6 +77,9 @@ class CONTENT_EXPORT RenderViewHost {
@@ -47,27 +47,14 @@ index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da
private:
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index f55211fdb346c8659c93d077ec04ccebdae5b450..19b846f6ccf99423b712f0b589c20c1ab35bdfcf 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -138,6 +138,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient {
bool was_created_by_renderer,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+ void OnSetSchedulerThrottling(bool allowed);
+
static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy);
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index 39bfc2200e924d0c589cfd07f085f182ef6853a6..bddff6d5ad3f6d08c4dc48e66ebc5319b1a5ec28 100644
index 6ff7c34463f3ce5011ea8711d23f9cd11da38d8b..2b8e313dfac2ea9fad0583bb5e98d0c385e8584a 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -108,4 +108,7 @@ interface PageBroadcast {
// Sent to whole page, but should only be used by the main frame.
SetPageBaseBackgroundColor(skia.mojom.SkColor? color);
@@ -137,4 +137,7 @@ interface PageBroadcast {
mojo_base.mojom.UnguessableToken devtools_frame_token,
RemoteFrameInterfacesFromBrowser remote_frame_interfaces,
RemoteMainFrameInterfaces remote_main_frame_interfaces);
+
+ // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed);
@@ -85,10 +72,10 @@ index 3af33a4d699b5bbfb0a1abac9408ad322a47a5ac..30bc8aa73fb46a0306ccc837a99cc4d5
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b7183233b4bc 100644
index 231f76d07d8a0d3d060b30e0ff6eabe4aa33d755..40aa3b1a5c569e66b6f5d1630afe248c40d5715b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3758,6 +3758,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3787,6 +3787,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -102,7 +89,7 @@ index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b718
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3769,7 +3776,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3798,7 +3805,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@@ -113,10 +100,10 @@ index 8f15822dc33a2f8a19971afd7da0ab305f0b48b7..38faafcc7432c2bedead647d4946b718
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc99099e16b 100644
index 08cc81481cbe4fe40a7df6316db765fa2eac7fda..c5dfefd84b44de5a2c28afb2b9bd8035647da12b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -416,6 +416,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -425,6 +425,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -124,7 +111,7 @@ index 1b0e7811c023f795f9f8f8cdf8bf621e54b79855..915348eaa98191c60bddaaa3d146bdc9
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -866,6 +867,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -875,6 +876,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// If true, we send IPC messages when |preferred_size_| changes.
bool send_preferred_size_changes_ = false;

View File

@@ -32,7 +32,7 @@ index e5c9ebda8156c1a7c32f7eb0661dff40f022c264..8840d4be4b49b27dfb257866f6a074ef
accelerated_video_decode_enabled(false),
animation_policy(
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index a910d7b53a1346797f0e2bd030dff7ff84a834b8..4847c7587484eb02b8d7f532be53e499517a95fb 100644
index cfd107cf7257b5c0c2482baba8964e1d2508fc8b..6a2e25a3d7700df9c59952ff19c9ce62d391005c 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -56,7 +56,7 @@ index a910d7b53a1346797f0e2bd030dff7ff84a834b8..4847c7587484eb02b8d7f532be53e499
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eeac87b0cca 100644
index adbb4f0de4d787ac7710de06de2bf3b32dc6491f..c68a71ca2e272874420d309f2154cf89cf99b7ec 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -10,6 +10,7 @@
@@ -67,7 +67,7 @@ index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eea
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
@@ -157,6 +158,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -159,6 +160,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
// If true, stylus handwriting recognition to text input will be available in
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;
@@ -88,7 +88,7 @@ index 33ca0140e9434f37c67386973f1ebf460222691c..220551e3be0ae9275714f80758671eea
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
// only controls whether or not the "document.cookie" field is properly
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a4afe8e4f 100644
index fa2db0ccc2d9f72aa4976816548df31f83c2ef54..ab896b217be1f8695c6d05414252a37c8086369d 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@
@@ -99,7 +99,7 @@ index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -433,6 +434,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -438,6 +439,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.stylus_handwriting_enabled;
}
@@ -153,7 +153,7 @@ index d4c86ca871c796c3179a0fe099de0b3082ebf46e..0b438a894c37826c19bdac1b1474a50a
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index 4638c6cf8f3834bb3dc5f98347069f1211cb7332..8cf8845375809f239998b1db256622c2ce5b1e58 100644
index 656ed9364bc7b5874273797f3587d5d74f2c6bdb..e8e990b10890cca95ecc8927222e622eee8b888f 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
@@ -164,7 +164,7 @@ index 4638c6cf8f3834bb3dc5f98347069f1211cb7332..8cf8845375809f239998b1db256622c2
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -209,6 +210,19 @@ struct WebPreferences {
@@ -210,6 +211,19 @@ struct WebPreferences {
// If true, stylus handwriting recognition to text input will be available in
// editable input fields which are non-password type.
bool stylus_handwriting_enabled;

View File

@@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index ce1d8d490c34b7a1f7f539dac401be4a4eafdde6..a40d91b1135f2baf0b5d654b7175107180048163 100644
index 6e1ed6b05b9358a46c796ac175a6556703477a1f..f138d6dc153694c2c3fbb8c98d9557e5bab8214e 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
@@ -21,7 +21,7 @@ index ce1d8d490c34b7a1f7f539dac401be4a4eafdde6..a40d91b1135f2baf0b5d654b71751071
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -310,6 +315,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
@@ -311,6 +316,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
MenuItemsChanged();
}
@@ -33,7 +33,7 @@ index ce1d8d490c34b7a1f7f539dac401be4a4eafdde6..a40d91b1135f2baf0b5d654b71751071
void SimpleMenuModel::SetMinorText(size_t index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -403,6 +413,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
@@ -404,6 +414,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
return items_[ValidateItemIndex(index)].label;
}

View File

@@ -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 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43be61659d9 100644
index 0e50579d9b1c989beee4113d6762d32b8074efb4..bbcd21ddc38a799fe4226447f9b3447f1ea54feb 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) {
DCHECK(!IsDetached());
@@ -33,7 +33,7 @@ index 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43b
if (type == FrameDetachType::kRemove) {
if (provisional_frame_) {
provisional_frame_->Detach(FrameDetachType::kRemove);
@@ -154,6 +146,14 @@ bool Frame::Detach(FrameDetachType type) {
@@ -155,6 +147,14 @@ bool Frame::Detach(FrameDetachType type) {
GetWindowProxyManager()->ClearForSwap();
}
@@ -49,10 +49,10 @@ index 83b1a2231b522d10cf4b17864e444a00ef514735..f74d6e73675713780326ab20e504e43b
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee2139648501d377dfb 100644
index 90cf3971e573aaec7a85ccf4b6fff9f931924bdc..bb4e80de2930b2e3213cc7c4469bb2875760ebee 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -545,10 +545,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -547,10 +547,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index dd19180e5f29182a8993a18d939e5c78d49446c9..e3d7332e13524e5571b7aee213964850
if (!Client())
return false;
@@ -594,6 +590,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -596,6 +592,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni
index 605a2d455a8affffb3e864d872ffa767fdbc988f..ab4da059149f51724c057cdff7e04e9f6bc85270 100644
index 674def40cfdc83432d0f3ced8ab3f570dc9e8b1b..96e5e5e145715218724f93041060df60d709839a 100644
--- a/base/allocator/allocator.gni
+++ b/base/allocator/allocator.gni
@@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug)

View File

@@ -13,16 +13,15 @@ This patch can be removed when enable_print_content_analysis can be more
easily enabled or disabled by default with buildflags.
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
index 1d2b24adbb39215531bbe189d6191dba026d4f68..88b7962836cfe93a59d1569245f4815f22be355e 100644
index e57b8edde3b3e8f7a9cd580e2bcd039f1beebdff..f49cbaa980674444ccaee4a615dc99e9c630f7b8 100644
--- a/printing/buildflags/buildflags.gni
+++ b/printing/buildflags/buildflags.gni
@@ -36,8 +36,7 @@ declare_args() {
@@ -36,7 +36,7 @@ declare_args() {
# Enable snapshotting a page when printing for its content to be analyzed for
# sensitive content by enterprise users.
- enable_print_content_analysis =
- is_chromeos_ash || is_chromeos_lacros || is_win || is_linux || is_mac
+ enable_print_content_analysis = is_chromeos_ash || is_chromeos_lacros
- enable_print_content_analysis = is_chromeos || is_win || is_linux || is_mac
+ enable_print_content_analysis = is_chromeos
}
declare_args() {

View File

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfefb578981 100644
index 0223183c4e869e835429a52ad7d9eb381a2d21f5..47162ccaa75ea637b7ce5ed0fed976862b14c427 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -175,11 +175,16 @@ if (!is_android && !is_mac) {
@@ -176,11 +176,16 @@ if (!is_android && !is_mac) {
"common/crash_keys.h",
]
@@ -33,10 +33,10 @@ index 31d63709bd68819a439901823b6649e4328244f8..319447a52fb6ad39c879c3916bd8acfe
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c7fbdcf50 100644
index bb193ea0cb1df492e52a5023bd84852bfc3985ce..f89c54a1f73f26ca142a2764fd235111e6cbeff0 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4614,7 +4614,7 @@ static_library("browser") {
@@ -4623,7 +4623,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@@ -46,10 +46,10 @@ index db5d426cef5850603eb9f98c69989e5f11fcb513..198a31142605f428d00a6e594908fb2c
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34e9a0c579 100644
index ade95f3592fc54e69ec8717c7542ef2eae645056..c339589fc723be5ad49cca88bddbd9ae8a649644 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6011,7 +6011,6 @@ test("unit_tests") {
@@ -6038,7 +6038,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@@ -57,7 +57,7 @@ index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:crash_reporter_client_win_unit_tests",
@@ -6036,6 +6035,10 @@ test("unit_tests") {
@@ -6063,6 +6062,10 @@ test("unit_tests") {
"//ui/resources",
]
@@ -68,16 +68,16 @@ index 0119e51f4ee0f98968d854e6310234c01028c4ff..9d87f0fdbe110663ab0d3da26fbc0d34
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -6933,7 +6936,7 @@ test("unit_tests") {
@@ -6964,7 +6967,7 @@ test("unit_tests") {
}
deps += [
- "//chrome:packed_resources_integrity_hash",
+ # "//chrome:packed_resources_integrity_hash",
"//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons",
"//chrome/browser/enterprise/connectors/analysis:features",
"//chrome/browser/media/router:test_support",
"//chrome/browser/media/router/discovery:discovery",
@@ -7051,6 +7054,10 @@ test("unit_tests") {
@@ -7083,6 +7086,10 @@ test("unit_tests") {
}
}

View File

@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index 4fec8db3c0431294f65e2a7f0046b6ac5ba78c47..2a4ad0955b3c01b2f1d1665fb65e6d9bb16f5fc2 100644
index 01f5a1713c28f077e624fe1ea1c84fa3b514d660..3837b9ccf00b2d9f0b655a2c08e96d5020b0afbf 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -44,7 +44,11 @@ config("winver") {

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad75a0ff582 100644
index abfe94dc8c31fc928eb554ec3f2ec095aa6a970b..e815010dcb9437727f32b12f0d47a31384e24677 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7298,6 +7298,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -7313,6 +7313,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 9fe7a9c021c8d29359f072e04665a55858048be6..115dab63efa4b90f37609a9a0a363ad7
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d06dd4436 100644
index 8e1c0feede6dc599c0bc78d6278726b16c7931df..2b393e7e7089d17a0906610c3c8979c20928a5f6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3996,6 +3996,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4012,6 +4012,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@@ -39,7 +39,7 @@ index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_config, session_storage_namespace);
@@ -4040,12 +4048,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4056,12 +4064,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -53,10 +53,10 @@ index 276ae812cfb35f4fe6000a87b38c2155f37b12d3..9a0edcadef1bc60b035ca67df5082a7d
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bdcd7b8f01 100644
index 4eee5f6c069c83039bf0acee71056d8ed4ea92eb..9212926fba9d06296c9c46a95519b6ed777569ee 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -571,6 +571,10 @@ struct CreateNewWindowParams {
@@ -574,6 +574,10 @@ struct CreateNewWindowParams {
// Additional parameters for creating picture-in-picture windows.
blink.mojom.PictureInPictureWindowOptions? pip_options;
@@ -68,10 +68,10 @@ index fc7e18c294993f1fa8cef88782ae3f4ba60e4d54..c41545fc79a6a45c82aa39ff21e790bd
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f14902e6f 100644
index a9c96d4b463929143c7de0ec29d4afee5315fd92..2750d9f6c377b36fd1684077d9eec1cde78c856c 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -610,6 +610,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -617,6 +617,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -81,10 +81,10 @@ index 82a07cfb29870615a18a1718e5b6c0b2a42443ef..ba6e21fb83b4c58716b776c1a018c36f
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a029c40ea 100644
index bac29d867e465c87f69ea4f28eac118718db0992..7eb47e0c73c7f0d8a0cadcf5b8163f8a5154faea 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -164,6 +164,7 @@ class NetworkService;
@@ -163,6 +163,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -92,7 +92,7 @@ index 2f475430b85cf6029f0066f30069294847d05bd1..f399bc59be5705542b34185e7fe7202a
} // namespace network
namespace sandbox {
@@ -991,6 +992,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -999,6 +1000,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -149,13 +149,13 @@ index 0274e3bb5cc62ce2c52be68a50b57c339fc5bba7..1ea3e1fdf067ea54ce54d31f494ac2bf
// Notifies the delegate about the creation of a new WebContents. This
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a0d1d2016 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -297,6 +297,10 @@ WebView* RenderViewImpl::CreateView(
/*openee_can_access_opener_origin=*/true, !creator->IsAllowedToDownload(),
creator->IsAdFrame());
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index d70f6df69aa604972755d1cfe0cfcd2b0369f68c..8199122b2d759aa8b27affabe67b108fb9a16c38 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6196,6 +6196,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
/*openee_can_access_opener_origin=*/true,
!GetWebFrame()->IsAllowedToDownload(), GetWebFrame()->IsAdFrame());
+ params->raw_features = features.raw_features.Utf8(
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
@@ -165,10 +165,10 @@ index f9a857f270bad274fc952655efd7a9a32fbd7fb1..80cad3267721dc7bf78f5b75f99cda2a
// 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 6abdcf70bdeeb3a34d01c3b00e5f629373eef76b..537f71cbf3cc1112100a199a15b77a535efd8a4e 100644
index 40b82385697d8721ef6da3d0c77544d6d0ca400c..3a2d5207fb2eeea4b016012b09c3668af8dc35b4 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -482,6 +482,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -212,12 +212,12 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e
} // 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 cc39235616f0249c8a979a870885aec2d0e04cc4..77e6bbe18556279a98b5453d4ba1c3eb5b850287 100644
index 5bf3339038b6a8498221d1bd222ec340d78d1b92..c4be7a96144ac53be856fbf52dff8e990aa736aa 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2090,6 +2090,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2091,6 +2091,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);
GetWindowFeaturesFromString(features, entered_window, completed_url);
+ window_features.raw_features = features;
+

View File

@@ -1,179 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ken Rockot <rockot@google.com>
Date: Wed, 31 Aug 2022 15:39:45 +0000
Subject: Mojo: Validate response message type
Ensures that a response message is actually the type expected by the
original request.
Fixed: 1358134
Change-Id: I8f8f58168764477fbf7a6d2e8aeb040f07793d45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3864274
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1041553}
diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h
index 0ebbc94ad51cca74fcebc357b5262229ae5c9d0e..cd79a5edb3f939623b874db36542ee651113c164 100644
--- a/mojo/public/cpp/bindings/interface_endpoint_client.h
+++ b/mojo/public/cpp/bindings/interface_endpoint_client.h
@@ -221,20 +221,32 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient
void ForgetAsyncRequest(uint64_t request_id);
private:
- // Maps from the id of a response to the MessageReceiver that handles the
- // response.
- using AsyncResponderMap =
- std::map<uint64_t, std::unique_ptr<MessageReceiver>>;
+ struct PendingAsyncResponse {
+ public:
+ PendingAsyncResponse(uint32_t request_message_name,
+ std::unique_ptr<MessageReceiver> responder);
+ PendingAsyncResponse(PendingAsyncResponse&&);
+ PendingAsyncResponse(const PendingAsyncResponse&) = delete;
+ PendingAsyncResponse& operator=(PendingAsyncResponse&&);
+ PendingAsyncResponse& operator=(const PendingAsyncResponse&) = delete;
+ ~PendingAsyncResponse();
+
+ uint32_t request_message_name;
+ std::unique_ptr<MessageReceiver> responder;
+ };
+
+ using AsyncResponderMap = std::map<uint64_t, PendingAsyncResponse>;
struct SyncResponseInfo {
public:
- explicit SyncResponseInfo(bool* in_response_received);
+ SyncResponseInfo(uint32_t request_message_name, bool* in_response_received);
SyncResponseInfo(const SyncResponseInfo&) = delete;
SyncResponseInfo& operator=(const SyncResponseInfo&) = delete;
~SyncResponseInfo();
+ uint32_t request_message_name;
Message response;
// Points to a stack-allocated variable.
diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
index ded0d20ab193cfdaf36bd44c25719d7073c989fb..a6f41414b8918989662eb0a1dea773932631c8cc 100644
--- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
+++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc
@@ -30,6 +30,7 @@
#include "mojo/public/cpp/bindings/sync_call_restrictions.h"
#include "mojo/public/cpp/bindings/sync_event_watcher.h"
#include "mojo/public/cpp/bindings/thread_safe_proxy.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_mojo_event_info.pbzero.h"
namespace mojo {
@@ -316,9 +317,27 @@ class ResponderThunk : public MessageReceiverWithStatus {
// ----------------------------------------------------------------------------
+InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse(
+ uint32_t request_message_name,
+ std::unique_ptr<MessageReceiver> responder)
+ : request_message_name(request_message_name),
+ responder(std::move(responder)) {}
+
+InterfaceEndpointClient::PendingAsyncResponse::PendingAsyncResponse(
+ PendingAsyncResponse&&) = default;
+
+InterfaceEndpointClient::PendingAsyncResponse&
+InterfaceEndpointClient::PendingAsyncResponse::operator=(
+ PendingAsyncResponse&&) = default;
+
+InterfaceEndpointClient::PendingAsyncResponse::~PendingAsyncResponse() =
+ default;
+
InterfaceEndpointClient::SyncResponseInfo::SyncResponseInfo(
+ uint32_t request_message_name,
bool* in_response_received)
- : response_received(in_response_received) {}
+ : request_message_name(request_message_name),
+ response_received(in_response_received) {}
InterfaceEndpointClient::SyncResponseInfo::~SyncResponseInfo() {}
@@ -606,6 +625,7 @@ bool InterfaceEndpointClient::SendMessageWithResponder(
// message before calling |SendMessage()| below.
#endif
+ const uint32_t message_name = message->name();
const bool is_sync = message->has_flag(Message::kFlagIsSync);
const bool exclusive_wait = message->has_flag(Message::kFlagNoInterrupt);
if (!controller_->SendMessage(message))
@@ -622,7 +642,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder(
controller_->RegisterExternalSyncWaiter(request_id);
}
base::AutoLock lock(async_responders_lock_);
- async_responders_[request_id] = std::move(responder);
+ async_responders_.emplace(
+ request_id, PendingAsyncResponse{message_name, std::move(responder)});
return true;
}
@@ -630,7 +651,8 @@ bool InterfaceEndpointClient::SendMessageWithResponder(
bool response_received = false;
sync_responses_.insert(std::make_pair(
- request_id, std::make_unique<SyncResponseInfo>(&response_received)));
+ request_id,
+ std::make_unique<SyncResponseInfo>(message_name, &response_received)));
base::WeakPtr<InterfaceEndpointClient> weak_self =
weak_ptr_factory_.GetWeakPtr();
@@ -808,13 +830,13 @@ void InterfaceEndpointClient::ResetFromAnotherSequenceUnsafe() {
}
void InterfaceEndpointClient::ForgetAsyncRequest(uint64_t request_id) {
- std::unique_ptr<MessageReceiver> responder;
+ absl::optional<PendingAsyncResponse> response;
{
base::AutoLock lock(async_responders_lock_);
auto it = async_responders_.find(request_id);
if (it == async_responders_.end())
return;
- responder = std::move(it->second);
+ response = std::move(it->second);
async_responders_.erase(it);
}
}
@@ -906,6 +928,10 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) {
return false;
if (it->second) {
+ if (message->name() != it->second->request_message_name) {
+ return false;
+ }
+
it->second->response = std::move(*message);
*it->second->response_received = true;
return true;
@@ -916,18 +942,22 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) {
sync_responses_.erase(it);
}
- std::unique_ptr<MessageReceiver> responder;
+ absl::optional<PendingAsyncResponse> pending_response;
{
base::AutoLock lock(async_responders_lock_);
auto it = async_responders_.find(request_id);
if (it == async_responders_.end())
return false;
- responder = std::move(it->second);
+ pending_response = std::move(it->second);
async_responders_.erase(it);
}
+ if (message->name() != pending_response->request_message_name) {
+ return false;
+ }
+
internal::MessageDispatchContext dispatch_context(message);
- return responder->Accept(message);
+ return pending_response->responder->Accept(message);
} else {
if (mojo::internal::ControlMessageHandler::IsControlMessage(message))
return control_message_handler_.Accept(message);

View File

@@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index baf86ec0cde417fa4287f794de10b78d19439930..29d7b595fbfd6e211864e3baa8e2d3014b2e7a5b 100644
index 651d8ec7d8e98e7588f8f182018188ab234d5c5a..1fc645a7f748d3cad8ca2f4fa9897454cb937a4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -230,6 +230,7 @@ vs-chromium-project.txt

View File

@@ -34,10 +34,10 @@ index 0aae49ec83b88057434af5bbfb54b10e53469918..058e5dc978e76a71fa02dc9e275592f3
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 67871eec9821cf100acc719a1765be489dfbe7d8..1f883dc7d46d5cc3fddffe75c55e6b96fb0fc5f2 100644
index 2dbe61a4bdf6556f6db101e47d81d37417736bd1..dec439f15a7995b14ccf4ef95651413911b5fc4f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3136,15 +3136,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3137,15 +3137,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.

View File

@@ -63,10 +63,10 @@ index faa684c429e8cd5817c043db48dcbea33c6c8782..8b5991bc8279585cc0749f6816aa8a03
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc
index 268355f22577cf21926e209a9fcdb3f52314f2ac..80f998cdb10d9955e438ba5ef4599b35c448fae2 100644
index a3083a16b1317cc58b87e13f30498bcf3e475eaf..50deda6f7ee9b2cbf57288d54a30a44022be808a 100644
--- a/chrome/browser/ui/ash/ash_web_view_impl.cc
+++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
@@ -84,10 +84,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
@@ -96,10 +96,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -108,10 +108,10 @@ index 1318d5e04d5448d2b357454c3ce4207264288760..3b0324c35d5b18ed2e29264aae860c48
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4ca6b3b66e 100644
index 244584b4df1fb85241212c44cca7da3e87c174f3..1e6239c111b0ea765388f384385789537f473237 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1821,12 +1821,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1811,12 +1811,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -127,10 +127,10 @@ index ecf7d1e17ec8aa8f593b6f1b17d2d1c98928879a..8fa9f8b224526c7a41c16f0f6fd51c4c
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index b0f70cfaa60d28547f74b199d41ce81a5cdc8891..74efdc0a0ba5e5b862e12180dbfdb9534e9e0a5d 100644
index 38ee0d848089a4abefa357e47169da871753df6e..53332516617dc196ce21d674ab6987c6de8438e0 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -855,8 +855,7 @@ class Browser : public TabStripModelObserver,
@@ -852,8 +852,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -246,10 +246,10 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a2f1f72a30f694d53f28d38d823341e7b4f008e1..7ff6febe70e9ec82becfbe036883fbc7572b5b01 100644
index 47b85a2bd890485dec96e23fb2cb8f8553f5c4e2..7f04a05eec8780e735e0458c75103d9f2e9b858b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3922,8 +3922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -3938,8 +3938,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,

View File

@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 732260f0da15c50f660348e0c66e0b3098aa418f..0a0394a3607e9b955f9fc517e0814ac07b3ba67e 100644
index 30da015cffeb945973d0045ce297467ab16d7db6..53e7bd0f7dbff8c620a5827abb3ba871703a4f06 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -17,7 +17,9 @@

View File

@@ -75,7 +75,7 @@ index 2532e99f00b39777cd9640c76704f7430d39502e..323e039e4591a4099b187f7a0097b4ee
// 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 7159bea91a25700f0cb36c48cab62fe2d616b3bd..9bcc5ae7e870c27c3533534c06daa890de5a4816 100644
index a80a792f1cb2c996b77443a3383663b4687ae044..2b1453353ce93632b378d4b25295b5cb14df9b2c 100644
--- a/components/crash/core/app/crashpad_linux.cc
+++ b/components/crash/core/app/crashpad_linux.cc
@@ -170,6 +170,7 @@ bool PlatformCrashpadInitialization(
@@ -128,7 +128,7 @@ index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a5
arguments.push_back("--monitor-self");
}
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
index ad401a7711ceff58abacb99a03fda258fccd12a0..de04f4df602e3a0b20af045111faf8a7bf8e9e28 100644
index ae8801a7fc877241313de84a6ae0698d4f2adf69..9ae249bfe41da9743adc7f60d69be0f003ca31e2 100644
--- a/components/crash/core/app/crashpad_win.cc
+++ b/components/crash/core/app/crashpad_win.cc
@@ -91,6 +91,7 @@ bool PlatformCrashpadInitialization(

View File

@@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7cccaee61d61 100644
index 29e812d41d5c8b1384db2231c625a39579fed6dc..b0d12e9b64cc7aa5448e88f540e7a594fca3c80e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -39,7 +39,7 @@ index 7438cdf5604e237b46a22a2dd808aa6d031aea5f..fe882b31026b527df28d384e6e7e7ccc
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -1052,6 +1057,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -1053,6 +1058,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}

View File

@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c5130e93e74d 100644
index 5542037a338e34800d86c3ca9cbaf0511fa60570..e5011a2b9d2127c1e17730db54f9574f1ed1d287 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1866,6 +1866,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1873,6 +1873,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
gfx::ContentColorUsage content_color_usage) const {
TargetColorParams params;
@@ -35,7 +35,7 @@ index 23c2ea10c648fd0f67f31118c0ae30c5647ce5e5..9fe5b106397e8b5a66bc4a10e874c513
// If we are likely to software composite the resource, we use sRGB because
// software compositing is unable to perform color conversion.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 5eaf2d9cab94def423be78b414179e6ccc596437..1ca8b5968350e88761d9ebc073fe8c573d0f3b5d 100644
index 809fb46cc34db308e0ec73197859045ba639407c..9360695cd920de372529206212f795f299405fcf 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -81,7 +81,7 @@ index 9d34ced366026eb7cdd00ce40a4eb1af56180d39..abf67f8246bfa37df08cd2216c388dd3
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363b1203c58 100644
index 3f413731440ea6597001c8da03c1ac3c49bb60b2..fe1f2373f0b5f5e8eed2e0966910a6454db776d4 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -93,7 +93,7 @@ index 4b3c2d088253e478005bd0d891dbd9c62be3fed7..187c2ae02479fa9605abc9587ff14363
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf26423d0e 100644
index 368d47247ced2320e0627e9cce3cf05e59ea9f39..c675f0f37fa75dd0a39d503564c7ac265614d4e9 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -199,6 +199,7 @@
@@ -104,7 +104,7 @@ index 7bb696c3ad090828b2a7e3a9a648b75bbf39f844..81f0d154838bcf3d3b4e12780ca37bcf
#include "ui/gl/gl_switches.h"
#include "url/gurl.h"
#include "url/origin.h"
@@ -3195,6 +3196,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3205,6 +3206,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
@@ -156,7 +156,7 @@ index 75d7af9a79d4e7f2cd39e45496ab5fff66407638..35b0bb908245330fbdc5205caa3299bf
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index 4f3b9b181b1998e0ebbd95955feeec28a5d6bcb7..00f2a213cded1985b3131fabf3560937c56f6ffd 100644
index ba6ab6961dec25a3f9c572341d24f341c8f58358..ba8cfd2a2572368fc14073a53f8544f269089894 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -24,6 +24,7 @@

View File

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

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468cef6e56d 100644
index 311dd906e497f5ba8a19037e629aa58c44773e67..457ba67603442e8ae9ea75be1cb3b4bf32ed4c4f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -810,6 +810,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,10 +20,10 @@ index cfa45a1e4e65b26085694979ac34a8844643b9c7..25a80899f9ae533e2d84e99076696468
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545cade0e23 100644
index 527463920c3d259ca0f30c70a5a860394d0cf4e9..2b50994469ee8ede3b4417650386e26553436e6e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -881,6 +881,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -883,6 +883,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
SiteInstanceGroup* GetSiteInstanceGroup();
@@ -34,10 +34,10 @@ index db807cca58eac2693aa4e8dabff7f3102c3ebaed..0646cecba3679dfa4cd04be093943545
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index ea62c4a966dd76c1964b6d7f9053cb4fb73376f5..79253c9d5c8f4e71e5c0d0d87dd641feab901e51 100644
index 9d1301a55acdc5f70550c7222cd31f8338f0e7f4..82e9c9ba7c7cade143aeffdd1e123131d7568698 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -592,7 +592,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -594,7 +594,7 @@ void RenderWidgetHostViewAura::HideImpl() {
DCHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -0,0 +1,59 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Thu, 1 Sep 2022 11:31:24 -0400
Subject: disable optimization guide for preconnect feature
The optimization guide component
(https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/)
is not enabled for Electron, but the preconnect feature uses the resource prefetch
predictor code which includes this component. This patch disables the optimization guide
component code in the resource prefetch predictor code since it is unused and including
it causes compilation problems on Windows.
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
index c4b64a7812bac4534371887eb7e0a07ec9cab8ff..b827d69964d824540ea70f66c467e91be8391e6c 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -100,10 +100,12 @@ PreconnectPrediction& PreconnectPrediction::operator=(
PreconnectPrediction& PreconnectPrediction::operator=(
PreconnectPrediction&& other) = default;
+#if 0
OptimizationGuidePrediction::OptimizationGuidePrediction() = default;
OptimizationGuidePrediction::OptimizationGuidePrediction(
const OptimizationGuidePrediction& prediction) = default;
OptimizationGuidePrediction::~OptimizationGuidePrediction() = default;
+#endif
////////////////////////////////////////////////////////////////////////////////
// ResourcePrefetchPredictor static functions.
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index 53a23990019accc0504a25dae935c53348c7eaa7..ef6667ce8bbc062dbfb8d2e2cdb6886b3e994b76 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -26,7 +26,9 @@
#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
+#if 0
#include "components/optimization_guide/content/browser/optimization_guide_decider.h"
+#endif
#include "components/sqlite_proto/key_value_data.h"
#include "net/base/network_isolation_key.h"
#include "services/network/public/mojom/fetch_api.mojom-forward.h"
@@ -110,6 +112,7 @@ struct PreconnectPrediction {
std::vector<PrefetchRequest> prefetch_requests;
};
+#if 0
// Stores a result of a prediction from the optimization guide.
struct OptimizationGuidePrediction {
OptimizationGuidePrediction();
@@ -121,6 +124,7 @@ struct OptimizationGuidePrediction {
std::vector<GURL> predicted_subresources;
absl::optional<base::TimeTicks> optimization_guide_prediction_arrived;
};
+#endif
// Contains logic for learning what can be prefetched and for kicking off
// speculative prefetching.

View File

@@ -50,7 +50,7 @@ index 714232b0c2707d6c256e634ff784c18322bf0a85..48c8d0051c427954fe7265fee9cd0c6b
#endif
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index 3327d353cd887d027cf1d9b483ebf6e6aaaef169..dab0d2cf3e87fc082f72f40d1d622efd390885d1 100644
index 960d0100e1857592ee24b2da22e0253ab06098c1..dca9fb72fb69386ffb0910e13f841fa698250b66 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -30,6 +30,7 @@

View File

@@ -19,10 +19,10 @@ index b6d243983474cfc2c314b555ccc1de4d833a7f00..2b1fa6a345247fdbb17bd2381ab9e74a
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index fe882b31026b527df28d384e6e7e7cccaee61d61..82616ebcb1f56de12cbd932a4614bb3858e9bad9 100644
index b0d12e9b64cc7aa5448e88f540e7a594fca3c80e..91e45df23e659d705839fa3798ad3452bac012e5 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1002,8 +1002,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
@@ -1003,8 +1003,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
}
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {

View File

@@ -33,7 +33,7 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f84811dde 100644
index f25c1baa5142d53a882b864a67d94e9e0911f0bf..4dbbc74ddb359047f1dd9e158b8dcaf63bde3790 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1412,6 +1412,13 @@ void NetworkContext::SetNetworkConditions(
@@ -51,22 +51,22 @@ index 3e0ac81d77b3943a3021381e96f55059e4289a9b..ea7c2387bfc06d47cea6bd97d0b4b95f
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9..d4dd2699fa0876d374750135851e1e5325bf4e0d 100644
index a9a1beed6c8e59abb9065701f34f155905781a2a..5ced53f2e875091cdaf6a38384de4f7890cd71e9 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -296,6 +296,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -300,6 +300,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
+ void SetUserAgent(const std::string& new_user_agent) override;
void SetAcceptLanguage(const std::string& new_accept_language) override;
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS)
void SetEnablePreconnect(bool enable_preconnect) override;
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529d3f603b3 100644
index e47bbfac56cd6c787ba3e7c0518a5326386a19b6..105011c25861fe00cc8e72fe8f310ee5118725c3 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1103,6 +1103,9 @@ interface NetworkContext {
@@ -1106,6 +1106,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,7 +77,7 @@ index bc63400c5143f13fa8108bc431e08e83725d3b0b..f995a7277f76e30309752e2c4c193529
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e6ee7916d 100644
index 52f08526b9988beae7ec5b0fa44ced84d38f73ce..3f55bfcf0ed5dd83e73984cb3ba16cfa1fb7b685 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -87,4 +87,4 @@ index 82edffa618da7e5954b0adeb4f933dfe4035b48a..92d3b15ff81eb2dbe9e7d1466fc4a18e
+ void SetUserAgent(const std::string& new_user_agent) override {}
void SetAcceptLanguage(const std::string& new_accept_language) override {}
void SetEnableReferrers(bool enable_referrers) override {}
#if BUILDFLAG(IS_CHROMEOS)
void SetEnablePreconnect(bool enable_preconnect) override {}

View File

@@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502b5d47996 100644
index 40aa3b1a5c569e66b6f5d1630afe248c40d5715b..d61f63d5c16f3d93b301f1a338ae329b6f034753 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -161,6 +161,7 @@
@@ -164,6 +164,7 @@
#include "third_party/blink/renderer/core/timing/window_performance.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
@@ -23,7 +23,7 @@ index 38faafcc7432c2bedead647d4946b7183233b4bc..ff4fc53da0e14a58218c3cb39595b502
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1797,6 +1798,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1807,6 +1808,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View File

@@ -13,11 +13,11 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0ad1c2cd0 100644
index c881e7951d10c48faac556661018423dff12b102..0f5408f3ddc65b856e62a05d3fe48a4397827cba 100644
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
@@ -10,8 +10,10 @@
#include "base/callback_helpers.h"
@@ -11,8 +11,10 @@
#include "base/containers/adapters.h"
#include "base/cxx17_backports.h"
#include "base/location.h"
+#include "base/no_destructor.h"
@@ -27,7 +27,7 @@ index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0
#include "media/base/media_log.h"
#include "net/base/net_errors.h"
#include "third_party/blink/renderer/platform/media/buffered_data_source_host_impl.h"
@@ -60,8 +62,20 @@ const int kUpdateBufferSizeFrequency = 32;
@@ -61,8 +63,20 @@ const int kUpdateBufferSizeFrequency = 32;
// How long to we delay a seek after a read?
constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20);
@@ -48,7 +48,7 @@ index 2879fec717b0b2bba66c599a063079b7ca8ce4b2..4bea0a1be7be5aa8c93a7a4d3cff0dc0
class MultiBufferDataSource::ReadOperation {
public:
ReadOperation() = delete;
@@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const {
@@ -154,7 +168,14 @@ bool MultiBufferDataSource::media_has_played() const {
bool MultiBufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);

View File

@@ -7,7 +7,7 @@ Subject: feat: allow embedders to add observers on created hunspell
This patch is used by Electron to implement spellchecker events.
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index db3c802746235c0dcfe7fe19ca4315ee77c96743..e9a7dfb8f3a4271d35ef1d33d2dd346c23d65b47 100644
index bbc3ea681bfe0db0e122635db5442c447a30d387..26bc4ccfcc7583fd76cd290132b0729c1f01bae3 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() {

View File

@@ -81,10 +81,10 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 90e1c4adeab61374adf9da5708497ea32a46c7f5..b812a22802c7c425ab259dfe5681cafe6ad758c8 100644
index e3056ad83f954787f50c2507cb63659605c3dd3b..358eceadb8a3c2a6782f5fcd4b57630f87689c8b 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -134,6 +134,8 @@ viz_component("service") {
@@ -136,6 +136,8 @@ viz_component("service") {
"display_embedder/skia_output_surface_impl_on_gpu.h",
"display_embedder/skia_render_copy_results.cc",
"display_embedder/skia_render_copy_results.h",

View File

@@ -103,7 +103,7 @@ index 3d2bcc3e81eb42f645fa4e8b1425cb5c54cfd3a1..4cdbe0e38609abfd0b0b5856deb8b2dd
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6aeacaf22f2 100644
index 2e8a874bf93e03e7c194dc13555eead6fe1fcafa..5b28db971f8feebd36965ccafe8b1b957b3f1ede 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -606,6 +606,7 @@ URLLoader::URLLoader(
@@ -123,7 +123,7 @@ index bc7e0a4b2ae29ac40765a9339248d42d4d31713b..2e01e4898fd17cc96fab8c2a06d4d6ae
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1545,6 +1546,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1555,6 +1556,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();

View File

@@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this
change.
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff118eed07 100644
index 8106b5ceec5b6b3ca01d14308a351e63eac809c1..5758757980879a9c1810c4de44f228860688d442 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -17,12 +17,16 @@
@@ -36,7 +36,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
@@ -177,6 +181,7 @@ void FullscreenController::EnterFullscreenModeForTab(
@@ -181,6 +185,7 @@ void FullscreenController::EnterFullscreenModeForTab(
return;
}
@@ -44,7 +44,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
if (base::FeatureList::IsEnabled(
blink::features::kWindowPlacementFullscreenCompanionWindow)) {
if (!popunder_preventer_)
@@ -184,6 +189,7 @@ void FullscreenController::EnterFullscreenModeForTab(
@@ -188,6 +193,7 @@ void FullscreenController::EnterFullscreenModeForTab(
else
popunder_preventer_->WillActivateWebContents(web_contents);
}
@@ -52,7 +52,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
// value of |IsWindowFullscreenForTabOrPending|.
@@ -233,7 +239,9 @@ void FullscreenController::EnterFullscreenModeForTab(
@@ -237,7 +243,9 @@ void FullscreenController::EnterFullscreenModeForTab(
}
void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
@@ -62,7 +62,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
if (MaybeToggleFullscreenWithinTab(web_contents, false)) {
// During tab capture of fullscreen-within-tab views, the browser window
@@ -288,11 +296,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
@@ -292,11 +300,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
void FullscreenController::FullscreenTabOpeningPopup(
content::WebContents* opener,
content::WebContents* popup) {
@@ -76,7 +76,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
}
void FullscreenController::OnTabDeactivated(
@@ -460,18 +470,17 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -465,18 +475,17 @@ void FullscreenController::EnterFullscreenModeInternal(
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
// from manually entering fullscreen mode and also disables kiosk mode on
// desktop platforms.
@@ -100,7 +100,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
if (option == TAB) {
url = GetRequestingOrigin();
tab_fullscreen_ = true;
@@ -498,6 +507,7 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -509,6 +518,7 @@ void FullscreenController::EnterFullscreenModeInternal(
if (!extension_caused_fullscreen_.is_empty())
url = extension_caused_fullscreen_;
}
@@ -108,7 +108,7 @@ index 84d9b4d72662895042e523522c13ec477aebe868..c358a34447c8aa67a341a1e4df769dff
if (option == BROWSER)
base::RecordAction(base::UserMetricsAction("ToggleFullscreen"));
@@ -525,12 +535,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
@@ -536,12 +546,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
RecordExitingUMA();
toggled_into_fullscreen_ = false;
started_fullscreen_transition_ = true;

View File

@@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4..fd6477ee04aee6a87dd33ea0e573eec3d7bba175 100644
index 2aa24b773a974e7789c661a0ffa5e01715c6e229..74993d461cbd0885a709cf8b663b9c69650aa3cf 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3453,7 +3453,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -3469,7 +3469,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
DCHECK(requesting_frame->IsActive());

View File

@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 82616ebcb1f56de12cbd932a4614bb3858e9bad9..67871eec9821cf100acc719a1765be489dfbe7d8 100644
index 91e45df23e659d705839fa3798ad3452bac012e5..2dbe61a4bdf6556f6db101e47d81d37417736bd1 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3702,6 +3702,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3703,6 +3703,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size);

View File

@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
to users. We should try to upstream this.
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c6935c90a 100644
index 892efd5009b0a0ef00081bd765d20c46d68b2324..f40238dc39a017a07972c8fec48a802da8a2cad0 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1837,7 +1837,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -1858,7 +1858,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// IncrementCapturerCount() is destructed.
void DecrementCapturerCount(bool stay_hidden,
bool stay_awake,
@@ -21,10 +21,10 @@ index 864c0a9b7072b6c3ac6584ed35a833dd6afb9e34..214f387fa670926a4c14d39ed1be556c
// Calculates the PageVisibilityState for |visibility|, taking the capturing
// state into account.
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index f92bcc8f2a212e6cda464d9b6060a561d689f467..f9cb0eea11665148a4be669acaf5703cf9c0ea09 100644
index a389a9c41f96ec3231b62510cde140c52dcdbe9e..25f7919970139baf58531a257f7a8c7184fef85a 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -669,6 +669,10 @@ class WebContents : public PageNavigator,
@@ -670,6 +670,10 @@ class WebContents : public PageNavigator,
bool stay_awake,
bool is_activity = true) = 0;

View File

@@ -7,11 +7,11 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
to make it usable from Electron by removing Profile references.
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f21e88f30 100644
index 28366584e6a3cc2655e5bc7417c4e52b9d0f4163..46894c02ca15f7091f280b2960f2ec628c500e53 100644
--- a/chrome/browser/accessibility/accessibility_ui.cc
+++ b/chrome/browser/accessibility/accessibility_ui.cc
@@ -22,7 +22,10 @@
#include "base/values.h"
@@ -21,7 +21,10 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#if 0
@@ -21,7 +21,7 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f
#include "chrome/common/pref_names.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/dev_ui_browser_resources.h"
@@ -50,9 +53,11 @@
@@ -49,9 +52,11 @@
#include "ui/views/accessibility/view_accessibility.h"
#if !BUILDFLAG(IS_ANDROID)
@@ -33,50 +33,49 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f
#include "ui/views/accessibility/widget_ax_tree_id_map.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -164,7 +169,7 @@ std::unique_ptr<base::DictionaryValue> BuildTargetDescriptor(
@@ -162,7 +167,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
accessibility_mode);
}
-#if !BUILDFLAG(IS_ANDROID)
+#if 0
std::unique_ptr<base::DictionaryValue> BuildTargetDescriptor(Browser* browser) {
std::unique_ptr<base::DictionaryValue> target_data(
new base::DictionaryValue());
@@ -203,7 +208,9 @@ void HandleAccessibilityRequestCallback(
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -196,7 +201,9 @@ void HandleAccessibilityRequestCallback(
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
base::DictionaryValue data;
base::Value::Dict data;
+#if 0
PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs();
+#endif
ui::AXMode mode =
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
@@ -237,7 +244,7 @@ void HandleAccessibilityRequestCallback(
data.SetBoolKey(kViewsAccessibility,
features::IsAccessibilityTreeForViewsEnabled());
@@ -228,7 +235,7 @@ void HandleAccessibilityRequestCallback(
// enabled.
data.Set(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled());
- bool show_internal = pref->GetBoolean(prefs::kShowInternalAccessibilityTree);
+ bool show_internal = true;
data.SetStringKey(kInternal, show_internal ? kOn : kOff);
data.Set(kInternal, show_internal ? kOn : kOff);
std::unique_ptr<base::ListValue> page_list(new base::ListValue());
@@ -274,12 +281,12 @@ void HandleAccessibilityRequestCallback(
base::Value::List page_list;
@@ -264,11 +271,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
std::unique_ptr<base::ListValue> browser_list(new base::ListValue());
base::Value::List browser_list;
-#if !BUILDFLAG(IS_ANDROID)
+#if 0
for (Browser* browser : *BrowserList::GetInstance()) {
browser_list->Append(
base::Value::FromUniquePtrValue(BuildTargetDescriptor(browser)));
browser_list.Append(BuildTargetDescriptor(browser));
}
-#endif // !BUILDFLAG(IS_ANDROID)
+#endif // !BUILDFLAG(IS_ANDROID)
data.Set(kBrowsersField, std::move(browser_list));
std::unique_ptr<base::ListValue> widgets_list(new base::ListValue());
@@ -497,8 +504,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(
base::Value::List widgets_list;
@@ -483,8 +490,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(
AllowJavascript();
if (flag_name_str == kInternal) {
@@ -87,7 +86,7 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f
return;
}
@@ -605,10 +614,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -588,10 +597,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -98,26 +97,26 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f
std::string accessibility_contents =
- web_contents->DumpAccessibilityTree(internal, property_filters);
+ web_contents->DumpAccessibilityTree(true, property_filters);
result->SetStringKey(kTreeField, accessibility_contents);
FireWebUIListener(request_type, *(result.get()));
result.Set(kTreeField, accessibility_contents);
FireWebUIListener(request_type, result);
}
@@ -633,6 +644,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -614,6 +625,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
+#if 0
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
std::unique_ptr<base::DictionaryValue> result(
@@ -647,6 +659,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -626,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
+#endif
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
@@ -763,5 +776,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
base::Value::Dict result;
@@ -738,5 +751,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
@@ -126,10 +125,10 @@ index a1c0a809fee4ddbda55540139e866cfe494c5590..25888d4405b60925ef60726a0f486f6f
+#endif
}
diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h
index 6bc5891205fc94377040d9195b0ee15a47a90382..16a25b6a5670a74cf260210b06bc9892431cd760 100644
index 8ae101cdb4de8ea570e3af6e05e9124b51a9f14c..2706f8ad05a6bee71b68f59406eb0bd3391a3fcd 100644
--- a/chrome/browser/accessibility/accessibility_ui.h
+++ b/chrome/browser/accessibility/accessibility_ui.h
@@ -25,6 +25,8 @@ struct AXEventNotificationDetails;
@@ -22,6 +22,8 @@ struct AXEventNotificationDetails;
class WebContents;
} // namespace content
@@ -138,7 +137,7 @@ index 6bc5891205fc94377040d9195b0ee15a47a90382..16a25b6a5670a74cf260210b06bc9892
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
@@ -66,6 +68,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
@@ -63,6 +65,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
private:

View File

@@ -0,0 +1,198 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Mon, 5 Sep 2022 19:07:54 +0900
Subject: fix: return v8::Value from LocalFrame::RequestExecuteScript
Allows api::WebFrame::ExecuteJavaScript(InIsolateWorld) to work with
v8::Value instead of base::Value.
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953
diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc
index 032ef69a5b50cef88f341b8a7a3de0acef88898d..a425fe1fb6275afd8e25033932f6f444efd6f643 100644
--- a/extensions/renderer/script_injection.cc
+++ b/extensions/renderer/script_injection.cc
@@ -332,6 +332,7 @@ void ScriptInjection::InjectJs(std::set<std::string>* executing_scripts,
blink::mojom::LoadEventBlockingOption::kBlock,
base::BindOnce(&ScriptInjection::OnJsInjectionCompleted,
weak_ptr_factory_.GetWeakPtr()),
+ base::NullCallback(),
blink::BackForwardCacheAware::kPossiblyDisallow,
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 ba043cf658f568e4390db1619b1042749e430b2b..285d53074a0fcfb00caaec8c3f8a0bbebcd68953 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -424,6 +424,7 @@ class WebLocalFrame : public WebFrame {
mojom::EvaluationTiming,
mojom::LoadEventBlockingOption,
WebScriptExecutionCallback,
+ WebScriptExecutionCallbackUnmodified,
BackForwardCacheAware,
mojom::PromiseResultOption) = 0;
diff --git a/third_party/blink/public/web/web_script_execution_callback.h b/third_party/blink/public/web/web_script_execution_callback.h
index c37e7ef609c91e9b9107d7a6194b213039184fb9..3f2e27b4f51dc1d673883cf2bf75f596a952ac44 100644
--- a/third_party/blink/public/web/web_script_execution_callback.h
+++ b/third_party/blink/public/web/web_script_execution_callback.h
@@ -17,6 +17,12 @@ namespace base {
class TimeTicks;
}
+namespace v8 {
+class Value;
+template <class T>
+class Local;
+}
+
namespace blink {
template <typename T>
@@ -26,6 +32,9 @@ using WebScriptExecutionCallback =
base::OnceCallback<void(const WebVector<v8::Local<v8::Value>>&,
base::TimeTicks)>;
+using WebScriptExecutionCallbackUnmodified =
+ base::OnceCallback<void(const WebVector<v8::Local<v8::Value>>&)>;
+
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index 3891afe36284d033e3ba88ffda63545b07f6c718..69eb59439932887b34099f7cd3ebd51ecd4aa676 100644
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -1133,6 +1133,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
auto* executor = MakeGarbageCollected<PausableScriptExecutor>(
DomWindow(), ToScriptState(frame_, *isolated_world),
execution_request->Callback(),
+ base::NullCallback(),
/*executor=*/execution_request);
executor->Run();
diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc
index 4b2b8fc8e5b48948b36bfdc5b76ebeabe5c72606..90437b41b3e12309c194d9f3e94ac37603403227 100644
--- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc
+++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc
@@ -262,7 +262,7 @@ void PausableScriptExecutor::CreateAndRun(LocalDOMWindow* window,
}
PausableScriptExecutor* executor =
MakeGarbageCollected<PausableScriptExecutor>(
- window, script_state, std::move(callback),
+ window, script_state, std::move(callback), base::NullCallback(),
MakeGarbageCollected<V8FunctionExecutor>(
window->GetIsolate(), function, receiver, argc, argv));
executor->Run();
@@ -277,6 +277,14 @@ void PausableScriptExecutor::ContextDestroyed() {
ScriptState::Scope script_scope(script_state_);
std::move(callback_).Run(Vector<v8::Local<v8::Value>>(), {});
}
+ if (raw_callback_) {
+ // Though the context is (about to be) destroyed, the callback is invoked
+ // with a vector of v8::Local<>s, which implies that creating v8::Locals
+ // is permitted. Ensure a valid scope is present for the callback.
+ // See https://crbug.com/840719.
+ ScriptState::Scope script_scope(script_state_);
+ std::move(raw_callback_).Run(Vector<v8::Local<v8::Value>>());
+ }
Dispose();
}
@@ -285,11 +293,12 @@ PausableScriptExecutor::PausableScriptExecutor(
scoped_refptr<DOMWrapperWorld> world,
Vector<WebScriptSource> sources,
mojom::blink::UserActivationOption user_gesture,
- WebScriptExecutionCallback callback)
+ WebScriptExecutionCallback callback,
+ WebScriptExecutionCallbackUnmodified raw_callback)
: PausableScriptExecutor(
window,
ToScriptState(window, *world),
- std::move(callback),
+ std::move(callback), std::move(raw_callback),
MakeGarbageCollected<WebScriptExecutor>(std::move(sources),
world->GetWorldId(),
user_gesture)) {}
@@ -298,11 +307,12 @@ PausableScriptExecutor::PausableScriptExecutor(
LocalDOMWindow* window,
ScriptState* script_state,
WebScriptExecutionCallback callback,
+ WebScriptExecutionCallbackUnmodified raw_callback,
Executor* executor)
: ExecutionContextLifecycleObserver(window),
script_state_(script_state),
callback_(std::move(callback)),
- blocking_option_(mojom::blink::LoadEventBlockingOption::kDoNotBlock),
+ raw_callback_(std::move(raw_callback)),
executor_(executor) {
CHECK(script_state_);
CHECK(script_state_->ContextIsValid());
@@ -388,6 +398,9 @@ void PausableScriptExecutor::HandleResults(
if (callback_)
std::move(callback_).Run(results, start_time_);
+ if (raw_callback_)
+ std::move(raw_callback_).Run(results);
+
Dispose();
}
diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.h b/third_party/blink/renderer/core/frame/pausable_script_executor.h
index 12a42ef52c2689a1c2d3029890fed8e12faa03aa..fe5bd4bee4f236f2958dcf03e1f644639afc4c75 100644
--- a/third_party/blink/renderer/core/frame/pausable_script_executor.h
+++ b/third_party/blink/renderer/core/frame/pausable_script_executor.h
@@ -48,10 +48,12 @@ class CORE_EXPORT PausableScriptExecutor final
scoped_refptr<DOMWrapperWorld>,
Vector<WebScriptSource>,
mojom::blink::UserActivationOption,
- WebScriptExecutionCallback);
+ WebScriptExecutionCallback,
+ WebScriptExecutionCallbackUnmodified);
PausableScriptExecutor(LocalDOMWindow*,
ScriptState*,
WebScriptExecutionCallback,
+ WebScriptExecutionCallbackUnmodified,
Executor*);
~PausableScriptExecutor() override;
@@ -75,6 +77,7 @@ class CORE_EXPORT PausableScriptExecutor final
Member<ScriptState> script_state_;
WebScriptExecutionCallback callback_;
+ WebScriptExecutionCallbackUnmodified raw_callback_;
base::TimeTicks start_time_;
mojom::blink::LoadEventBlockingOption blocking_option_;
TaskHandle task_handle_;
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 a31fe747be3c228c4eec512835de6368d29516aa..4197391cb15a55eaca55eca2d3886ebcb8360e95 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
@@ -1086,6 +1086,7 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
+ WebScriptExecutionCallbackUnmodified raw_callback,
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::PromiseResultOption promise_behavior) {
DCHECK(GetFrame());
@@ -1109,7 +1110,7 @@ void WebLocalFrameImpl::RequestExecuteScript(
base::checked_cast<wtf_size_t>(sources.size()));
auto* executor = MakeGarbageCollected<PausableScriptExecutor>(
GetFrame()->DomWindow(), std::move(world), std::move(script_sources),
- user_gesture, std::move(callback));
+ user_gesture, std::move(callback), std::move(raw_callback));
executor->set_wait_for_promise(promise_behavior);
switch (evaluation_timing) {
case mojom::blink::EvaluationTiming::kAsynchronous:
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 76cbde766ba8ebc1b503eea9a5b6335f775dc00c..ebb1084be8069251d8f568e7b9f30d3dc83b0a64 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
@@ -189,6 +189,7 @@ class CORE_EXPORT WebLocalFrameImpl final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
+ WebScriptExecutionCallbackUnmodified,
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::PromiseResultOption) override;
void Alert(const WebString& message) override;

View File

@@ -18,10 +18,10 @@ fix this, we revert those state update calls to early returns.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856525
diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc
index 84736afeb21d1deec0f4032ef6f3304075d8fffb..d023bb7b5a34c5c055d3d7cc5dc3e04ef43bcc3b 100644
index 90c7fbebfcedd744163f8294be6de99db7b54aef..5c507f3aa02d918fc9c87ed3842f282f4545f0ff 100644
--- a/content/browser/devtools/protocol/emulation_handler.cc
+++ b/content/browser/devtools/protocol/emulation_handler.cc
@@ -565,7 +565,9 @@ WebContentsImpl* EmulationHandler::GetWebContents() {
@@ -588,7 +588,9 @@ WebContentsImpl* EmulationHandler::GetWebContents() {
}
void EmulationHandler::UpdateTouchEventEmulationState() {
@@ -32,7 +32,7 @@ index 84736afeb21d1deec0f4032ef6f3304075d8fffb..d023bb7b5a34c5c055d3d7cc5dc3e04e
// We only have a single TouchEmulator for all frames, so let the main frame's
// EmulationHandler enable/disable it.
DCHECK(!host_->GetParentOrOuterDocument());
@@ -585,7 +587,9 @@ void EmulationHandler::UpdateTouchEventEmulationState() {
@@ -608,7 +610,9 @@ void EmulationHandler::UpdateTouchEventEmulationState() {
}
void EmulationHandler::UpdateDeviceEmulationState() {

View File

@@ -0,0 +1,47 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Adam Kallai <kadam@inf.u-szeged.hu>
Date: Mon, 22 Aug 2022 20:35:17 +0000
Subject: Fix the gn gen for components/segmentation_platform
'optimization_guide_segmentation_handler' dependency only available if
the 'build_with_tflite_lib' condition is set.
Change-Id: I4d13e1f17caaaa744b3c95e425466cf851edf613
Bug: 1355185
Change-Id: I4d13e1f17caaaa744b3c95e425466cf851edf613
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3845194
Reviewed-by: Siddhartha S <ssid@chromium.org>
Commit-Queue: Siddhartha S <ssid@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1037919}
(cherry picked from commit 9352250ae5e5589a7484873d7efe66d708ba6ad6)
diff --git a/components/segmentation_platform/embedder/BUILD.gn b/components/segmentation_platform/embedder/BUILD.gn
index 385ab7e469f4e0c02500295edc7f24cedaf0ac6b..9bbac1528bcf0c7c1589c4962bee0ff9c5febaf7 100644
--- a/components/segmentation_platform/embedder/BUILD.gn
+++ b/components/segmentation_platform/embedder/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//components/optimization_guide/features.gni")
+
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
@@ -21,11 +23,14 @@ source_set("embedder") {
"//components/optimization_guide/core",
"//components/optimization_guide/core:features",
"//components/segmentation_platform/internal",
- "//components/segmentation_platform/internal:optimization_guide_segmentation_handler",
"//components/segmentation_platform/internal/proto",
"//components/segmentation_platform/public",
"//url",
]
+
+ if (build_with_tflite_lib) {
+ deps += [ "//components/segmentation_platform/internal:optimization_guide_segmentation_handler" ]
+ }
}
source_set("unit_tests") {

View File

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d27548f6b62a7 100644
index 569297aab0b4187afde801643957949216404082..a1e332ae2bcf2027019261e38bb82c8446e014d1 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -3271,6 +3271,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -3270,6 +3270,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,10 +20,10 @@ index 2ade1a0771a8f9c3c790492aadbd711b97a4613c..4a5f3bf210869e55dbc735b70b5d2754
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index f399bc59be5705542b34185e7fe7202a029c40ea..3293b6e035a6ea182504aa2700866fea8c213f4c 100644
index 7eb47e0c73c7f0d8a0cadcf5b8163f8a5154faea..a699439c45bcfce66b697e2a97e6d1ae408cd343 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -270,6 +270,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -271,6 +271,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

View File

@@ -38,10 +38,10 @@ index d7739924bc3c3daec848db52730bd60c72ff2d8a..78af701cb06f6cb1bdd9829b2fcc46c8
// 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 ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b3c640dd4 100644
index cb3302bb2abb735609436bdf2a5d4d51cc4258ad..5530d975303cc96701e4b70ffbcaf6e7c02bb016 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -362,7 +362,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -368,7 +368,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 ab2affbcab0ca7eea0b908fd1dd75f36ef095385..952b3ba6247935053d9a080bced30e3b
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -372,7 +373,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@@ -378,7 +379,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
SetFlags(mode, js_command_line_flags);

View File

@@ -12,7 +12,7 @@ rendering and there is no signal from browser process on this event
to identify it.
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58ef31931ae 100644
index 54cc8dc51d400a5738c7e3d63e6f368bead2a021..182ef4fde23a6afe2e9d8a8f02d8ccf6161c633e 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
@@ -28,7 +28,7 @@ index 650a9128d26ac6a745abfdaca93d21f19e60343a..9ccc48f79e9fe9541f9fcd7063b1f58e
void GpuDataManagerImpl::UpdateDawnInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb00a156332 100644
index 1fc56c055d423ab074f8f4f90415e34593a04a18..c637247f003e1c6bfe073a43a09851682cd242cc 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -125,6 +125,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
@@ -40,10 +40,10 @@ index 9f2b350bc160e01ae39becd405e8a7d99a9a8ec1..3601121e3290b7b3a71041ede93d8fb0
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f0c91ee61 100644
index 526b9768da187b0f7d94b3500a63af8242d568af..01faafb23559dd13f5a770c1dd3864a2ea858321 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1209,6 +1209,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
@@ -1199,6 +1199,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
if (host)
host->ForceShutdown();
}
@@ -57,7 +57,7 @@ index 855bd71694c21353337090d049dfcfa20ebccea4..dbd0636107b1e66cb7993e29b8ed0e7f
void GpuDataManagerImplPrivate::UpdateDawnInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index 1aff605f7c126104edc9e74adc80d56344177a80..93e589d1ede1fb33dde3b099d04540fef777e182 100644
index af6dd8d8af99c5bd1e854c8cfbeb89e04476fefd..758adb66dff5aefad9f3c9f8c23de6fa9df33ef7 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -87,6 +87,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 1bc95f7cab225ff4ff5d9819fa07d8a8cf7d9f9c..3631ccc4e41db1b6c9d3873f52cc3ff708b18d68 100644
index d9ae17943b8fcfaa6026869328e60c8cc4057425..7d97829b1a0d2589607eb696bdde1fa72cc09424 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -975,6 +975,11 @@
@@ -984,6 +984,11 @@
"includes": [4960],
},

View File

@@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index f25be7d134b65a6caf65241a78111de145727fcd..4fcbd6e5fd6e0d692c3bad4232b37d2a95a7073f 100755
index c8703580d32010666d81fc28ea7325ef0b292fec..a8c9e3af875586d041d58d6d70b5b81092139eed 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -302,6 +302,8 @@ def GetDefaultHostOs():
@@ -307,6 +307,8 @@ def GetDefaultHostOs():
'win32': 'win',
}
default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform)

View File

@@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index ed19f7f1a283da619c01e2dc476d9d1ace950dc7..ef51df5e85584329c9c02aa2b6b88ba9eadd1a31 100644
index fb4af331fb38b9e431137fd2b3806be84175acbf..14ca983c91cfe495ebd2859866a7f434d0a9ab02 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -251,11 +251,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
@@ -253,11 +253,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
const std::string& process_type) {

View File

@@ -9,10 +9,10 @@ be created for each child process, despite logs being redirected to a
file.
diff --git a/content/app/content_main.cc b/content/app/content_main.cc
index b54d534b4d408c30341b20409fec75d3a66ca519..d0a00518d06bbb0da228662924b2ab9e568ef940 100644
index 34cbeddf6cabd78806304e45e25074d5d2ccd51e..db66cfa6313e805e91d9dbb189ae10b02792a112 100644
--- a/content/app/content_main.cc
+++ b/content/app/content_main.cc
@@ -386,8 +386,12 @@ RunContentProcess(ContentMainParams params,
@@ -413,8 +413,12 @@ RunContentProcess(ContentMainParams params,
#if BUILDFLAG(IS_WIN)
// Route stdio to parent console (if any) or create one.

View File

@@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
+
@end
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90209ee47c 100644
index cfbb9f03214084c5181e48e1b0d497ab0b5cf1b3..21fdd6e2e9fae08443ca74c49c1b6984ea0c3429 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
@@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
@@ -95,10 +95,10 @@ index 77662e89cf2c6135b99b3905c20456f4da0a6e09..fea78cc7fa195f44d88ec08a027b8e90
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583513ea8ec 100644
index 8ffa07e273fc65d8d29e119bb7dd4114b5eba6f4..60de405c461ec05a7036025553b82dd18f2acd13 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -77,7 +77,9 @@ void OrderChildWindow(NSWindow* child_window,
@@ -78,7 +78,9 @@ void OrderChildWindow(NSWindow* child_window,
} // namespace
@interface NSWindow (Private)
@@ -108,7 +108,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -109,6 +111,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -110,6 +112,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end
@@ -117,7 +117,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -135,6 +139,8 @@ - (BOOL)usesCustomDrawing {
@@ -136,6 +140,8 @@ - (BOOL)usesCustomDrawing {
}
@end
@@ -126,7 +126,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -287,6 +293,8 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -285,6 +291,8 @@ - (NSAccessibilityRole)accessibilityRole {
// NSWindow overrides.
@@ -135,7 +135,7 @@ index 18c63a44773700852365c508ee222232d0e5c8ec..8c644c4e16ce2305719caaa7d67dc583
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -298,6 +306,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -296,6 +304,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}

View File

@@ -44,7 +44,7 @@ index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063
} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94494d5a97 100644
index 378cb463ff2ad323fe413d5ef40d6bd48659a5df..686527e081f1dc9bfa3cd8313ef818a05a4e5bfb 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -61,10 +61,10 @@ index c8a108cd8d39bf5185db438092579f67d31938f1..7ceaca262d71b1738d1dc92421db5e94
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
index d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550fb973e03 100644
index be7b05ee4f779ccc44e6eea7ff7fb3e8bd504d6f..3b3336913cf91c3b7f22cefb4139f82b882c97c9 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -76,8 +76,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -77,8 +77,10 @@ id GetFocusedBrowserAccessibilityElement() override {
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
@@ -75,7 +75,7 @@ index d6d48ab183ee32edc8c9c984673e050a2557950d..0022095c7ae81197ef5cdeddc62d8550
}
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -139,8 +141,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
@@ -140,8 +142,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
@@ -117,10 +117,10 @@ index 6c0700b182e9765afd60d8deec501d13432e1b0a..c85c024a5a5711471e24698f14dda21b
return false;
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880db7b309e 100644
index 0549e3b400cb42e1a3491a2de9739c275ae006df..ab59ea7211b425e36d3d0fa673d8c09b99140716 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler;
@@ -52,7 +52,9 @@ class ScopedPasswordInputEnabler;
@protocol RenderWidgetHostViewMacDelegate;
@@ -130,7 +130,7 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -668,10 +670,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
@@ -144,10 +144,10 @@ index a27ce05f20a8d645688c5bb920d36e76901e2b37..cb4238fe7d5f2d182c742532cf467880
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e19b4cc8c 100644
index d460e055c8bc70845cdf89567e17a79da70fd9f1..f28dcfe0721239ca9341a0db80e8626a515c34d8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -258,8 +258,10 @@
@@ -259,8 +259,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -158,7 +158,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1559,8 +1561,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1561,8 +1563,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -169,7 +169,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e
return [GetInProcessNSView() window];
}
@@ -1604,9 +1608,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1606,9 +1610,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -181,7 +181,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2101,12 +2107,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2103,12 +2109,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@@ -197,7 +197,7 @@ index 9c42f305d30b1f1cafd72fd7326894819fa57ee7..54681d4aaaa52ee07fba0055a8411b8e
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 012ab83bb9f4887646decb030b4a18f6b21e0d01..0d8b56cc387b24833ec7950a8049e038f650020c 100644
index 8efef6d9adbca21613be3c32fe9f43b2d50ff8c5..6e819be94a6a5e8a26598f4883697719fecef693 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -341,6 +341,13 @@ component("base") {
@@ -235,7 +235,7 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf76b43b00c 100644
index 5a09100094d0371a3e58db6c7626e06bdcdd17c3..1aa7bde93efdf198998ba4e6a97dcf2aadd9f4e9 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -32,7 +32,9 @@
@@ -248,7 +248,7 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7
@class NSView;
namespace remote_cocoa {
@@ -447,11 +449,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -449,11 +451,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
@@ -263,7 +263,7 @@ index fc847f1ae010e4e0d69836f16d83515b8a92073a..a4bebe5078ace6c49cb34912813bbaf7
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372424d0eb8 100644
index cdaf472a02038e1fbcb15747dd1992e2ea0e998b..a9cb80cf7f3631eab7d0fcbcf685ee88af6d8972 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -325,14 +325,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -289,7 +289,7 @@ index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1289,6 +1297,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1304,6 +1312,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -297,7 +297,7 @@ index eaca66e6c854cf7c2ba57a988080d2dee03d08e7..88e75e76cc4accacfbe4e8a2a1934372
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1296,14 +1305,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1311,14 +1320,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];

View File

@@ -166,7 +166,7 @@ index 69e60d498941c34cfac9e79c7517765bf93849f5..b998ad7cf01c21e93c57e1283cfdcb1e
void BluetoothAdapterMac::RemovePairingDelegateInternal(
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index 2a9cf9620bcc4453a24d48037f0092b6f270806a..6182aac37a7153b9a193565253fe77f9b72db55f 100644
index d872796dee0dee4aa14c238f788b962b3f1c9311..4d5f74c18d773755d5d8f7223bc0d5c944467d69 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -176,6 +176,12 @@ source_set("audio") {

View File

@@ -7,7 +7,7 @@ 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 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059e4289a9b 100644
index 3ee7e8145e8cd0a68680e2044f0fb44d314a4317..f25c1baa5142d53a882b864a67d94e9e0911f0bf 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -130,6 +130,11 @@
@@ -128,7 +128,7 @@ index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2320,6 +2417,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2324,6 +2421,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -139,7 +139,7 @@ index 33264a4ec00f67345bccbd59c042235a65fdded1..3e0ac81d77b3943a3021381e96f55059
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d16d2c9b9 100644
index cc1c9079baed00f6327efe929ab9d004d2272cfb..a9a1beed6c8e59abb9065701f34f155905781a2a 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -104,6 +104,7 @@ class URLMatcher;
@@ -150,7 +150,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d
class CookieManager;
class ExpectCTReporter;
class HostResolver;
@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@@ -159,7 +159,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -822,6 +825,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -827,6 +830,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@@ -169,7 +169,7 @@ index fe906c8374fee5a4afdd193b8d4a2462c28ce835..07e6cb535bdc9fdc03ae8a115cc3b50d
// CertNetFetcher is not used by the current platform, or if the actual
// net::CertVerifier is instantiated outside of the network service.
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83725d3b0b 100644
index e4eec4dde27862507252d6853ec3186400181c95..e47bbfac56cd6c787ba3e7c0518a5326386a19b6 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -283,6 +283,17 @@ struct NetworkContextFilePaths {
@@ -190,7 +190,7 @@ index 99cd0107ab918600970055a542cb753b24264cba..bc63400c5143f13fa8108bc431e08e83
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -848,6 +859,9 @@ interface NetworkContext {
@@ -851,6 +862,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View File

@@ -91,10 +91,10 @@ index 41fb02d532190e82d50286e2733a6c3627bf25c8..f19bb5dcb69233733125029d8f997f73
/*weak_document_ptr=*/WeakDocumentPtr(),
notification_service_remote_.BindNewPipeAndPassReceiver());
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 61ac1d7760432bd1a4118c0929a35168a3e26f49..e2ce4aa910053b1a4fb52fcc1197943af95b02f6 100644
index fdd74853b9b277d9b47fb99311349b66f70dfa11..06d1f5a8cc7f0ff12e4a7d66b435a19369af126b 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -282,6 +282,7 @@ void PlatformNotificationContextImpl::Shutdown() {
@@ -283,6 +283,7 @@ void PlatformNotificationContextImpl::Shutdown() {
void PlatformNotificationContextImpl::CreateService(
RenderProcessHost* render_process_host,
@@ -102,7 +102,7 @@ index 61ac1d7760432bd1a4118c0929a35168a3e26f49..e2ce4aa910053b1a4fb52fcc1197943a
const url::Origin& origin,
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
@@ -289,7 +290,8 @@ void PlatformNotificationContextImpl::CreateService(
@@ -290,7 +291,8 @@ void PlatformNotificationContextImpl::CreateService(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
services_.push_back(std::make_unique<BlinkNotificationServiceImpl>(
this, browser_context_, service_worker_context_, render_process_host,
@@ -133,10 +133,10 @@ index 424fae79eb1c93f1fac293ae8fdeb6d067f523cc..6a2f074ad981deb15b46bd91b6d7eb5d
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 f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518bccab6a7c 100644
index 18ad9b07e8d6ce33e4f5497aed48269ea49e2b9e..161aefa1d91923be35046dfe735071c687710deb 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2073,8 +2073,9 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2075,8 +2075,9 @@ void RenderProcessHostImpl::CreateNotificationService(
// For workers:
if (render_frame_id == MSG_ROUTING_NONE) {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -148,7 +148,7 @@ index f4d1b2317145ecd14b58bd52cff9de0645b37044..d2fbb44deef7a63cc1f5296d338d518b
return;
}
@@ -2082,7 +2083,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2084,7 +2085,7 @@ void RenderProcessHostImpl::CreateNotificationService(
RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id);
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

View File

@@ -113,7 +113,7 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866
// OverlayWindowViews
bool ControlsHitTestContainsPoint(const gfx::Point& point) override;
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d123fbd783 100644
index 590d247e1136b9ac5f766a613e8d91916eb0dda4..453c358d210d48d21a237654143439f2065e98fe 100644
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -14,9 +14,11 @@
@@ -126,9 +126,9 @@ index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d1
#include "chrome/browser/ui/browser_finder.h"
+#endif
#include "chrome/grit/generated_resources.h"
#include "chromeos/ui/base/chromeos_ui_constants.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/picture_in_picture_window_controller.h"
@@ -36,7 +38,7 @@
@@ -37,7 +39,7 @@
#include "ui/aura/window.h"
#endif

View File

@@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
index 277c93b46025fc5efa7c9462222bf3704172e035..6683578241804b9634965f96d0d1c1a317b94643 100644
index 401c319799f6bc97845bd88a3f0211d2d6511274..db0d729b22b8ae22781b15de00507f14cc669b83 100644
--- a/ui/color/color_id.h
+++ b/ui/color/color_id.h
@@ -129,6 +129,16 @@

View File

@@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/BUILD.gn b/BUILD.gn
index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0ca8b03202 100644
index 645819d78ca8526340714f05acc9f1819e72c4e3..86f6cfd19586f1d352d6a91c3d76b7323ccf26fe 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -973,7 +973,6 @@ if (is_win) {
@@ -987,7 +987,6 @@ if (is_win) {
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
@@ -22,7 +22,7 @@ index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0c
"//sql:sql_unittests",
"//third_party/breakpad:symupload($host_toolchain)",
"//ui/base:ui_base_unittests",
@@ -982,6 +981,10 @@ if (is_win) {
@@ -996,6 +995,10 @@ if (is_win) {
"//ui/views:views_unittests",
"//url:url_unittests",
]
@@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
}
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2661cf5db 100644
index f0d4596f0e95391e752c48dc6ac12f76397c27f1..b7313ce8037c88aa5b8826dc2edcb0dfa4ebee46 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -20,7 +20,6 @@
@@ -97,7 +97,7 @@ index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2
#include "printing/backend/print_backend.h"
#include "printing/buildflags/buildflags.h"
#include "printing/mojom/print.mojom.h"
@@ -209,16 +209,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings,
@@ -208,16 +208,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings,
#endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS)
}
@@ -134,7 +134,7 @@ index 398d59a0ebad165981e9e96b29ffc672e4b841eb..e420d87ef0e90cddb740ac4b24f92519
void PrintJobWorkerOop::UnregisterServiceManagerClient() {
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212b98a2b15 100644
index 8f4cb7f50dd34c4ef49022242c4b93d703a508a2..d9183b6c1d84a4685f38e84071eb25f26cd28867 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -30,8 +30,6 @@
@@ -146,7 +146,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
@@ -86,10 +84,23 @@ namespace printing {
@@ -82,10 +80,23 @@ namespace printing {
namespace {
@@ -170,7 +170,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
// Runs always on the UI thread.
static bool is_dialog_shown = false;
if (is_dialog_shown)
@@ -98,6 +109,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
@@ -94,6 +105,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
chrome::ShowWarningMessageBox(nullptr, std::u16string(), message);
@@ -178,7 +178,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
void OnDidGetDefaultPrintSettings(
@@ -147,7 +159,9 @@ void OnDidUpdatePrintSettings(
@@ -143,7 +155,9 @@ void OnDidUpdatePrintSettings(
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(printer_query);
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
@@ -189,7 +189,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
RenderParamsFromPrintSettings(printer_query->settings(),
params->params.get());
params->params->document_cookie = printer_query->cookie();
@@ -175,6 +189,7 @@ void OnDidScriptedPrint(
@@ -171,6 +185,7 @@ void OnDidScriptedPrint(
mojom::PrintManagerHost::ScriptedPrintCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
@@ -197,7 +197,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
if (printer_query->last_status() == mojom::ResultCode::kSuccess &&
printer_query->settings().dpi()) {
RenderParamsFromPrintSettings(printer_query->settings(),
@@ -184,7 +199,8 @@ void OnDidScriptedPrint(
@@ -180,7 +195,8 @@ void OnDidScriptedPrint(
}
bool has_valid_cookie = params->params->document_cookie;
bool has_dpi = !params->params->dpi.IsEmpty();
@@ -207,7 +207,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
if (has_dpi && has_valid_cookie) {
queue->QueuePrinterQuery(std::move(printer_query));
@@ -199,12 +215,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
@@ -195,12 +211,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
: PrintManager(web_contents),
queue_(g_browser_process->print_job_manager()->queue()) {
DCHECK(queue_);
@@ -222,7 +222,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -212,7 +230,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
@@ -208,7 +226,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob();
}
@@ -234,17 +234,17 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
// is still valid after a possible inner message loop runs in
// `DisconnectFromCurrentPrintJob()`.
@@ -240,6 +261,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
@@ -236,6 +257,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
#endif
SetPrintingRFH(rfh);
+ callback_ = std::move(callback);
+
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings));
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
enterprise_connectors::ContentAnalysisDelegate::Data scanning_data;
@@ -452,7 +476,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
CompletePrintNow(rfh);
return true;
}
@@ -395,7 +419,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
void PrintViewManagerBase::ScriptedPrintReply(
ScriptedPrintCallback callback,
int process_id,
@@ -254,7 +254,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
#if BUILDFLAG(ENABLE_OOP_PRINTING)
@@ -467,8 +492,11 @@ void PrintViewManagerBase::ScriptedPrintReply(
@@ -410,8 +435,11 @@ void PrintViewManagerBase::ScriptedPrintReply(
return;
}
@@ -267,7 +267,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
void PrintViewManagerBase::UpdatePrintingEnabled() {
@@ -476,8 +504,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() {
@@ -419,8 +447,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() {
// The Unretained() is safe because ForEachRenderFrameHost() is synchronous.
web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost(
base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled,
@@ -277,7 +277,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
void PrintViewManagerBase::NavigationStopped() {
@@ -593,11 +620,14 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -536,11 +563,14 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -292,7 +292,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
!service_manager_client_id_.has_value()) {
@@ -635,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -578,18 +608,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value::Dict job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -314,7 +314,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
content::BrowserContext* context =
web_contents() ? web_contents()->GetBrowserContext() : nullptr;
PrefService* prefs =
@@ -656,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -599,6 +631,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
if (value > 0)
job_settings.Set(kSettingRasterizePdfDpi, value);
}
@@ -322,7 +322,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
auto callback_wrapper =
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
@@ -687,14 +720,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -630,14 +663,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
// didn't happen for some reason.
bad_message::ReceivedBadMessage(
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@@ -339,7 +339,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
return;
}
#endif
@@ -732,7 +765,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -675,7 +708,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
PrintManager::PrintingFailed(cookie, reason);
#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function.
@@ -347,7 +347,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
#endif
ReleasePrinterQuery();
@@ -747,6 +779,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
@@ -690,6 +722,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
}
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
@@ -359,7 +359,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
l10n_util::GetStringUTF16(
@@ -757,10 +794,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
@@ -700,10 +737,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
content::RenderFrameHost* render_frame_host,
content::RenderFrameHost::LifecycleState /*old_state*/,
content::RenderFrameHost::LifecycleState new_state) {
@@ -372,7 +372,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
void PrintViewManagerBase::DidStartLoading() {
@@ -821,7 +860,12 @@ void PrintViewManagerBase::OnJobDone() {
@@ -759,7 +798,12 @@ void PrintViewManagerBase::OnJobDone() {
// Printing is done, we don't need it anymore.
// print_job_->is_job_pending() may still be true, depending on the order
// of object registration.
@@ -386,7 +386,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
ReleasePrintJob();
}
@@ -835,7 +879,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
@@ -773,7 +817,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// Is the document already complete?
if (print_job_->document() && print_job_->document()->IsComplete()) {
@@ -395,7 +395,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
return true;
}
@@ -883,7 +927,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -821,7 +865,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
// Disconnect the current `print_job_`.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@@ -407,7 +407,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
if (!weak_this)
return false;
@@ -904,7 +951,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -842,7 +889,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
#endif
print_job_->AddObserver(*this);
@@ -416,7 +416,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
return true;
}
@@ -964,6 +1011,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -902,6 +949,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
}
#endif
@@ -428,7 +428,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
if (!print_job_)
return;
@@ -971,7 +1023,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -909,7 +961,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// printing_rfh_ should only ever point to a RenderFrameHost with a live
// RenderFrame.
DCHECK(rfh->IsRenderFrameLive());
@@ -437,7 +437,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
}
print_job_->RemoveObserver(*this);
@@ -1013,7 +1065,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -951,7 +1003,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -446,7 +446,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
return true;
if (!cookie) {
@@ -1121,7 +1173,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
@@ -1059,7 +1111,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
}
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@@ -456,10 +456,10 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
for (auto& observer : GetObservers())
observer.OnPrintNow(rfh);
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187845e6a75 100644
index 871e00c49028ccf58d207f904c22e0107f3c2b65..c9b136ab165410eb533f84254454dac0b6674f14 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -43,6 +43,8 @@ namespace printing {
@@ -42,6 +42,8 @@ namespace printing {
class PrintQueriesQueue;
class PrinterQuery;
@@ -468,7 +468,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
// Base class for managing the print commands for a WebContents.
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
public:
@@ -70,7 +72,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -65,7 +67,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
@@ -480,7 +480,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in `print_data` with settings specified in
@@ -128,6 +133,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -123,6 +128,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void ShowInvalidPrinterSettingsError() override;
void PrintingFailed(int32_t cookie,
mojom::PrintFailureReason reason) override;
@@ -488,7 +488,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
// Adds and removes observers for `PrintViewManagerBase` events. The order in
// which notifications are sent to observers is undefined. Observers must be
@@ -135,6 +141,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -130,6 +136,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void AddObserver(Observer& observer);
void RemoveObserver(Observer& observer);
@@ -503,7 +503,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);
@@ -256,7 +270,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -251,7 +265,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Runs `callback` with `params` to reply to ScriptedPrint().
void ScriptedPrintReply(ScriptedPrintCallback callback,
int process_id,
@@ -513,7 +513,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
// Requests the RenderView to render all the missing pages for the print job.
// No-op if no print job is pending. Returns true if at least one page has
@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -324,8 +339,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// The current RFH that is printing with a system printing dialog.
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
@@ -575,7 +575,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a
// Tells the browser that there are invalid printer settings.
ShowInvalidPrinterSettingsError();
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86bc0e0f90 100644
index 2331b4db94bb6397616dc230498960860554787f..ade741255b9e0274252121ecc2ec68697429c8ad 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -42,6 +42,7 @@
@@ -586,7 +586,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
#include "printing/units.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
@@ -1282,7 +1283,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1283,7 +1284,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
if (!weak_this)
return;
@@ -596,7 +596,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
if (!weak_this)
return;
@@ -1313,7 +1315,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1314,7 +1316,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@@ -605,7 +605,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -1328,7 +1330,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1329,7 +1331,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@@ -614,7 +614,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
@@ -1405,7 +1407,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1406,7 +1408,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
}
Print(frame, print_preview_context_.source_node(),
@@ -624,7 +624,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
if (!render_frame_gone_)
print_preview_context_.DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1454,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
@@ -1455,6 +1458,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@@ -633,7 +633,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
print_preview_context_.OnPrintPreview();
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -2066,7 +2071,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2067,7 +2072,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
return;
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -643,7 +643,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
// Check if |this| is still valid.
if (!weak_this)
return;
@@ -2081,7 +2087,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2082,7 +2088,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -654,7 +654,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -2089,7 +2097,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2090,7 +2098,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
uint32_t expected_page_count = 0;
@@ -663,7 +663,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -2108,8 +2116,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2109,8 +2117,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@@ -680,7 +680,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
// Check if |this| is still valid.
if (!self)
return;
@@ -2374,36 +2389,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2375,36 +2390,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
}
@@ -745,7 +745,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
notify_browser_of_print_failure_ = false;
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
return false;
@@ -2528,7 +2559,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
@@ -2529,7 +2560,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
std::move(params),
base::BindOnce(
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
@@ -796,10 +796,10 @@ index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f003
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6b2992922 100644
index 993ec8acd401d5ccb1e07652c28f6f0a1d89c6bc..638dbd46cb572274a17b0c06ed3db0cf7b614b7f 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2783,8 +2783,9 @@ source_set("browser") {
@@ -2802,8 +2802,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]
@@ -812,7 +812,7 @@ index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6
if (is_chromeos) {
sources += [
diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc
index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da79270244062c210d6 100644
index e7f5b062791f6b2b94943c88d487757f2d77c7c5..f69ed3d412caa7254cfbea85a5448770a42b537d 100644
--- a/content/browser/utility_sandbox_delegate_win.cc
+++ b/content/browser/utility_sandbox_delegate_win.cc
@@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) {
@@ -828,9 +828,9 @@ index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da792702440
return true;
}
+#endif
} // namespace
std::string UtilitySandboxedProcessLauncherDelegate::GetSandboxTag() {
std::string UtilityAppContainerId(base::CommandLine& cmd_line) {
return base::WideToUTF8(cmd_line.GetProgram().value());
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
index 6cca846b9831da669ca52aff776caf5a23f6f4d1..39d1032f276181a535de9fba89c2246c7a9814d7 100644
--- a/printing/printing_context.cc

View File

@@ -24,10 +24,10 @@ This patch adds a few changes to the Chromium code:
before the browser thread is ready.
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index aca2f19f53657fc2b944b69418e099b056c8e734..e43b0d89e2e6ad0bcb2c34bfacc4ef3b59eaaab1 100644
index c29925908862930061f63e9f02d614b8a8a7980d..5ce3a8dd6366093ac5d09bab8b1774b8771faea8 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1424,7 +1424,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1421,7 +1421,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
switch (notify_result_) {
case ProcessSingleton::PROCESS_NONE:
// No process already running, fall through to starting a new one.

View File

@@ -30,10 +30,10 @@ index bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e6f060787 100644
index 457ba67603442e8ae9ea75be1cb3b4bf32ed4c4f..50680346b1db4c687d9d956fd3a13adbbd27e65a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2075,6 +2075,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
@@ -2076,6 +2076,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_)
view_->UpdateCursor(WebCursor(cursor));
@@ -43,10 +43,10 @@ index 25a80899f9ae533e2d84e99076696468cef6e56d..e8a3a0525bea6185f4d7ef94edc99d5e
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7b4f008e1 100644
index 2b393e7e7089d17a0906610c3c8979c20928a5f6..47b85a2bd890485dec96e23fb2cb8f8553f5c4e2 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4593,6 +4593,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -4609,6 +4609,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -59,10 +59,10 @@ index 9a0edcadef1bc60b035ca67df5082a7d06dd4436..a2f1f72a30f694d53f28d38d823341e7
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 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd6afb9e34 100644
index 91dd718d313ee66bfeea3c0a08e5d2ec3e38b133..892efd5009b0a0ef00081bd765d20c46d68b2324 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -967,6 +967,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -974,6 +974,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@@ -71,7 +71,7 @@ index 3221d31d311c74f32f77fed34d53721017cac5e3..864c0a9b7072b6c3ac6584ed35a833dd
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 af8a777096c1202b3742d328c02e9e957389fc1e..3a3359865bcedecfa946d517dd50b299172958c9 100644
index bea8d6a0d6ac44c56132bc7e3745c5c154a02e79..e3fc1e633a9803eee837acbf6434fc6471d5c067 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -13,6 +13,7 @@

View File

@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a78f6e1c1 100644
index 999eeb6fc817a3898b2227fd58aa1ecc660f21a3..8c51cd22fef29fe3e647b80e951af4cf7d9e4637 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -703,6 +703,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@@ -705,6 +705,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
return false;
}
@@ -24,7 +24,7 @@ index eefdd87f1f85ac62079e97f1a7736234952d419c..f2b1959f7650ecd98ed2db870d1c723a
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba71016d60ab99 100644
index f3a4f3961b543be0787b9f6ace585ce614e3c23e..5f112610fa0815f58436c54c9631b59ddf8606db 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -26,8 +26,10 @@
@@ -38,7 +38,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/widget_type.h"
@@ -67,9 +69,11 @@ class CursorManager;
@@ -68,9 +70,11 @@ class CursorManager;
class MouseWheelPhaseHandler;
class RenderWidgetHostImpl;
class RenderWidgetHostViewBaseObserver;
@@ -50,7 +50,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101
class WebCursor;
class WebContentsAccessibility;
class DelegatedFrameHost;
@@ -146,6 +150,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -147,6 +151,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
const gfx::Rect& keyboard_rect) override {}
bool IsHTMLFormPopup() const override;
@@ -60,7 +60,7 @@ index 4174581cda568c887e34c2e2b29edf5ef6e2a092..770599358ca8badf180e249410ba7101
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -308,6 +315,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -315,6 +322,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

View File

@@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
Additionally, disables usage of some private APIs in MAS builds.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3b7e5c7a7 100644
index e26ed62d252e27792d3f2813b502ac93f723a5c2..87b977a5da2334c1494402f81588d0a3fcd8c7a0 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -29,7 +29,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -597,6 +606,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -598,6 +607,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -39,7 +39,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3
return [self acceptsMouseEventsWhenInactive];
}
@@ -673,6 +685,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -674,6 +686,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@@ -50,7 +50,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -992,6 +1008,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -993,6 +1009,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);
@@ -61,7 +61,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3
// We only handle key down events and just simply forward other events.
if (eventType != NSEventTypeKeyDown) {
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1812,9 +1832,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1813,9 +1833,11 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -73,7 +73,7 @@ index e4246c858efdd4d0a6060fd497081e0895a46e20..3f489f6563407ed484df1526bcec35b3
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1823,7 +1845,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1824,7 +1846,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,

View File

@@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4328244f8 100644
index aee9abd99a03ad2266e2fcd15c680ae3b97e9dc3..0223183c4e869e835429a52ad7d9eb381a2d21f5 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) {
@@ -1547,7 +1547,7 @@ if (is_chrome_branded && !is_android) {
}
}
@@ -64,7 +64,7 @@ index 6042493f09bfefb8b0eaad16588acbae984a3dad..31d63709bd68819a439901823b6649e4
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1575,6 +1575,12 @@ if (!is_android) {
@@ -1576,6 +1576,12 @@ if (!is_android) {
}
}

View File

@@ -10,10 +10,10 @@ can be reverted when those failures are addressed. It's unlikely
that this patch will be upstreamed.
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
index 72f8e9251df63db8ebebad9a5b682add91340e79..89361e9e8ea4e73c571d3960123030c0011a129d 100644
index 328574de32fb02f014433b1005d5aa625e498d9f..5cdc5a8c67688747ff3b5323c42e4605ab613347 100644
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
@@ -302,26 +302,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) {
@@ -297,26 +297,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) {
}
}

View File

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 14985e39b792e931a9884ae95b8d550776520478..d6c104b05471161901e76051e6ec0d1059aa2dd1 100644
index a15cfb291dea69d78bad2b4726b013d8a636a361..50c1d506d20be94d89f7c33fe3efb4bd30fb2305 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1282,7 +1282,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1285,7 +1285,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

View File

@@ -15,26 +15,25 @@ short-circuit all the permissions checks in MSDC for now to allow us to
unduplicate this code.
diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc
index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63052b7ee8 100644
index 71eb2eda28d4d0d5dd9a1ad37309dd27caa69ccf..88a1d29ded5630a484106e6638921c6d279778d7 100644
--- a/components/webrtc/media_stream_devices_controller.cc
+++ b/components/webrtc/media_stream_devices_controller.cc
@@ -93,11 +93,14 @@ void MediaStreamDevicesController::RequestPermissions(
@@ -92,10 +92,12 @@ void MediaStreamDevicesController::RequestPermissions(
std::vector<blink::PermissionType> permission_types;
+#if 0
permissions::PermissionManager* permission_manager =
permissions::PermissionsClient::Get()->GetPermissionManager(
web_contents->GetBrowserContext());
content::PermissionController* permission_controller =
web_contents->GetBrowserContext()->GetPermissionController();
-
+#endif
if (controller->ShouldRequestAudio()) {
+#if 0
permissions::PermissionResult permission_status =
permission_manager->GetPermissionStatusForCurrentDocument(
ContentSettingsType::MEDIASTREAM_MIC, rfh);
@@ -109,10 +112,12 @@ void MediaStreamDevicesController::RequestPermissions(
permissions::PermissionStatusSource::FEATURE_POLICY);
content::PermissionResult permission_status =
permission_controller->GetPermissionResultForCurrentDocument(
blink::PermissionType::AUDIO_CAPTURE, rfh);
@@ -106,10 +108,12 @@ void MediaStreamDevicesController::RequestPermissions(
content::PermissionStatusSource::FEATURE_POLICY);
return;
}
+#endif
@@ -43,26 +42,26 @@ index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63
}
if (controller->ShouldRequestVideo()) {
+#if 0
permissions::PermissionResult permission_status =
permission_manager->GetPermissionStatusForCurrentDocument(
ContentSettingsType::MEDIASTREAM_CAMERA, rfh);
@@ -124,6 +129,7 @@ void MediaStreamDevicesController::RequestPermissions(
permissions::PermissionStatusSource::FEATURE_POLICY);
content::PermissionResult permission_status =
permission_controller->GetPermissionResultForCurrentDocument(
blink::PermissionType::VIDEO_CAPTURE, rfh);
@@ -120,6 +124,7 @@ void MediaStreamDevicesController::RequestPermissions(
content::PermissionStatusSource::FEATURE_POLICY);
return;
}
+#endif
permission_types.push_back(blink::PermissionType::VIDEO_CAPTURE);
@@ -135,6 +141,7 @@ void MediaStreamDevicesController::RequestPermissions(
@@ -131,6 +136,7 @@ void MediaStreamDevicesController::RequestPermissions(
// pan-tilt-zoom permission and there are suitable PTZ capable devices
// available.
if (request.request_pan_tilt_zoom_permission && has_pan_tilt_zoom_camera) {
+#if 0
permission_status =
permission_manager->GetPermissionStatusForCurrentDocument(
ContentSettingsType::CAMERA_PAN_TILT_ZOOM, rfh);
@@ -144,6 +151,7 @@ void MediaStreamDevicesController::RequestPermissions(
permission_controller->GetPermissionResultForCurrentDocument(
blink::PermissionType::CAMERA_PAN_TILT_ZOOM, rfh);
@@ -140,6 +146,7 @@ void MediaStreamDevicesController::RequestPermissions(
controller->RunCallback(/*blocked_by_permissions_policy=*/false);
return;
}
@@ -70,16 +69,16 @@ index 13bbeaac938b27446d5b62eb92ca761487db5fef..4cfe57a6356bbc2492f59957a0dfcf63
permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM);
}
@@ -417,6 +425,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
if (rfh->GetLastCommittedOrigin().GetURL() != request_.security_origin) {
return false;
}
@@ -428,6 +435,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
// TODO(raymes): This function wouldn't be needed if
// PermissionManager::RequestPermissions returned a denial reason.
+#if 0
permissions::PermissionResult result =
permissions::PermissionsClient::Get()
->GetPermissionManager(web_contents_->GetBrowserContext())
@@ -425,6 +434,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
DCHECK_EQ(CONTENT_SETTING_BLOCK, result.content_setting);
content::PermissionResult result =
web_contents_->GetBrowserContext()
->GetPermissionController()
@@ -436,6 +444,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status);
return true;
}
+#endif

View File

@@ -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 d2fbb44deef7a63cc1f5296d338d518bccab6a7c..7bb696c3ad090828b2a7e3a9a648b75bbf39f844 100644
index 161aefa1d91923be35046dfe735071c687710deb..368d47247ced2320e0627e9cce3cf05e59ea9f39 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1762,9 +1762,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1764,9 +1764,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
cmd_line.get(), IsJitDisabled());

View File

@@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
which include extra deps that Electron needs (e.g. libnotify)
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index eaa1c2edfd6fba471312fdb4eb3917b50e38e018..74140d29ed56ce54e39940e7bffa3778db983f27 100755
index abd7eb4a8d116075751bcf6e44f872bac83431ef..54c01f56ac3f17b4534b6e89d9f8c4ba3bd79bf9 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -41,9 +41,11 @@ except ImportError:

View File

@@ -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 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d66cdc7ba4 100644
index 7f04a05eec8780e735e0458c75103d9f2e9b858b..2aa24b773a974e7789c661a0ffa5e01715c6e229 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3073,6 +3073,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3089,6 +3089,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
site_instance.get(), params.renderer_initiated_creation,
params.main_frame_name, GetOpener(), primary_main_frame_policy);
@@ -26,7 +26,7 @@ index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d6
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3083,6 +3090,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3099,6 +3106,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -35,7 +35,7 @@ index 7ff6febe70e9ec82becfbe036883fbc7572b5b01..2a3c04df4f6f44d2cf75b661761c91d6
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561d689f467 100644
index 024cd37e818e1c508cf2a8e324478235444f16ed..a389a9c41f96ec3231b62510cde140c52dcdbe9e 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -94,10 +94,13 @@ class BrowserContext;
@@ -52,7 +52,7 @@ index f07dd54c9498e677e4b3e6a24cb9d794f4465e93..f92bcc8f2a212e6cda464d9b6060a561
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -236,6 +239,10 @@ class WebContents : public PageNavigator,
@@ -237,6 +240,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;

View File

@@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 7f60d038fb9c2bc8364c580bc9c7684d97fbbcfb..b1eddf20c22edf974375b8a04d70fca72f7834af 100644
index 3e2342d28760172bcfd765f7ac3733b4d89a1445..351bee9cfcc31dc6ca06f1fc502b70617105191a 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -900,10 +900,7 @@ bool WebContentsViewAura::IsValidDragTarget(
@@ -916,10 +916,7 @@ bool WebContentsViewAura::IsValidDragTarget(
// for the outermost view. Inner `WebContents` will have a
// `WebContentsViewChildFrame` so when dragging between an inner
// `WebContents` and its embedder the view IDs will be the same.

View File

@@ -14,10 +14,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 115dab63efa4b90f37609a9a0a363ad75a0ff582..324232704f0bc0db6c20031cc0a2217b35667c3d 100644
index e815010dcb9437727f32b12f0d47a31384e24677..bb1ffcd003807084b970e11a1b464e5f72142c53 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -6579,6 +6579,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -6567,6 +6567,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}

View File

@@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa27f7084d 100644
index a9146ec6c85b3dfa854d764e8010124f76cd3fc7..e0b308051be9b34ce26b65f6cd582beb7743662d 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -365,6 +365,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@@ -26,10 +26,10 @@ index d1fa110e7ccdcf496fe5e967cdb85b5fa0e54301..b2f206ed814e43e04815d1247ba4c6aa
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c 100644
index b822b43d0a2398689120a87b6dbd5f1c5f0f4ee3..53b42b67823474fc5c688654da280cde82faea87 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -869,6 +869,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -860,6 +860,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -43,10 +43,10 @@ index 8077fb82bc4bb6594c4676db12223d43bf650688..c05cc4f60a97f10cb0ed194267d6c81a
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df39eb9d82 100644
index 9718602c31f866b668cd211ff4fd72f69de1cd42..8f80fb04990c3e2820dcbc9b89dc0255c9c49d30 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -180,6 +180,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -55,10 +55,10 @@ index 8f4b58da709ba6e6a89b3d35d6eae5c23ee19389..7aa2a565643c27d946588bfc5212b3df
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768af8ba22f 100644
index ad34b6230f57ad906bae515aa73ea2aaf1bfeede..b5cff1fee2d14c02f2d67cf012b7ba24fc3a7a06 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -638,6 +638,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -625,6 +625,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -67,7 +67,7 @@ index b3845ea3620684e3a89f9c2a99fb9c8505f942e2..d7fed3409f1846d9655aa2b4adc89768
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 91fd003fe648c8ac854843922714f30434e3663f..f67fbdd1c9eda7feb9f171fa8482c1d5cc29d508 100644
index 20d674166c78e316751bfa3ec7aed74656eea9b4..d289cfca8d8a9b093d8d30427e594c46b2f56c79 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -744,6 +744,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {

View File

@@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
initialized.
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04ecd9f05d8 100644
index e0b308051be9b34ce26b65f6cd582beb7743662d..857d5eb211890b10e143f54662636f2ba522b698 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -360,6 +360,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -365,6 +365,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@@ -35,10 +35,10 @@ index b2f206ed814e43e04815d1247ba4c6aa27f7084d..62c1555386315e00bdf7f677eb85f04e
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c5900fc9aec3 100644
index 53b42b67823474fc5c688654da280cde82faea87..db175070bdcefc84f1d6001568941a9f4f14789c 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -881,6 +881,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -872,6 +872,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@@ -52,10 +52,10 @@ index c05cc4f60a97f10cb0ed194267d6c81a0b50cc7c..f7b7c348509c775c8877058aa525c590
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f1716318f0d2 100644
index 8f80fb04990c3e2820dcbc9b89dc0255c9c49d30..f16af9a3e4027066cddbd5082998adc837e9b5dc 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -180,6 +180,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -65,10 +65,10 @@ index 7aa2a565643c27d946588bfc5212b3df39eb9d82..488d24afedf147307cb71480f5e6f171
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index d7fed3409f1846d9655aa2b4adc89768af8ba22f..169916298918d19f23f4e4dce5a306e94d640226 100644
index b5cff1fee2d14c02f2d67cf012b7ba24fc3a7a06..765c0882406fa0ab7ae3d0460ff9a9814f60db0a 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -638,6 +638,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -625,6 +625,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View File

@@ -21,7 +21,5 @@
"src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle",
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC",
"src/electron/patches/lss": "src/third_party/lss"
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC"
}

View File

@@ -1 +0,0 @@
fix_cast_pwrite64_arg_to_long_for_arm.patch

View File

@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: VerteDinde <keeleymhammond@gmail.com>
Date: Tue, 9 Aug 2022 14:05:55 -0700
Subject: fix: cast pwrite64 arg to long for arm
This patch cases pwrite64 arg to a long in order to avoid a
compilation error on arm. This patch can be eliminated when the
upstream patch is merged into chromium main:
https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946
diff --git a/linux_syscall_support.h b/linux_syscall_support.h
index e4e816f4bd001a6de7b98972d1cbaec9aaa8f821..5ea1295f8e9bb5312469dbc1aadb67dd620d35d3 100644
--- a/linux_syscall_support.h
+++ b/linux_syscall_support.h
@@ -4842,7 +4842,7 @@ struct kernel_statfs {
unsigned, o2)
LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f,
const void *, b, size_t, c, unsigned, o1,
- long, o2)
+ unsigned, o2)
LSS_INLINE _syscall4(int, _readahead, int, f,
unsigned, o1, unsigned, o2, size_t, c)
#endif

View File

@@ -47,3 +47,5 @@ build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
fix_override_createjob_in_node_platform.patch
buffer_fix_atob_input_validation.patch
v8_api_advance_api_deprecation.patch
enable_-wunqualified-std-cast-call.patch

View File

@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 26 Aug 2022 00:10:16 +0900
Subject: Enable -Wunqualified-std-cast-call
Refs https://chromium-review.googlesource.com/c/chromium/src/+/3825237
Should be upstreamed.
diff --git a/src/node_http2.cc b/src/node_http2.cc
index ca82da47b4b160af0b1c11f9d162919272666cdb..e60036bb9cc07c5a87c2a017507c3533e229f14f 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -645,7 +645,7 @@ void Http2Stream::EmitStatistics() {
duration,
statistics_);
- env()->SetImmediate([entry = move(entry)](Environment* env) {
+ env()->SetImmediate([entry = std::move(entry)](Environment* env) {
if (HasHttp2Observer(env))
entry->Notify(env);
});

View File

@@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 26 Aug 2022 00:03:44 +0900
Subject: v8: [api] Advance API deprecation
Refs https://chromium-review.googlesource.com/c/v8/v8/+/3702449
Should be upstreamed.
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index 2c36a0b132cf1b21595ac39619b99d316ad81d9e..3dfea77eab2ff880508eda95a5dff80a6564251f 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -217,7 +217,8 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
bool prevent_shutdown)
: delegate_(std::move(delegate)), prevent_shutdown_(prevent_shutdown),
retaining_context_(false) {
- session_ = inspector->connect(CONTEXT_GROUP_ID, this, StringView());
+ session_ = inspector->connect(
+ CONTEXT_GROUP_ID, this, StringView(),V8Inspector::kFullyTrusted);
node_dispatcher_ = std::make_unique<protocol::UberDispatcher>(this);
tracing_agent_ =
std::make_unique<protocol::TracingAgent>(env, main_thread_);

View File

@@ -9,10 +9,10 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944ea566018 100644
index 83082271b8b76179b41e943190303e31fa639a95..0a23171a391606bb3408dcf8a488d075a148443a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -650,7 +650,7 @@ config("internal_config") {
@@ -663,7 +663,7 @@ config("internal_config") {
":cppgc_header_features",
]
@@ -21,7 +21,7 @@ index 0c1a72dfd2a3cb95004de7b32fc35ac982c5f927..f359ea10d6e83f94b698d9d728147944
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6124,7 +6124,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6166,7 +6166,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]

View File

@@ -6,10 +6,10 @@ Subject: dcheck.patch
https://github.com/auchenberg/volkswagen
diff --git a/src/api/api.cc b/src/api/api.cc
index 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b84221f3b1 100644
index 353fa739d89bf85d6dbb202d62b3ddab9b0a899e..ae6d7c8548c1cb336e07dcfe7507f7919eb85845 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -9181,7 +9181,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -9171,7 +9171,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@@ -18,20 +18,3 @@ index 0b6bdbc0328dfc979531dbbb25c5fc7b02f661bd..191ee0bb424471c1240835dedc7f25b8
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
i_isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 41f2378ba770a96d9722b8d50d28f3562ebf5101..59338d1d293d5325e89052dd226a9ad4f9e8b46a 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -6165,9 +6165,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);
- DCHECK(gc_prologue_callbacks_.end() ==
- std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(),
- GCCallbackTuple(callback, gc_type, data)));
+ // DCHECK(gc_prologue_callbacks_.end() ==
+ // std::find(gc_prologue_callbacks_.begin(), gc_prologue_callbacks_.end(),
+ // GCCallbackTuple(callback, gc_type, data)));
gc_prologue_callbacks_.emplace_back(callback, gc_type, data);
}

View File

@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index 09c3dc73292e2778baba3a0f7f1a02d875845d34..cf9dff8346bbe086464391758a5c11f228b3898c 100644
index b0c6d08bf50a3443e2589f09b6f1f5b7734c000c..7728123805054064d5acecacf6cbf8d1fe4a56c1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -650,6 +650,10 @@ config("internal_config") {
@@ -663,6 +663,10 @@ config("internal_config") {
":cppgc_header_features",
]

View File

@@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
diff --git a/src/objects/objects.h b/src/objects/objects.h
index fbdf5f029f19d8c231e70593e4860f8949e66e45..f98808fa74d79f8492f5a9aac92783b0775bfdf6 100644
index ced30839aa8627b9b21eabea1a4a3b2574a906d8..f038aea4e2e105b711f4530a1c40d63ee340724f 100644
--- a/src/objects/objects.h
+++ b/src/objects/objects.h
@@ -930,7 +930,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
@@ -928,7 +928,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER };
// Utility superclass for stack-allocated objects that must be updated
// on gc. It provides two ways for the gc to update instances, either
// iterating or updating after gc.

View File

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index f359ea10d6e83f94b698d9d728147944ea566018..09c3dc73292e2778baba3a0f7f1a02d875845d34 100644
index 0a23171a391606bb3408dcf8a488d075a148443a..b0c6d08bf50a3443e2589f09b6f1f5b7734c000c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6136,7 +6136,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6178,7 +6178,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View File

@@ -18,10 +18,10 @@ index ca4b1dc557f573bfcde200201cbd2f05e3c6b530..9edc8ce00c524a63cb23911a474f1904
StoreRoot(RootIndex::kCurrentMicrotask, microtask);
TNode<IntPtrT> saved_entered_context_count = GetEnteredContextCount();
diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc
index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c20982a675 100644
index 9a12cfdd9d02624a6fbbf5b10da958a6024b0857..01acdbcd633e9f11e6bd0673ed33eed5ce4f61fa 100644
--- a/src/codegen/code-stub-assembler.cc
+++ b/src/codegen/code-stub-assembler.cc
@@ -6124,12 +6124,6 @@ void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {
@@ -6139,12 +6139,6 @@ void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {
StoreFullTaggedNoWriteBarrier(pending_message, message);
}
@@ -35,10 +35,10 @@ index fe435ad067837df7f1ebc971083b6585952903f5..34660673e239cbc49e749732e95d16c2
int type) {
return Word32Equal(instance_type, Int32Constant(type));
diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h
index c4878044b149ec23f4ac9198f402ccc5114e219e..ba9be792cbcce3cbc85062daa524010dced2cfeb 100644
index 5c89a2ac9de2db35c4b5c326a02269203bb0ce46..ecc20c69e8f72179d32ce53e68bc463105907d11 100644
--- a/src/codegen/code-stub-assembler.h
+++ b/src/codegen/code-stub-assembler.h
@@ -2533,7 +2533,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
@@ -2538,7 +2538,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<HeapObject> GetPendingMessage();
void SetPendingMessage(TNode<HeapObject> message);

View File

@@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
this error no longer seems to happen.
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
index 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e19359ba5594e 100644
index 0110e903fd9c3681dca9921d4ad26fa47c38886a..18be54526bc11a4b285d9e0ab1873d587f11899d 100644
--- a/src/codegen/arm64/assembler-arm64.cc
+++ b/src/codegen/arm64/assembler-arm64.cc
@@ -3630,6 +3630,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
@@ -3627,6 +3627,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
}
@@ -39,7 +39,7 @@ index 818af524388b1aba51e984b7ff7f7b856d1e590b..7ba8a0e9bc11a65e72e66aebd87e1935
const Operand& operand, FlagsUpdate S, AddSubOp op) {
DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits());
diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h
index e3d8eb27dea2d241933bcb597bef35b46fcd2a09..0a752245ec25c80d5ed34b1a858fa43cc0d6dd40 100644
index f26054a12ee493fc82cc5285de96da3b5aa149b2..23d8ead77dc4cde1da093510353cc93c14ce4fe0 100644
--- a/src/codegen/arm64/assembler-arm64.h
+++ b/src/codegen/arm64/assembler-arm64.h
@@ -2120,11 +2120,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {

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