mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
15 Commits
v33.0.0-ni
...
v33.0.0-ni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6293bbced0 | ||
|
|
f42331f277 | ||
|
|
29fd2d343b | ||
|
|
c70f86fe03 | ||
|
|
701a09d44f | ||
|
|
a4dcb0fb32 | ||
|
|
acd39bd077 | ||
|
|
3d766e9ccb | ||
|
|
6877671390 | ||
|
|
e64302cc91 | ||
|
|
2a613cabaa | ||
|
|
78995b956e | ||
|
|
f508f6b6b5 | ||
|
|
20e77afe0f | ||
|
|
5a809a6694 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -137,6 +137,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-13
|
||||
target-platform: macos
|
||||
target-arch: x64
|
||||
@@ -155,6 +156,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-14
|
||||
target-platform: macos
|
||||
target-arch: arm64
|
||||
@@ -173,6 +175,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -193,6 +196,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -214,6 +218,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
||||
@@ -234,6 +239,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
|
||||
23
.github/workflows/issue-opened.yml
vendored
23
.github/workflows/issue-opened.yml
vendored
@@ -86,6 +86,29 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
const operatingSystems = select('heading:has(> text[value="What operating system(s) are you using?"]) + paragraph > text', tree)?.value.trim().split(', ');
|
||||
const platformLabels = new Set();
|
||||
for (const operatingSystem of (operatingSystems ?? [])) {
|
||||
switch (operatingSystem) {
|
||||
case 'Windows':
|
||||
platformLabels.add('platform/windows');
|
||||
break;
|
||||
case 'macOS':
|
||||
platformLabels.add('platform/macOS');
|
||||
break;
|
||||
case 'Ubuntu':
|
||||
case 'Other Linux':
|
||||
platformLabels.add('platform/linux');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (platformLabels.size === 3) {
|
||||
labels.push('platform/all');
|
||||
} else {
|
||||
labels.push(...platformLabels);
|
||||
}
|
||||
|
||||
const gistUrl = select('heading:has(> text[value="Testcase Gist URL"]) + paragraph > text', tree)?.value.trim();
|
||||
if (gistUrl !== undefined && gistUrl.startsWith('https://gist.github.com/')) {
|
||||
labels.push('has-repro-gist');
|
||||
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -77,7 +81,7 @@ jobs:
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.build-runs-on }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -83,7 +87,7 @@ jobs:
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.build-runs-on }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'129.0.6632.0',
|
||||
'129.0.6638.0',
|
||||
'node_version':
|
||||
'v20.16.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-129.0.6616.0
|
||||
image: e-129.0.6636.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-129.0.6616.0
|
||||
image: e-129.0.6636.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -65,7 +65,7 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
})
|
||||
```
|
||||
|
||||
### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `canGoToOffset`, `goToOffset` on `WebContents`
|
||||
### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `goToIndex`, `canGoToOffset`, `goToOffset` on `WebContents`
|
||||
|
||||
The navigation-related APIs are now deprecated.
|
||||
|
||||
@@ -78,6 +78,7 @@ win.webContents.canGoBack()
|
||||
win.webContents.goBack()
|
||||
win.webContents.canGoForward()
|
||||
win.webContents.goForward()
|
||||
win.webContents.goToIndex(index)
|
||||
win.webContents.canGoToOffset()
|
||||
win.webContents.goToOffset(index)
|
||||
|
||||
@@ -136,6 +137,24 @@ The autoresizing behavior is now standardized across all platforms.
|
||||
If your app uses `BrowserView.setAutoResize` to do anything more complex than making a BrowserView fill the entire window, it's likely you already had custom logic in place to handle this difference in behavior on macOS.
|
||||
If so, that logic will no longer be needed in Electron 30 as autoresizing behavior is consistent.
|
||||
|
||||
### Deprecated: `BrowserView`
|
||||
|
||||
The [`BrowserView`](./api/browser-view.md) class has been deprecated and
|
||||
replaced by the new [`WebContentsView`](./api/web-contents-view.md) class.
|
||||
|
||||
`BrowserView` related methods in [`BrowserWindow`](./api/browser-window.md) have
|
||||
also been deprecated:
|
||||
|
||||
```js
|
||||
BrowserWindow.fromBrowserView(browserView)
|
||||
win.setBrowserView(browserView)
|
||||
win.getBrowserView()
|
||||
win.addBrowserView(browserView)
|
||||
win.removeBrowserView(browserView)
|
||||
win.setTopBrowserView(browserView)
|
||||
win.getBrowserViews()
|
||||
```
|
||||
|
||||
### Removed: `params.inputFormType` property on `context-menu` on `WebContents`
|
||||
|
||||
The `inputFormType` property of the params object in the `context-menu`
|
||||
@@ -463,7 +482,7 @@ systemPreferences.getColor('selected-content-background')
|
||||
|
||||
## Planned Breaking API Changes (25.0)
|
||||
|
||||
### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
|
||||
### Deprecated: `protocol.{un,}{register,intercept}{Buffer,String,Stream,File,Http}Protocol` and `protocol.isProtocol{Registered,Intercepted}`
|
||||
|
||||
The `protocol.register*Protocol` and `protocol.intercept*Protocol` methods have
|
||||
been replaced with [`protocol.handle`](api/protocol.md#protocolhandlescheme-handler).
|
||||
|
||||
@@ -130,3 +130,4 @@ fix_font_face_resolution_when_renderer_is_blocked.patch
|
||||
feat_enable_passing_exit_code_on_service_process_crash.patch
|
||||
chore_remove_reference_to_chrome_browser_themes.patch
|
||||
feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
|
||||
fix_potential_draggable_region_crash_when_no_mainframeimpl.patch
|
||||
|
||||
@@ -92,7 +92,7 @@ index bb419323dd6afd6070fcee909672344beaf63322..98894c5e14ba97a93ec305da173c4cf3
|
||||
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 47336f7596d7cdae9f78278f42fce07e1d86bba0..fcbddc3c13a5298dffea5c8ad87be02d60be52b2 100644
|
||||
index ca3cf8a256fc1f729defe7df76968cfdfb00d540..3200171e5e065d0bbb52899e817a234e4a074060 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
|
||||
@@ -294,6 +294,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index 47336f7596d7cdae9f78278f42fce07e1d86bba0..fcbddc3c13a5298dffea5c8ad87be02d
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 1ea7ea4a054bea4711eeb6da14b83f54f7527cb1..ee3048b311f35483fd57bead855e3618a4d37cca 100644
|
||||
index ab862098f141296840e8ddc4f48c9a6edb8f1fea..2c3e9065f92e70018f5ee527c4ca85d7c72bac51 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
@@ -116,10 +116,10 @@ index 4220a0aebf4a2ce3d62f76c441b6ec1b5e11ffa1..6ea17602d2b186b81cf7dc69750bd302
|
||||
// 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 36bd7ee7ed789981d3e6733d5f869430a1112a6f..831b3b1ee47a88b6b02a2256682e4a9b1cbeda3c 100644
|
||||
index 52ee34863c20ab33616b5410688597668b9b8688..2b4f5e43d7219ae60611fabd5cf650daf51976b8 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2461,6 +2461,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2456,6 +2456,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index 36bd7ee7ed789981d3e6733d5f869430a1112a6f..831b3b1ee47a88b6b02a2256682e4a9b
|
||||
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
|
||||
!old_state->is_in_back_forward_cache;
|
||||
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
|
||||
@@ -3974,10 +3978,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3972,10 +3976,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,10 +155,10 @@ index 36bd7ee7ed789981d3e6733d5f869430a1112a6f..831b3b1ee47a88b6b02a2256682e4a9b
|
||||
// Do not throttle if the page should be painting.
|
||||
bool is_visible =
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index 764d48e8fc89fa0b95e01881c2f5462e385ed8d5..c0e99aec75858ec00a57d4b4484cbc719dbdda88 100644
|
||||
index 6bc36c658b6574756d850ad85cb7200e374fdfca..95d8489d6ec2687c7cadb892ed06458773c2b500 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -449,6 +449,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -446,6 +446,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -166,7 +166,7 @@ index 764d48e8fc89fa0b95e01881c2f5462e385ed8d5..c0e99aec75858ec00a57d4b4484cbc71
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -930,6 +931,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -927,6 +928,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ index 313b9756ba3b28c26baa408088fe9cec9bcfa283..96e8579d1be764bb4aac9ef82e6ede19
|
||||
// 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 496493cb923583164a73364ed1ac0a57a4fad6b2..4357c005f9b731566451b31d133d441f084a1c86 100644
|
||||
index fb41c4b4e2cb3ae49475121317b2ce1e5f803601..337fac133deea60fe01ef0210cb9543a5d0ed116 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -733,10 +733,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -33,10 +33,10 @@ index 74c16760fbd0ec88d8cd4e92a6fc9a68c0a3ebe3..f4907e0e2f491078a652baba8302181f
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 30fdf95e3a255cbbb05f4634c19cc192b4c72643..724354994e2cd38f9f04159c065282499d5e3f48 100644
|
||||
index 392c9af03305ad9be1833507737082faf74bdb73..bbbc110ec15e53c969a336974cca8e354d68b7bc 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4567,7 +4567,7 @@ static_library("browser") {
|
||||
@@ -4551,7 +4551,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ index 30fdf95e3a255cbbb05f4634c19cc192b4c72643..724354994e2cd38f9f04159c06528249
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index a469562fbb3cee09500652b4c8873c9681bdca2a..7511bb15b9ec3006f963e272c55c4c0f244d808d 100644
|
||||
index a0859faf25f977b062687df1fc5662b7d20a4071..0ebbc5705d56846a9db83295a28f72a31f081139 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7155,9 +7155,12 @@ test("unit_tests") {
|
||||
@@ -63,7 +63,7 @@ index a469562fbb3cee09500652b4c8873c9681bdca2a..7511bb15b9ec3006f963e272c55c4c0f
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8186,6 +8189,10 @@ test("unit_tests") {
|
||||
@@ -8182,6 +8185,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index a469562fbb3cee09500652b4c8873c9681bdca2a..7511bb15b9ec3006f963e272c55c4c0f
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8258,7 +8265,6 @@ test("unit_tests") {
|
||||
@@ -8254,7 +8261,6 @@ test("unit_tests") {
|
||||
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron
|
||||
https://nornagon.medium.com/a-libc-odyssey-973e51649063
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
|
||||
index d5222dbaf15ab1ccebe7b65cb59cf55fdb92542f..dba4c1db441c35798bea61057a586a4b93e973d3 100644
|
||||
index 39cc404dda7ba408438deeaa5b65a01cdd696dcb..355a774a08fb6eb6fa435c4704e8ff9cb5a9f5bd 100644
|
||||
--- a/buildtools/third_party/libc++/__config_site
|
||||
+++ b/buildtools/third_party/libc++/__config_site
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
@@ -9,7 +9,7 @@ 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 d04b3371729218029b1fcec462820eea0c595d23..c3d4f2dbf0131a80ce2e18c3f1f35f3b4aa5b6f7 100644
|
||||
index c837c2dd1109ed930a22b7b6f1b8088b5cf06f1b..f2f8053be9074fd0e8a6e94b16aa6447bb5d9803 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8852,6 +8852,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
|
||||
@@ -18,7 +18,7 @@ index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f
|
||||
/googleurl
|
||||
/gpu/gles2_conform_test
|
||||
diff --git a/third_party/.gitignore b/third_party/.gitignore
|
||||
index e347f59477744c7c4c8b2a7fbe04107e997a9bbe..f3decca9583976705b8f29fe431068575755ed07 100644
|
||||
index a2681a43f063da4bed955ea3b7f66b1248241a79..b5b50afa2808514aacafeb89e56b701efff56ef7 100644
|
||||
--- a/third_party/.gitignore
|
||||
+++ b/third_party/.gitignore
|
||||
@@ -48,7 +48,9 @@
|
||||
@@ -30,8 +30,8 @@ index e347f59477744c7c4c8b2a7fbe04107e997a9bbe..f3decca9583976705b8f29fe43106857
|
||||
+/engflow-reclient-configs/
|
||||
/espresso/lib/
|
||||
/eyesfree/src
|
||||
/fuchsia-sdk/images
|
||||
@@ -103,6 +105,7 @@
|
||||
/fast_float/src
|
||||
@@ -104,6 +106,7 @@
|
||||
/mocha
|
||||
/mockito/src
|
||||
/nacl_sdk_binaries/
|
||||
@@ -39,7 +39,7 @@ index e347f59477744c7c4c8b2a7fbe04107e997a9bbe..f3decca9583976705b8f29fe43106857
|
||||
/ninja
|
||||
/node/*.tar.gz
|
||||
/node/linux/
|
||||
@@ -153,6 +156,7 @@
|
||||
@@ -154,6 +157,7 @@
|
||||
/spirv-headers/src
|
||||
/spirv-tools/src
|
||||
/sqlite4java/lib/
|
||||
|
||||
@@ -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 a3e64928c558f0959ff7aa3451f3898cf0d1fb18..389045f400ed0bc0af19047ad318f693a6006910 100644
|
||||
index 630b7b17066a427c2baefd0f0acfb3abab6123f5..bb5ac504809d0027ed434ddac2766e02f3643c4b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -778,6 +778,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -787,6 +787,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ index a3e64928c558f0959ff7aa3451f3898cf0d1fb18..389045f400ed0bc0af19047ad318f693
|
||||
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 42161abd764655cc753fffd8577a507955e72ce4..b222f105dbc13e726bbd70186a596dbb442c1aed 100644
|
||||
index e9f357b26b449634a7399f329ac435efa46a5d39..82489872df5efce285d29b9d7492d34f9613c02e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -1001,6 +1001,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 0d6d4d646bd6e7c187b5174edff2ddb0c51d7867..deb9e51c9c6a185dbd45fabe7e7b7454e8870026 100644
|
||||
index 6c23ecefaf8162efde4379b90d9b116e63175d48..6daa421ccecc3d1d4daf597239a40c0c8ff2de9a 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1728,6 +1728,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1747,6 +1747,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 0d6d4d646bd6e7c187b5174edff2ddb0c51d7867..deb9e51c9c6a185dbd45fabe7e7b7454
|
||||
// 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 b0df50eca7d4bed289940ebdf968a36fd891297b..02c6fabb412cfbf3c33602d29a0e2d52d375a855 100644
|
||||
index 5ddd56b235229f85fa2d0619b7f4614cb00d914e..96141984c65f368e07bc180beb22969846cba479 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -315,6 +315,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -63,10 +63,10 @@ index b0df50eca7d4bed289940ebdf968a36fd891297b..02c6fabb412cfbf3c33602d29a0e2d52
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 1686353217d288c2faaef98f8cd445baf8ee0df5..bfb21675e01fb3e04e7a56e045d10d3e2196c81e 100644
|
||||
index 1b3143b046135369c8b6a22b15d16fbfea3e615a..f0ac67db0fe669e4eef06cde7d06354a62f43d34 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1299,6 +1299,9 @@ interface NetworkContext {
|
||||
@@ -1304,6 +1304,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
@@ -77,10 +77,10 @@ index 1686353217d288c2faaef98f8cd445baf8ee0df5..bfb21675e01fb3e04e7a56e045d10d3e
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index edb9e10bca66bc93c274652574360dacadf02949..d9cad3b22a53c361ae94eeead94a52e2dbdbaf52 100644
|
||||
index 3640daadd0f1874930d0ffe9e560b53771e1ade7..2ddeb269418531c177b1519276371eeef7f7b4c7 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -153,6 +153,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -155,6 +155,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
||||
@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 831b3b1ee47a88b6b02a2256682e4a9b1cbeda3c..ef68f9cbc63772f50269520fb0198a95e4270947 100644
|
||||
index 2b4f5e43d7219ae60611fabd5cf650daf51976b8..99b1895903c2ae8aa36c76f578e1f51318033ad9 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -168,6 +168,7 @@
|
||||
@@ -23,7 +23,7 @@ index 831b3b1ee47a88b6b02a2256682e4a9b1cbeda3c..ef68f9cbc63772f50269520fb0198a95
|
||||
#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"
|
||||
@@ -1837,6 +1838,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1832,6 +1833,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 1c5e059cee6593f61270559a58cee7450b52ab8c..d4ac7f62b59c1948b2ec341109d27422ca8dda04 100644
|
||||
index f907a3eea3843ccad7b15ca34137f42dbe57baa1..f3f0812be22067a06fc0afc3e52ffc252cd33f86 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -172,6 +172,8 @@ viz_component("service") {
|
||||
@@ -520,7 +520,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
|
||||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 3914375bdb741e347ea561935dfcd9162b05dbd6..ff21b6e7610e034ef65e23560dd011b2a29e74ae 100644
|
||||
index 4022dff593fb718b6e97c35fbf928af129495aaf..d51b9d9c7eb7e2cef09d9d7745d4b54a27b69168 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -100,7 +100,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
@@ -562,7 +562,7 @@ index febb2718cb34ea4d9f411f068d8c01a89c7db888..be8bd51cb61c20ef3df8552972a0ac2f
|
||||
gpu::SyncPointManager* GetSyncPointManager() override;
|
||||
};
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index 2ea7347d2abe0a4ac9c1e57ea5249660ca2203fc..d71e6349fa887ddaf2d03438e72b4d696d9bf9c5 100644
|
||||
index b9ad5c8cbeb5b3684af6d84f70aa8aace69dc01a..55ea89b5c08daf3dd5cdf332be96ff43b8590233 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -390,8 +390,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
@@ -595,10 +595,10 @@ index d7deccb6e6ec63592cd840a05403f402238e645e..4c4356b8def15ed3156db38d0a593b83
|
||||
|
||||
// Sends the created child window to the browser process so that it can be
|
||||
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
index 7f71e53cce852ad30a6e14b6dbe12df30a3367b0..0e7b9c3ed19c16cf7d9566df0c07c95720b64999 100644
|
||||
index 3ec6e6aec3d9ca1cedc0004388f88e2624bb688d..0a44bf55d47d38e7566d50f1d04c36338eb9f014 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
@@ -34,6 +34,7 @@ struct RootCompositorFrameSinkParams {
|
||||
@@ -35,6 +35,7 @@ struct RootCompositorFrameSinkParams {
|
||||
bool send_swap_size_notifications = false;
|
||||
// Disables begin frame rate limiting for the display compositor.
|
||||
bool disable_frame_rate_limit = false;
|
||||
|
||||
@@ -112,7 +112,7 @@ index 3450c15835d8b792f37764f6edc4a4560be435ef..b1034aa141d6121f8e1524fb34a28a04
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 0f42a915d4755d9a7e531f5d1aba4060f77482ab..9334a3ccc919eb2420543679084e90485ba9c609 100644
|
||||
index fd6188634e9d551cfd381c867ec2a40de87e6a25..69a6301ff61e98dab6014f9c0f10f682ce8c27a6 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -712,6 +712,7 @@ URLLoader::URLLoader(
|
||||
|
||||
@@ -23,10 +23,10 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 70baa92dfb7782a9b5850f8fd246b0aa0ca46de6..1f4b8f68e2fc974cd8ceafb91916dd994349c69e 100644
|
||||
index 016c33d9fb5673ca1b96a9135f0ca5118d837a12..0115b30344e36ee6f4852028ba992cc88ed03ae9 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -10729,6 +10729,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
@@ -10732,6 +10732,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 70baa92dfb7782a9b5850f8fd246b0aa0ca46de6..1f4b8f68e2fc974cd8ceafb91916dd99
|
||||
// origin of |common_params.url| and/or |common_params.initiator_origin|.
|
||||
url::Origin resolved_origin = url::Origin::Resolve(
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
index 85c4d912e2fdb5e9cb3336ecbfe0cbad112fafe8..0ac0108cf08457d5b597070e43dcca38ee95f81e 100644
|
||||
index 2c9efc43b52219f8e2875e838819180c4995ee2b..88f13d06cac5e592d60fa9a26c7ccf3c152d722e 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2243,6 +2243,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
@@ -2253,6 +2253,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
Document* owner_document) {
|
||||
scoped_refptr<SecurityOrigin> origin;
|
||||
@@ -54,7 +54,7 @@ index 85c4d912e2fdb5e9cb3336ecbfe0cbad112fafe8..0ac0108cf08457d5b597070e43dcca38
|
||||
StringBuilder debug_info_builder;
|
||||
// Whether the origin is newly created within this call, instead of copied
|
||||
// from an existing document's origin or from `origin_to_commit_`. If this is
|
||||
@@ -2295,6 +2299,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
@@ -2305,6 +2309,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
debug_info_builder.Append(", url=");
|
||||
debug_info_builder.Append(owner_document->Url().BaseAsString());
|
||||
debug_info_builder.Append(")");
|
||||
|
||||
@@ -10,7 +10,7 @@ This patch should be backported to e29, upstreamed to Chromium, and then
|
||||
removed if it lands upstream.
|
||||
|
||||
diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
|
||||
index ca90a0a253c905c40e8a051ca57ef3a33baf7447..449f498e6954fd1cf938ff849367a980df3a028e 100644
|
||||
index 18a0865f85add58588168a29962b35802fab28da..b584517c21285efed01ea4211b606ff768829993 100644
|
||||
--- a/ui/events/x/events_x_utils.cc
|
||||
+++ b/ui/events/x/events_x_utils.cc
|
||||
@@ -594,6 +594,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Thu, 1 Aug 2024 15:30:32 +0200
|
||||
Subject: Fix potential draggable region crash when no MainFrameImpl
|
||||
|
||||
Fix a crash that can occur when SetSupportsDraggableRegions
|
||||
is called with `true` and there is no MainFrameImpl. When MainFrameImpl
|
||||
is nullptr, logic currently correctly returns early, but
|
||||
supports_draggable_regions_ is set before that happens. As a
|
||||
result, when SupportsDraggableRegions() is called, it will return
|
||||
true, and thus LocalFrameView::UpdateDocumentDraggableRegions() will
|
||||
call DraggableRegionsChanged(). This will trigger a crash in
|
||||
WebViewImpl::DraggableRegionsChanged(), as it assumes that
|
||||
MainFrameImpl is not null.
|
||||
|
||||
Upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/5756619
|
||||
|
||||
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 99b1895903c2ae8aa36c76f578e1f51318033ad9..685b85e1d7294af5e8be2ae771bd352b1427c923 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -4071,11 +4071,12 @@ bool WebViewImpl::IsFencedFrameRoot() const {
|
||||
}
|
||||
|
||||
void WebViewImpl::SetSupportsDraggableRegions(bool supports_draggable_regions) {
|
||||
- supports_draggable_regions_ = supports_draggable_regions;
|
||||
if (!MainFrameImpl() || !MainFrameImpl()->GetFrame()) {
|
||||
return;
|
||||
}
|
||||
|
||||
+ supports_draggable_regions_ = supports_draggable_regions;
|
||||
+
|
||||
LocalFrame* local_frame = MainFrameImpl()->GetFrame();
|
||||
|
||||
if (supports_draggable_regions_) {
|
||||
@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
|
||||
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index a06a04c3e1c40370fa04b7bc34f0a3adc9832169..e3f5da2087616300d4765c23f7b8bc190deca4df 100644
|
||||
index 0d4057cacf26b1460b34122d8927fd398c8623fb..ba7f92ef873d3a8b38bbb490a50a1ea5d4c74bbe 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2026,9 +2026,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
@@ -2035,9 +2035,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
|
||||
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
|
||||
// The resize message (which may not happen immediately) will carry with it
|
||||
// the screen info as well as the new size (if the screen has changed scale
|
||||
|
||||
@@ -64,7 +64,7 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 4357c005f9b731566451b31d133d441f084a1c86..0ae4ec8b42ad5f82c7d3ad1b9b91e690548daab4 100644
|
||||
index 337fac133deea60fe01ef0210cb9543a5d0ed116..c6f55e730b6dec0017045eb2ab543d5a2839f1fe 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3110,6 +3110,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -204,7 +204,7 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
|
||||
const mojom::blink::UserActivationOption user_activation_option_;
|
||||
const mojom::blink::LoadEventBlockingOption blocking_option_;
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
index db1cc198dfc40ce359bad4157a4aad396e1be1a0..424fa3415a9f7d44a8422ecf0eb3670bfffd910a 100644
|
||||
index 0ec11fe5274bad102b2cb8001f3bf07bad7d331c..907f10b419087e31dcfa760edc023fd82de4fe47 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
|
||||
@@ -294,6 +294,7 @@ void ExecuteScriptsInMainWorld(
|
||||
@@ -216,7 +216,7 @@ index db1cc198dfc40ce359bad4157a4aad396e1be1a0..424fa3415a9f7d44a8422ecf0eb3670b
|
||||
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 2079ffada65df5773909f25cb0c6645a3f6b3aab..e1dea864e10a106993d6d713f9b5db06c174adf0 100644
|
||||
index 00824c082be7bc693c57d5abc84fff9104e73d4f..5eb080a3f73c2f07047b7f45273091c00dddcaab 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
|
||||
@@ -1095,14 +1095,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
@@ -238,7 +238,7 @@ index 2079ffada65df5773909f25cb0c6645a3f6b3aab..e1dea864e10a106993d6d713f9b5db06
|
||||
|
||||
v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
|
||||
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 a986b357438ab1b0d076b5cd28231f019772fb8a..fd63c05fbce9429977b2a0509e1516eea448ce68 100644
|
||||
index a6b53468d98c2c2f74768b717e8a045c13d317e2..5a908288b2132ce313a3e237a2d8e7663beba9d5 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -250,7 +250,7 @@ index a986b357438ab1b0d076b5cd28231f019772fb8a..fd63c05fbce9429977b2a0509e1516ee
|
||||
mojom::blink::WantResultOption,
|
||||
mojom::blink::PromiseResultOption) override;
|
||||
diff --git a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
|
||||
index 7c5eb8bfb0473334b49ce922f186f277d8d6e3fa..c8e77c29d319c74cd88401cb8619b43a40f0da44 100644
|
||||
index 4eb146c0798514e9201f2d68dcfebfacc82b97ea..27398228f87982e5c53476d5dee13fde5a6fa64e 100644
|
||||
--- a/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
|
||||
+++ b/third_party/blink/renderer/core/scheduler_integration_tests/virtual_time_test.cc
|
||||
@@ -63,6 +63,7 @@ class VirtualTimeTest : public SimTest {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index cbf46ff2827c31192ab8da1df2d2ce396351102b..efa2b96edaa1a268017ba2946472140c2a6f9b27 100644
|
||||
index afc29b7f0d9d88b8d66d0a2a6ed8f41c86c2913a..956f4c511393e7ff8b5941faa658a72a695c4492 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1343,6 +1343,11 @@
|
||||
|
||||
@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
|
||||
system priority.
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index f23f880efa562ed992eb9dc92946437b2151d1f1..848f860907f118a8f6cea188601e0873397265cd 100644
|
||||
index 3f1e7832615c898ca146dbcb718b52c17d8ec8ba..19a1b892030014574ba9673a650bb77a03890e2c 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1050,6 +1050,7 @@ component("base") {
|
||||
@@ -171,7 +171,7 @@ index 4fe7a0bfaa5b3398372f55c6454e738f140efe6b..b1c70281c45aaca4ae483f1f28e9d219
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
index bc054fb378181210794a1b3453f7c14443da0dab..b9690bbdd2d126c09396c02a8cae5d91bab6bcd4 100644
|
||||
index 73a4b456147bd18617ddc9be48b44d1b37d3a2f1..bb0b5a86d24aa5f3d597a6e2e07513f513496741 100644
|
||||
--- a/components/remote_cocoa/app_shim/BUILD.gn
|
||||
+++ b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
@@ -16,6 +16,7 @@ component("app_shim") {
|
||||
@@ -362,10 +362,10 @@ index 4f37e077120a311638c64e715059e5c08b1f1045..30027aafc16d48ac076dca3223f3a38d
|
||||
bool shouldShowWindowTitle = YES;
|
||||
if (_bridge)
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
index b3c087eda0561d94d205ef0cbbb341a7e2a34638..035202378209e32e6f7c630140367cda7a34e483 100644
|
||||
index 897e8a7d807fa7e6d5b461b5413483114871bfbb..45f292bad3d69073e52de2d4175c6126898ca7a1 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
|
||||
@@ -627,10 +627,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -635,10 +635,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
// this should be treated as an error and caught early.
|
||||
CHECK(bridged_view_);
|
||||
|
||||
@@ -379,10 +379,10 @@ index b3c087eda0561d94d205ef0cbbb341a7e2a34638..035202378209e32e6f7c630140367cda
|
||||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 5162f0de437618af7ce9de59209e090ac56881b9..1c5e059cee6593f61270559a58cee7450b52ab8c 100644
|
||||
index c72378fbfd823855b41e094e16e4e92d9fbaefcc..f907a3eea3843ccad7b15ca34137f42dbe57baa1 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -367,6 +367,7 @@ viz_component("service") {
|
||||
@@ -368,6 +368,7 @@ viz_component("service") {
|
||||
"frame_sinks/external_begin_frame_source_mac.h",
|
||||
]
|
||||
}
|
||||
@@ -390,7 +390,7 @@ index 5162f0de437618af7ce9de59209e090ac56881b9..1c5e059cee6593f61270559a58cee745
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -639,6 +640,7 @@ viz_source_set("unit_tests") {
|
||||
@@ -640,6 +641,7 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
@@ -629,7 +629,7 @@ index 0738636a7462fd973c12d0e26e298c3b767f0c53..977e90c5dc3d8ff48ba9674c1c7d5eb6
|
||||
public_deps = [
|
||||
":mojo_bindings",
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index aa858c2dd7594798e7b8d1a947fb85b0eb506710..8e9c678f9af71175c842343e3fd19b2c2cce1416 100644
|
||||
index 6b6d292cf28c25c5ee903b2833eaf797bcbd8706..cedeb95341224e404372f7e54b8c8b026c6fb926 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -232,6 +232,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -709,7 +709,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index cfcc4bc7fbcc6209c86f07ae1b6e920c5258173c..18395806b05c7deef7a0415031c376f7c2239bfd 100644
|
||||
index 69a89c9937899620d8774b1bf288349d0efb535c..6b14a1fe2762b2ae513c522798e77aa6b3403193 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -502,6 +502,7 @@ static_library("test_support") {
|
||||
@@ -770,7 +770,7 @@ index 2e53ca913d9b4380792df82f73dcfdd5177c0214..edb1e1a3283ee1978d64527c29ad207e
|
||||
|
||||
if (is_mac) {
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index 4244e70c523d584fb796f4ce741376c6f72531cd..25db1e83fefecd01820923e5d182b882426eebfd 100644
|
||||
index 25f2c71ac4d74f1843b3fa5b16a8833170240431..ee2fa297f5cf555269ebb5d6e413cc337e2b6ee9 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -39,6 +39,7 @@
|
||||
@@ -800,7 +800,7 @@ index 4244e70c523d584fb796f4ce741376c6f72531cd..25db1e83fefecd01820923e5d182b882
|
||||
device_paired_status_callback_(
|
||||
base::BindRepeating(&IsDeviceSystemPaired)) {
|
||||
}
|
||||
@@ -297,8 +301,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
@@ -307,8 +311,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
}
|
||||
|
||||
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
||||
|
||||
@@ -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 02ff46371083e4a5821e8877fbd31796fdb6a0a9..0d6d4d646bd6e7c187b5174edff2ddb0c51d7867 100644
|
||||
index d5d2f0738d89805a418fa90e062567ba66e96c2f..6c23ecefaf8162efde4379b90d9b116e63175d48 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -157,6 +157,11 @@
|
||||
@@ -136,7 +136,7 @@ index 02ff46371083e4a5821e8877fbd31796fdb6a0a9..0d6d4d646bd6e7c187b5174edff2ddb0
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2474,6 +2579,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2493,6 +2598,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = std::move(cert_verifier_with_trust_anchors);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -147,7 +147,7 @@ index 02ff46371083e4a5821e8877fbd31796fdb6a0a9..0d6d4d646bd6e7c187b5174edff2ddb0
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 4f1cd30aa54de9a64372c7dced2bdaa683cc0d8e..b0df50eca7d4bed289940ebdf968a36fd891297b 100644
|
||||
index c73d2ca100eeda97406427f6ff20b12b0ce393f2..5ddd56b235229f85fa2d0619b7f4614cb00d914e 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -115,6 +115,7 @@ class URLMatcher;
|
||||
@@ -167,7 +167,7 @@ index 4f1cd30aa54de9a64372c7dced2bdaa683cc0d8e..b0df50eca7d4bed289940ebdf968a36f
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetViaObliviousHttp(
|
||||
mojom::ObliviousHttpRequestPtr request,
|
||||
@@ -923,6 +926,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -925,6 +928,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::vector<base::OnceClosure> dismount_closures_;
|
||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||
|
||||
@@ -177,7 +177,7 @@ index 4f1cd30aa54de9a64372c7dced2bdaa683cc0d8e..b0df50eca7d4bed289940ebdf968a36f
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 1abef24d101b3426544f24484c32e7999535d3d0..1686353217d288c2faaef98f8cd445baf8ee0df5 100644
|
||||
index 0678afc12458f8609741bce73effe5315ec94036..1b3143b046135369c8b6a22b15d16fbfea3e615a 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -298,6 +298,16 @@ struct SocketBrokerRemotes {
|
||||
@@ -208,7 +208,7 @@ index 1abef24d101b3426544f24484c32e7999535d3d0..1686353217d288c2faaef98f8cd445ba
|
||||
CreateURLLoaderFactory(pending_receiver<URLLoaderFactory> url_loader_factory,
|
||||
URLLoaderFactoryParams params);
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index c4444fef6804a1e494320e2cd539262e4e8b4f1b..edb9e10bca66bc93c274652574360dacadf02949 100644
|
||||
index c025846455a8a3b024fe6f39274c68b8f8d30899..3640daadd0f1874930d0ffe9e560b53771e1ade7 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
|
||||
@@ -133,10 +133,10 @@ index 46b071609e56e8602b04d1cd9f5f4ebd7e4f4ae1..6092383e0f8f1c0d829a8ef8af53a786
|
||||
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 7ac8e5e171c277a6452009ffadf09f5a685c584b..46b205e47314627bcc0ffd03a28a29c103e523ab 100644
|
||||
index bcdddb80ff9c562ce6f4ba32278bd7fdeed60102..8bd86cb0ba06b69aa34886b89fd60ca6c73e8f90 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1975,7 +1975,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2057,7 +2057,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index 7ac8e5e171c277a6452009ffadf09f5a685c584b..46b205e47314627bcc0ffd03a28a29c1
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -1983,7 +1983,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2065,7 +2065,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -10,7 +10,7 @@ an about:blank check to this area.
|
||||
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 3b88a74fe5ccbad4c691be18ad7b902b356f0a31..5d4b2d4c11c7caa9719602cc87de13b243583acb 100644
|
||||
index 812d7e0afa917cde3fecdb880ae932e04a650a60..4d5a49677bea80375453ffb9a334cdc50477dee0 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
|
||||
|
||||
@@ -30,10 +30,10 @@ index eaca11c1b16ee0befe8f5bfd3735a582a63cbd81..9f042cd993e46993826634772714c4f2
|
||||
// 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 389045f400ed0bc0af19047ad318f693a6006910..a06a04c3e1c40370fa04b7bc34f0a3adc9832169 100644
|
||||
index bb5ac504809d0027ed434ddac2766e02f3643c4b..0d4057cacf26b1460b34122d8927fd398c8623fb 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1960,6 +1960,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -1969,6 +1969,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_) {
|
||||
view_->UpdateCursor(cursor);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ should be removed as soon as those have been updated. Patching because
|
||||
every instance is a FTBFS that prevents testing any one instance's fix.
|
||||
|
||||
diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h
|
||||
index a491f22076c16addeb4aa5ad21678164fc979991..ef50f9d2c5681d7d88cd9c07b07baa52fe338d09 100644
|
||||
index 9b484a05b2fe317168d512d013c51d52259517b4..e73a46cd6b616e92be341a0a34450bee92ef5a53 100644
|
||||
--- a/base/functional/callback_helpers.h
|
||||
+++ b/base/functional/callback_helpers.h
|
||||
@@ -100,6 +100,22 @@ RepeatingCallback<void(Args...)> ForwardRepeatingCallbacks(
|
||||
|
||||
@@ -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 46b205e47314627bcc0ffd03a28a29c103e523ab..0e82358006724f6eb2c12a400a877331fdbb5988 100644
|
||||
index 8bd86cb0ba06b69aa34886b89fd60ca6c73e8f90..05069489e0d9633c9e08fd854feea8bcedf62c71 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1612,9 +1612,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1694,9 +1694,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), /*is_jit_disabled=*/IsPdf());
|
||||
|
||||
@@ -15,7 +15,7 @@ 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 c3d4f2dbf0131a80ce2e18c3f1f35f3b4aa5b6f7..3b88a74fe5ccbad4c691be18ad7b902b356f0a31 100644
|
||||
index f2f8053be9074fd0e8a6e94b16aa6447bb5d9803..812d7e0afa917cde3fecdb880ae932e04a650a60 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7999,6 +7999,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
|
||||
@@ -10,7 +10,7 @@ to handle this without patching, but this is fairly clean for now and no longer
|
||||
patching legacy devtools code.
|
||||
|
||||
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
|
||||
index 5f03f3197a5302e76a396ce27dd7f95384a96250..3ae373b68b198d28d92b2227be07956e0673b504 100644
|
||||
index 1fd49e0859467a404815911af209a4497edb3ab6..39a91bf8612b73a9b1daa2f0b3c2e21b527ec1f8 100644
|
||||
--- a/front_end/entrypoints/main/MainImpl.ts
|
||||
+++ b/front_end/entrypoints/main/MainImpl.ts
|
||||
@@ -746,6 +746,8 @@ export class MainImpl {
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
// launchApplication is deprecated; should be migrated to
|
||||
// [NSWorkspace openApplicationAtURL:configuration:completionHandler:]
|
||||
// UserNotifications.frameworks API
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
@autoreleasepool {
|
||||
NSArray* pathComponents =
|
||||
@@ -17,11 +11,18 @@ int main(int argc, char* argv[]) {
|
||||
pathComponents = [pathComponents
|
||||
subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
||||
NSString* path = [NSString pathWithComponents:pathComponents];
|
||||
NSURL* url = [NSURL fileURLWithPath:path];
|
||||
|
||||
[[NSWorkspace sharedWorkspace] launchApplication:path];
|
||||
[[NSWorkspace sharedWorkspace]
|
||||
openApplicationAtURL:url
|
||||
configuration:NSWorkspaceOpenConfiguration.configuration
|
||||
completionHandler:^(NSRunningApplication* app, NSError* error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to launch application: %@", error);
|
||||
} else {
|
||||
NSLog(@"Application launched successfully: %@", app);
|
||||
}
|
||||
}];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// -Wdeprecated-declarations
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -46,9 +46,9 @@ void AutoUpdater::OnError(const std::string& message) {
|
||||
gin::StringToV8(isolate, message),
|
||||
};
|
||||
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, wrapper->GetCreationContextChecked()->GetMicrotaskQueue(),
|
||||
true);
|
||||
true, v8::MicrotasksScope::kRunMicrotasks};
|
||||
|
||||
node::MakeCallback(isolate, wrapper, "emit", args.size(), args.data(),
|
||||
{0, 0});
|
||||
|
||||
@@ -38,13 +38,14 @@ void FrameSubscriber::AttachToHost(content::RenderWidgetHost* host) {
|
||||
|
||||
// The view can be null if the renderer process has crashed.
|
||||
// (https://crbug.com/847363)
|
||||
if (!host_->GetView())
|
||||
auto* rwhv = host_->GetView();
|
||||
if (!rwhv)
|
||||
return;
|
||||
|
||||
// Create and configure the video capturer.
|
||||
gfx::Size size = GetRenderViewSize();
|
||||
DCHECK(!size.IsEmpty());
|
||||
video_capturer_ = host_->GetView()->CreateVideoCapturer();
|
||||
video_capturer_ = rwhv->CreateVideoCapturer();
|
||||
video_capturer_->SetResolutionConstraints(size, size, true);
|
||||
video_capturer_->SetAutoThrottlingEnabled(false);
|
||||
video_capturer_->SetMinSizeChangePeriod(base::TimeDelta());
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/barrier_closure.h"
|
||||
@@ -129,7 +129,7 @@ media::mojom::CaptureHandlePtr CreateCaptureHandle(
|
||||
|
||||
const auto& captured_config = captured->GetCaptureHandleConfig();
|
||||
if (!captured_config.all_origins_permitted &&
|
||||
base::ranges::none_of(
|
||||
std::ranges::none_of(
|
||||
captured_config.permitted_origins,
|
||||
[capturer_origin](const url::Origin& permitted_origin) {
|
||||
return capturer_origin.IsSameOriginWith(permitted_origin);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "shell/browser/file_system_access/file_system_access_permission_context.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -98,7 +99,7 @@ constexpr base::TimeDelta kPermissionRevocationTimeout = base::Seconds(5);
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
[[nodiscard]] constexpr bool ContainsInvalidDNSCharacter(
|
||||
base::FilePath::StringType hostname) {
|
||||
return !base::ranges::all_of(hostname, [](base::FilePath::CharType c) {
|
||||
return !std::ranges::all_of(hostname, [](base::FilePath::CharType c) {
|
||||
return (c >= L'A' && c <= L'Z') || (c >= L'a' && c <= L'z') ||
|
||||
(c >= L'0' && c <= L'9') || (c == L'.') || (c == L'-');
|
||||
});
|
||||
@@ -355,7 +356,7 @@ class FileSystemAccessPermissionContext::PermissionGrantImpl
|
||||
const base::FilePath& old_path,
|
||||
const base::FilePath& new_path) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
auto entry_it = base::ranges::find_if(
|
||||
auto entry_it = std::ranges::find_if(
|
||||
grants,
|
||||
[&old_path](const auto& entry) { return entry.first == old_path; });
|
||||
|
||||
@@ -683,7 +684,7 @@ void FileSystemAccessPermissionContext::MaybeEvictEntries(
|
||||
return;
|
||||
}
|
||||
|
||||
base::ranges::sort(entries);
|
||||
std::ranges::sort(entries);
|
||||
size_t entries_to_remove = entries.size() - max_ids_per_origin_;
|
||||
for (size_t i = 0; i < entries_to_remove; ++i) {
|
||||
bool did_remove_entry = dict.Remove(entries[i].second);
|
||||
@@ -862,7 +863,7 @@ bool FileSystemAccessPermissionContext::OriginHasReadAccess(
|
||||
|
||||
auto it = active_permissions_map_.find(origin);
|
||||
if (it != active_permissions_map_.end()) {
|
||||
return base::ranges::any_of(it->second.read_grants, [&](const auto& grant) {
|
||||
return std::ranges::any_of(it->second.read_grants, [&](const auto& grant) {
|
||||
return grant.second->GetStatus() == PermissionStatus::GRANTED;
|
||||
});
|
||||
}
|
||||
@@ -876,10 +877,9 @@ bool FileSystemAccessPermissionContext::OriginHasWriteAccess(
|
||||
|
||||
auto it = active_permissions_map_.find(origin);
|
||||
if (it != active_permissions_map_.end()) {
|
||||
return base::ranges::any_of(
|
||||
it->second.write_grants, [&](const auto& grant) {
|
||||
return grant.second->GetStatus() == PermissionStatus::GRANTED;
|
||||
});
|
||||
return std::ranges::any_of(it->second.write_grants, [&](const auto& grant) {
|
||||
return grant.second->GetStatus() == PermissionStatus::GRANTED;
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -273,13 +273,8 @@ void HidChooserContext::DeviceRemoved(device::mojom::HidDeviceInfoPtr device) {
|
||||
if (CanStorePersistentEntry(*device))
|
||||
return;
|
||||
|
||||
std::vector<url::Origin> revoked_origins;
|
||||
for (auto& map_entry : ephemeral_devices_) {
|
||||
if (map_entry.second.erase(device->guid) > 0)
|
||||
revoked_origins.push_back(map_entry.first);
|
||||
}
|
||||
if (revoked_origins.empty())
|
||||
return;
|
||||
for (auto& [origin, guids] : ephemeral_devices_)
|
||||
guids.erase(device->guid);
|
||||
}
|
||||
|
||||
void HidChooserContext::DeviceChanged(device::mojom::HidDeviceInfoPtr device) {
|
||||
@@ -338,11 +333,6 @@ void HidChooserContext::OnHidManagerConnectionError() {
|
||||
hid_manager_.reset();
|
||||
client_receiver_.reset();
|
||||
devices_.clear();
|
||||
|
||||
std::vector<url::Origin> revoked_origins;
|
||||
revoked_origins.reserve(ephemeral_devices_.size());
|
||||
for (const auto& map_entry : ephemeral_devices_)
|
||||
revoked_origins.push_back(map_entry.first);
|
||||
ephemeral_devices_.clear();
|
||||
|
||||
// Notify all device observers.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "shell/browser/hid/hid_chooser_controller.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "base/command_line.h"
|
||||
@@ -368,8 +369,8 @@ void HidChooserController::UpdateDeviceInfo(
|
||||
auto physical_device_it = device_map_.find(id);
|
||||
DCHECK(physical_device_it != device_map_.end());
|
||||
auto& device_infos = physical_device_it->second;
|
||||
auto device_it = base::ranges::find(device_infos, device.guid,
|
||||
&device::mojom::HidDeviceInfo::guid);
|
||||
auto device_it = std::ranges::find(device_infos, device.guid,
|
||||
&device::mojom::HidDeviceInfo::guid);
|
||||
DCHECK(device_it != device_infos.end());
|
||||
*device_it = device.Clone();
|
||||
}
|
||||
|
||||
@@ -114,50 +114,6 @@ struct Converter<electron::NativeWindowMac::VisualEffectState> {
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
// -[NSWindow orderWindow] does not handle reordering for children
|
||||
// windows. Their order is fixed to the attachment order (the last attached
|
||||
// window is on the top). Therefore, work around it by re-parenting in our
|
||||
// desired order.
|
||||
void ReorderChildWindowAbove(NSWindow* child_window, NSWindow* other_window) {
|
||||
NSWindow* parent = [child_window parentWindow];
|
||||
DCHECK(parent);
|
||||
|
||||
// `ordered_children` sorts children windows back to front.
|
||||
NSArray<NSWindow*>* children = [[child_window parentWindow] childWindows];
|
||||
std::vector<std::pair<NSInteger, NSWindow*>> ordered_children;
|
||||
for (NSWindow* child in children)
|
||||
ordered_children.push_back({[child orderedIndex], child});
|
||||
std::sort(ordered_children.begin(), ordered_children.end(), std::greater<>());
|
||||
|
||||
// If `other_window` is nullptr, place `child_window` in front of
|
||||
// all other children windows.
|
||||
if (other_window == nullptr)
|
||||
other_window = ordered_children.back().second;
|
||||
|
||||
if (child_window == other_window)
|
||||
return;
|
||||
|
||||
for (NSWindow* child in children)
|
||||
[parent removeChildWindow:child];
|
||||
|
||||
const bool relative_to_parent = parent == other_window;
|
||||
if (relative_to_parent)
|
||||
[parent addChildWindow:child_window ordered:NSWindowAbove];
|
||||
|
||||
// Re-parent children windows in the desired order.
|
||||
for (auto [ordered_index, child] : ordered_children) {
|
||||
if (child != child_window && child != other_window) {
|
||||
[parent addChildWindow:child ordered:NSWindowAbove];
|
||||
} else if (child == other_window && !relative_to_parent) {
|
||||
[parent addChildWindow:other_window ordered:NSWindowAbove];
|
||||
[parent addChildWindow:child_window ordered:NSWindowAbove];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
|
||||
NativeWindow* parent)
|
||||
: NativeWindow(options, parent), root_view_(new RootViewMac(this)) {
|
||||
@@ -792,22 +748,12 @@ bool NativeWindowMac::MoveAbove(const std::string& sourceId) {
|
||||
if (!webrtc::GetWindowOwnerPid(window_id))
|
||||
return false;
|
||||
|
||||
if (!parent() || is_modal()) {
|
||||
[window_ orderWindow:NSWindowAbove relativeTo:window_id];
|
||||
} else {
|
||||
NSWindow* other_window = [NSApp windowWithWindowNumber:window_id];
|
||||
ReorderChildWindowAbove(window_, other_window);
|
||||
}
|
||||
|
||||
[window_ orderWindowByShuffling:NSWindowAbove relativeTo:window_id];
|
||||
return true;
|
||||
}
|
||||
|
||||
void NativeWindowMac::MoveTop() {
|
||||
if (!parent() || is_modal()) {
|
||||
[window_ orderWindow:NSWindowAbove relativeTo:0];
|
||||
} else {
|
||||
ReorderChildWindowAbove(window_, nullptr);
|
||||
}
|
||||
[window_ orderWindowByShuffling:NSWindowAbove relativeTo:0];
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetResizable(bool resizable) {
|
||||
|
||||
@@ -565,10 +565,8 @@ OffScreenRenderWidgetHostView::CreateViewForWidget(
|
||||
content::RenderWidgetHost* render_widget_host,
|
||||
content::RenderWidgetHost* embedder_render_widget_host,
|
||||
content::WebContentsView* web_contents_view) {
|
||||
if (render_widget_host->GetView()) {
|
||||
return static_cast<content::RenderWidgetHostViewBase*>(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
if (auto* rwhv = render_widget_host->GetView())
|
||||
return static_cast<content::RenderWidgetHostViewBase*>(rwhv);
|
||||
|
||||
OffScreenRenderWidgetHostView* embedder_host_view = nullptr;
|
||||
if (embedder_render_widget_host) {
|
||||
|
||||
@@ -35,8 +35,8 @@ void OffScreenWebContentsView::SetWebContents(
|
||||
content::WebContents* web_contents) {
|
||||
web_contents_ = web_contents;
|
||||
|
||||
if (GetView())
|
||||
GetView()->InstallTransparency();
|
||||
if (auto* view = GetView())
|
||||
view->InstallTransparency();
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::SetNativeWindow(NativeWindow* window) {
|
||||
@@ -53,8 +53,8 @@ void OffScreenWebContentsView::SetNativeWindow(NativeWindow* window) {
|
||||
|
||||
void OffScreenWebContentsView::OnWindowResize() {
|
||||
// In offscreen mode call RenderWidgetHostView's SetSize explicitly
|
||||
if (GetView())
|
||||
GetView()->SetSize(GetSize());
|
||||
if (auto* view = GetView())
|
||||
view->SetSize(GetSize());
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::OnWindowClosed() {
|
||||
@@ -107,7 +107,9 @@ content::DropData* OffScreenWebContentsView::GetDropData() const {
|
||||
}
|
||||
|
||||
gfx::Rect OffScreenWebContentsView::GetViewBounds() const {
|
||||
return GetView() ? GetView()->GetViewBounds() : gfx::Rect();
|
||||
if (auto* view = GetView())
|
||||
return view->GetViewBounds();
|
||||
return {};
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::CreateView(gfx::NativeView context) {}
|
||||
@@ -115,10 +117,8 @@ void OffScreenWebContentsView::CreateView(gfx::NativeView context) {}
|
||||
content::RenderWidgetHostViewBase*
|
||||
OffScreenWebContentsView::CreateViewForWidget(
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
if (render_widget_host->GetView()) {
|
||||
return static_cast<content::RenderWidgetHostViewBase*>(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
if (auto* rwhv = render_widget_host->GetView())
|
||||
return static_cast<content::RenderWidgetHostViewBase*>(rwhv);
|
||||
|
||||
return new OffScreenRenderWidgetHostView(
|
||||
transparent_, painting_, GetFrameRate(), callback_, render_widget_host,
|
||||
@@ -144,8 +144,8 @@ OffScreenWebContentsView::CreateViewForChildWidget(
|
||||
void OffScreenWebContentsView::SetPageTitle(const std::u16string& title) {}
|
||||
|
||||
void OffScreenWebContentsView::RenderViewReady() {
|
||||
if (GetView())
|
||||
GetView()->InstallTransparency();
|
||||
if (auto* view = GetView())
|
||||
view->InstallTransparency();
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::RenderViewHostChanged(
|
||||
@@ -181,11 +181,9 @@ void OffScreenWebContentsView::UpdateDragOperation(
|
||||
bool document_is_handling_drag) {}
|
||||
|
||||
void OffScreenWebContentsView::SetPainting(bool painting) {
|
||||
auto* view = GetView();
|
||||
painting_ = painting;
|
||||
if (view != nullptr) {
|
||||
if (auto* view = GetView())
|
||||
view->SetPainting(painting);
|
||||
}
|
||||
}
|
||||
|
||||
bool OffScreenWebContentsView::IsPainting() const {
|
||||
@@ -195,11 +193,9 @@ bool OffScreenWebContentsView::IsPainting() const {
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::SetFrameRate(int frame_rate) {
|
||||
auto* view = GetView();
|
||||
frame_rate_ = frame_rate;
|
||||
if (view != nullptr) {
|
||||
if (auto* view = GetView())
|
||||
view->SetFrameRate(frame_rate);
|
||||
}
|
||||
}
|
||||
|
||||
int OffScreenWebContentsView::GetFrameRate() const {
|
||||
|
||||
@@ -154,8 +154,8 @@ void SerialChooserController::OnPortAdded(
|
||||
|
||||
void SerialChooserController::OnPortRemoved(
|
||||
const device::mojom::SerialPortInfo& port) {
|
||||
const auto it = base::ranges::find(ports_, port.token,
|
||||
&device::mojom::SerialPortInfo::token);
|
||||
const auto it = std::ranges::find(ports_, port.token,
|
||||
&device::mojom::SerialPortInfo::token);
|
||||
if (it != ports_.end()) {
|
||||
api::Session* session = GetSession();
|
||||
if (session) {
|
||||
|
||||
@@ -191,11 +191,8 @@ void AutofillPopup::CreateView(content::RenderFrameHost* frame_host,
|
||||
view_ = new AutofillPopupView(this, parent->GetWidget());
|
||||
|
||||
if (offscreen) {
|
||||
auto* rwhv = frame_host->GetView();
|
||||
if (embedder_frame_host != nullptr) {
|
||||
rwhv = embedder_frame_host->GetView();
|
||||
}
|
||||
|
||||
auto* rwhv = embedder_frame_host ? embedder_frame_host->GetView()
|
||||
: frame_host->GetView();
|
||||
auto* osr_rwhv = static_cast<OffScreenRenderWidgetHostView*>(rwhv);
|
||||
view_->view_proxy_ = std::make_unique<OffscreenViewProxy>(view_);
|
||||
osr_rwhv->AddViewProxy(view_->view_proxy_.get());
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/files/file_util.h"
|
||||
@@ -45,7 +46,7 @@ ui::SelectFileDialog::FileTypeInfo GetFilterInfo(const Filters& filters) {
|
||||
file_type_info.extension_description_overrides.push_back(
|
||||
base::UTF8ToUTF16(name));
|
||||
|
||||
const bool has_all_files_wildcard = base::ranges::any_of(
|
||||
const bool has_all_files_wildcard = std::ranges::any_of(
|
||||
extension_group, [](const auto& ext) { return ext == "*"; });
|
||||
if (has_all_files_wildcard) {
|
||||
file_type_info.include_all_files = true;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "shell/browser/ui/inspectable_web_contents.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
@@ -13,7 +14,6 @@
|
||||
#include "base/base64.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/histogram.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "base/strings/pattern.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -111,10 +111,10 @@ gfx::Rect DictionaryToRect(const base::Value::Dict& dict) {
|
||||
}
|
||||
|
||||
bool IsPointInScreen(const gfx::Point& point) {
|
||||
return base::ranges::any_of(display::Screen::GetScreen()->GetAllDisplays(),
|
||||
[&point](auto const& display) {
|
||||
return display.bounds().Contains(point);
|
||||
});
|
||||
return std::ranges::any_of(display::Screen::GetScreen()->GetAllDisplays(),
|
||||
[&point](auto const& display) {
|
||||
return display.bounds().Contains(point);
|
||||
});
|
||||
}
|
||||
|
||||
void SetZoomLevelForWebContents(content::WebContents* web_contents,
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
#include "shell/browser/usb/usb_chooser_controller.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/ranges/algorithm.h"
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -146,7 +146,7 @@ bool UsbChooserController::DisplayDevice(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (base::ranges::any_of(
|
||||
if (std::ranges::any_of(
|
||||
options_->exclusion_filters, [&device_info](const auto& filter) {
|
||||
return device::UsbDeviceFilterMatches(*filter, device_info);
|
||||
})) {
|
||||
|
||||
@@ -128,8 +128,8 @@ gin::Handle<NativeImage> NativeImage::CreateFromNamedImage(gin::Arguments* args,
|
||||
|
||||
if (args->GetNext(&hsl_shift) && hsl_shift.size() == 3) {
|
||||
gfx::Image gfx_image = gfx::Image::CreateFrom1xPNGBytes(
|
||||
reinterpret_cast<const unsigned char*>((char*)[png_data bytes]),
|
||||
[png_data length]);
|
||||
{reinterpret_cast<const uint8_t*>((char*)[png_data bytes]),
|
||||
[png_data length]});
|
||||
color_utils::HSL shift = {safeShift(hsl_shift[0], -1),
|
||||
safeShift(hsl_shift[1], 0.5),
|
||||
safeShift(hsl_shift[2], 0.5)};
|
||||
|
||||
@@ -237,8 +237,9 @@ void ElectronBindings::DidReceiveMemoryDump(
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Context> local_context =
|
||||
v8::Local<v8::Context>::New(isolate, context);
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, local_context->GetMicrotaskQueue(), true);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, local_context->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(local_context);
|
||||
|
||||
if (!success) {
|
||||
|
||||
@@ -50,8 +50,9 @@ struct V8FunctionInvoker<v8::Local<v8::Value>(ArgTypes...)> {
|
||||
return v8::Null(isolate);
|
||||
v8::Local<v8::Function> holder = function.NewHandle(isolate);
|
||||
v8::Local<v8::Context> context = holder->GetCreationContextChecked();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(), true);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(context);
|
||||
std::vector<v8::Local<v8::Value>> args{
|
||||
gin::ConvertToV8(isolate, std::forward<ArgTypes>(raw))...};
|
||||
@@ -75,8 +76,9 @@ struct V8FunctionInvoker<void(ArgTypes...)> {
|
||||
return;
|
||||
v8::Local<v8::Function> holder = function.NewHandle(isolate);
|
||||
v8::Local<v8::Context> context = holder->GetCreationContextChecked();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(), true);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(context);
|
||||
std::vector<v8::Local<v8::Value>> args{
|
||||
gin::ConvertToV8(isolate, std::forward<ArgTypes>(raw))...};
|
||||
@@ -99,8 +101,9 @@ struct V8FunctionInvoker<ReturnType(ArgTypes...)> {
|
||||
return ret;
|
||||
v8::Local<v8::Function> holder = function.NewHandle(isolate);
|
||||
v8::Local<v8::Context> context = holder->GetCreationContextChecked();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(), true);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(context);
|
||||
std::vector<v8::Local<v8::Value>> args{
|
||||
gin::ConvertToV8(isolate, std::forward<ArgTypes>(raw))...};
|
||||
|
||||
@@ -24,8 +24,9 @@ v8::Local<v8::Value> CallMethodWithArgs(v8::Isolate* isolate,
|
||||
}
|
||||
|
||||
// Perform microtask checkpoint after running JavaScript.
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, obj->GetCreationContextChecked()->GetMicrotaskQueue(), true);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, obj->GetCreationContextChecked()->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
|
||||
// node::MakeCallback will also run pending tasks in Node.js.
|
||||
v8::MaybeLocal<v8::Value> ret = node::MakeCallback(
|
||||
|
||||
@@ -267,9 +267,10 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
||||
template <typename ReturnType>
|
||||
void DispatchToCallback(
|
||||
base::RepeatingCallback<ReturnType(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true);
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
args_->Return(
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...));
|
||||
}
|
||||
@@ -278,9 +279,10 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
||||
// expression to foo. As a result, we must specialize the case of Callbacks
|
||||
// that have the void return type.
|
||||
void DispatchToCallback(base::RepeatingCallback<void(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true);
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,11 +16,10 @@ namespace gin_helper {
|
||||
// In the render process creates a v8::MicrotasksScope.
|
||||
class MicrotasksScope {
|
||||
public:
|
||||
explicit MicrotasksScope(v8::Isolate* isolate,
|
||||
v8::MicrotaskQueue* microtask_queue,
|
||||
bool ignore_browser_checkpoint = false,
|
||||
v8::MicrotasksScope::Type scope_type =
|
||||
v8::MicrotasksScope::kRunMicrotasks);
|
||||
MicrotasksScope(v8::Isolate* isolate,
|
||||
v8::MicrotaskQueue* microtask_queue,
|
||||
bool ignore_browser_checkpoint,
|
||||
v8::MicrotasksScope::Type scope_type);
|
||||
~MicrotasksScope();
|
||||
|
||||
// disable copy
|
||||
|
||||
@@ -30,8 +30,9 @@ PromiseBase& PromiseBase::operator=(PromiseBase&&) = default;
|
||||
|
||||
v8::Maybe<bool> PromiseBase::Reject() {
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate(), GetContext()->GetMicrotaskQueue());
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate(), GetContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
||||
return GetInner()->Reject(GetContext(), v8::Undefined(isolate()));
|
||||
@@ -39,8 +40,9 @@ v8::Maybe<bool> PromiseBase::Reject() {
|
||||
|
||||
v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate(), GetContext()->GetMicrotaskQueue());
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate(), GetContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
||||
return GetInner()->Reject(GetContext(), except);
|
||||
@@ -49,8 +51,9 @@ v8::Maybe<bool> PromiseBase::Reject(v8::Local<v8::Value> except) {
|
||||
v8::Maybe<bool> PromiseBase::RejectWithErrorMessage(
|
||||
const std::string_view message) {
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate(), GetContext()->GetMicrotaskQueue());
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate(), GetContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
||||
v8::Local<v8::Value> error =
|
||||
@@ -92,8 +95,9 @@ v8::Local<v8::Promise> Promise<void>::ResolvedPromise(v8::Isolate* isolate) {
|
||||
|
||||
v8::Maybe<bool> Promise<void>::Resolve() {
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate(), GetContext()->GetMicrotaskQueue());
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate(), GetContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
||||
return GetInner()->Resolve(GetContext(), v8::Undefined(isolate()));
|
||||
|
||||
@@ -123,8 +123,9 @@ class Promise : public PromiseBase {
|
||||
v8::Maybe<bool> Resolve(const RT& value) {
|
||||
gin_helper::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate(), GetContext()->GetMicrotaskQueue());
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate(), GetContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
v8::Context::Scope context_scope(GetContext());
|
||||
|
||||
return GetInner()->Resolve(GetContext(),
|
||||
|
||||
@@ -285,7 +285,7 @@ void ErrorMessageListener(v8::Local<v8::Message> message,
|
||||
node::Environment* env = node::Environment::GetCurrent(isolate);
|
||||
if (env) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, env->context()->GetMicrotaskQueue(),
|
||||
isolate, env->context()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
// Emit the after() hooks now that the exception has been handled.
|
||||
// Analogous to node/lib/internal/process/execution.js#L176-L180
|
||||
|
||||
@@ -34,9 +34,9 @@ class V8Serializer : public v8::ValueSerializer::Delegate {
|
||||
~V8Serializer() override = default;
|
||||
|
||||
bool Serialize(v8::Local<v8::Value> value, blink::CloneableMessage* out) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate_, isolate_->GetCurrentContext()->GetMicrotaskQueue(),
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate_, isolate_->GetCurrentContext()->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
WriteBlinkEnvelope(19);
|
||||
|
||||
serializer_.WriteHeader();
|
||||
|
||||
@@ -221,9 +221,9 @@ void SpellCheckClient::SpellCheckWords(const SpellCheckScope& scope,
|
||||
DCHECK(!scope.spell_check_.IsEmpty());
|
||||
|
||||
auto context = isolate_->GetCurrentContext();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate_, context->GetMicrotaskQueue(),
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate_, context->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
|
||||
v8::Local<v8::FunctionTemplate> templ = gin_helper::CreateFunctionTemplate(
|
||||
isolate_, base::BindRepeating(&SpellCheckClient::OnSpellCheckDone,
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "shell/renderer/electron_renderer_client.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/debug/stack_trace.h"
|
||||
@@ -163,7 +165,7 @@ void ElectronRendererClient::WillReleaseScriptContext(
|
||||
return;
|
||||
|
||||
node::Environment* env = node::Environment::GetCurrent(context);
|
||||
const auto iter = base::ranges::find_if(
|
||||
const auto iter = std::ranges::find_if(
|
||||
environments_, [env](auto& item) { return env == item.get(); });
|
||||
if (iter == environments_.end())
|
||||
return;
|
||||
|
||||
@@ -204,9 +204,9 @@ void ElectronSandboxedRendererClient::WillReleaseScriptContext(
|
||||
return;
|
||||
|
||||
auto* isolate = context->GetIsolate();
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(),
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Context::Scope context_scope(context);
|
||||
InvokeEmitProcessEvent(context, "exit");
|
||||
@@ -223,9 +223,9 @@ void ElectronSandboxedRendererClient::EmitProcessEvent(
|
||||
v8::HandleScope handle_scope{isolate};
|
||||
|
||||
v8::Local<v8::Context> context = GetContext(frame, isolate);
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
isolate, context->GetMicrotaskQueue(),
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
isolate, context->GetMicrotaskQueue(), false,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks};
|
||||
v8::Context::Scope context_scope(context);
|
||||
|
||||
InvokeEmitProcessEvent(context, event_name);
|
||||
|
||||
Reference in New Issue
Block a user