Compare commits

...

60 Commits

Author SHA1 Message Date
VerteDinde
0f403b2468 Merge branch 'main' into test-patch-lf 2024-06-24 22:33:31 -07:00
VerteDinde
59063774d9 build: fix LF endings on test 2024-06-24 22:25:07 -07:00
VerteDinde
00e937013a 5583182: Automatic Fullscreen: Prototype Permissions API query support | https://chromium-review.googlesource.com/c/chromium/src/+/5583182 2024-06-24 22:07:44 -07:00
VerteDinde
ac0a67beea fix: add property query interceptors 2024-06-24 21:54:51 -07:00
electron-roller[bot]
31055077fd chore: bump chromium in DEPS to 128.0.6555.0 2024-06-24 13:00:33 +00:00
electron-roller[bot]
52e4e81d02 chore: bump chromium in DEPS to 128.0.6553.0 2024-06-23 13:00:43 +00:00
VerteDinde
c0c2e5764b chore: update patches 2024-06-22 13:50:01 -07:00
VerteDinde
74bc52a559 5637699: Add command line to ASAN Additional Info section | https://chromium-review.googlesource.com/c/chromium/src/+/5637699 2024-06-22 13:49:53 -07:00
electron-roller[bot]
4d5b086c3e chore: bump chromium in DEPS to 128.0.6551.0 2024-06-22 13:00:32 +00:00
electron-roller[bot]
1684b1edc6 chore: bump chromium in DEPS to 128.0.6549.0 2024-06-21 13:00:39 +00:00
VerteDinde
f50fdd559d fixup! add test patch 2024-06-20 22:30:16 -07:00
Alice Zhao
beb4582956 chore: add test patch 2024-06-20 14:56:29 -07:00
Keeley Hammond
2f63917519 chore: re-add nan patch (attempt 2) 2024-06-20 14:45:16 -07:00
Alice Zhao
d06ed3364e chore: delete nan patch 2024-06-20 14:36:44 -07:00
Keeley Hammond
7a96e135ac chore: maybe fix nan patch, part 3 2024-06-20 14:27:56 -07:00
Keeley Hammond
3e970f2915 chore: update patches 2024-06-20 13:52:30 -07:00
Keeley Hammond
858a9f1464 5605693: Remove files from third_party/ninja | https://chromium-review.googlesource.com/c/chromium/src/+/5605693 2024-06-20 13:52:11 -07:00
electron-roller[bot]
d1fce6131b chore: bump chromium in DEPS to 128.0.6544.0 2024-06-19 13:00:25 +00:00
Alice Zhao
d9191b6a4a 5621488: Apply consistent naming conventions to zoom values | https://chromium-review.googlesource.com/c/chromium/src/+/5621488 2024-06-18 16:28:57 -07:00
Alice Zhao
0aeebd8c93 Merge branch 'main' into roller/chromium/main 2024-06-18 16:27:47 -07:00
Samuel Attard
73402b154f rework nan patches 2024-06-18 16:09:44 -07:00
Alice Zhao
2ecba83ea4 chore: update patches 2024-06-18 15:51:50 -07:00
Alice Zhao
53839b6286 5626254: Use sandbox_type instead of process_type | https://chromium-review.googlesource.com/c/chromium/src/+/5626254 2024-06-18 15:49:59 -07:00
electron-roller[bot]
ea4c486382 chore: bump chromium in DEPS to 128.0.6543.0 2024-06-18 13:00:41 +00:00
Keeley Hammond
efdc93b78b chore: fix nan read/write patch 2024-06-17 16:56:06 -07:00
Keeley Hammond
b82b83476c chore: update patches 2024-06-17 15:39:30 -07:00
electron-roller[bot]
4f57150c12 chore: bump chromium in DEPS to 128.0.6541.0 2024-06-17 13:00:21 +00:00
electron-roller[bot]
92346a1a58 chore: bump chromium in DEPS to 128.0.6540.0 2024-06-15 13:00:45 +00:00
deepak1556
7896af4485 ui/gl/features.gni: Set use_egl=true unconditionally.
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5569748
Refs https://issues.chromium.org/issues/344606399
2024-06-15 01:53:57 +09:00
deepak1556
c79edcf85a chore: update patches 2024-06-15 01:30:37 +09:00
deepak1556
a545faee89 chore: update v8 patches 2024-06-15 01:12:43 +09:00
electron-roller[bot]
2df11e4757 chore: bump chromium in DEPS to 128.0.6538.0 2024-06-14 13:00:46 +00:00
PatchUp
7830d4898a chore: update patches 2024-06-14 10:27:40 +00:00
deepak1556
4c4822097c chore: fix lf mismatch in api_remove_allcan_read_write.patch 2024-06-14 19:17:40 +09:00
deepak1556
e204e2712e chore: update patches 2024-06-13 21:03:19 +09:00
deepak1556
551a342cf4 chore: update patches 2024-06-13 20:37:07 +09:00
deepak1556
ee216a5dff fix: update api_remove_allcan_read_write.patch 2024-06-13 20:37:07 +09:00
deepak1556
3494a78367 fix[node]: do not use soon-to-be-deprecated V8 API 2024-06-13 14:03:15 +09:00
deepak1556
ad8c2ff0f8 [Extensions] Move some scriptings files out of the API directory.
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5606682
2024-06-13 14:01:37 +09:00
deepak1556
52fa5b30f1 chore: update patches 2024-06-13 11:57:05 +09:00
electron-roller[bot]
033d48ef93 chore: bump chromium in DEPS to 128.0.6535.0 2024-06-12 21:26:04 +00:00
deepak1556
5116cd8fa5 temp: disable occlusion checker on macOS 2024-06-12 20:31:47 +09:00
deepak1556
64f83cef19 Revert "fix: visibility state specs on macOS"
This reverts commit 1eee30a33d.
2024-06-12 19:21:59 +09:00
deepak1556
1eee30a33d fix: visibility state specs on macOS
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5605407
2024-06-12 17:55:43 +09:00
John Kleinschmidt
d9f9004ec3 5597904: [Windows] Remove ConvertToLongPath from Sandbox Utilities.
https://chromium-review.googlesource.com/c/chromium/src/+/5597904

ResolveNTFunctionPtr was removed in this CL.
2024-06-10 16:36:32 -05:00
John Kleinschmidt
a77116a0fa 5581721: [DEPS] Update clang-format location
https://chromium-review.googlesource.com/c/chromium/src/+/5581721
2024-06-10 12:02:27 -05:00
John Kleinschmidt
098ebbb759 5604487: Reland "[api] Deprecate v8::FunctionCallbackInfo::Holder() for real"
https://chromium-review.googlesource.com/c/v8/v8/+/5604487
2024-06-10 11:31:13 -05:00
John Kleinschmidt
6432ee00de 5585932: [video-pip] Add minimize button to video picture-in-picture window
https://chromium-review.googlesource.com/c/chromium/src/+/5585932
2024-06-10 11:18:08 -05:00
John Kleinschmidt
00c7468c54 5596349: Remove PDF OCR toggle from settings.
https://chromium-review.googlesource.com/c/chromium/src/+/5596349
2024-06-10 11:17:36 -05:00
John Kleinschmidt
bba6ef7de5 chore: update patches 2024-06-10 10:24:36 -05:00
electron-roller[bot]
03d248cd20 chore: bump chromium in DEPS to 127.0.6531.0 2024-06-10 13:00:50 +00:00
electron-roller[bot]
aa47578639 chore: bump chromium in DEPS to 127.0.6529.0 2024-06-09 13:00:39 +00:00
PatchUp
b6e9afd728 chore: update patches 2024-06-08 13:10:51 +00:00
electron-roller[bot]
b7b161e27e chore: bump chromium in DEPS to 127.0.6527.0 2024-06-08 13:00:22 +00:00
Charles Kerr
724557dda3 chore: e patches all 2024-06-07 18:59:30 -05:00
Charles Kerr
cdd5dd9756 chore: update revert_heap_add_checks_position_info.patch
No manual changes; patch applied with fuzz 1
2024-06-07 18:48:31 -05:00
Charles Kerr
1b1552314d chore: update refactor_expose_file_system_access_blocklist.patch
No manual changes; patch applied with fuzz 2
2024-06-07 18:40:48 -05:00
Charles Kerr
1c9482f68f chore: update fix_move_autopipsettingshelper_behind_branding_buildflag.patch
No manual changes; patch applied with fuzz 1
2024-06-07 18:34:46 -05:00
Charles Kerr
3aa11c8a07 chore: update network_service_allow_remote_certificate_verification_logic.patch
manually apply patch due to minor upstream shear

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5598454
2024-06-07 18:30:22 -05:00
electron-roller[bot]
87af949a53 chore: bump chromium in DEPS to 127.0.6526.0 2024-06-07 21:18:47 +00:00
104 changed files with 1423 additions and 1124 deletions

2
.gitattributes vendored
View File

@@ -2,6 +2,8 @@
# files to be checked out with LF endings even if core.autocrlf is true.
*.patch text eol=lf
patches/**/.patches merge=union
# Target file for patch has CRLF line endings
patches/nan/apply_allcan_read_write_test.patch eol=crlf
# Source code and markdown files should always use LF as line ending.
*.c text eol=lf

View File

@@ -34,7 +34,6 @@ import("js2c_toolchain.gni")
if (is_mac) {
import("//build/config/mac/rules.gni")
import("//third_party/icu/config.gni")
import("//ui/gl/features.gni")
import("//v8/gni/v8.gni")
import("build/rules.gni")
@@ -812,37 +811,33 @@ if (is_mac) {
group("electron_framework_libraries") {
}
}
if (use_egl) {
# Add the ANGLE .dylibs in the Libraries directory of the Framework.
bundle_data("electron_angle_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:angle_library_copy" ]
}
# Add the SwiftShader .dylibs in the Libraries directory of the Framework.
bundle_data("electron_swiftshader_binaries") {
sources = [
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ]
}
# Add the ANGLE .dylibs in the Libraries directory of the Framework.
bundle_data("electron_angle_binaries") {
sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:angle_library_copy" ]
}
# Add the SwiftShader .dylibs in the Libraries directory of the Framework.
bundle_data("electron_swiftshader_binaries") {
sources = [
"$root_out_dir/vk_intermediates/libvk_swiftshader.dylib",
"$root_out_dir/vk_intermediates/vk_swiftshader_icd.json",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:swiftshader_vk_library_copy" ]
}
group("electron_angle_library") {
if (use_egl) {
deps = [ ":electron_angle_binaries" ]
}
deps = [ ":electron_angle_binaries" ]
}
group("electron_swiftshader_library") {
if (use_egl) {
deps = [ ":electron_swiftshader_binaries" ]
}
deps = [ ":electron_swiftshader_binaries" ]
}
bundle_data("electron_crashpad_helper") {

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'127.0.6521.0',
'128.0.6555.0',
'node_version':
'v20.14.0',
'nan_version':

View File

@@ -116,6 +116,8 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/constants.h",
"//chrome/browser/ui/views/overlay/hang_up_button.cc",
"//chrome/browser/ui/views/overlay/hang_up_button.h",
"//chrome/browser/ui/views/overlay/minimize_button.cc",
"//chrome/browser/ui/views/overlay/minimize_button.h",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
"//chrome/browser/ui/views/overlay/playback_image_button.cc",

View File

@@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index ec0ee893e58d49890f5545d02b533d07e362309c..b1c1a77c340e7d2c9e2ef21fcf0cc01ed6e15cc0 100644
index 278c7a9b48756b81246be6af66e0cdea0a9a2c9a..2f4ebd2348b05bf4097d27615e3e1ebabbd3dc90 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1340,7 +1340,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -32,7 +32,7 @@ index ec0ee893e58d49890f5545d02b533d07e362309c..b1c1a77c340e7d2c9e2ef21fcf0cc01e
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2707,13 +2707,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2722,13 +2722,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

View File

@@ -129,4 +129,3 @@ feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
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
x11_use_localized_display_label_only_for_browser_process.patch

View File

@@ -10,10 +10,10 @@ 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 bb019363bf40f8f2df7815353784c357254c0132..e994a0e7bbef2f78c642486e84aa0386cab7f794 100644
index 3ef2255d2f9758a7ab497021ad4429aa6960504d..3de73ebf606d40cdd4d88b84d955923a8ebc7a0c 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -264,6 +264,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -256,6 +256,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
@@ -24,7 +24,7 @@ index bb019363bf40f8f2df7815353784c357254c0132..e994a0e7bbef2f78c642486e84aa0386
// 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
@@ -362,7 +366,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -354,7 +358,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

View File

@@ -23,7 +23,7 @@ index 902d84ad70adc9496f3af989465a99b6f44b077a..3ce043eea32c41130aa59ab8570a05b3
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 81f42913489724e621b916f1457d2966849c0f71..f976151c380ad1a9bf75c927ca3ba228d3f5a8f1 100644
index 9601b8a33c5c0b77143462395a30da1d3f515efe..6dfad272ba75c6680d00539b0e45b41de5637793 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4692,6 +4692,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -67,10 +67,10 @@ index 03bf5ef3fc6664421d832ed001a613e37fa90e90..9e44146ddc56ef3627ac73da63830ea8
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 7fe0374717656c4907ff33c2cbd62509173cdb96..f4b5ab6cafa3a80425d6b7c6897052dc092caba1 100644
index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec36d183701 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -216,6 +216,7 @@ void LocalWindowProxy::Initialize() {
@@ -217,6 +217,7 @@ void LocalWindowProxy::Initialize() {
}
InstallConditionalFeatures();
@@ -79,10 +79,10 @@ index 7fe0374717656c4907ff33c2cbd62509173cdb96..f4b5ab6cafa3a80425d6b7c6897052dc
if (World().IsMainWorld()) {
probe::DidCreateMainWorldContext(GetFrame());
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index ce0f4df2259a072f08a2ee5500f40222c480a601..80f158198419c7e61bf044d6b5fdfde1fbb63848 100644
index 52c70685b63026c12ce5d0b064d133a68844b248..4062c6b34581c25d5218c410dfab3178dd96b40a 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -306,6 +306,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -305,6 +305,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index ce0f4df2259a072f08a2ee5500f40222c480a601..80f158198419c7e61bf044d6b5fdfde1
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 c136548b2b64ac9440584f23ce0aaf65a08971bd..325651979715ed39958a9bca1d6779d4b07f8148 100644
index 8e91e683ce267b1d7e603528dac3fbb2cdf39c6d..7ad8af1ee21ebab40cbab6fa6ef1530f9bdb4626 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
@@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index c136548b2b64ac9440584f23ce0aaf65a08971bd..325651979715ed39958a9bca1d6779d4
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 de6a2faab0d261d0e50656b27ce06156fddef3ae..ec4550c7ff2fd600425f4575f1c6a735811a462f 100644
index c01a1f7055a32c11880da78b520ae4747d8824fb..18cf55c052e88584e34cac786637476c3f865bba 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
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index de6a2faab0d261d0e50656b27ce06156fddef3ae..ec4550c7ff2fd600425f4575f1c6a735
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 ec2a8f7d2fc14702686be73e663dfb9632b5b4de..5f3fdd7d03b81c7bf59528af96c550d9f2307835 100644
index b3d016f4602a34298e4694ad314bbfb7807053d4..c3aa86cb772c45fd87b58acc91b9f4f295e9baf7 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -412,6 +412,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -411,6 +411,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index f3a8ba3756a19beb286a3f7bba52399705bf59bf..7cf72db56d3bc71cf6fb2b3f88a80e7866db1598 100755
index 79b1e0f5d43caea6a5fcd03e5c7aa7a9dca7e9fd..341a1800abb18a96380ecfd521b9d94de0bb89d5 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -336,6 +336,31 @@ SPECIAL_CASES = {
@@ -335,6 +335,31 @@ SPECIAL_CASES = {
"License": "Apache 2.0",
"License File": ["//third_party/dawn/third_party/khronos/LICENSE"],
},

View File

@@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index e6b380f1619cfdf346b65ff71bb1576810f3f049..e4a4bcd1b9b26457a2803ca318be64a0e512607c 100644
index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c77cb428b 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -43,6 +43,7 @@

View File

@@ -23,10 +23,10 @@ index 8a921c9310b2540b4b4d7d7383406698993d40d7..348e0de3e5193e6f97a4c83f43476497
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 590024e4883a9397855374108f9b8cd1f90819f5..37cf232b23f5909b42e68735953945c3a518247e 100644
index 56f1f9234bee383ac4e8643e009ced56f2b12bb0..4f52bb9f87c1e3b86ddd0bfd920ac5d8812e11c7 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -730,6 +730,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -732,6 +732,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -51,7 +51,7 @@ index 779e90581cdfb2d1bdd904da038f7537d0477f5a..c85620ac2f30998d1b67f159e50ee722
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index deaa2c34322f764f3ae8e854b98a205ef6a7e834..8974181a9c33d790e8bee5fe38883af59f487a78 100644
index 41ed2610ae5bdfdc9b3f1e47df58140c71bff790..d19f13ba781b24bf9863a0ff5b7d767b9c2ffcc6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -570,8 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -116,10 +116,10 @@ index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be
// 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 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324 100644
index 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06feb98312 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2422,6 +2422,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
@@ -2460,6 +2460,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
"old_state", old_state, "new_state", new_state);
@@ -130,7 +130,7 @@ index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8
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 &&
@@ -3932,10 +3936,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3974,10 +3978,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -155,7 +155,7 @@ index 65c00aae8e04a9f3202ab7d0e664e6047681d38f..5b33d4cebaa04f11c2e9f0cfffb4fbb8
// 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 0a1db1e8faa6b56d54627a51ab49db186a0231b9..b5036e48c48b7e88554d67cc988e2f675d5d66a3 100644
index e36a3b35fd3cbfc9439b15b32cf1bf432b8e1122..b8f0b7830e6d14c40d2371378556000d347e78fb 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -166,7 +166,7 @@ index 0a1db1e8faa6b56d54627a51ab49db186a0231b9..b5036e48c48b7e88554d67cc988e2f67
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -928,6 +929,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -932,6 +933,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 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79
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 a928196b83671b7f9a6fc27f2a8436c89fe3d3e5..ef5ba7b733bfa67158cb631b5b0bb6b28ba8758d 100644
index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b762453429378 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 @@
@@ -43,7 +43,7 @@ index a928196b83671b7f9a6fc27f2a8436c89fe3d3e5..ef5ba7b733bfa67158cb631b5b0bb6b2
#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"
@@ -432,6 +433,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
@@ -433,6 +434,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
// blocking user's access to the background web content.
bool modal_context_menu = true;

View File

@@ -49,10 +49,10 @@ index 55343df3901f295f6570dfbcf74d326b6d0e1c4a..3ba0f8e60848147d61958f97d3ac0a89
// 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 e0f66dc32ee0ed5b68bf7010f2556edbcf781c3b..7385c4b848dd1550cd5c2325745a155393d5e860 100644
index 624babb1432078816302cc235a6b34351d10b05a..61a18e03de738185ea0b905d35667ab610bfc25e 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -718,10 +718,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -736,10 +736,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index e0f66dc32ee0ed5b68bf7010f2556edbcf781c3b..7385c4b848dd1550cd5c2325745a1553
if (!Client())
return false;
@@ -772,6 +768,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -792,6 +788,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index ce54376e4a56053fc8dc33ceeabcbc26f85ae40a..eef187949d45296dad0808f88652590e01bb71ee 100644
index d88de5e36d6013224566bef67118e455765cff46..4650a54199700b199de3d4316be4c444a7ed3bd0 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -192,11 +192,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index ce54376e4a56053fc8dc33ceeabcbc26f85ae40a..eef187949d45296dad0808f88652590e
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 8676580bd02dc424666dc41698c1b1d638bae721..a812e9787894e2f9d7eac97118406d8d2479de87 100644
index 40ba7a2c7584b5a08358fc21f3fd53e829b9430c..ce5a1d20c9a12e616ea579dc23dbe8bddb0c772f 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4904,7 +4904,7 @@ static_library("browser") {
@@ -4860,7 +4860,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 8676580bd02dc424666dc41698c1b1d638bae721..a812e9787894e2f9d7eac97118406d8d
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index ee5eb6b794dfd944fcf94c55706a809c9f62d583..3e703e7f9ed8e286d55b54d8dd970d320a873f30 100644
index 88c61c3a4e2aabe85bab2043916549a6debd0159..ed12f9d1649a7518ff7b5db63dad775d95a2f410 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7395,9 +7395,12 @@ test("unit_tests") {
@@ -7376,9 +7376,12 @@ test("unit_tests") {
"//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
]
@@ -63,7 +63,7 @@ index ee5eb6b794dfd944fcf94c55706a809c9f62d583..3e703e7f9ed8e286d55b54d8dd970d32
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8395,6 +8398,10 @@ test("unit_tests") {
@@ -8387,6 +8390,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,9 +74,9 @@ index ee5eb6b794dfd944fcf94c55706a809c9f62d583..3e703e7f9ed8e286d55b54d8dd970d32
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8472,7 +8479,6 @@ test("unit_tests") {
}
@@ -8467,7 +8474,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
- "//chrome:packed_resources_integrity_header",
"//chrome/browser/apps:icon_standardizer",

View File

@@ -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 d3249c5c3056c77036d39b9d9604ee2984f5b51a..40dca160004a6e819374b2990f8ac0bb34e91e6a 100644
index 6bb31f334ab590fe5de47214785270a1ff05f885..780e5a3d43ac06d2543fde0024f3df8a94a1146c 100644
--- a/buildtools/third_party/libc++/__config_site
+++ b/buildtools/third_party/libc++/__config_site
@@ -13,7 +13,9 @@

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 6a04a0ca7ce3a250eb94a9e3f3c9371f8fad24ce..048321f3142ad1c6252a1d72735d3ee5dd1a1591 100644
index f8cb8938e99bc8e5f3a937fc33045747b0718189..018f04380c2d04bfaaac138c2b059bda575036c8 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8543,6 +8543,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -8557,6 +8557,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 6a04a0ca7ce3a250eb94a9e3f3c9371f8fad24ce..048321f3142ad1c6252a1d72735d3ee5
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f43ec47a8c6504a2f1911bce5259a292b6e1aded..50a6d0835c70795a3c7865c305b9389936939ee9 100644
index 3a6322f9ff87c287319d551b11cb7d2515d9f324..be7ff72576a6bb59f7a302d2034460f3ff002a69 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4713,6 +4713,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4761,6 +4761,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
auto* new_contents_impl = new_contents.get();
@@ -37,7 +37,7 @@ index f43ec47a8c6504a2f1911bce5259a292b6e1aded..50a6d0835c70795a3c7865c305b93899
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -4754,12 +4760,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4802,12 +4808,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@@ -66,10 +66,10 @@ index 6df9186bcee6a56da11da8e365c7cf5b4375e366..0fdda1a6e0ac98a8c8619b4d4fab5977
// 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 ac5528906494016a03df8c4b00703a1f67e87846..0c10b2095b1ce9261f700f9dc65904d48124597d 100644
index 2668ab84237c37b7df1e2b19ceda0ed012c0c072..8a7bdd7ff737795411368ce41e94bba8eb53bd0a 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -735,6 +735,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -741,6 +741,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -79,10 +79,10 @@ index ac5528906494016a03df8c4b00703a1f67e87846..0c10b2095b1ce9261f700f9dc65904d4
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 691bb7e0bd534f54e8d204094c7cd94c345f9f66..81f617f0a8e6f6d930343ea49ecd9292f694c10e 100644
index e5c261c9d1eaa5550609ac28a6fcfebebf0ee091..223265d74f6c5056e5e6af6adcb115cf406f0c5f 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -187,6 +187,7 @@ class NetworkService;
@@ -188,6 +188,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -90,7 +90,7 @@ index 691bb7e0bd534f54e8d204094c7cd94c345f9f66..81f617f0a8e6f6d930343ea49ecd9292
} // namespace network
namespace sandbox {
@@ -1240,6 +1241,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1255,6 +1256,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -148,10 +148,10 @@ index fd851a9347dd6920e035bc9183991ea2a275aff4..579a796fcfdecf44ab415ceebc30b427
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a8d9b10d1cfc44fd7b3c76b813be6c41b9a1b827..81f42913489724e621b916f1457d2966849c0f71 100644
index 929f2e14399b92f5190d23fa48158efeae63d95d..9601b8a33c5c0b77143462395a30da1d3f515efe 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6688,6 +6688,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6668,6 +6668,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@@ -189,7 +189,7 @@ index 53949c3510d0755e608847e174de63f46c8c2363..f6644476d8714fd02480830ebb0f0571
bool opener_suppressed,
bool* no_javascript_access) override;
diff --git a/third_party/blink/public/web/web_window_features.h b/third_party/blink/public/web/web_window_features.h
index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc06301c04 100644
index c79c07788b16c394ed413a6a739b7dcdd4697496..1b25625d84fe6b2c64de106b4e86e9acc09a0c36 100644
--- a/third_party/blink/public/web/web_window_features.h
+++ b/third_party/blink/public/web/web_window_features.h
@@ -35,6 +35,7 @@
@@ -200,7 +200,7 @@ index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc
namespace blink {
@@ -74,6 +75,8 @@ struct WebWindowFeatures {
@@ -69,6 +70,8 @@ struct WebWindowFeatures {
// TODO(apaseltiner): Investigate moving this field to a non-public struct
// since it is only needed within //third_party/blink.
std::optional<WebVector<WebString>> attribution_srcs;
@@ -210,7 +210,7 @@ index 78956238f8d959580e928d2590866b2f4da3d218..806b3337ec8a8ad7c89681857b4e81dc
} // 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 679a9f2aeeebb2b238f6fabaebb40c67c60c09b9..7dee70f410e1c137b2953c112d15ad584d3c554e 100644
index 451c228ec18f25eba303e5b06de6faa0c0800bc0..1041564538f1a6e65494bdc37f51b18021fa62b5 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2251,6 +2251,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,

View File

@@ -18,7 +18,7 @@ index 50992a3f4502d46a1bc2713c25bec6095c541ffa..121a09d7fa00162fe64ce901cae96d8f
/googleurl
/gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 4f4e8f03bb876e5745ea6bcf07c2f8ba8b12bffb..de05f778dfc2ee1dabb70242b9a6201b7eea90e3 100644
index 9a642e94c58fa85a2122095c3bc8191eb16826ec..27cf90e1ddb16680be9b90e1be62efec98dc17b2 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -51,7 +51,9 @@
@@ -31,15 +31,15 @@ index 4f4e8f03bb876e5745ea6bcf07c2f8ba8b12bffb..de05f778dfc2ee1dabb70242b9a6201b
/espresso/lib/
/eyesfree/src
/fuchsia-sdk/images
@@ -106,6 +108,7 @@
/mocha
@@ -107,6 +109,7 @@
/mockito/src
/nacl_sdk_binaries/
/ninja
+/nan
/ninja/ninja*
/node/*.tar.gz
/node/linux/
@@ -155,6 +158,7 @@
/node/mac/
@@ -156,6 +159,7 @@
/spirv-headers/src
/spirv-tools/src
/sqlite4java/lib/

View File

@@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
actions in the non-client caption area.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index baa087ba8f78f79a47e71bf7c85c830b040592a7..f9a351307179ee19a56d07730d8245cb58ecce42 100644
index 8199517bf3590abbb79484038492e83bfca2f541..e8648c9614c97b3df4f1d0846e949b5ea5c3de50 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1224,6 +1224,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
@@ -22,10 +22,10 @@ index baa087ba8f78f79a47e71bf7c85c830b040592a7..f9a351307179ee19a56d07730d8245cb
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
return new DesktopNativeCursorManagerWin();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 8d5b01098915dd8e27ed047fa3a250169157a382..797670a6d0a34f25ee5d6f266bb2a1f547970e1f 100644
index 8169f1798225351dc45ee588be5b946240d299ea..b0f89462f6aefc6f1bfd327ae28e27e0ba186f24 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -261,6 +261,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -263,6 +263,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void HandleWindowSizeUnchanged() override;
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;

View File

@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index fca9f03283c9b11e63d585411eb1620a20174bf6..96a4280e94988857545cd4e2bb0752077cb0132f 100644
index 1bc39182f84c77f4b2652f1c7f3208ab09fdbad0..fd533986c227e25d102f3025db8a06a7d51c66f4 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -136,6 +136,7 @@ class KeyStorageLinux;
@@ -18,7 +18,7 @@ index fca9f03283c9b11e63d585411eb1620a20174bf6..96a4280e94988857545cd4e2bb075207
class Profile;
class ProfileImpl;
class ScopedAllowBlockingForProfile;
@@ -285,6 +286,9 @@ class BackendImpl;
@@ -286,6 +287,9 @@ class BackendImpl;
class InFlightIO;
bool CleanupDirectorySync(const base::FilePath&);
} // namespace disk_cache
@@ -28,7 +28,7 @@ index fca9f03283c9b11e63d585411eb1620a20174bf6..96a4280e94988857545cd4e2bb075207
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -592,6 +596,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
@@ -593,6 +597,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index fca9f03283c9b11e63d585411eb1620a20174bf6..96a4280e94988857545cd4e2bb075207
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
friend class ::StartupTabProviderImpl;
@@ -632,6 +637,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
@@ -633,6 +638,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class crosapi::LacrosThreadTypeDelegate;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;

View File

@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index f5616892f0444a691c67693fe2ddbe62f2680ba7..8b14b78936cccf6f40a467ac69e95261fec734b6 100644
index 3954983758f6a3c734d4547f55db38cc48066955..ddc22dfce29c8fddcc984de60adcba104f90280e 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -211,7 +211,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

View File

@@ -80,10 +80,10 @@ index 28cd699814f32a7a569d63936b9544567a66d9c4..fd461fa448d983481dc4c0c7d03b1945
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index e345a4350fa8a059eaf5b30c46b801cd3ddc33aa..5eb85031c43762e2cc54429254d2c81222fa3198 100644
index 52152047604632037159a5136bcc9ba98ab71a70..39eb85390dbd3e7ad8c8a0cdeb760e1325652d44 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1983,12 +1983,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2066,12 +2066,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -99,10 +99,10 @@ index e345a4350fa8a059eaf5b30c46b801cd3ddc33aa..5eb85031c43762e2cc54429254d2c812
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index e1b064c185ca5c4b125b583504e5d3a34ff9462f..29dd562a64494ba702b955802850917de05e483a 100644
index d5e1b7bd61208647c122646a5e8ccd5548fc21e1..c4b4638819de81d8d187db4b324872d79cb9a5b1 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -964,8 +964,7 @@ class Browser : public TabStripModelObserver,
@@ -976,8 +976,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -141,7 +141,7 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index e4c31867e264c4f9aa2a451a934eda705826a1a3..f6325a210aec33aa63257bdf3bc542d845f3708e 100644
index 1b29ac2afdbbc10ea59649b741e17583abf10536..cef3d60636e39cab514c45a085cc3a1d6587729a 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -75,8 +75,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -218,10 +218,10 @@ index c5b0d3b23b8da318ae55fcac2515a1187f261469..16ed1f46c9afde0ff25750128b4fcff6
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 92f2823839cdfd6139a7f13684d2649b7e230964..0a548b96a53454313fe0175a2fa3da7e7b92346f 100644
index b8c0929a305a0c78ff0cc3c447019ca11905241a..69e6473166679bce52389be060dafc19096946c7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4619,8 +4619,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4667,8 +4667,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -316,7 +316,7 @@ index f0b71aba6dfb4682ce2e5b4c834b2526dcacb75c..d4b1857ca468ff97914d91d0c31298b7
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
index 41e911c5e383eb85b461a14b3c0543922f6f25ad..32bd05155142aec16279d5ce2e0941583ea526c8 100644
index 4d829cd24ec34d075c62b622e5e8fa836b7ae5f4..ab282d281e24ca9635c8f7d2753089d5b19649f9 100644
--- a/fuchsia_web/webengine/browser/frame_impl.cc
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
@@ -574,8 +574,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -344,10 +344,10 @@ index ab81b9e60cd6334b8342a83bbffc588d256b54c7..eca73c0305617e98cc10568de036c7e7
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 838b3b23a4e4486f9c2d1dd2daba56f72dd2d836..421dd09166f72172668bbf3ddb883a74ed44cb66 100644
index c5955452821025aec09870caeaaa87a4df2abe4b..25af1df9e8fcacd42cb153543c4654c3678083b4 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -190,8 +190,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -195,8 +195,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

View File

@@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index a9b2453b377ec6bc7ed856991ad29d9f38d382d3..f7ef6faa8c66d17a9e7ce268cdfe6fb700fe4d05 100644
index ba2ec653757232519c442e9fa5f88441470c61a0..432e139370208f93e2af655dd2d5491ba4d15904 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -40,6 +40,7 @@
@@ -45,6 +45,7 @@
#include "base/process/memory.h"
#include "base/process/process.h"
#include "base/process/process_handle.h"
@@ -18,9 +18,9 @@ index a9b2453b377ec6bc7ed856991ad29d9f38d382d3..f7ef6faa8c66d17a9e7ce268cdfe6fb7
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
@@ -262,8 +263,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
#endif
@@ -281,8 +282,13 @@ void AsanProcessInfoCB(const char*, bool*) {
}
#endif // defined(ADDRESS_SANITIZER)
-void LoadV8SnapshotFile(const base::CommandLine& command_line) {
+void LoadV8SnapshotFile(const raw_ptr<ContentMainDelegate> delegate, const base::CommandLine& command_line) {
@@ -33,7 +33,7 @@ index a9b2453b377ec6bc7ed856991ad29d9f38d382d3..f7ef6faa8c66d17a9e7ce268cdfe6fb7
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -292,11 +298,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
@@ -311,11 +317,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
#endif // V8_USE_EXTERNAL_STARTUP_DATA
@@ -48,7 +48,7 @@ index a9b2453b377ec6bc7ed856991ad29d9f38d382d3..f7ef6faa8c66d17a9e7ce268cdfe6fb7
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -972,7 +979,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -991,7 +998,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@@ -102,10 +102,10 @@ index f482ce44b4339e0cf2a57a6a4f9db4d1be5fa178..d6fd25ccd747a7a0620f103cb0f101d3
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 1202c8e3e86d18212609a63ac94aa41c9318f5ee..c72515482c339758537ce068a8493901f35246aa 100644
index 1f4ade4905be30789451a117a788782e59f3d4c4..0032741eb6c47323a8beaf8a33f98c95dbc22f8e 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -585,8 +585,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -592,8 +592,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@@ -115,7 +115,7 @@ index 1202c8e3e86d18212609a63ac94aa41c9318f5ee..c72515482c339758537ce068a8493901
if (g_mapped_snapshot) {
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
// files in a process.
@@ -595,10 +594,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -602,10 +601,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e89050c7b8d31 100644
index 08bcee90d1c2332361bfa52502632d3dfb598400..71ccf45f9b94bdf9fdf1734cd3e8f349c762ee6c 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -2006,6 +2006,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -2008,6 +2008,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e8905
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -2025,9 +2045,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -2027,9 +2047,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index d05bf1f172378351b15f1dd5412a2e3eac2373ac..544b53a99990385d6bc45368843e8905
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -2035,9 +2053,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -2037,9 +2055,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View File

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

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 14df0bd5469f099b328639d0849c21c1403bb5ce..3452aa6a281f2a97c2708d66fd4aa7e2bce1e1f9 100644
index fb013badaeaf5eac23b1468301476228f6dc1782..6c0fe34bb30f68d43e1e111d1f4bf24e7a3281e5 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -775,6 +775,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -777,6 +777,9 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@@ -20,20 +20,21 @@ index 14df0bd5469f099b328639d0849c21c1403bb5ce..3452aa6a281f2a97c2708d66fd4aa7e2
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 1d9eab0ed2ef26754f7bc07cdefed76a81b15d9b..ed2c41fdd25210398ebb948e7d83bad44a4bcb76 100644
index 8e0d92a74d31758bb813b26ab906e80b5026a9ba..3365a20260fc6c489688a8647b0eea8649d06ddf 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -923,6 +923,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
cc::BrowserControlsState current,
bool animate);
@@ -996,6 +996,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Requests a commit and forced redraw in the renderer compositor.
void ForceRedrawForTesting();
+ // Electron: Prevents the widget from getting hidden.
+ bool disable_hidden_ = false;
void StartDragging(blink::mojom::DragDataPtr drag_data,
const url::Origin& source_origin,
+
protected:
// |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 1d00ea327805ddb5a5df506125d1e4fa19229a1a..deaa2c34322f764f3ae8e854b98a205ef6a7e834 100644
index eb65b0b002dfd2ba820e7823ad7338cfa2f40c4c..41ed2610ae5bdfdc9b3f1e47df58140c71bff790 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -634,7 +634,7 @@ void RenderWidgetHostViewAura::HideImpl() {

View File

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 5c1702ff0ffc3cc0f6f68d7ba3a13e5a0fd62d78..0a71f7770651377d8db21561581471ce27118644 100644
index 38de77460b8cfad57b010d5655787819ba320d14..a8bff1c1a41d3be17d9bca041514415aaca431d6 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1329,6 +1329,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1325,6 +1325,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index 5c1702ff0ffc3cc0f6f68d7ba3a13e5a0fd62d78..0a71f7770651377d8db21561581471ce
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1378,6 +1379,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1374,6 +1375,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View File

@@ -32,7 +32,7 @@ index aa5edd1d07d97bee4912b14996ff804351240e94..8334b7eb6a3293c068f5234508f8dca7
} // namespace storage
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
index 332be0811d86c7a265f440ab7719460160a22617..e3382d843599ef6017e0ac557919b3a41809f17d 100644
index 5902d8217c1b98d182f68f4199be4830c6177e68..2517c37be979cfe25ec8592cdbf8e53bab100c42 100644
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom
+++ b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
@@ -50,7 +50,8 @@ struct KeyValue {

View File

@@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 288a76d86ed878ee7a5edc0579ffe139700a3639..baa087ba8f78f79a47e71bf7c85c830b040592a7 100644
index e24cb885f357c24a811b8f2a91530274314aaeea..8199517bf3590abbb79484038492e83bfca2f541 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -581,7 +581,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {

View File

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 50650759734c7ef4d683d61560caba01da6aa113..4c766a23c03350b7056c27070b79beacb07e94d4 100644
index b068b0de6c5676f36a8e8532d4fd59f6815f4dd1..84840e53019ebe511b0c0b4176eeea2863ac624f 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1671,6 +1671,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1682,6 +1682,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,10 +51,10 @@ index 50650759734c7ef4d683d61560caba01da6aa113..4c766a23c03350b7056c27070b79beac
// 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 004354b6a74023adebc041c2f40d8989eb9f0a05..106567ae61d404ee20d552bd51caeea1f830aba7 100644
index ec0e4a355e96394abe086325a6fdb37fcd3d1446..522f021835654e48146db4cf6ad0d862d9140056 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -319,6 +319,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 004354b6a74023adebc041c2f40d8989eb9f0a05..106567ae61d404ee20d552bd51caeea1
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 6b868b5744f0250d2a566051d26d746a19a26177..3b58a45343e07a013a5d9ae759696502453c68c6 100644
index 19f568b78c621ecbec64b8eb46c8c92d7af650f7..8abdfc8c32c7f3c05bd8436c4d4349af53852eaf 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1266,6 +1266,9 @@ interface NetworkContext {
@@ -1265,6 +1265,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,7 +77,7 @@ index 6b868b5744f0250d2a566051d26d746a19a26177..3b58a45343e07a013a5d9ae759696502
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index db21e3f02b3e0fecf4c2c494afe4d806170be3f1..d0175513938d3307662e95e20bc1f703aeaaa2cb 100644
index eb78d84ad3d6124313cf7b940425b0162d554fd6..80bfebc12978d976e239f6c81f1fff3aef5614c7 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -147,6 +147,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -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 5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324..6ba638d19b24013d9b92965f234902d019525143 100644
index e2f3e1171327eafb62d824c1241b0a06feb98312..f1e4c0eb81b0f23b3151e7426309315a9c2b0f26 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 5b33d4cebaa04f11c2e9f0cfffb4fbb8fd40e324..6ba638d19b24013d9b92965f234902d0
#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"
@@ -1810,6 +1811,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1839,6 +1840,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

@@ -9,10 +9,10 @@ embedders to make custom schemes allow V8 code cache.
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
index a9e025b1d611c3becb983a77d20fc03da2418293..d04e399638116fef5f2b15b6510157d3a878723a 100644
index 7982c87feb19cf80aa05025996b50b1d9be5f54c..8434fdab9d0e66f54381ed96142b138a5149c9ce 100644
--- a/content/browser/code_cache/generated_code_cache.cc
+++ b/content/browser/code_cache/generated_code_cache.cc
@@ -7,6 +7,7 @@
@@ -12,6 +12,7 @@
#include <iostream>
#include <string_view>
@@ -20,7 +20,7 @@ index a9e025b1d611c3becb983a77d20fc03da2418293..d04e399638116fef5f2b15b6510157d3
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
@@ -27,6 +28,7 @@
@@ -32,6 +33,7 @@
#include "net/http/http_cache.h"
#include "third_party/blink/public/common/scheme_registry.h"
#include "url/gurl.h"
@@ -28,7 +28,7 @@ index a9e025b1d611c3becb983a77d20fc03da2418293..d04e399638116fef5f2b15b6510157d3
using storage::BigIOBuffer;
@@ -39,7 +41,7 @@ constexpr char kSeparator[] = " \n";
@@ -44,7 +46,7 @@ constexpr char kSeparator[] = " \n";
// We always expect to receive valid URLs that can be used as keys to the code
// cache. The relevant checks (for ex: resource_url is valid, origin_lock is
@@ -37,7 +37,7 @@ index a9e025b1d611c3becb983a77d20fc03da2418293..d04e399638116fef5f2b15b6510157d3
//
// This function doesn't enforce anything in the production code. It is here
// to make the assumptions explicit and to catch any errors when DCHECKs are
@@ -49,33 +51,55 @@ void CheckValidKeys(const GURL& resource_url,
@@ -54,33 +56,55 @@ void CheckValidKeys(const GURL& resource_url,
GeneratedCodeCache::CodeCacheType cache_type) {
// If the resource url is invalid don't cache the code.
DCHECK(resource_url.is_valid());
@@ -407,10 +407,10 @@ index 9dc2d5a33858da7c31fd87bbbabe3899301fa52d..ebf0bb23b9aedb7bf9eb8af52b4756db
std::vector<std::string> extension_schemes;
// Registers a URL scheme with a predefined default custom handler.
diff --git a/url/url_util.cc b/url/url_util.cc
index 301824a7f83e9e7057279723eccd6c9c9ad44618..25e7e087e2ddf0e8fab1cd6f20a56790f7e406b2 100644
index da35159332452f49f9e249804a6d7bd23379aba3..1f33d868bc368076ac1bda1e23fc595fd78f1e8a 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -133,6 +133,9 @@ struct SchemeRegistry {
@@ -130,6 +130,9 @@ struct SchemeRegistry {
kMaterializedViewScheme,
};
@@ -420,7 +420,7 @@ index 301824a7f83e9e7057279723eccd6c9c9ad44618..25e7e087e2ddf0e8fab1cd6f20a56790
// Schemes with a predefined default custom handler.
std::vector<SchemeWithHandler> predefined_handler_schemes;
@@ -714,6 +717,15 @@ const std::vector<std::string>& GetEmptyDocumentSchemes() {
@@ -711,6 +714,15 @@ const std::vector<std::string>& GetEmptyDocumentSchemes() {
return GetSchemeRegistry().empty_document_schemes;
}

View File

@@ -18,7 +18,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
parent process to read from the pipe.
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976f4ce64ea 100644
index e3bc6f02cffcdbc0954173e4033a43437e3d5c37..7a7d8931759479021c14b9e014622a742bdbbe21 100644
--- a/content/browser/child_process_launcher.h
+++ b/content/browser/child_process_launcher.h
@@ -32,6 +32,7 @@
@@ -29,7 +29,7 @@ index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976
#endif
#if BUILDFLAG(IS_POSIX)
@@ -165,7 +166,10 @@ struct ChildProcessLauncherFileData {
@@ -169,7 +170,10 @@ struct ChildProcessLauncherFileData {
delete;
~ChildProcessLauncherFileData();
@@ -41,7 +41,7 @@ index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976
// Files opened by the browser and passed as corresponding file descriptors
// in the child process. If a FilePath is provided, the file will be opened
// and the descriptor cached for future process launches. If a ScopedFD is
@@ -180,6 +184,15 @@ struct ChildProcessLauncherFileData {
@@ -184,6 +188,15 @@ struct ChildProcessLauncherFileData {
std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>>
files_to_preload;
#endif
@@ -324,7 +324,7 @@ index 9791ae2f761043b9eecd9064a6fd39a6e2339af4..1083f1683a05825f51f5b2d71f8107d9
// launch failed.
enum class LaunchState {
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc
index bb7667de8bb189d5daccf0ae824bffbb092f1c22..2e5beb5ac9dac293ca3d2824972d26d8fcd9fe06 100644
index 5aec5f3dc619373d8faa44b23c7482bbd19d3f96..826c5d3e7022208d87fc77e8735907aa5884d994 100644
--- a/content/browser/utility_sandbox_delegate.cc
+++ b/content/browser/utility_sandbox_delegate.cc
@@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate::
@@ -347,7 +347,7 @@ index bb7667de8bb189d5daccf0ae824bffbb092f1c22..2e5beb5ac9dac293ca3d2824972d26d8
#if DCHECK_IS_ON()
bool supported_sandbox_type =
sandbox_type_ == sandbox::mojom::Sandbox::kNoSandbox ||
@@ -97,11 +99,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
@@ -98,11 +100,17 @@ UtilitySandboxedProcessLauncherDelegate::GetSandboxType() {
return sandbox_type_;
}
@@ -415,7 +415,7 @@ index c1e56dc93b80594ffb55e11291e7bd152f029d61..928f3f693eed4252d9d34a64dd392af7
} // namespace content
diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc
index 498f60227d13eb2e476413f88eaa58cc0babf461..619639ad5d22a1121b0e0d5f2c9e3c10394cdbd7 100644
index b96d6a879e8b6664559bac69f726321fdb02b40f..bfeec6ddb98d4127c1dcfe5999894f1cdebdc087 100644
--- a/content/common/sandbox_init_win.cc
+++ b/content/common/sandbox_init_win.cc
@@ -23,7 +23,7 @@ namespace content {
@@ -431,8 +431,8 @@ index 498f60227d13eb2e476413f88eaa58cc0babf461..619639ad5d22a1121b0e0d5f2c9e3c10
}
return sandbox::policy::SandboxWin::StartSandboxedProcess(
- full_command_line, type_str, handles_to_inherit, delegate, process);
+ full_command_line, type_str, options, delegate, process);
- full_command_line, handles_to_inherit, delegate, process);
+ full_command_line, options, delegate, process);
}
} // namespace content
@@ -628,10 +628,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
#if BUILDFLAG(IS_MAC)
// Whether or not to disclaim TCC responsibility for the process, defaults to
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52bf39e0eb4 100644
index 24f4b08835b3fb8a447e569bcd0952b600759011..9e1d58f8621cedc886990935fd73539e666caf13 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -765,11 +765,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@@ -693,11 +693,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
// command line flag.
ResultCode LaunchWithoutSandbox(
const base::CommandLine& cmd_line,
@@ -644,16 +644,16 @@ index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52b
// Network process runs in a job even when unsandboxed. This is to ensure it
// does not outlive the browser, which could happen if there is a lot of I/O
// on process shutdown, in which case TerminateProcess can fail. See
@@ -1000,7 +998,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
@@ -927,7 +925,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
// static
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
- const base::HandlesToInheritVector& handles_to_inherit,
+ const base::LaunchOptions* options,
SandboxDelegate* delegate,
TargetPolicy* policy) {
const base::CommandLine& launcher_process_command_line =
@@ -1014,7 +1012,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -941,7 +939,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
}
// Add any handles to be inherited to the policy.
@@ -662,7 +662,7 @@ index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52b
policy->AddHandleToShare(handle);
if (!policy->GetConfig()->IsConfigured()) {
@@ -1029,6 +1027,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -956,6 +954,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@@ -676,16 +676,16 @@ index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52b
#endif
if (!delegate->PreSpawnTarget(policy))
@@ -1041,7 +1046,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -967,7 +972,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// static
ResultCode SandboxWin::StartSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
- const base::HandlesToInheritVector& handles_to_inherit,
+ const base::LaunchOptions* options,
SandboxDelegate* delegate,
base::Process* process) {
SandboxLaunchTimer timer;
@@ -1049,7 +1054,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -975,7 +980,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
// Avoid making a policy if we won't use it.
if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
*base::CommandLine::ForCurrentProcess())) {
@@ -694,32 +694,32 @@ index 3354330593ebcd1a9cb2f444977b37e9f79b9d90..0b38d2e5b70a0c5bb09fd003f340a52b
process);
}
@@ -1057,7 +1062,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -983,7 +988,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
timer.OnPolicyCreated();
ResultCode result = GeneratePolicyForSandboxedProcess(
- cmd_line, process_type, handles_to_inherit, delegate, policy.get());
+ cmd_line, process_type, options, delegate, policy.get());
- cmd_line, handles_to_inherit, delegate, policy.get());
+ cmd_line, options, delegate, policy.get());
if (SBOX_ALL_OK != result)
return result;
timer.OnPolicyGenerated();
diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h
index 54d808db3a0a2aff198e132fae02c8649a0b547e..e1f5321298e634a310afc10773b93fedbad22431 100644
index 271e80f52b15484ecc8b31b12b012eac39b3d333..cd3d803f52972c4ae8af6a0411b5be0e0a5bc782 100644
--- a/sandbox/policy/win/sandbox_win.h
+++ b/sandbox/policy/win/sandbox_win.h
@@ -53,7 +53,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
@@ -52,7 +52,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
// Otherwise, returns one of sandbox::ResultCode for any other error.
static ResultCode StartSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
- const base::HandlesToInheritVector& handles_to_inherit,
+ const base::LaunchOptions* options,
SandboxDelegate* delegate,
base::Process* process);
@@ -67,7 +67,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
@@ -65,7 +65,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin {
// of sandbox::ResultCode for any other error while constructing the policy.
static ResultCode GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
const std::string& process_type,
- const base::HandlesToInheritVector& handles_to_inherit,
+ const base::LaunchOptions* options,
SandboxDelegate* delegate,

View File

@@ -562,10 +562,10 @@ 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 20c29b96d4a1f14e0b7bc5ad51441fc371f16865..1f1f35f0a3a4e9dbeb1d594473e684ee4de539d1 100644
index 2ea7347d2abe0a4ac9c1e57ea5249660ca2203fc..d71e6349fa887ddaf2d03438e72b4d696d9bf9c5 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -385,8 +385,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -390,8 +390,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();

View File

@@ -28,10 +28,10 @@ index f9d3219990dcf4f4a829567d567072df59a70ada..ca8281faaff601bf591cf5a2b185e4ba
// Returns the http referrer of original request which initited this load.
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index be15dfe1288297782931c71567735328c6430209..3e78f23f30a7bd65cb53eedadf625baff1e66214 100644
index 675ce162a8b85d9ad9a2fe82c1ebee40ce3c9abb..860d14e16af06446889ba2a8c864cf35123e18af 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -313,7 +313,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
@@ -314,7 +314,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
std::optional<scheduler::TaskAttributionId>
soft_navigation_heuristics_task_id);

View File

@@ -90,7 +90,7 @@ index 1d510b64f480ba516009cb1d995fbe9ca29ec164..d6d17abbb058c2e4109ab98a3db1bdf7
// a cookie. If this is set to non-null, the observer passed to
// URLLoaderFactory will be ignored.
diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom
index 64ec7b5a4bfb08a2bbd75ce03a602b36e6b0f278..f726e1ccf33dee59a131f881fa000f506a772e65 100644
index e1d4360ac8d0ee6dacdd36ed5a98e2c954bff31d..9e763a3af2088c8507922932288e5e4c0c050f9d 100644
--- a/services/network/public/mojom/url_response_head.mojom
+++ b/services/network/public/mojom/url_response_head.mojom
@@ -13,6 +13,7 @@ import "services/network/public/mojom/attribution.mojom";
@@ -112,7 +112,7 @@ index 64ec7b5a4bfb08a2bbd75ce03a602b36e6b0f278..f726e1ccf33dee59a131f881fa000f50
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index f5ee349b77610206ef71886555e46cbc22f699d3..9e63ff05c06e44815978289a9767965b8b6ced62 100644
index 48d72aa1908e951c07370146a6a96a3a92629835..2413d871aa6c8e775cd829b4b8d54d9977ce0a21 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -707,6 +707,7 @@ URLLoader::URLLoader(
@@ -132,7 +132,7 @@ index f5ee349b77610206ef71886555e46cbc22f699d3..9e63ff05c06e44815978289a9767965b
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1694,6 +1695,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1700,6 +1701,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();

View File

@@ -7,13 +7,13 @@ Subject: feat: filter out non-shareable windows in the current application in
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index 2d05b1c438266f8e7bd6b39cf87fc297849f4b42..85f88adcf55b2d996976218d18dc94123cbb1214 100644
index 152b90019ed030b3ae10f3cc554311ade229a637..5c09b98b0c0ade9197a73186809ae4da28a12506 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -171,8 +171,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
case DesktopMediaID::TYPE_SCREEN:
for (SCDisplay* display in content.displays) {
if (source_.id == display.displayID) {
@@ -182,8 +182,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
// fallback. See https://crbug.com/325530044.
if (source_.id == display.displayID ||
source_.id == webrtc::kFullDesktopScreenId) {
+ NSArray<NSWindow*>* exclude_ns_windows = [[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) {
+ return [win sharingType] == NSWindowSharingNone;
+ }]];

View File

@@ -16,10 +16,10 @@ 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 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a3ac6a930 100644
index 5136dd14692d31fc0b12adf0e026c99168db4da5..3e32e68cb017c11bba84278681fac7902f378527 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -20,12 +20,16 @@
@@ -21,12 +21,16 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
@@ -36,7 +36,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
#include "chrome/common/chrome_switches.h"
#include "components/history/core/browser/history_service.h"
#include "components/history/core/browser/history_types.h"
@@ -253,10 +257,12 @@ void FullscreenController::EnterFullscreenModeForTab(
@@ -254,10 +258,12 @@ void FullscreenController::EnterFullscreenModeForTab(
return;
}
@@ -49,7 +49,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
// value of |IsWindowFullscreenForTabOrPending|.
@@ -368,12 +374,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
@@ -369,12 +375,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
void FullscreenController::FullscreenTabOpeningPopup(
content::WebContents* opener,
content::WebContents* popup) {
@@ -64,7 +64,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
}
void FullscreenController::OnTabDeactivated(
@@ -459,10 +467,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
@@ -460,10 +468,12 @@ void FullscreenController::FullscreenTransitionCompleted() {
#endif // DCHECK_IS_ON()
tab_fullscreen_target_display_id_ = display::kInvalidDisplayId;
started_fullscreen_transition_ = false;
@@ -77,7 +77,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
}
void FullscreenController::RunOrDeferUntilTransitionIsComplete(
@@ -570,18 +580,17 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -571,18 +581,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.
@@ -101,7 +101,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
if (option == TAB) {
url = GetRequestingOrigin();
tab_fullscreen_ = true;
@@ -614,6 +623,7 @@ void FullscreenController::EnterFullscreenModeInternal(
@@ -615,6 +624,7 @@ void FullscreenController::EnterFullscreenModeInternal(
if (!extension_caused_fullscreen_.is_empty())
url = extension_caused_fullscreen_;
}
@@ -109,7 +109,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
fullscreen_start_time_ = base::TimeTicks::Now();
if (option == BROWSER)
@@ -633,6 +643,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
@@ -634,6 +644,7 @@ void FullscreenController::ExitFullscreenModeInternal() {
if (chrome::IsRunningInAppMode())
return;
@@ -117,7 +117,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
// `fullscreen_start_time_` is null if a fullscreen tab moves to a new window.
if (fullscreen_start_time_ && exclusive_access_tab()) {
ukm::SourceId source_id =
@@ -644,15 +655,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
@@ -645,15 +656,16 @@ void FullscreenController::ExitFullscreenModeInternal() {
.Record(ukm::UkmRecorder::Get());
fullscreen_start_time_.reset();
}
@@ -137,7 +137,7 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
exclusive_access_manager()->context()->ExitFullscreen();
extension_caused_fullscreen_ = GURL();
exclusive_access_manager()->UpdateBubble(base::NullCallback());
@@ -714,8 +726,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
@@ -715,8 +727,12 @@ GURL FullscreenController::GetEmbeddingOrigin() const {
void FullscreenController::RecordMetricsOnFullscreenApiRequested(
content::RenderFrameHost* requesting_frame) {
history::HistoryService* service =
@@ -151,10 +151,10 @@ index 64ba5e52bb81dc0a95c3d46579abfa63725a4c28..a91adbea3d8b0d32cb77bfea551e488a
// Check if the origin has been visited more than a day ago and whether it's
// on an allowlist, then record those bits of information in a metric.
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
index 643d434d3fd420fb04e1ee4ef17c7d8cbab752d7..018ae803de7de01bbe5a4709460ce3906dfe8469 100644
index 97003f03b69c9435ee1f79e42476003b63b8a66d..859b9d21985c14c9e9f95c65edfbd89e13ef16e7 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
@@ -252,10 +252,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
@@ -250,10 +250,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
// Used in testing to set the state to tab fullscreen.
bool is_tab_fullscreen_for_testing_ = false;

View File

@@ -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 9d97c3debed1c679d3c1cf2cec4dc5a26dbfffa9..f30b9ad364adac48904d82afcaa9ff91c9c46ab3 100644
index 48b992034c890cca2b437d4486f57ddcb1236a78..e7820eff2adc3488c4d38c378944dc4d616df08a 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -10466,6 +10466,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
@@ -10539,6 +10539,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
}
}
@@ -40,10 +40,10 @@ index 9d97c3debed1c679d3c1cf2cec4dc5a26dbfffa9..f30b9ad364adac48904d82afcaa9ff91
// 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 dd529bc8c76fe77500110a423132617aa34bd85a..9bd2033a4d7e762973f6cb5c92b8a67d366f3195 100644
index 883dff338d71ec917530f15fbcfe17f2c3a8fe6e..cf45f7358d4f966215ff24ebb6b966dc2663ebc9 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2225,6 +2225,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2232,6 +2232,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@@ -54,7 +54,7 @@ index dd529bc8c76fe77500110a423132617aa34bd85a..9bd2033a4d7e762973f6cb5c92b8a67d
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
@@ -2277,6 +2281,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
@@ -2284,6 +2288,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
debug_info_builder.Append(", url=");
debug_info_builder.Append(owner_document->Url().BaseAsString());
debug_info_builder.Append(")");

View File

@@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index 3272e287117dbf4762b1a607954b5d03cbec73fd..062b7dc05e3b1e0edb8c1ba6dc7eafa24eb22466 100644
index 6168e69b59168c471bf349a4fd3b83b1fdb8b17a..7969930eecd6cc9f165681cd73fc62234b9c38d5 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -1011,7 +1011,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -998,7 +998,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
dataArray = [result.dataToSave];
}
@@ -32,7 +32,7 @@ index 3272e287117dbf4762b1a607954b5d03cbec73fd..062b7dc05e3b1e0edb8c1ba6dc7eafa2
const fileName = this.attachments_[index].name;
chrome.fileSystem.chooseEntry(
{type: 'saveFile', suggestedName: fileName},
@@ -1033,6 +1041,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1020,6 +1028,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if>
});
});
@@ -40,7 +40,7 @@ index 3272e287117dbf4762b1a607954b5d03cbec73fd..062b7dc05e3b1e0edb8c1ba6dc7eafa2
}
/**
@@ -1140,8 +1149,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1127,8 +1136,15 @@ export class PdfViewerElement extends PdfViewerBaseElement {
fileName = fileName + '.pdf';
}
@@ -57,7 +57,7 @@ index 3272e287117dbf4762b1a607954b5d03cbec73fd..062b7dc05e3b1e0edb8c1ba6dc7eafa2
chrome.fileSystem.chooseEntry(
{
type: 'saveFile',
@@ -1166,6 +1182,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1153,6 +1169,7 @@ export class PdfViewerElement extends PdfViewerBaseElement {
// </if>
});
});

View File

@@ -75,11 +75,11 @@ index ceced82cbd23b2dcd7fabf7d63028423f86e05c3..27d0b61a7b67d1c9d7e0699e287b7833
PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 62280109a74b5d606f16503151a98449147cc660..f0f66496085d189fc6240772800c2fb5c42b77b3 100644
index 507a695ba97c6321c4d1aa662bdd0206991e6c69..847447364a2ae158ae764a01f883e69b4907d031 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -345,11 +345,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
input_scope);
@@ -332,11 +332,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
}
#endif // BUILDFLAG(IS_WIN)
+#if 0

View File

@@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 8974181a9c33d790e8bee5fe38883af59f487a78..2db3239303d59677384cfb6eeb5cdd101c7d6d5c 100644
index d19f13ba781b24bf9863a0ff5b7d767b9c2ffcc6..7147e49f1eb9963b9d385e44e4b32871be9b404b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2949,6 +2949,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
@@ -2934,6 +2934,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
}
}
@@ -87,10 +87,10 @@ index 0c7d5b2c1d3e97420913bd643bb2a524a76fc286..653793fa480f035ce11e079b370bf5ed
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f8ca743c5629c8e62a16cad3e2f7f76e17826751..d6460ccac4aaa0643cb724e3b5c04401ed82b20b 100644
index 8b47c0901b2d416ded059d64a133f8af377ce130..c2490a46dcb810c3b293b1da235f933d31931b49 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9085,7 +9085,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -9132,7 +9132,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View File

@@ -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 aa0231253c3f707a2779e773e593dede41f6287e..56e123036df2631ca0a4c5e1a80397ad7db5519e 100644
index 5275c37f27ef61754f67c1b5fbcd4b126602929e..4f7fe9d81a30b08a0a5efc09517381311903eae8 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2150,9 +2150,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
@@ -2051,9 +2051,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

View File

@@ -64,10 +64,10 @@ 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 7385c4b848dd1550cd5c2325745a155393d5e860..50b33b854da3447d4f85f514e755e22170ec8b08 100644
index 61a18e03de738185ea0b905d35667ab610bfc25e..7210bd9641de3dcbd8256c64d304056fdd5f446f 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3060,6 +3060,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3096,6 +3096,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -75,7 +75,7 @@ index 7385c4b848dd1550cd5c2325745a155393d5e860..50b33b854da3447d4f85f514e755e221
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -3093,7 +3094,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3129,7 +3130,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@@ -85,10 +85,10 @@ index 7385c4b848dd1550cd5c2325745a155393d5e860..50b33b854da3447d4f85f514e755e221
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index acdd52f146add6106d23ae1305ed7b610f76920e..85da7b5deb71d5d582378eb3824068d5e63c5b33 100644
index e87408dbb6e627118a00d0b803e400b4c9e56b44..867d94c1572e07ff6af8eab1e3fece9ad77fbaee 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -825,6 +825,7 @@ class CORE_EXPORT LocalFrame final
@@ -830,6 +830,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -97,10 +97,10 @@ index acdd52f146add6106d23ae1305ed7b610f76920e..85da7b5deb71d5d582378eb3824068d5
mojom::blink::WantResultOption,
mojom::blink::PromiseResultOption);
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index 72a5ae6c7ede80fa2f5c088c5f3acf35a7116737..acb1d814098b9526511135d4101d70a57e7b2777 100644
index 58fc9827290bf20eb89b649dbc7d6d9da5f94245..a29b055e18c4d7bde94da07f31341a551f4916fd 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
@@ -955,6 +955,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
@@ -954,6 +954,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
std::move(callback).Run(value ? std::move(*value) : base::Value());
},
std::move(callback)),
@@ -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 ff209df4d0c807e8496786a0ef41dfe2b4409474..c65abdb48068cb737d75ed469f0a33c1f5fa3d02 100644
index 3dbdae2305f24878a26b21f010a1c031736db11c..c30a457bcc040f9995657f45049c496e20e6ebe7 100644
--- a/third_party/blink/renderer/core/frame/web_frame_test.cc
+++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
@@ -288,6 +288,7 @@ void ExecuteScriptsInMainWorld(
@@ -216,10 +216,10 @@ index ff209df4d0c807e8496786a0ef41dfe2b4409474..c65abdb48068cb737d75ed469f0a33c1
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 a143868555f4f1b82b500d8c9e558cbb2a58321e..9f8c65fee192a8d883c2bfa35c5347c0888439f0 100644
index 5381b7b4186972cfd609279511a7c4bd2168ac0d..c625f2f5fe38aad367ce69707290e7dd44f57529 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
@@ -1084,14 +1084,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -1091,14 +1091,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -238,10 +238,10 @@ index a143868555f4f1b82b500d8c9e558cbb2a58321e..9f8c65fee192a8d883c2bfa35c5347c0
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 36138c55768bed91ad67bf3b55029f1aa3957a65..bdf243a7d47dabacdb707172b52502a1f1bbf535 100644
index dc77c55900a20f3b6ac1c5ac3b03e9d1253cb9cf..a1cfeb937988624178eb2db299760dd7d607043c 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
@@ -194,6 +194,7 @@ class CORE_EXPORT WebLocalFrameImpl final
@@ -195,6 +195,7 @@ class CORE_EXPORT WebLocalFrameImpl final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,

View File

@@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 2392b7395336e72a03e08e4312041ec3f0813d3f..ab19507b2133b6164ce656410cfac9d1de4a0c7c 100644
index ef6a903caf5a9bfd092170b74ba1cb1eacb919ee..30274b6772d01fa0d3dee5d93e5f9f52e6efea05 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -578,6 +578,7 @@ void MenuController::Run(Widget* parent,
@@ -32,7 +32,7 @@ index 2392b7395336e72a03e08e4312041ec3f0813d3f..ab19507b2133b6164ce656410cfac9d1
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2278,19 +2287,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2267,19 +2276,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);

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 913987ca6b5e3aeac67ef8bdef405cca2608e9f1..aad201a544c47052039d5fa1bfd19eab8e290f4b 100644
index 4a4495b57d1ed318da95e0739897347fd816b879..9bf277ce26ebab689509f2f33e987963edfffe78 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4354,6 +4354,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4378,6 +4378,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -20,10 +20,10 @@ index 913987ca6b5e3aeac67ef8bdef405cca2608e9f1..aad201a544c47052039d5fa1bfd19eab
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 81f617f0a8e6f6d930343ea49ecd9292f694c10e..031f4a08949ea818774e1664e80c569ee18a756b 100644
index 223265d74f6c5056e5e6af6adcb115cf406f0c5f..92839a6865cbe4e035856c0162b29e5309a61b7e 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -312,6 +312,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -313,6 +313,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

View File

@@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7
// 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 188bb9664a06782936cfeb82a66ded005a9ef653..1202c8e3e86d18212609a63ac94aa41c9318f5ee 100644
index dd0088534a79a5380be8c3d069d8bc2cdc1466fa..1f4ade4905be30789451a117a788782e59f3d4c4 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -473,7 +473,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -480,7 +480,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 188bb9664a06782936cfeb82a66ded005a9ef653..1202c8e3e86d18212609a63ac94aa41c
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -483,7 +484,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@@ -490,7 +491,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
SetFlags(mode, js_command_line_flags);

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 c0cd4f1ea237d593c4fdd0eae65632ff4eb76a54..313f0ee692d4dc82535461348cbeb118a2079ba5 100644
index 753e09ca4d6876f5d4a601c0b98418314f274b9a..b7e40e5223c29b5e783af39e7a765ac73f823314 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1331,6 +1331,11 @@
@@ -1338,6 +1338,11 @@
"includes": [8460],
},

View File

@@ -8,10 +8,10 @@ require a largeish patch to get working, so just redirect it to our
implementation instead.
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
index de3bf9edfd25e6defd3245f283bae1fed9151b06..5931d446f1fecd1f6c3fd05224d43ada1306fdd6 100644
index d672fda980688514e1f31c3f287bc92532cfdad8..ec081f28cd9233e0cbfbe83b7211240482614891 100644
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
@@ -11,8 +11,8 @@
@@ -12,8 +12,8 @@
#include "base/numerics/safe_conversions.h"
#include "base/unguessable_token.h"
#include "base/uuid.h"

View File

@@ -11,7 +11,7 @@ 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 0e4cdd69a21a8227df3dec74e6830896a0bef4bf..7900321c94d5afdb7e67cde8ef58bcad243a78fd 100755
index 35b36c560150d608f28773552f35aeabd2a6f749..bc29b9751db5f962dc75bae5a7b85e261a14bee9 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -304,6 +304,8 @@ def GetDefaultHostOs():

View File

@@ -21,7 +21,7 @@ index 39e18820db0d0c1b57f4375e01d269e53c839e4e..ea4da67a9b7798822d1d5dd90d09597a
properties->supports_global_application_menus = true;
properties->app_modal_dialogs_use_event_blocker = true;
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
index bc3dce09be325a1a1754da3311f15681f74ce88d..b02e0295ecd35844d3e40b03c73955f8a64cdd9c 100644
index 67059788c5facdc604cd635dc90b7621c459eb24..2c307378f066668804a502fd146714be7ca5196c 100644
--- a/ui/ozone/public/ozone_platform.h
+++ b/ui/ozone/public/ozone_platform.h
@@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {

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 089eefd697ae6aede0f18a7bbfc280bcafb1e702..a9b2453b377ec6bc7ed856991ad29d9f38d382d3 100644
index 8618985cc8e20c5d7bf2e7eb4d56fc21856378fd..ba2ec653757232519c442e9fa5f88441470c61a0 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -283,11 +283,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
@@ -302,11 +302,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
const std::string& process_type) {

View File

@@ -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 9c05322b1599410c1b04334315be29cfbb8fc6d7..18cc427e0d3c0b39d78668784c8304ab0bf87658 100644
index b51b58a0fa23daa7b7a15c24934d8787ca9b9bfb..846c4451161da289119f906dc280d7efc91c4fd3 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1052,6 +1052,7 @@ component("base") {
@@ -73,7 +73,7 @@ index 4bf9a3c27e05c6635b2beb8e880b5b43dbed61b5..57d4756c0d87b9313e8566b3083c0132
} // namespace base
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index 99d801d0fe89804bd87851c87f1ce76acff9f894..327c93478f491d098464f40dac7b936492f6e6fa 100644
index d1b09cb1a75000cf41f31bddcdcb739f776920aa..825a6ecd65bc4e3412db83413d6de34ea997ddd0 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -21,13 +21,18 @@
@@ -353,7 +353,7 @@ index 6ebc4754ef986f5ae966ff7a3217ab77df78edf9..91147b8a42f731c645c318776933b4c1
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 7fbc649a45bea2181523a1875f0112021f0b9251..e15f59c3dedf587df6664cef1913a8e789497bbd 100644
index b3c087eda0561d94d205ef0cbbb341a7e2a34638..035202378209e32e6f7c630140367cda7a34e483 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) {
@@ -433,10 +433,10 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..0cdb0def975e457651771b43fd543261
void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
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 ea7957d89c1c44ce7cae2f0d4548fb67b60543ca..04f78e4f395df7ad3be39ff4a373e0d72811f587 100644
index 05dbd641ea4af9276be7f89627e4075153e667a9..a50cc9cd1502d7aaebdb7029fc5792fe2b74eda9 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
@@ -2063,15 +2063,21 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -2068,15 +2068,21 @@ - (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
//
@@ -459,7 +459,7 @@ index ea7957d89c1c44ce7cae2f0d4548fb67b60543ca..04f78e4f395df7ad3be39ff4a373e0d7
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 6d5fd4133598c17a2dfcf1a4bd2732435353ed1f..24b1ea6fc5fef18b199518ae730713baaa8c0530 100644
index ae5a89f2f9070bf79d0e7ea7984050db5e4545b1..ed9d01d7b2914140d33443ee10f707c765c38fdd 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -54,6 +54,7 @@ source_set("browser") {
@@ -543,7 +543,7 @@ index fe37e5d17d217ad2a7861ac9dba2e61de5a063aa..ab8c04e648f320412de16ce31c134b28
// 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 e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf33383e8b 100644
index 2ad8852bf38dbfbdc600a5a21b354385338eb81e..1e17e24f269fb6fc758a90fa11e33fcea7ce779e 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -272,8 +272,10 @@
@@ -557,7 +557,7 @@ index e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1654,8 +1656,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1656,8 +1658,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -568,7 +568,7 @@ index e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf
return [GetInProcessNSView() window];
}
@@ -1704,9 +1708,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1706,9 +1710,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -580,7 +580,7 @@ index e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2230,20 +2236,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2232,20 +2238,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
GetRenderWidgetAccessibilityTokenCallback callback) {
base::ProcessId pid = getpid();
@@ -608,10 +608,10 @@ index e9a73bafeb1ef85ef6ebbc870b66fbde2076b306..679c9e92ef3f8e984e8cc4d6b99afbbf
///////////////////////////////////////////////////////////////////////////////
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 4d169795cd87c26d2264f4b89334f50c532bc4e7..365154bac05faec52591cc6b4138dcf0bbcadcbb 100644
index aa5bf488affb055f9eef527783f4319d5cb3ce01..eaf62d995e54803372728b17f1a7ab24d40f4504 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -249,6 +249,7 @@ source_set("common") {
@@ -217,6 +217,7 @@ source_set("common") {
"//content:content_implementation",
"//build/config:precompiled_headers",
]
@@ -620,10 +620,10 @@ index 4d169795cd87c26d2264f4b89334f50c532bc4e7..365154bac05faec52591cc6b4138dcf0
public_deps = [
":mojo_bindings",
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 4acb73f39de91b9dfd9b1e6d25c911983c91dc93..22513b5aa30d0fa549d06d5d58312b0a2aa07b27 100644
index c60a3f782dbadd7acaa658d844a73c96b899dd36..78bfe250a8241e8942f5f6b812ddc36d4511f78d 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -226,6 +226,7 @@ target(link_target_type, "renderer") {
@@ -230,6 +230,7 @@ target(link_target_type, "renderer") {
}
configs += [ "//content:content_implementation" ]
@@ -700,10 +700,10 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 02b51f9dae40ed3976cf43a7d5cf837ea639d7c9..ca71960c438930e59e372ff3ad7837cb6d9e34d4 100644
index f010f10b32702c78a4e1cb931434e1a5393e11d3..baf0252f0ab6648a829c4453db17bc9466c53c45 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -504,6 +504,7 @@ static_library("test_support") {
@@ -502,6 +502,7 @@ static_library("test_support") {
configs += [
"//build/config:precompiled_headers",
"//v8:external_startup_data",
@@ -711,7 +711,7 @@ index 02b51f9dae40ed3976cf43a7d5cf837ea639d7c9..ca71960c438930e59e372ff3ad7837cb
]
public_deps = [
@@ -1103,6 +1104,7 @@ static_library("browsertest_support") {
@@ -1102,6 +1103,7 @@ static_library("browsertest_support") {
}
configs += [ "//v8:external_startup_data" ]
@@ -719,7 +719,7 @@ index 02b51f9dae40ed3976cf43a7d5cf837ea639d7c9..ca71960c438930e59e372ff3ad7837cb
}
mojom("content_test_mojo_bindings") {
@@ -1718,6 +1720,7 @@ test("content_browsertests") {
@@ -1716,6 +1718,7 @@ test("content_browsertests") {
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
configs += [ "//build/config:precompiled_headers" ]
@@ -727,7 +727,7 @@ index 02b51f9dae40ed3976cf43a7d5cf837ea639d7c9..ca71960c438930e59e372ff3ad7837cb
public_deps = [
":test_interfaces",
@@ -2971,6 +2974,7 @@ test("content_unittests") {
@@ -2968,6 +2971,7 @@ test("content_unittests") {
}
configs += [ "//build/config:precompiled_headers" ]
@@ -749,10 +749,10 @@ index c28458b5ddc8ef74e82125a983344b1daf65dda6..48e6d48962a2228d26444dbdbcfa1637
sources += [ "browser/web_test_shell_platform_delegate_mac.mm" ]
} else if (toolkit_views && !is_castos) {
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
index 05cce11f233e04e22bf9166ee107661900686bea..70268a1ff7c59a03903072fafe8b62acc3454287 100644
index cfb175b6985ed81021b236fc2ce14064e23beba7..81116f63eb9443165721064c26bacc710c454684 100644
--- a/device/bluetooth/BUILD.gn
+++ b/device/bluetooth/BUILD.gn
@@ -248,6 +248,7 @@ component("bluetooth") {
@@ -249,6 +249,7 @@ component("bluetooth") {
"IOKit.framework",
"Foundation.framework",
]
@@ -761,7 +761,7 @@ index 05cce11f233e04e22bf9166ee107661900686bea..70268a1ff7c59a03903072fafe8b62ac
if (is_mac) {
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index cda4f747099492c306db22c6dba98249e443cd74..f63dbbe7149010efa06c9cbb215399eb9e882cb9 100644
index 4244e70c523d584fb796f4ce741376c6f72531cd..25db1e83fefecd01820923e5d182b882426eebfd 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -39,6 +39,7 @@
@@ -778,9 +778,9 @@ index cda4f747099492c306db22c6dba98249e443cd74..f63dbbe7149010efa06c9cbb215399eb
}
+#endif
namespace {
@@ -103,8 +105,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
// A simple helper class that forwards any Bluetooth device connect notification
// to its wrapped |_adapter|.
@@ -150,8 +152,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
: controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@@ -791,7 +791,7 @@ index cda4f747099492c306db22c6dba98249e443cd74..f63dbbe7149010efa06c9cbb215399eb
device_paired_status_callback_(
base::BindRepeating(&IsDeviceSystemPaired)) {
}
@@ -252,8 +256,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
@@ -297,8 +301,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
@@ -817,7 +817,7 @@ index a4f541e3f4095a0f537137ae371555adc80c0023..f93f0b5bf8c47efbc67039d50e3bcd29
if (is_ios) {
sources += [ "image_transport_surface_ios.mm" ]
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
index d75db1f8fbdf12cf07ba19e3f2c68136ef33f021..dc0238d5a78b434c722b84adf3dbbcebaa19e847 100644
index 36322ddd3047f96569f35807541a37d3c6672b09..3162cb6e3dce2c44e5b1e5f33f9177da832d26aa 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
@@ -23,7 +23,9 @@
@@ -1260,7 +1260,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773a
} // namespace sandbox
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index 2a9d420eabfee17a39604e525af6f0fa95fafc04..0883cfc964881922f3f5b04426923544c49a2273 100644
index 6ee0ec12c17501514937f9126338bd402546d28b..9801bfbc7b6e0fe85809b343500cad352f01ff21 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -330,6 +330,7 @@ component("core") {
@@ -1385,10 +1385,10 @@ index dcf493d62990018040a3f84b6f875af737bd2214..6ffffe8b3946e0427aead8be19878c53
void DisplayCALayerTree::GotIOSurfaceFrame(
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
index 3e295499c9ddf8fbb4376e711c57855c8df5e451..c90568d1f5f67ca3e1510aafb524b99c098c455e 100644
index b7f86265ef2c79ce7a0c3eda2443a01a0242af89..96b8b4976ada0fcb2fd322e2ea42429a3c0757db 100644
--- a/ui/accessibility/platform/BUILD.gn
+++ b/ui/accessibility/platform/BUILD.gn
@@ -254,6 +254,7 @@ component("platform") {
@@ -255,6 +255,7 @@ component("platform") {
weak_frameworks = [
"Accessibility.framework", # macOS 11
]
@@ -1517,11 +1517,11 @@ index fc25ba79d2b0e1acdb7ba54b89e7d6e16f94771b..962df2d65d61ec0836cf465d847eb666
} // namespace
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
index 761d9361972720855719ae3418e19c623c465361..752744e489b9b2c184012562985e7803ef685b17 100644
index d8e29c85add32bc13989aae412f953d5b2e5a7d3..03bea16fc3c62717c3a4072327af681a38c571ca 100644
--- a/ui/display/BUILD.gn
+++ b/ui/display/BUILD.gn
@@ -69,6 +69,10 @@ component("display") {
"mac/display_link_mac.h",
@@ -71,6 +71,10 @@ component("display") {
"mac/display_link_mac.mm",
"mac/screen_mac.mm",
]
+
@@ -1554,7 +1554,7 @@ index cd08cb3b7c95a8fd418524652bb345945291112a..13c6cc142262781450d1075fe85f86ad
// Query the display's refresh rate.
{
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 060744da5ed7e6d814a94b2b8576ff672c980c85..0cdd00f78c1518e29bc935e4b35399091882de71 100644
index 5255116a8e8f897607e5c5df2875dbaf275ec919..0a28b2832470f3c9d45f70499be29c2b29cb1b25 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -204,6 +204,7 @@ component("gfx") {
@@ -1596,7 +1596,7 @@ index 0ab5fbd2a81d8860c73f29c08896f6755b5ca5fa..9400c6c7698258ff2834c550fb8901b4
// enough.
return PlatformFontMac::SystemFontType::kGeneral;
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index a14ebf37508ab6e419507c41536689052d52439c..60cb9b1df27453103649deb4f6a6e26b4c9e3c89 100644
index cd6c9a924dce762ff935ef722c8873c974772225..b162795219e0fac3d9caa6bbfead126c033534cc 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -716,6 +716,7 @@ component("views") {
@@ -1617,10 +1617,10 @@ index a14ebf37508ab6e419507c41536689052d52439c..60cb9b1df27453103649deb4f6a6e26b
sources += [
"test/desktop_window_tree_host_win_test_api.cc",
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 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086ddb8691d 100644
index e92ca79bebffde146bd0d8778f126651f44e527e..298f06095ea598348eec489b0a4be737945b87de 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -30,7 +30,9 @@
@@ -31,7 +31,9 @@
#include "ui/views/window/dialog_observer.h"
@class NativeWidgetMacNSWindow;
@@ -1630,7 +1630,7 @@ index 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086
@class NSView;
namespace remote_cocoa {
@@ -465,10 +467,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -475,10 +477,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
@@ -1644,7 +1644,7 @@ index 06cb52062e66fc27c00941e703b909cf42cfa322..309f7a351b8a2aa2ccc42a084a5af086
// 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 b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e1a5a65a8 100644
index 8dc2fc9768da17f8635dce99da218450b231cafe..a88e24a51070ba906d3b858f8492ebe39d372c69 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -345,7 +345,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1671,7 +1671,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1265,9 +1273,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1297,9 +1305,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// for PWAs. However this breaks accessibility on in-process windows,
// so set it back to NO when a local window gains focus. See
// https://crbug.com/41485830.
@@ -1683,7 +1683,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
// Explicitly set the keyboard accessibility state on regaining key
// window status.
if (is_key && is_content_first_responder)
@@ -1420,17 +1430,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1459,17 +1469,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -1704,7 +1704,7 @@ index b50e6f05254ea9e12985fa18b5468c3c020cf3cf..43051bb6a54ed56b2f920555f096494e
*pid = getpid();
id element_id = GetNativeViewAccessible();
@@ -1443,6 +1456,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1482,6 +1495,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
}
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

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 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01da6aa113 100644
index df74825a6b9ace016cd78b091f2a8d5768b300cd..b068b0de6c5676f36a8e8532d4fd59f6815f4dd1 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -156,6 +156,11 @@
@@ -22,7 +22,7 @@ index 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01
#if BUILDFLAG(IS_CT_SUPPORTED)
// gn check does not account for BUILDFLAG(). So, for iOS builds, it will
// complain about a missing dependency on the target exposing this header. Add a
@@ -568,6 +573,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() {
@@ -580,6 +585,99 @@ mojom::URLLoaderFactoryParamsPtr CreateURLLoaderFactoryParamsForPrefetch() {
} // namespace
@@ -122,7 +122,7 @@ index 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -935,6 +1033,13 @@ void NetworkContext::SetClient(
@@ -946,6 +1044,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -136,9 +136,9 @@ index 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2417,6 +2522,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2425,6 +2530,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
cert_verifier = std::move(cert_verifier_with_trust_anchors);
#endif // BUILDFLAG(IS_CHROMEOS)
+ auto remote_cert_verifier = std::make_unique<RemoteCertVerifier>(std::move(cert_verifier));
+ remote_cert_verifier_ = remote_cert_verifier.get();
@@ -147,18 +147,18 @@ index 548bcc1f870b0c94244a9d954ae37c4a01987833..50650759734c7ef4d683d61560caba01
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index f212b8a1fc95df94fc6ff3b6eccb4d5cc989441f..004354b6a74023adebc041c2f40d8989eb9f0a05 100644
index 0a890a1d65cae565fb1c3fd195682b2cae5195c1..ec0e4a355e96394abe086325a6fdb37fcd3d1446 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -114,6 +114,7 @@ class URLMatcher;
@@ -113,6 +113,7 @@ class URLMatcher;
}
namespace network {
class CertVerifierWithTrustAnchors;
+class RemoteCertVerifier;
class CookieManager;
class HostResolver;
class MdnsResponderManager;
@@ -249,6 +250,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -248,6 +249,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@@ -167,7 +167,7 @@ index f212b8a1fc95df94fc6ff3b6eccb4d5cc989441f..004354b6a74023adebc041c2f40d8989
void ResetURLLoaderFactories() override;
void GetViaObliviousHttp(
mojom::ObliviousHttpRequestPtr request,
@@ -908,6 +911,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -904,6 +907,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@@ -177,10 +177,10 @@ index f212b8a1fc95df94fc6ff3b6eccb4d5cc989441f..004354b6a74023adebc041c2f40d8989
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 5597a97f13cc0738b14f050a768605e929d07dcd..6b868b5744f0250d2a566051d26d746a19a26177 100644
index c2babfc29eaf0e190939173a75f9f35d1816d6bc..19f568b78c621ecbec64b8eb46c8c92d7af650f7 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -298,6 +298,16 @@ struct SocketBrokerRemotes {
@@ -297,6 +297,16 @@ struct SocketBrokerRemotes {
pending_remote<SocketBroker> server;
};
@@ -197,7 +197,7 @@ index 5597a97f13cc0738b14f050a768605e929d07dcd..6b868b5744f0250d2a566051d26d746a
// Parameters for constructing a network context.
struct NetworkContextParams {
@@ -970,6 +980,9 @@ interface NetworkContext {
@@ -969,6 +979,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);
@@ -208,7 +208,7 @@ index 5597a97f13cc0738b14f050a768605e929d07dcd..6b868b5744f0250d2a566051d26d746a
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 9d7e3c953449aec6ba3009c256389480a555b24e..db21e3f02b3e0fecf4c2c494afe4d806170be3f1 100644
index f9aabc3d30ed66012402ef23027092be7e806b65..eb78d84ad3d6124313cf7b940425b0162d554fd6 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -62,6 +62,8 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -133,10 +133,10 @@ index 38c8cf36fdf9366121c7ada96c167a4c9664952e..03b37fb62655a355e104870a088e4222
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 4b67983bc0c4fe9ddfa006a322daf559112e91b1..84fec9a7d7d013c8f9c30144179a154a2d6b6078 100644
index 8aae7c95521896aa61305f323cb84a89be268987..65b4037388fb32d4217a3b4c9133c32ab74b0224 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2057,7 +2057,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -1956,7 +1956,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index 4b67983bc0c4fe9ddfa006a322daf559112e91b1..84fec9a7d7d013c8f9c30144179a154a
creator_type, std::move(receiver));
break;
}
@@ -2065,7 +2065,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -1964,7 +1964,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

View File

@@ -10,10 +10,10 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index a4fd7f1370aeb113a0b07ba0e4504adf7cc1848c..6ff1c3dc0923696b029a73fdcaf5e99d8e5887a7 100644
index fc9898b73ed34850da9c78efb26d7fc9ea840ecb..876ef1bea3a5901ee88e51c662fbb1ba232a9cdd 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -786,8 +786,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
@@ -783,8 +783,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
// TODO(crbug.com/40092527): Consider adding a separate boolean that
// tracks this instead of piggybacking `origin_calculation_debug_info`.
if (renderer_side_origin.opaque() &&

View File

@@ -39,7 +39,7 @@ index d236578cefc347e772305ac7ec54b9734e4aa20b..6bb89cea3b6b91ec8ea351ed60c4e405
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 2de1e8257b1fb47078326774e841404f7695165a..62280109a74b5d606f16503151a98449147cc660 100644
index c67f93efc462c2ac7b15ecb3a2ffb2daaccbd1cc..507a695ba97c6321c4d1aa662bdd0206991e6c69 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -17,9 +17,11 @@
@@ -54,16 +54,16 @@ index 2de1e8257b1fb47078326774e841404f7695165a..62280109a74b5d606f16503151a98449
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
#include "chrome/browser/ui/views/overlay/close_image_button.h"
@@ -59,7 +61,7 @@
@@ -60,7 +62,7 @@
#include "ui/aura/window.h"
#endif
-#if BUILDFLAG(IS_WIN)
+#if 0
#include "chrome/browser/shell_integration_win.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h"
@@ -312,7 +314,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
#include "ui/aura/window_tree_host.h"
@@ -310,7 +312,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();

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 a958dad6344b8660b38c3143f1dcf792a3bab43b..df6fd814d703bed76a7eba2ab54cacc3a79a63d0 100644
index eaae83bc500d0011bf5fac160c82cdf4c865d7d6..438f7b020b28f39f68a85d2970d3ff7010a0c5ca 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -978,7 +978,6 @@ if (is_win) {
@@ -976,7 +976,6 @@ if (is_win) {
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
@@ -22,7 +22,7 @@ index a958dad6344b8660b38c3143f1dcf792a3bab43b..df6fd814d703bed76a7eba2ab54cacc3
"//sql:sql_unittests",
"//third_party/breakpad:symupload($host_toolchain)",
"//ui/base:ui_base_unittests",
@@ -987,6 +986,10 @@ if (is_win) {
@@ -985,6 +984,10 @@ if (is_win) {
"//ui/views:views_unittests",
"//url:url_unittests",
]
@@ -861,10 +861,10 @@ index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d415
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 24b1ea6fc5fef18b199518ae730713baaa8c0530..663bce7e031c11417d9e54c78a99fdf17bb7bd13 100644
index ed9d01d7b2914140d33443ee10f707c765c38fdd..57708df678f9f7b0a8c9bbb672363a9144bb7b56 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2963,8 +2963,9 @@ source_set("browser") {
@@ -2974,8 +2974,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,10 +30,10 @@ index e8738cf3a033f69a2e8eaf06f1a9f61bf83e9066..b3777cb41cb5c6b007122ae808732765
// 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 3452aa6a281f2a97c2708d66fd4aa7e2bce1e1f9..aa0231253c3f707a2779e773e593dede41f6287e 100644
index 6c0fe34bb30f68d43e1e111d1f4bf24e7a3281e5..5275c37f27ef61754f67c1b5fbcd4b126602929e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2084,6 +2084,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -1985,6 +1985,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}
@@ -44,10 +44,10 @@ index 3452aa6a281f2a97c2708d66fd4aa7e2bce1e1f9..aa0231253c3f707a2779e773e593dede
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 50a6d0835c70795a3c7865c305b9389936939ee9..92f2823839cdfd6139a7f13684d2649b7e230964 100644
index be7ff72576a6bb59f7a302d2034460f3ff002a69..b8c0929a305a0c78ff0cc3c447019ca11905241a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5404,6 +5404,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5452,6 +5452,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@@ -60,10 +60,10 @@ index 50a6d0835c70795a3c7865c305b9389936939ee9..92f2823839cdfd6139a7f13684d2649b
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 c00653f5cb694f07dd20f2e8f4a672e285a9a724..d469afd4bbd0013784d8a0cffa0622a6225d2c87 100644
index 5f6692b4c5db97120554c70c5eb6b57ead338d04..a3ad36ba34c9360f1a135379b1a6ad853041bc9f 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1078,6 +1078,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1090,6 +1090,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;

View File

@@ -8,18 +8,18 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
to upstream this change to Chrome.
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
index 0103c97b187815fe63be677a7dcc5db7f4b85199..6c5d0b0a8713411e3bccdc16afa1a829ad7d63b2 100644
index fdea712f8d0bd08d0e57f1582a3f12c7afb52013..6e2fc89d1eebe49391ebafda537afbfbed69ce1b 100644
--- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
+++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -38,7 +38,6 @@
#include "chrome/browser/profiles/profile_manager.h"
@@ -39,7 +39,6 @@
#include "chrome/browser/safe_browsing/download_protection/download_protection_util.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/file_system_access_dialogs.h"
-#include "chrome/common/chrome_paths.h"
#include "chrome/grit/generated_resources.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
@@ -222,118 +221,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
@@ -225,118 +224,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) {
}
#endif

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 31fb2a66ac5bed634f3d31f4f93d040293c30c0d..ad42e2d94ab498dd30968e62aebd62e14f8161ab 100644
index de78ee035a47f8929b9bf357cdb571964791d4ce..16ed90ca643a4d2f81e17e34c02fa3d9d5ee2367 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -742,6 +742,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
@@ -777,6 +777,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
return false;
}
@@ -24,17 +24,16 @@ index 31fb2a66ac5bed634f3d31f4f93d040293c30c0d..ad42e2d94ab498dd30968e62aebd62e1
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 1a7932a580836bae3b92c63aa9bfeb56b250ee61..dc31ac9ef4dc708b44afb806d311e38a4f0597a3 100644
index abb2812168104f912f1e30132ed188083f62c34e..3d2d66d60db936e5b25ccb51d2a1dab21a3e3060 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -26,10 +26,12 @@
@@ -27,9 +27,11 @@
#include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
#include "components/viz/common/surfaces/surface_id.h"
#include "content/browser/renderer_host/display_feature.h"
-#include "content/common/content_export.h"
+#include "content/browser/renderer_host/visible_time_request_trigger.h"
+#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/input/input_router_impl.h"
#include "content/common/input/render_widget_host_view_input.h"
#include "content/public/browser/render_frame_metadata_provider.h"
+#include "content/public/browser/render_widget_host.h"
@@ -52,8 +51,8 @@ index 1a7932a580836bae3b92c63aa9bfeb56b250ee61..dc31ac9ef4dc708b44afb806d311e38a
+class WebContentsView;
class WebContentsAccessibility;
class DelegatedFrameHost;
@@ -226,6 +230,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
class SyntheticGestureTarget;
@@ -232,6 +236,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
const gfx::Rect& keyboard_rect) override {}
bool IsHTMLFormPopup() const override;
@@ -63,7 +62,7 @@ index 1a7932a580836bae3b92c63aa9bfeb56b250ee61..dc31ac9ef4dc708b44afb806d311e38a
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -276,6 +283,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -282,6 +289,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
// non-embeddable derived views.
virtual RenderWidgetHostViewBase* GetRootView();

View File

@@ -8,10 +8,10 @@ respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
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 a89dcd1e5687a1e12d558e5b55ea4c95c4083278..ea7957d89c1c44ce7cae2f0d4548fb67b60543ca 100644
index a14c65728ec516e437015d66f56eabaa05bf2376..05dbd641ea4af9276be7f89627e4075153e667a9 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
@@ -164,6 +164,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -169,6 +169,15 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@@ -27,7 +27,7 @@ index a89dcd1e5687a1e12d558e5b55ea4c95c4083278..ea7957d89c1c44ce7cae2f0d4548fb67
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -762,6 +771,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
@@ -767,6 +776,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -37,7 +37,7 @@ index a89dcd1e5687a1e12d558e5b55ea4c95c4083278..ea7957d89c1c44ce7cae2f0d4548fb67
// Enable "click-through" if mouse clicks are accepted in inactive windows
return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow;
}
@@ -856,6 +868,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -861,6 +873,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@@ -48,7 +48,7 @@ index a89dcd1e5687a1e12d558e5b55ea4c95c4083278..ea7957d89c1c44ce7cae2f0d4548fb67
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -1183,6 +1199,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1188,6 +1204,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);

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 c35f1b734745addf3a495b1d69957ad13fe954fb..ce54376e4a56053fc8dc33ceeabcbc26f85ae40a 100644
index 6e3f0a148b8e4c216e7d96472353859a7d8cc737..d88de5e36d6013224566bef67118e455765cff46 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1574,7 +1574,7 @@ if (is_chrome_branded && !is_android) {
@@ -1559,7 +1559,7 @@ if (is_chrome_branded && !is_android) {
}
}
@@ -64,7 +64,7 @@ index c35f1b734745addf3a495b1d69957ad13fe954fb..ce54376e4a56053fc8dc33ceeabcbc26
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1613,6 +1613,12 @@ if (!is_android) {
@@ -1598,6 +1598,12 @@ if (!is_android) {
}
}

View File

@@ -6,10 +6,10 @@ Subject: Revert "Remove the AllowAggressiveThrottlingWithWebSocket feature."
This reverts commit 615c1810a187840ffeb04096087efff86edb37de.
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
index 4028103044ba8996e0c547795520f96a3470a6a6..864d37c74946129e380f1ff06278952ea73365ce 100644
index e9c5df9cec4cc7d15285843098b858320de72a3a..4a9045b59475577eac62a4ce99d18fac0d5b7195 100644
--- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -96,6 +96,17 @@ enum WebSocketOpCode {
@@ -98,6 +98,17 @@ enum WebSocketOpCode {
kOpCodeBinary = 0x2,
};
@@ -27,7 +27,7 @@ index 4028103044ba8996e0c547795520f96a3470a6a6..864d37c74946129e380f1ff06278952e
} // namespace
void WebSocketChannelImpl::MessageDataDeleter::operator()(char* p) const {
@@ -286,7 +297,10 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) {
@@ -288,7 +299,10 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) {
// even if the `WebSocketChannel` is closed.
feature_handle_for_scheduler_ = scheduler->RegisterFeature(
SchedulingPolicy::Feature::kWebSocket,

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 f9a5d0b80ed7e7e921b545bf6be611d9a91c833a..495b02339145e2e280bea15d9819af4b0b18a8ac 100644
index 144b00419efeb83b0c2d24d79f466c31e11335bf..b077d20d6a410dcd8a00287878a6c70268fb2215 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1251,7 +1251,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1273,7 +1273,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

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 84fec9a7d7d013c8f9c30144179a154a2d6b6078..639f7c4704c4f91630d75badc27589e205153fba 100644
index 65b4037388fb32d4217a3b4c9133c32ab74b0224..42a6355b84456d717673a38f28d766112bbc0148 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1740,9 +1740,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1601,9 +1601,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), /*is_jit_disabled=*/IsPdf());
@@ -42,7 +42,7 @@ index 84fec9a7d7d013c8f9c30144179a154a2d6b6078..639f7c4704c4f91630d75badc27589e2
auto file_data = std::make_unique<ChildProcessLauncherFileData>();
diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
index dce5ba05c3ba1d476e1dfecb27942fd5e913ff88..f77ac77e9942a567a47c229838150385975f0756 100644
index 01c5da99e5bd8dd9d38e5cec9ad4f953e8167cbe..2005dc7c90d1851f9368a7ef3231f4cca52fafca 100644
--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
+++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc
@@ -35,6 +35,9 @@ namespace content {

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 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944 100644
index 69e6473166679bce52389be060dafc19096946c7..ac8d2292e6e3c47e94cf863fa67b4de0c00be130 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3609,6 +3609,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3657,6 +3657,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -26,7 +26,7 @@ index 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3619,6 +3626,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3667,6 +3674,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -35,10 +35,10 @@ index 0a548b96a53454313fe0175a2fa3da7e7b92346f..bfef0d4ad7d543bd0f7cc5b0e57d067c
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 4d573eb5d291776143c7f3a32192d20df3ec99d7..370f4e32bd3a5d8a9d3ff73f90a74c5c091a802d 100644
index 36c71b1c9b401438177034433b7f665031c763d5..322099129e42cb822a70700ef141f90fc6ecdc2b 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -104,10 +104,13 @@ class BrowserContext;
@@ -109,10 +109,13 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@@ -52,7 +52,7 @@ index 4d573eb5d291776143c7f3a32192d20df3ec99d7..370f4e32bd3a5d8a9d3ff73f90a74c5c
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -254,6 +257,10 @@ class WebContents : public PageNavigator,
@@ -259,6 +262,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 048321f3142ad1c6252a1d72735d3ee5dd1a1591..a4fd7f1370aeb113a0b07ba0e4504adf7cc1848c 100644
index 018f04380c2d04bfaaac138c2b059bda575036c8..fc9898b73ed34850da9c78efb26d7fc9ea840ecb 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7702,6 +7702,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -7716,6 +7716,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@@ -37,10 +37,10 @@ index 048321f3142ad1c6252a1d72735d3ee5dd1a1591..a4fd7f1370aeb113a0b07ba0e4504adf
if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e17826751 100644
index ac8d2292e6e3c47e94cf863fa67b4de0c00be130..8b47c0901b2d416ded059d64a133f8af377ce130 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3864,21 +3864,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -3912,21 +3912,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4035,7 +4039,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -4083,7 +4087,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive());
@@ -88,7 +88,7 @@ index bfef0d4ad7d543bd0f7cc5b0e57d067c1d8fc944..f8ca743c5629c8e62a16cad3e2f7f76e
features::kAutomaticFullscreenContentSetting)) {
// Ensure the window is made active to take input focus. The user may have
diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
index 7c69e3d4fc1a115f0d2b0d318566653279fa2741..f6a7ab2e25bf3c8345c82648efaa80983b425c27 100644
index 5cb222aa469134e03af008f52e5e95fd5e2e2053..1b5fe8416277addbd3ef769f15ae0e1812f7c9f4 100644
--- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
+++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
@@ -112,7 +112,7 @@ void FullscreenElementChanged(Document& document,

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 7a9334a6cb0c77d49b87d75f7dba56715d3ba5f7..2733fe20a58af97c0fd424bf169254397c631707 100644
index 7f934695ad22e27a02aba16a5ec1b0d99b03a603..5e99d69adde3cb32e588d94bef84ed2ff7ab9334 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -397,6 +397,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -401,6 +401,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@@ -26,10 +26,10 @@ index 7a9334a6cb0c77d49b87d75f7dba56715d3ba5f7..2733fe20a58af97c0fd424bf16925439
// 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 9d1b45efcc171fc8f2c4a71599aaf4f709a0ba49..3bc0313d663b3d948ae00ff5eb7fee6ddf574628 100644
index 23a15a223206a2e99bd0ee7711e9592e3749fe7c..d0cc959bb3a2bacf43d4acff26df9582055efa61 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -840,6 +840,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -871,6 +871,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -43,10 +43,10 @@ index 9d1b45efcc171fc8f2c4a71599aaf4f709a0ba49..3bc0313d663b3d948ae00ff5eb7fee6d
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 8a8faf056bee0005325b099ed0716f4c23ba3e99..8970240e31bbfbf34433641dcc675f575b86ee09 100644
index 3ad3a20d1c4802c5511750170bc1883d325fb4f2..7e8e2445fb3f85920b5524f63e0cf29b9041b1b5 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -188,6 +188,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -192,6 +192,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 8a8faf056bee0005325b099ed0716f4c23ba3e99..8970240e31bbfbf34433641dcc675f57
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 86a9cc130b21534b3235091659aa1c8009287d45..f299762e90655ea1a6be4d52257c9ae65598ca98 100644
index 0cf3f6df20704cabc731e73409d6999f6d1c3420..64a0cc94c97c5e98a2072ddc3bff3d521a779e6f 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -639,6 +639,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -653,6 +653,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -67,10 +67,10 @@ index 86a9cc130b21534b3235091659aa1c8009287d45..f299762e90655ea1a6be4d52257c9ae6
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 9adca4e4953cfa6511d17392b42726b2d2544212..2131b07c416e26e2f4b7b5add671df361f28a97b 100644
index 9866cc85f4d2c9d834538010f8b1ca64efc701b9..5af206ddc527f7d7cf44b6c363d2ede08a36ff55 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -763,6 +763,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -764,6 +764,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
}
pause_handle_.reset();

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 2733fe20a58af97c0fd424bf169254397c631707..d251cba0c8b4a6b7b5aa1fb24488269ef2d162a9 100644
index 5e99d69adde3cb32e588d94bef84ed2ff7ab9334..f3ecba82c33a27e0a0b8e28948880154f076dac7 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -397,6 +397,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -401,6 +401,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@@ -35,10 +35,10 @@ index 2733fe20a58af97c0fd424bf169254397c631707..d251cba0c8b4a6b7b5aa1fb24488269e
// 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 3bc0313d663b3d948ae00ff5eb7fee6ddf574628..81754497f90b774eb155c84b490f29048bed48a7 100644
index d0cc959bb3a2bacf43d4acff26df9582055efa61..9269bd0a139304467c295984aacefd6e5d19f98f 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -852,6 +852,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -883,6 +883,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@@ -52,10 +52,10 @@ index 3bc0313d663b3d948ae00ff5eb7fee6ddf574628..81754497f90b774eb155c84b490f2904
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 8970240e31bbfbf34433641dcc675f575b86ee09..f89ab57f2976ac917cb936acf392773c1fac6e16 100644
index 7e8e2445fb3f85920b5524f63e0cf29b9041b1b5..f12644eabd967876fcc09575aa19870bd267e83d 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -188,6 +188,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -192,6 +192,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 8970240e31bbfbf34433641dcc675f575b86ee09..f89ab57f2976ac917cb936acf392773c
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 f299762e90655ea1a6be4d52257c9ae65598ca98..1f49f4566279c5a2eac0cc3e503d905e3d05a5bd 100644
index 64a0cc94c97c5e98a2072ddc3bff3d521a779e6f..bc61d4f42152289e6f10828c210bb1ce9f4952a0 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -639,6 +639,8 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -653,6 +653,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -78,10 +78,10 @@ index f299762e90655ea1a6be4d52257c9ae65598ca98..1f49f4566279c5a2eac0cc3e503d905e
virtual bool AllowScriptExtensionForServiceWorker(
const WebSecurityOrigin& script_origin) {
diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
index 1da03efdb0c935217697372cf222d3025f2214b1..832054db7ad4f52265f2ab649d09b9510627f130 100644
index 2ae0fef28566f19627de0424dae4e8b292e0b096..b8f6aa88e4511981ca0c923196e478614cf808a2 100644
--- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
+++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
@@ -300,6 +300,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
@@ -302,6 +302,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
V8PerContextData* per_context_data = script_state_->PerContextData();
std::ignore =
per_context_data->ConstructorForType(global_scope_->GetWrapperTypeInfo());

View File

@@ -1,62 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Mon, 17 Jun 2024 18:05:47 +0000
Subject: Use localized display label only for browser process
With https://crrev.com/c/5098130, GetPrimaryDisplayRefreshIntervalFromXrandr uses BuildDisplaysFromXRandRInfo
to calculate the primary display frequency. In software compositing mode --disable-gpu-compositing,
this code path will be called from the gpu process via SoftwareOutputSurface::SwapBuffers and
can trigger a crash when attempting to set localized string. This is because on linux,
gpu process does not have access to the resource bundle.
Bug: none
Change-Id: I9d66b98c07a1a8671369546d4fc685213904a84f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631219
Auto-Submit: Deepak Mohan (Robo) <hop2deep@gmail.com>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1315980}
diff --git a/ui/base/x/x11_display_util.cc b/ui/base/x/x11_display_util.cc
index ffaea4fef9931050f1c1888674bf2f7498c578da..faf59929eb7e291502c449631e54f3841582bd9e 100644
--- a/ui/base/x/x11_display_util.cc
+++ b/ui/base/x/x11_display_util.cc
@@ -299,6 +299,7 @@ std::vector<display::Display> BuildDisplaysFromXRandRInfo(
const display::DisplayConfig& display_config,
size_t* primary_display_index_out) {
DCHECK(primary_display_index_out);
+ auto* command_line = base::CommandLine::ForCurrentProcess();
const float primary_scale = display_config.primary_scale;
auto* connection = x11::Connection::Get();
@@ -348,7 +349,7 @@ std::vector<display::Display> BuildDisplaysFromXRandRInfo(
connection->Flush();
std::vector<x11::Future<x11::GetPropertyReply>> icc_futures{n_iccs};
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless)) {
+ if (!command_line->HasSwitch(switches::kHeadless)) {
for (size_t monitor = 0; monitor < n_iccs; ++monitor) {
icc_futures[monitor] = GetIccProfileFuture(connection, monitor);
}
@@ -446,11 +447,18 @@ std::vector<display::Display> BuildDisplaysFromXRandRInfo(
}
const std::string name(output_info->name.begin(), output_info->name.end());
+ auto process_type =
+ command_line->GetSwitchValueASCII("type");
if (base::StartsWith(name, "eDP") || base::StartsWith(name, "LVDS")) {
display::SetInternalDisplayIds({display_id});
- // Use localized variant of "Built-in display" for internal displays.
+ // For browser process which has access to resource bundle,
+ // use localized variant of "Built-in display" for internal displays.
// This follows the ozone DRM behavior (i.e. ChromeOS).
- display.set_label(l10n_util::GetStringUTF8(IDS_DISPLAY_NAME_INTERNAL));
+ if (process_type.empty()) {
+ display.set_label(l10n_util::GetStringUTF8(IDS_DISPLAY_NAME_INTERNAL));
+ } else {
+ display.set_label("Built-in display");
+ }
} else {
display.set_label(edid_parser.display_name());
}

View File

@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index 3fab27f094ca75608f4b05b179abd7f53608a013..244a78f1e92f7e749c8d42979184f53a629c487a 100644
index 629193c62a8dbd0fdde5a083ad380641f5de6433..1a99d21d95c739ce3851b07a272f98bae0d0b2fe 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -723,6 +723,8 @@ export class MainImpl {
@@ -729,6 +729,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-ignore Exported for Tests.js
globalThis.Main.Main = MainImpl;

View File

@@ -1,5 +1,6 @@
use_new_constructor_for_scriptorigin_when_17_x.patch
api_remove_allcan_read_write.patch
fix_define_nan_copyablepersistenttraits_for_v8_12_5.patch
remove_deprecated_v8_isolate_idlenotificationdeadline.patch
remove_several_apis_deprecated_in_version_12_6.patch
apply_allcan_read_write_test.patch
apply_allcan_read_write.patch

View File

@@ -1,87 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 10 Nov 2023 22:51:53 +0900
Subject: Remove AllCan Read/Write
Refs https://chromium-review.googlesource.com/c/v8/v8/+/5006387
Should be upstreamed.
Module version checks are made against 119 since that is the current assigned version
for Electron 28 in https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json.
The version should be updateed to the one assinged for Electron 29 when it is available.
Steps for upstreaming this patch:
- Get a new module version assigned for Electron 29 in nodejs/node
- Update NODE_21_0_MODULE_VERSION to the new version number
- Upstream patch to nodejs/nan before Electron 29 is branched
diff --git a/nan.h b/nan.h
index 2a68349448c163fa29af327a03b11678e61f5789..2be1b4f573948024f5777fc6801126b3e799ef11 100644
--- a/nan.h
+++ b/nan.h
@@ -47,6 +47,7 @@
#define NODE_18_0_MODULE_VERSION 108
#define NODE_19_0_MODULE_VERSION 111
#define NODE_20_0_MODULE_VERSION 115
+#define NODE_21_0_MODULE_VERSION 119
#ifdef _MSC_VER
# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
@@ -2517,7 +2518,9 @@ NAN_DEPRECATED inline void SetAccessor(
, GetterCallback getter
, SetterCallback setter
, v8::Local<v8::Value> data
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, v8::AccessControl settings
+#endif
, v8::PropertyAttribute attribute
, imp::Sig signature) {
HandleScope scope;
@@ -2550,7 +2553,9 @@ NAN_DEPRECATED inline void SetAccessor(
, getter_
, setter_
, obj
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
+#endif
, attribute
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
, signature
@@ -2564,7 +2569,9 @@ inline void SetAccessor(
, GetterCallback getter
, SetterCallback setter = 0
, v8::Local<v8::Value> data = v8::Local<v8::Value>()
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, v8::AccessControl settings = v8::DEFAULT
+#endif
, v8::PropertyAttribute attribute = v8::None) {
HandleScope scope;
@@ -2596,7 +2603,9 @@ inline void SetAccessor(
, getter_
, setter_
, obj
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
+#endif
, attribute
);
}
@@ -2634,7 +2643,15 @@ inline bool SetAccessor(
, New<v8::External>(reinterpret_cast<void *>(setter)));
}
-#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
+#if (NODE_MODULE_VERSION >= NODE_21_0_MODULE_VERSION)
+ return obj->SetNativeDataProperty(
+ GetCurrentContext()
+ , name
+ , getter_
+ , setter_
+ , dataobj
+ , attribute).FromMaybe(false);
+#elif (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
return obj->SetAccessor(
GetCurrentContext()
, name

View File

@@ -0,0 +1,188 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Keeley Hammond <khammond@slack-corp.com>
Date: Thu, 20 Jun 2024 14:42:08 -0700
Subject: Remove Allcan Read Write
Check for NODE_21_0_MODULE_VERSION
Refs https://chromium-review.googlesource.com/c/v8/v8/+/5006387
Should be upstreamed.
Module version checks are made against 119 since that is the current assigned version
for Electron 28 in https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json.
The version should be updateed to the one assinged for Electron 29 when it is available.
Steps for upstreaming this patch:
- Get a new module version assigned for Electron 29 in nodejs/node
- Update NODE_21_0_MODULE_VERSION to the new version number
- Upstream patch to nodejs/nan before Electron 29 is branched
- Ensure that methodswithdata-test.js uses LF line endings
diff --git a/nan.h b/nan.h
index 9a9112afe0cc94ce58ed3cce9763ace7c160a932..f4865a77e60d5105ed2426037984ddcbfa58bbca 100644
--- a/nan.h
+++ b/nan.h
@@ -47,6 +47,7 @@
#define NODE_18_0_MODULE_VERSION 108
#define NODE_19_0_MODULE_VERSION 111
#define NODE_20_0_MODULE_VERSION 115
+#define NODE_21_0_MODULE_VERSION 119
#ifdef _MSC_VER
# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
@@ -2525,7 +2526,9 @@ NAN_DEPRECATED inline void SetAccessor(
, GetterCallback getter
, SetterCallback setter
, v8::Local<v8::Value> data
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, v8::AccessControl settings
+#endif
, v8::PropertyAttribute attribute
, imp::Sig signature) {
HandleScope scope;
@@ -2553,17 +2556,28 @@ NAN_DEPRECATED inline void SetAccessor(
obj->SetInternalField(imp::kDataIndex, data);
}
+#if (NODE_MODULE_VERSION >= NODE_21_0_MODULE_VERSION)
+ tpl->SetNativeDataProperty(
+ name
+ , getter_
+ , setter_
+ , obj
+ , attribute);
+#else
tpl->SetAccessor(
name
, getter_
, setter_
, obj
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
+#endif
, attribute
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
, signature
#endif
);
+#endif
}
inline void SetAccessor(
@@ -2572,7 +2586,9 @@ inline void SetAccessor(
, GetterCallback getter
, SetterCallback setter = 0
, v8::Local<v8::Value> data = v8::Local<v8::Value>()
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, v8::AccessControl settings = v8::DEFAULT
+#endif
, v8::PropertyAttribute attribute = v8::None) {
HandleScope scope;
@@ -2599,14 +2615,25 @@ inline void SetAccessor(
obj->SetInternalField(imp::kDataIndex, data);
}
+#if (NODE_MODULE_VERSION >= NODE_21_0_MODULE_VERSION)
+ tpl->SetNativeDataProperty(
+ name
+ , getter_
+ , setter_
+ , obj
+ , attribute);
+#else
tpl->SetAccessor(
name
, getter_
, setter_
, obj
+#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
+#endif
, attribute
);
+#endif
}
inline bool SetAccessor(
@@ -2642,7 +2669,15 @@ inline bool SetAccessor(
, New<v8::External>(reinterpret_cast<void *>(setter)));
}
-#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
+#if (NODE_MODULE_VERSION >= NODE_21_0_MODULE_VERSION)
+ return obj->SetNativeDataProperty(
+ GetCurrentContext()
+ , name
+ , getter_
+ , setter_
+ , dataobj
+ , attribute).FromMaybe(false);
+#elif (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
return obj->SetAccessor(
GetCurrentContext()
, name
diff --git a/test/js/accessors-test.js b/test/js/accessors-test.js
index e6ad45737e2ac18da3fa936b1de618e7389933bc..025f5b66774c2f5fe0ccb98c91fc714dd916fcb1 100644
--- a/test/js/accessors-test.js
+++ b/test/js/accessors-test.js
@@ -11,7 +11,7 @@ const test = require('tap').test
, bindings = require('bindings')({ module_root: testRoot, bindings: 'accessors' });
test('accessors', function (t) {
- t.plan(7)
+ t.plan(6)
var settergetter = bindings.create()
t.equal(settergetter.prop1, 'this is property 1')
t.ok(settergetter.prop2 === '')
@@ -28,5 +28,4 @@ test('accessors', function (t) {
t.equal(derived.prop1, 'this is property 1')
derived.prop2 = 'setting a new value'
t.equal(derived.prop2, 'setting a new value')
- t.equal(settergetter.prop2, 'setting a new value')
})
diff --git a/test/js/methodswithdatalf-test.js b/test/js/methodswithdatalf-test.js
new file mode 100644
index 0000000000000000000000000000000000000000..5db3fae7e075b3428810948bdcfee5b8b97c343c
--- /dev/null
+++ b/test/js/methodswithdatalf-test.js
@@ -0,0 +1,37 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2019 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+const test = require('tap').test
+ , testRoot = require('path').resolve(__dirname, '..')
+ , bindings = require('bindings')({ module_root: testRoot, bindings: 'methodswithdata' })
+
+test('SetMethod with data', function (t) {
+ t.plan(1);
+ t.ok(bindings.testWithData());
+});
+
+test('accessors with data', function (t) {
+ t.plan(7)
+ var settergetter = bindings.create()
+ t.equal(settergetter.prop1, 'this is property 1')
+ t.ok(settergetter.prop2 === '')
+ settergetter.prop2 = 'setting a value'
+ t.equal(settergetter.prop2, 'setting a value')
+ t.equal(settergetter.log(),
+ 'New()\n' +
+ 'Prop1:GETTER(this is property 1)\n' +
+ 'Prop2:GETTER()\n' +
+ 'Prop2:SETTER(setting a value)\n' +
+ 'Prop2:GETTER(setting a value)\n'
+ )
+ var derived = Object.create(settergetter)
+ t.equal(derived.prop1, 'this is property 1')
+ derived.prop2 = 'setting a new value'
+ t.equal(derived.prop2, 'setting a new value')
+ t.equal(settergetter.prop2, 'setting a new value')
+ })
\ No newline at end of file

View File

@@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alice Zhao <alice@makenotion.com>
Date: Thu, 20 Jun 2024 14:50:13 -0700
Subject: test: delete test file for allcan_read_write patch
Refs https://chromium-review.googlesource.com/c/v8/v8/+/5006387
Should be upstreamed.
This patch is seperated from the apply_allcan_read_write.patch
because the file itself has CRLF line endings and need to be patched
seperately. When this patch is removed, also remove the eol=crlf
exception in .gitattributes.
diff --git a/test/js/methodswithdata-test.js b/test/js/methodswithdata-test.js
deleted file mode 100644
index 9f4fc5246f1ca3d8faadc9a72d49e14a6a190e32..0000000000000000000000000000000000000000
--- a/test/js/methodswithdata-test.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*********************************************************************
- * NAN - Native Abstractions for Node.js
- *
- * Copyright (c) 2019 NAN contributors
- *
- * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
- ********************************************************************/
-
-const test = require('tap').test
- , testRoot = require('path').resolve(__dirname, '..')
- , bindings = require('bindings')({ module_root: testRoot, bindings: 'methodswithdata' })
-
-test('SetMethod with data', function (t) {
- t.plan(1);
- t.ok(bindings.testWithData());
-});
-
-test('accessors with data', function (t) {
- t.plan(7)
- var settergetter = bindings.create()
- t.equal(settergetter.prop1, 'this is property 1')
- t.ok(settergetter.prop2 === '')
- settergetter.prop2 = 'setting a value'
- t.equal(settergetter.prop2, 'setting a value')
- t.equal(settergetter.log(),
- 'New()\n' +
- 'Prop1:GETTER(this is property 1)\n' +
- 'Prop2:GETTER()\n' +
- 'Prop2:SETTER(setting a value)\n' +
- 'Prop2:GETTER(setting a value)\n'
- )
- var derived = Object.create(settergetter)
- t.equal(derived.prop1, 'this is property 1')
- derived.prop2 = 'setting a new value'
- t.equal(derived.prop2, 'setting a new value')
- t.equal(settergetter.prop2, 'setting a new value')
- })
-
\ No newline at end of file

View File

@@ -7,10 +7,10 @@ Refs https://chromium-review.googlesource.com/c/v8/v8/+/5403708
Should be upstreamed.
diff --git a/nan.h b/nan.h
index 2be1b4f573948024f5777fc6801126b3e799ef11..64f857c93818712ea3557f53ab4f3cad6813c43c 100644
index 2a68349448c163fa29af327a03b11678e61f5789..42285328055ddb7c76548258f3c4847d2c278ad6 100644
--- a/nan.h
+++ b/nan.h
@@ -204,9 +204,11 @@ typedef v8::String::ExternalOneByteStringResource
@@ -203,9 +203,11 @@ typedef v8::String::ExternalOneByteStringResource
template<typename T>
class NonCopyablePersistentTraits :
public v8::NonCopyablePersistentTraits<T> {};

View File

@@ -8,10 +8,10 @@ See https://chromium-review.googlesource.com/c/v8/v8/+/5539852
Also https://github.com/nodejs/nan/issues/953#issuecomment-1791163429
diff --git a/nan.h b/nan.h
index 64f857c93818712ea3557f53ab4f3cad6813c43c..6a405a6fb6f89dcb2140de48dac4ce743e9f10fa 100644
index 42285328055ddb7c76548258f3c4847d2c278ad6..9a9112afe0cc94ce58ed3cce9763ace7c160a932 100644
--- a/nan.h
+++ b/nan.h
@@ -685,7 +685,13 @@ inline uv_loop_t* GetCurrentEventLoop() {
@@ -684,7 +684,13 @@ inline uv_loop_t* GetCurrentEventLoop() {
v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb);
}

View File

@@ -50,3 +50,6 @@ src_do_not_use_deprecated_v8_api.patch
src_use_new_v8_api_to_define_stream_accessor.patch
src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch
test_update_v8-stats_test_for_v8_12_6.patch
chore_remove_calls_to_v8_functioncallbackinfo_holder.patch
src_do_not_use_soon-to-be-deprecated_v8_api.patch
fix_add_property_query_interceptors.patch

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Mon, 10 Jun 2024 11:18:56 -0500
Subject: chore: remove calls to v8::FunctionCallbackInfo::Holder()
Use This() instead.
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5604487
https://issues.chromium.org/issues/333672197
This patch can be removed once Node addresses this change.
diff --git a/src/node_internals.h b/src/node_internals.h
index 6b4ec38bd092358a9433a1179dbe1e71f56aa387..0a9eaba5c71f711c58799d77a9de6072304deb9a 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -67,7 +67,7 @@ template <typename T, int (*F)(const typename T::HandleType*, sockaddr*, int*)>
void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
T* wrap;
ASSIGN_OR_RETURN_UNWRAP(&wrap,
- args.Holder(),
+ args.This(),
args.GetReturnValue().Set(UV_EBADF));
CHECK(args[0]->IsObject());
sockaddr_storage storage;

View File

@@ -0,0 +1,574 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: VerteDinde <vertedinde@electronjs.org>
Date: Mon, 24 Jun 2024 21:48:40 -0700
Subject: fix: add property query interceptors
This commit cherry-picks an upstream interceptor API change
from node-v8/canary to accomodate V8's upstream changes to old
interceptor APIs.
Node PR: https://github.com/nodejs/node-v8/commit/d1f18b0bf16efbc1e54ba04a54735ce4683cb936
CL: https://chromium-review.googlesource.com/c/v8/v8/+/5630388
This patch can be removed when the node change is incorporated into main.
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index f6969e635f692b17b4efca1dfbee086a0199db6e..6ace71b04e9da761c77838dde2abd8088abcb6c4 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -49,6 +49,7 @@ using v8::FunctionTemplate;
using v8::HandleScope;
using v8::IndexedPropertyHandlerConfiguration;
using v8::Int32;
+using v8::Intercepted;
using v8::Isolate;
using v8::Just;
using v8::Local;
@@ -457,14 +458,15 @@ bool ContextifyContext::IsStillInitializing(const ContextifyContext* ctx) {
}
// static
-void ContextifyContext::PropertyGetterCallback(
- Local<Name> property,
- const PropertyCallbackInfo<Value>& args) {
+Intercepted ContextifyContext::PropertyGetterCallback(
+ Local<Name> property, const PropertyCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Local<Context> context = ctx->context();
Local<Object> sandbox = ctx->sandbox();
@@ -488,18 +490,22 @@ void ContextifyContext::PropertyGetterCallback(
rv = ctx->global_proxy();
args.GetReturnValue().Set(rv);
+ return Intercepted::kYes;
}
+ return Intercepted::kNo;
}
// static
-void ContextifyContext::PropertySetterCallback(
+Intercepted ContextifyContext::PropertySetterCallback(
Local<Name> property,
Local<Value> value,
- const PropertyCallbackInfo<Value>& args) {
+ const PropertyCallbackInfo<void>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Local<Context> context = ctx->context();
PropertyAttribute attributes = PropertyAttribute::None;
@@ -517,8 +523,9 @@ void ContextifyContext::PropertySetterCallback(
(static_cast<int>(attributes) &
static_cast<int>(PropertyAttribute::ReadOnly));
- if (read_only)
- return;
+ if (read_only) {
+ return Intercepted::kNo;
+ }
// true for x = 5
// false for this.x = 5
@@ -537,11 +544,16 @@ void ContextifyContext::PropertySetterCallback(
bool is_declared = is_declared_on_global_proxy || is_declared_on_sandbox;
if (!is_declared && args.ShouldThrowOnError() && is_contextual_store &&
- !is_function)
- return;
+ !is_function) {
+ return Intercepted::kNo;
+ }
- if (!is_declared && property->IsSymbol()) return;
- if (ctx->sandbox()->Set(context, property, value).IsNothing()) return;
+ if (!is_declared && property->IsSymbol()) {
+ return Intercepted::kNo;
+ }
+ if (ctx->sandbox()->Set(context, property, value).IsNothing()) {
+ return Intercepted::kNo;
+ }
Local<Value> desc;
if (is_declared_on_sandbox &&
@@ -555,19 +567,23 @@ void ContextifyContext::PropertySetterCallback(
// We have to specify the return value for any contextual or get/set
// property
if (desc_obj->HasOwnProperty(context, env->get_string()).FromMaybe(false) ||
- desc_obj->HasOwnProperty(context, env->set_string()).FromMaybe(false))
+ desc_obj->HasOwnProperty(context, env->set_string()).FromMaybe(false)) {
args.GetReturnValue().Set(value);
+ return Intercepted::kYes;
+ }
}
+ return Intercepted::kNo;
}
// static
-void ContextifyContext::PropertyDescriptorCallback(
- Local<Name> property,
- const PropertyCallbackInfo<Value>& args) {
+Intercepted ContextifyContext::PropertyDescriptorCallback(
+ Local<Name> property, const PropertyCallbackInfo<Value>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Local<Context> context = ctx->context();
@@ -577,19 +593,23 @@ void ContextifyContext::PropertyDescriptorCallback(
Local<Value> desc;
if (sandbox->GetOwnPropertyDescriptor(context, property).ToLocal(&desc)) {
args.GetReturnValue().Set(desc);
+ return Intercepted::kYes;
}
}
+ return Intercepted::kNo;
}
// static
-void ContextifyContext::PropertyDefinerCallback(
+Intercepted ContextifyContext::PropertyDefinerCallback(
Local<Name> property,
const PropertyDescriptor& desc,
- const PropertyCallbackInfo<Value>& args) {
+ const PropertyCallbackInfo<void>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Local<Context> context = ctx->context();
Isolate* isolate = context->GetIsolate();
@@ -608,7 +628,7 @@ void ContextifyContext::PropertyDefinerCallback(
// If the property is set on the global as neither writable nor
// configurable, don't change it on the global or sandbox.
if (is_declared && read_only && dont_delete) {
- return;
+ return Intercepted::kNo;
}
Local<Object> sandbox = ctx->sandbox();
@@ -631,6 +651,9 @@ void ContextifyContext::PropertyDefinerCallback(
desc.has_set() ? desc.set() : Undefined(isolate).As<Value>());
define_prop_on_sandbox(&desc_for_sandbox);
+ // TODO(https://github.com/nodejs/node/issues/52634): this should return
+ // kYes to behave according to the expected semantics.
+ return Intercepted::kNo;
} else {
Local<Value> value =
desc.has_value() ? desc.value() : Undefined(isolate).As<Value>();
@@ -642,26 +665,32 @@ void ContextifyContext::PropertyDefinerCallback(
PropertyDescriptor desc_for_sandbox(value);
define_prop_on_sandbox(&desc_for_sandbox);
}
+ // TODO(https://github.com/nodejs/node/issues/52634): this should return
+ // kYes to behave according to the expected semantics.
+ return Intercepted::kNo;
}
}
// static
-void ContextifyContext::PropertyDeleterCallback(
- Local<Name> property,
- const PropertyCallbackInfo<Boolean>& args) {
+Intercepted ContextifyContext::PropertyDeleterCallback(
+ Local<Name> property, const PropertyCallbackInfo<Boolean>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Maybe<bool> success = ctx->sandbox()->Delete(ctx->context(), property);
- if (success.FromMaybe(false))
- return;
+ if (success.FromMaybe(false)) {
+ return Intercepted::kNo;
+ }
// Delete failed on the sandbox, intercept and do not delete on
// the global object.
args.GetReturnValue().Set(false);
+ return Intercepted::kYes;
}
// static
@@ -681,76 +710,84 @@ void ContextifyContext::PropertyEnumeratorCallback(
}
// static
-void ContextifyContext::IndexedPropertyGetterCallback(
- uint32_t index,
- const PropertyCallbackInfo<Value>& args) {
+Intercepted ContextifyContext::IndexedPropertyGetterCallback(
+ uint32_t index, const PropertyCallbackInfo<Value>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
- ContextifyContext::PropertyGetterCallback(
+ return ContextifyContext::PropertyGetterCallback(
Uint32ToName(ctx->context(), index), args);
}
-
-void ContextifyContext::IndexedPropertySetterCallback(
+Intercepted ContextifyContext::IndexedPropertySetterCallback(
uint32_t index,
Local<Value> value,
- const PropertyCallbackInfo<Value>& args) {
+ const PropertyCallbackInfo<void>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
- ContextifyContext::PropertySetterCallback(
+ return ContextifyContext::PropertySetterCallback(
Uint32ToName(ctx->context(), index), value, args);
}
// static
-void ContextifyContext::IndexedPropertyDescriptorCallback(
- uint32_t index,
- const PropertyCallbackInfo<Value>& args) {
+Intercepted ContextifyContext::IndexedPropertyDescriptorCallback(
+ uint32_t index, const PropertyCallbackInfo<Value>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
- ContextifyContext::PropertyDescriptorCallback(
+ return ContextifyContext::PropertyDescriptorCallback(
Uint32ToName(ctx->context(), index), args);
}
-void ContextifyContext::IndexedPropertyDefinerCallback(
+Intercepted ContextifyContext::IndexedPropertyDefinerCallback(
uint32_t index,
const PropertyDescriptor& desc,
- const PropertyCallbackInfo<Value>& args) {
+ const PropertyCallbackInfo<void>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
- ContextifyContext::PropertyDefinerCallback(
+ return ContextifyContext::PropertyDefinerCallback(
Uint32ToName(ctx->context(), index), desc, args);
}
// static
-void ContextifyContext::IndexedPropertyDeleterCallback(
- uint32_t index,
- const PropertyCallbackInfo<Boolean>& args) {
+Intercepted ContextifyContext::IndexedPropertyDeleterCallback(
+ uint32_t index, const PropertyCallbackInfo<Boolean>& args) {
ContextifyContext* ctx = ContextifyContext::Get(args);
// Still initializing
- if (IsStillInitializing(ctx)) return;
+ if (IsStillInitializing(ctx)) {
+ return Intercepted::kNo;
+ }
Maybe<bool> success = ctx->sandbox()->Delete(ctx->context(), index);
- if (success.FromMaybe(false))
- return;
+ if (success.FromMaybe(false)) {
+ return Intercepted::kNo;
+ }
// Delete failed on the sandbox, intercept and do not delete on
// the global object.
args.GetReturnValue().Set(false);
+ return Intercepted::kYes;
}
void ContextifyScript::CreatePerIsolateProperties(
diff --git a/src/node_contextify.h b/src/node_contextify.h
index d42b5e0c544e726fc3f6d8392a554df9aa480fe9..ea2d513463057715127cb4b4f2d66b4cfcf71351 100644
--- a/src/node_contextify.h
+++ b/src/node_contextify.h
@@ -107,42 +107,39 @@ class ContextifyContext : public BaseObject {
const v8::FunctionCallbackInfo<v8::Value>& args);
static void WeakCallback(
const v8::WeakCallbackInfo<ContextifyContext>& data);
- static void PropertyGetterCallback(
+ static v8::Intercepted PropertyGetterCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& args);
- static void PropertySetterCallback(
+ static v8::Intercepted PropertySetterCallback(
v8::Local<v8::Name> property,
v8::Local<v8::Value> value,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void PropertyDescriptorCallback(
+ const v8::PropertyCallbackInfo<void>& args);
+ static v8::Intercepted PropertyDescriptorCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& args);
- static void PropertyDefinerCallback(
+ static v8::Intercepted PropertyDefinerCallback(
v8::Local<v8::Name> property,
const v8::PropertyDescriptor& desc,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void PropertyDeleterCallback(
+ const v8::PropertyCallbackInfo<void>& args);
+ static v8::Intercepted PropertyDeleterCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Boolean>& args);
static void PropertyEnumeratorCallback(
const v8::PropertyCallbackInfo<v8::Array>& args);
- static void IndexedPropertyGetterCallback(
- uint32_t index,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void IndexedPropertySetterCallback(
+ static v8::Intercepted IndexedPropertyGetterCallback(
+ uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args);
+ static v8::Intercepted IndexedPropertySetterCallback(
uint32_t index,
v8::Local<v8::Value> value,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void IndexedPropertyDescriptorCallback(
- uint32_t index,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void IndexedPropertyDefinerCallback(
+ const v8::PropertyCallbackInfo<void>& args);
+ static v8::Intercepted IndexedPropertyDescriptorCallback(
+ uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& args);
+ static v8::Intercepted IndexedPropertyDefinerCallback(
uint32_t index,
const v8::PropertyDescriptor& desc,
- const v8::PropertyCallbackInfo<v8::Value>& args);
- static void IndexedPropertyDeleterCallback(
- uint32_t index,
- const v8::PropertyCallbackInfo<v8::Boolean>& args);
+ const v8::PropertyCallbackInfo<void>& args);
+ static v8::Intercepted IndexedPropertyDeleterCallback(
+ uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& args);
v8::Global<v8::Context> context_;
std::unique_ptr<v8::MicrotaskQueue> microtask_queue_;
diff --git a/src/node_env_var.cc b/src/node_env_var.cc
index bce7ae07214ddf970a530db29ed6970e14b7a5ed..85f82180d48d6cfd7738cd7b1e504f23b38153e8 100644
--- a/src/node_env_var.cc
+++ b/src/node_env_var.cc
@@ -16,6 +16,7 @@ using v8::DontEnum;
using v8::FunctionTemplate;
using v8::HandleScope;
using v8::Integer;
+using v8::Intercepted;
using v8::Isolate;
using v8::Just;
using v8::Local;
@@ -336,24 +337,27 @@ Maybe<bool> KVStore::AssignToObject(v8::Isolate* isolate,
return Just(true);
}
-static void EnvGetter(Local<Name> property,
- const PropertyCallbackInfo<Value>& info) {
+static Intercepted EnvGetter(Local<Name> property,
+ const PropertyCallbackInfo<Value>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(env->has_run_bootstrapping_code());
if (property->IsSymbol()) {
- return info.GetReturnValue().SetUndefined();
+ info.GetReturnValue().SetUndefined();
+ return Intercepted::kYes;
}
CHECK(property->IsString());
MaybeLocal<String> value_string =
env->env_vars()->Get(env->isolate(), property.As<String>());
if (!value_string.IsEmpty()) {
info.GetReturnValue().Set(value_string.ToLocalChecked());
+ return Intercepted::kYes;
}
+ return Intercepted::kNo;
}
-static void EnvSetter(Local<Name> property,
- Local<Value> value,
- const PropertyCallbackInfo<Value>& info) {
+static Intercepted EnvSetter(Local<Name> property,
+ Local<Value> value,
+ const PropertyCallbackInfo<void>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(env->has_run_bootstrapping_code());
// calling env->EmitProcessEnvWarning() sets a variable indicating that
@@ -369,35 +373,40 @@ static void EnvSetter(Local<Name> property,
"the "
"value to a string before setting process.env with it.",
"DEP0104")
- .IsNothing())
- return;
+ .IsNothing()) {
+ return Intercepted::kNo;
+ }
}
Local<String> key;
Local<String> value_string;
if (!property->ToString(env->context()).ToLocal(&key) ||
!value->ToString(env->context()).ToLocal(&value_string)) {
- return;
+ return Intercepted::kNo;
}
env->env_vars()->Set(env->isolate(), key, value_string);
- // Whether it worked or not, always return value.
- info.GetReturnValue().Set(value);
+ return Intercepted::kYes;
}
-static void EnvQuery(Local<Name> property,
- const PropertyCallbackInfo<Integer>& info) {
+static Intercepted EnvQuery(Local<Name> property,
+ const PropertyCallbackInfo<Integer>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(env->has_run_bootstrapping_code());
if (property->IsString()) {
int32_t rc = env->env_vars()->Query(env->isolate(), property.As<String>());
- if (rc != -1) info.GetReturnValue().Set(rc);
+ if (rc != -1) {
+ // Return attributes for the property.
+ info.GetReturnValue().Set(v8::None);
+ return Intercepted::kYes;
+ }
}
+ return Intercepted::kNo;
}
-static void EnvDeleter(Local<Name> property,
- const PropertyCallbackInfo<Boolean>& info) {
+static Intercepted EnvDeleter(Local<Name> property,
+ const PropertyCallbackInfo<Boolean>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(env->has_run_bootstrapping_code());
if (property->IsString()) {
@@ -407,6 +416,7 @@ static void EnvDeleter(Local<Name> property,
// process.env never has non-configurable properties, so always
// return true like the tc39 delete operator.
info.GetReturnValue().Set(true);
+ return Intercepted::kYes;
}
static void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
@@ -417,9 +427,9 @@ static void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
env->env_vars()->Enumerate(env->isolate()));
}
-static void EnvDefiner(Local<Name> property,
- const PropertyDescriptor& desc,
- const PropertyCallbackInfo<Value>& info) {
+static Intercepted EnvDefiner(Local<Name> property,
+ const PropertyDescriptor& desc,
+ const PropertyCallbackInfo<void>& info) {
Environment* env = Environment::GetCurrent(info);
if (desc.has_value()) {
if (!desc.has_writable() ||
@@ -430,6 +440,7 @@ static void EnvDefiner(Local<Name> property,
"configurable, writable,"
" and enumerable "
"data descriptor");
+ return Intercepted::kYes;
} else if (!desc.configurable() ||
!desc.enumerable() ||
!desc.writable()) {
@@ -438,6 +449,7 @@ static void EnvDefiner(Local<Name> property,
"configurable, writable,"
" and enumerable "
"data descriptor");
+ return Intercepted::kYes;
} else {
return EnvSetter(property, desc.value(), info);
}
@@ -447,12 +459,14 @@ static void EnvDefiner(Local<Name> property,
"'process.env' does not accept an"
" accessor(getter/setter)"
" descriptor");
+ return Intercepted::kYes;
} else {
THROW_ERR_INVALID_OBJECT_DEFINE_PROPERTY(env,
"'process.env' only accepts a "
"configurable, writable,"
" and enumerable "
"data descriptor");
+ return Intercepted::kYes;
}
}
diff --git a/src/node_external_reference.h b/src/node_external_reference.h
index 24f0c6771720d8a6cdb684a0d562d01564d433f7..a1ad176c45f1900fb248650eb8533df4690bcf29 100644
--- a/src/node_external_reference.h
+++ b/src/node_external_reference.h
@@ -65,16 +65,17 @@ class ExternalReferenceRegistry {
V(v8::FunctionCallback) \
V(v8::AccessorNameGetterCallback) \
V(v8::AccessorNameSetterCallback) \
- V(v8::GenericNamedPropertyDefinerCallback) \
- V(v8::GenericNamedPropertyDeleterCallback) \
- V(v8::GenericNamedPropertyEnumeratorCallback) \
- V(v8::GenericNamedPropertyQueryCallback) \
- V(v8::GenericNamedPropertySetterCallback) \
- V(v8::IndexedPropertySetterCallback) \
- V(v8::IndexedPropertyDefinerCallback) \
- V(v8::IndexedPropertyDeleterCallback) \
- V(v8::IndexedPropertyQueryCallback) \
- V(v8::IndexedPropertyDescriptorCallback) \
+ V(v8::NamedPropertyGetterCallback) \
+ V(v8::NamedPropertyDefinerCallback) \
+ V(v8::NamedPropertyDeleterCallback) \
+ V(v8::NamedPropertyEnumeratorCallback) \
+ V(v8::NamedPropertyQueryCallback) \
+ V(v8::NamedPropertySetterCallback) \
+ V(v8::IndexedPropertyGetterCallbackV2) \
+ V(v8::IndexedPropertySetterCallbackV2) \
+ V(v8::IndexedPropertyDefinerCallbackV2) \
+ V(v8::IndexedPropertyDeleterCallbackV2) \
+ V(v8::IndexedPropertyQueryCallbackV2) \
V(const v8::String::ExternalStringResourceBase*)
#define V(ExternalReferenceType) \

View File

@@ -0,0 +1,125 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Igor Sheludko <ishell@chromium.org>
Date: Fri, 19 Apr 2024 12:29:53 +0200
Subject: src: do not use soon-to-be-deprecated V8 API
V8 announced deprecation of the following methods:
- v8::Object::SetAccessor(...) in favor of
v8::Object::SetNativeDataProperty(...),
- v8::ObjectTemplate::SetNativeDataProperty(...) with AccessControl
parameter in favor of
v8::ObjectTemplate::SetNativeDataProperty(...) without AccessControl
parameter.
See https://crrev.com/c/5006387.
This slightly changes behavior of the following properties:
- process.debugPort (for worker processes),
- process.title (for worker processes),
- process.ppid.
The difference is that they will now behave like a regular writable
JavaScript data properties - in case setter callback is not provided
they will be be reconfigured from a native data property (the one
that calls C++ callbacks upon get/set operations) to a real data
property (so subsequent reads will no longer trigger C++ getter
callbacks).
PR-URL: https://github.com/nodejs/node/pull/53174
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/src/node_process_object.cc b/src/node_process_object.cc
index 274f1f01de8d84596ea24bd2bd65e83d69605178..935a6c612d706a611d4cf3f812f30978e0a81210 100644
--- a/src/node_process_object.cc
+++ b/src/node_process_object.cc
@@ -13,7 +13,6 @@
namespace node {
using v8::Context;
-using v8::DEFAULT;
using v8::EscapableHandleScope;
using v8::Function;
using v8::FunctionCallbackInfo;
@@ -183,13 +182,12 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
// process.title
CHECK(process
- ->SetAccessor(
+ ->SetNativeDataProperty(
context,
FIXED_ONE_BYTE_STRING(isolate, "title"),
ProcessTitleGetter,
env->owns_process_state() ? ProcessTitleSetter : nullptr,
Local<Value>(),
- DEFAULT,
None,
SideEffectType::kHasNoSideEffect)
.FromJust());
@@ -208,9 +206,15 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
READONLY_PROPERTY(process, "pid",
Integer::New(isolate, uv_os_getpid()));
- CHECK(process->SetAccessor(context,
- FIXED_ONE_BYTE_STRING(isolate, "ppid"),
- GetParentProcessId).FromJust());
+ CHECK(process
+ ->SetNativeDataProperty(context,
+ FIXED_ONE_BYTE_STRING(isolate, "ppid"),
+ GetParentProcessId,
+ nullptr,
+ Local<Value>(),
+ None,
+ SideEffectType::kHasNoSideEffect)
+ .FromJust());
// --security-revert flags
#define V(code, _, __) \
@@ -235,11 +239,14 @@ void PatchProcessObject(const FunctionCallbackInfo<Value>& args) {
// process.debugPort
CHECK(process
- ->SetAccessor(context,
- FIXED_ONE_BYTE_STRING(isolate, "debugPort"),
- DebugPortGetter,
- env->owns_process_state() ? DebugPortSetter : nullptr,
- Local<Value>())
+ ->SetNativeDataProperty(
+ context,
+ FIXED_ONE_BYTE_STRING(isolate, "debugPort"),
+ DebugPortGetter,
+ env->owns_process_state() ? DebugPortSetter : nullptr,
+ Local<Value>(),
+ None,
+ SideEffectType::kHasNoSideEffect)
.FromJust());
}
diff --git a/test/parallel/test-worker-unsupported-things.js b/test/parallel/test-worker-unsupported-things.js
index 18c1617c3cde5ef12f9c97828840c39e0be3dc2c..95d93d24dec9f1944091a97574f01c94d617cc49 100644
--- a/test/parallel/test-worker-unsupported-things.js
+++ b/test/parallel/test-worker-unsupported-things.js
@@ -14,14 +14,16 @@ if (!process.env.HAS_STARTED_WORKER) {
} else {
{
const before = process.title;
- process.title += ' in worker';
- assert.strictEqual(process.title, before);
+ const after = before + ' in worker';
+ process.title = after;
+ assert.strictEqual(process.title, after);
}
{
const before = process.debugPort;
- process.debugPort++;
- assert.strictEqual(process.debugPort, before);
+ const after = before + 1;
+ process.debugPort = after;
+ assert.strictEqual(process.debugPort, after);
}
{

View File

@@ -8,7 +8,7 @@ This definition conflicts with libuv's: https://github.com/libuv/libuv/blob/bb0b
Breaks the build on 32-bit windows.
diff --git a/include/perfetto/ext/base/sys_types.h b/include/perfetto/ext/base/sys_types.h
index bcb6433a23d160d69b52095280c024ff71e984cc..e5f575ee694153e87168bfc4d563d9fd35ecaaa4 100644
index 33ef5e7d652807f2607466287eadd053c9c0ab67..dc1197ba0d6e30e22ddab55c4a57de30193fb1f5 100644
--- a/include/perfetto/ext/base/sys_types.h
+++ b/include/perfetto/ext/base/sys_types.h
@@ -33,11 +33,7 @@ using uid_t = int;

View File

@@ -1,3 +1,2 @@
chore_allow_customizing_microtask_policy_per_context.patch
deps_add_v8_object_setinternalfieldfornodecore.patch
revert_heap_add_checks_position_info.patch

View File

@@ -11,7 +11,7 @@ This is a non-ABI breaking solution added by Node.js in v20.x for:
which are necessary for backporting the vm-related memory fixes in https://github.com/nodejs/node/pull/48510.
diff --git a/include/v8-object.h b/include/v8-object.h
index 30708c44e10a5d965d6e3ad9df607ef62edb3c5d..ee862a1eed0694f87f4348af2f94869adc942ab8 100644
index 170429bf163b02963c0d59de4cd2b19bedf2e54a..c131d78dc92a37b92ef4608f8954bff4b8884a77 100644
--- a/include/v8-object.h
+++ b/include/v8-object.h
@@ -22,6 +22,8 @@ class Function;
@@ -23,7 +23,7 @@ index 30708c44e10a5d965d6e3ad9df607ef62edb3c5d..ee862a1eed0694f87f4348af2f94869a
/**
* A private symbol
@@ -543,6 +545,21 @@ class V8_EXPORT Object : public Value {
@@ -526,6 +528,21 @@ class V8_EXPORT Object : public Value {
index);
}
@@ -46,10 +46,10 @@ index 30708c44e10a5d965d6e3ad9df607ef62edb3c5d..ee862a1eed0694f87f4348af2f94869a
V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc
index 732ee34a9776e516b764957525161874d9c27a2b..a544aeddd7310f60b1cbc1496174a8d2ccdf775e 100644
index 88991b5bc332f44079ae1868e67a20f79033f864..babf2f5aa9c6eacc02a4d56e77dc751c838ea657 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -6293,14 +6293,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
@@ -6277,14 +6277,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
isolate);
}
@@ -61,7 +61,7 @@ index 732ee34a9776e516b764957525161874d9c27a2b..a544aeddd7310f60b1cbc1496174a8d2
const char* location = "v8::Object::SetInternalField()";
if (!InternalFieldOK(obj, index, location)) return;
auto val = Utils::OpenDirectHandle(*value);
i::DirectHandle<i::JSObject>::cast(obj)->SetEmbedderField(index, *val);
i::Cast<i::JSObject>(obj)->SetEmbedderField(index, *val);
}
+void v8::Object::SetInternalField(int index, v8::Local<Data> value) {

View File

@@ -1,438 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Keeley Hammond <khammond@slack-corp.com>
Date: Tue, 7 May 2024 15:50:31 -0700
Subject: Revert "[heap] Add checks for ensuring position info slow path is not
used in heap snapshot"
These two CLs were causing several heap-related tests to fail, and
the issue seems to be under construction in future Chrome rolls.
This patch can be removed when the issue is fixed upstream.
CR Bug: https://issues.chromium.org/issues/42204564
This reverts commit ca51566b53be5507ff184704767c7a9220a68733 and commit
6e70dc9e73af2a930074f4f000864fbc65515b74.
diff --git a/src/common/assert-scope.cc b/src/common/assert-scope.cc
index 0ea1a04fed062658fa36c239d323e70d0358b57d..1b996b14e490a6fe1b3636f9147728f07cca141f 100644
--- a/src/common/assert-scope.cc
+++ b/src/common/assert-scope.cc
@@ -108,8 +108,6 @@ template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, true>;
template class PerThreadAssertScope<CODE_ALLOCATION_ASSERT, false>;
template class PerThreadAssertScope<CODE_ALLOCATION_ASSERT, true>;
template class PerThreadAssertScope<GC_MOLE, false>;
-template class PerThreadAssertScope<POSITION_INFO_SLOW_ASSERT, false>;
-template class PerThreadAssertScope<POSITION_INFO_SLOW_ASSERT, true>;
} // namespace internal
} // namespace v8
diff --git a/src/common/assert-scope.h b/src/common/assert-scope.h
index 27fbc04bc880f2ea68dc7a126b8091a3b5ab4025..42d9649c5250c06a4d39ba0306cbdea0b0e5a8c3 100644
--- a/src/common/assert-scope.h
+++ b/src/common/assert-scope.h
@@ -30,7 +30,6 @@ enum PerThreadAssertType {
CODE_ALLOCATION_ASSERT,
// Dummy type for disabling GC mole.
GC_MOLE,
- POSITION_INFO_SLOW_ASSERT,
};
template <PerThreadAssertType kType, bool kAllow>
@@ -258,14 +257,6 @@ using DisallowGarbageCollection =
// work.
using DisableGCMole = PerThreadAssertScopeDebugOnly<GC_MOLE, false>;
-// Scope to ensure slow path for obtaining position info is not called
-using DisallowPositionInfoSlow =
- PerThreadAssertScopeDebugOnly<POSITION_INFO_SLOW_ASSERT, false>;
-
-// Scope to add an exception to disallowing position info slow path
-using AllowPositionInfoSlow =
- PerThreadAssertScopeDebugOnly<POSITION_INFO_SLOW_ASSERT, true>;
-
// The DISALLOW_GARBAGE_COLLECTION macro can be used to define a
// DisallowGarbageCollection field in classes that isn't present in release
// builds.
@@ -337,8 +328,6 @@ extern template class PerThreadAssertScope<CODE_DEPENDENCY_CHANGE_ASSERT, true>;
extern template class PerThreadAssertScope<CODE_ALLOCATION_ASSERT, false>;
extern template class PerThreadAssertScope<CODE_ALLOCATION_ASSERT, true>;
extern template class PerThreadAssertScope<GC_MOLE, false>;
-extern template class PerThreadAssertScope<POSITION_INFO_SLOW_ASSERT, false>;
-extern template class PerThreadAssertScope<POSITION_INFO_SLOW_ASSERT, true>;
} // namespace internal
} // namespace v8
diff --git a/src/objects/objects.cc b/src/objects/objects.cc
index d83783a5560a355684a866e1aca2cc081835919b..f8622e1311838df9548bc1839cd40d17af02a7d2 100644
--- a/src/objects/objects.cc
+++ b/src/objects/objects.cc
@@ -4361,7 +4361,6 @@ namespace {
template <typename Char>
bool GetPositionInfoSlowImpl(base::Vector<Char> source, int position,
Script::PositionInfo* info) {
- DCHECK(DisallowPositionInfoSlow::IsAllowed());
if (position < 0) {
position = 0;
}
@@ -4408,11 +4407,25 @@ int GetLength(const String::LineEndsVector& vector) {
}
int GetLength(const Tagged<FixedArray>& array) { return array->length(); }
+} // namespace
+
+void Script::AddPositionInfoOffset(PositionInfo* info,
+ OffsetFlag offset_flag) const {
+ // Add offsets if requested.
+ if (offset_flag == OffsetFlag::kWithOffset) {
+ if (info->line == 0) {
+ info->column += column_offset();
+ }
+ info->line += line_offset();
+ } else {
+ DCHECK_EQ(offset_flag, OffsetFlag::kNoOffset);
+ }
+}
template <typename LineEndsContainer>
-bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends,
- int position, Script::PositionInfo* info,
- const DisallowGarbageCollection& no_gc) {
+bool Script::GetPositionInfoInternal(
+ const LineEndsContainer& ends, int position, Script::PositionInfo* info,
+ const DisallowGarbageCollection& no_gc) const {
const int ends_len = GetLength(ends);
if (ends_len == 0) return false;
@@ -4451,31 +4464,6 @@ bool GetLineEndsContainerPositionInfo(const LineEndsContainer& ends,
info->column = position - info->line_start;
}
- return true;
-}
-
-} // namespace
-
-void Script::AddPositionInfoOffset(PositionInfo* info,
- OffsetFlag offset_flag) const {
- // Add offsets if requested.
- if (offset_flag == OffsetFlag::kWithOffset) {
- if (info->line == 0) {
- info->column += column_offset();
- }
- info->line += line_offset();
- } else {
- DCHECK_EQ(offset_flag, OffsetFlag::kNoOffset);
- }
-}
-
-template <typename LineEndsContainer>
-bool Script::GetPositionInfoInternal(
- const LineEndsContainer& ends, int position, Script::PositionInfo* info,
- const DisallowGarbageCollection& no_gc) const {
- if (!GetLineEndsContainerPositionInfo(ends, position, info, no_gc))
- return false;
-
// Line end is position of the linebreak character.
info->line_end = GetLineEnd(ends, info->line);
if (info->line_end > 0) {
@@ -4544,23 +4532,6 @@ bool Script::GetPositionInfoWithLineEnds(
return true;
}
-bool Script::GetLineColumnWithLineEnds(
- int position, int& line, int& column,
- const String::LineEndsVector& line_ends) {
- DisallowGarbageCollection no_gc;
- PositionInfo info;
- if (!GetLineEndsContainerPositionInfo(line_ends, position, &info, no_gc)) {
- line = -1;
- column = -1;
- return false;
- }
-
- line = info.line;
- column = info.column;
-
- return true;
-}
-
int Script::GetColumnNumber(Handle<Script> script, int code_pos) {
PositionInfo info;
GetPositionInfo(script, code_pos, &info);
diff --git a/src/objects/script.h b/src/objects/script.h
index bfa0dc0e9b7625636c21620563ef0a19fcf20900..8b89639dd78a80cfae570a4746f391b1359d65a7 100644
--- a/src/objects/script.h
+++ b/src/objects/script.h
@@ -205,9 +205,6 @@ class Script : public TorqueGeneratedScript<Script, Struct> {
static bool GetPositionInfo(Handle<Script> script, int position,
PositionInfo* info,
OffsetFlag offset_flag = OffsetFlag::kWithOffset);
- static bool GetLineColumnWithLineEnds(
- int position, int& line, int& column,
- const String::LineEndsVector& line_ends);
V8_EXPORT_PRIVATE bool GetPositionInfo(
int position, PositionInfo* info,
OffsetFlag offset_flag = OffsetFlag::kWithOffset) const;
diff --git a/src/profiler/allocation-tracker.cc b/src/profiler/allocation-tracker.cc
index 4f9e3bb8a5d2b20bba2cc09770872b6ab2a546e8..eac8c082aee0a122282f70956816a25c1ee30112 100644
--- a/src/profiler/allocation-tracker.cc
+++ b/src/profiler/allocation-tracker.cc
@@ -96,7 +96,10 @@ AllocationTracker::FunctionInfo::FunctionInfo()
function_id(0),
script_name(""),
script_id(0),
- start_position(-1) {}
+ line(-1),
+ column(-1) {
+}
+
void AddressToTraceMap::AddRange(Address start, int size,
unsigned trace_node_id) {
@@ -178,10 +181,23 @@ AllocationTracker::AllocationTracker(HeapObjectsMap* ids, StringsStorage* names)
function_info_list_.push_back(info);
}
+
AllocationTracker::~AllocationTracker() {
+ for (UnresolvedLocation* location : unresolved_locations_) delete location;
for (FunctionInfo* info : function_info_list_) delete info;
}
+
+void AllocationTracker::PrepareForSerialization() {
+ for (UnresolvedLocation* location : unresolved_locations_) {
+ location->Resolve();
+ delete location;
+ }
+ unresolved_locations_.clear();
+ unresolved_locations_.shrink_to_fit();
+}
+
+
void AllocationTracker::AllocationEvent(Address addr, int size) {
DisallowGarbageCollection no_gc;
Heap* heap = ids_->heap();
@@ -235,7 +251,10 @@ unsigned AllocationTracker::AddFunctionInfo(Tagged<SharedFunctionInfo> shared,
info->script_name = names_->GetName(name);
}
info->script_id = script->id();
- info->start_position = shared->StartPosition();
+ // Converting start offset into line and column may cause heap
+ // allocations so we postpone them until snapshot serialization.
+ unresolved_locations_.push_back(
+ new UnresolvedLocation(script, shared->StartPosition(), info));
}
entry->value = reinterpret_cast<void*>(function_info_list_.size());
function_info_list_.push_back(info);
@@ -255,5 +274,39 @@ unsigned AllocationTracker::functionInfoIndexForVMState(StateTag state) {
return info_index_for_other_state_;
}
+AllocationTracker::UnresolvedLocation::UnresolvedLocation(Tagged<Script> script,
+ int start,
+ FunctionInfo* info)
+ : start_position_(start), info_(info) {
+ script_ = script->GetIsolate()->global_handles()->Create(script);
+ GlobalHandles::MakeWeak(script_.location(), this, &HandleWeakScript,
+ v8::WeakCallbackType::kParameter);
+}
+
+AllocationTracker::UnresolvedLocation::~UnresolvedLocation() {
+ if (!script_.is_null()) {
+ GlobalHandles::Destroy(script_.location());
+ }
+}
+
+
+void AllocationTracker::UnresolvedLocation::Resolve() {
+ if (script_.is_null()) return;
+ HandleScope scope(script_->GetIsolate());
+ Script::PositionInfo pos_info;
+ Script::GetPositionInfo(script_, start_position_, &pos_info);
+ info_->line = pos_info.line;
+ info_->column = pos_info.column;
+}
+
+void AllocationTracker::UnresolvedLocation::HandleWeakScript(
+ const v8::WeakCallbackInfo<void>& data) {
+ UnresolvedLocation* loc =
+ reinterpret_cast<UnresolvedLocation*>(data.GetParameter());
+ GlobalHandles::Destroy(loc->script_.location());
+ loc->script_ = Handle<Script>::null();
+}
+
+
} // namespace internal
} // namespace v8
diff --git a/src/profiler/allocation-tracker.h b/src/profiler/allocation-tracker.h
index d04bb9bf73b4b5725c99dade26510f4964ec0d4b..bb59c92a780160c4168349bfc5d523dffff5684f 100644
--- a/src/profiler/allocation-tracker.h
+++ b/src/profiler/allocation-tracker.h
@@ -104,7 +104,8 @@ class AllocationTracker {
SnapshotObjectId function_id;
const char* script_name;
int script_id;
- int start_position;
+ int line;
+ int column;
};
AllocationTracker(HeapObjectsMap* ids, StringsStorage* names);
@@ -112,6 +113,7 @@ class AllocationTracker {
AllocationTracker(const AllocationTracker&) = delete;
AllocationTracker& operator=(const AllocationTracker&) = delete;
+ V8_EXPORT_PRIVATE void PrepareForSerialization();
void AllocationEvent(Address addr, int size);
AllocationTraceTree* trace_tree() { return &trace_tree_; }
@@ -125,6 +127,20 @@ class AllocationTracker {
SnapshotObjectId id);
unsigned functionInfoIndexForVMState(StateTag state);
+ class UnresolvedLocation {
+ public:
+ UnresolvedLocation(Tagged<Script> script, int start, FunctionInfo* info);
+ ~UnresolvedLocation();
+ void Resolve();
+
+ private:
+ static void HandleWeakScript(const v8::WeakCallbackInfo<void>& data);
+
+ Handle<Script> script_;
+ int start_position_;
+ FunctionInfo* info_;
+ };
+
static const int kMaxAllocationTraceLength = 64;
HeapObjectsMap* ids_;
StringsStorage* names_;
@@ -132,6 +148,7 @@ class AllocationTracker {
unsigned allocation_trace_buffer_[kMaxAllocationTraceLength];
std::vector<FunctionInfo*> function_info_list_;
base::HashMap id_to_function_info_index_;
+ std::vector<UnresolvedLocation*> unresolved_locations_;
unsigned info_index_for_other_state_;
AddressToTraceMap address_to_trace_;
};
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
index 1b7170bd84c29d9e6228e92a8e3ad46d50967a15..417a487bd6767b15bb177394f4273af21bd64883 100644
--- a/src/profiler/heap-snapshot-generator.cc
+++ b/src/profiler/heap-snapshot-generator.cc
@@ -2999,6 +2999,7 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
IsolateSafepointScope scope(heap_);
Isolate* isolate = heap_->isolate();
+ v8_heap_explorer_.PopulateLineEnds();
auto temporary_global_object_tags =
v8_heap_explorer_.CollectTemporaryGlobalObjectsTags();
@@ -3010,7 +3011,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
// DisallowGarbageCollection scope as the HeapObjectIterator used during
// snapshot creation enters a safepoint as well. However, in practice we
// already enter a safepoint above so that should never trigger a GC.
- DisallowPositionInfoSlow no_position_info_slow;
NullContextForSnapshotScope null_context_scope(isolate);
@@ -3021,7 +3021,6 @@ bool HeapSnapshotGenerator::GenerateSnapshot() {
snapshot_->AddSyntheticRootEntries();
- v8_heap_explorer_.PopulateLineEnds();
if (!FillReferences()) return false;
snapshot_->FillChildren();
@@ -3092,9 +3091,12 @@ bool HeapSnapshotGenerator::FillReferences() {
const int HeapSnapshotJSONSerializer::kNodeFieldsCount = 7;
void HeapSnapshotJSONSerializer::Serialize(v8::OutputStream* stream) {
- DisallowHeapAllocation no_heap_allocation;
v8::base::ElapsedTimer timer;
timer.Start();
+ if (AllocationTracker* allocation_tracker =
+ snapshot_->profiler()->allocation_tracker()) {
+ allocation_tracker->PrepareForSerialization();
+ }
DCHECK_NULL(writer_);
writer_ = new OutputStreamWriter(stream);
SerializeImpl();
@@ -3452,17 +3454,10 @@ void HeapSnapshotJSONSerializer::SerializeTraceNodeInfos() {
// The cast is safe because script id is a non-negative Smi.
buffer_pos =
utoa(static_cast<unsigned>(info->script_id), buffer, buffer_pos);
-
- auto& line_ends = snapshot_->GetScriptLineEnds(info->script_id);
- int line = -1;
- int column = -1;
- Script::GetLineColumnWithLineEnds(info->start_position, line, column,
- line_ends);
-
buffer[buffer_pos++] = ',';
- buffer_pos = SerializePosition(line, buffer, buffer_pos);
+ buffer_pos = SerializePosition(info->line, buffer, buffer_pos);
buffer[buffer_pos++] = ',';
- buffer_pos = SerializePosition(column, buffer, buffer_pos);
+ buffer_pos = SerializePosition(info->column, buffer, buffer_pos);
buffer[buffer_pos++] = '\n';
buffer[buffer_pos++] = '\0';
writer_->AddString(buffer.begin());
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 4885cab74f95378a9ff884d58a8c089624985a8f..f1e869f28e00c0449e85b00f3f4626e0941e4c43 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2841,6 +2841,8 @@ TEST(ArrayGrowLeftTrim) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
@@ -2863,6 +2865,8 @@ TEST(TrackHeapAllocationsWithInlining) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
@@ -2895,6 +2899,8 @@ TEST(TrackHeapAllocationsWithoutInlining) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
@@ -2943,6 +2949,8 @@ TEST(TrackBumpPointerAllocations) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
@@ -2967,6 +2975,8 @@ TEST(TrackBumpPointerAllocations) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);
@@ -2994,6 +3004,8 @@ TEST(TrackV8ApiAllocation) {
AllocationTracker* tracker =
reinterpret_cast<i::HeapProfiler*>(heap_profiler)->allocation_tracker();
CHECK(tracker);
+ // Resolve all function locations.
+ tracker->PrepareForSerialization();
// Print for better diagnostics in case of failure.
tracker->trace_tree()->Print(tracker);

View File

@@ -196,7 +196,7 @@ def get_buildtools_executable(name):
raise Exception(f"Unsupported platform: {sys.platform}")
if name == 'clang-format':
path = os.path.join(buildtools, chromium_platform, 'format', name)
path = os.path.join(buildtools, f"{chromium_platform}-format", name)
else:
path = os.path.join(buildtools, chromium_platform, name)
if sys.platform == 'win32':

View File

@@ -3595,13 +3595,13 @@ void WebContents::SetZoomFactor(gin_helper::ErrorThrower thrower,
return;
}
auto level = blink::PageZoomFactorToZoomLevel(factor);
auto level = blink::ZoomFactorToZoomLevel(factor);
SetZoomLevel(level);
}
double WebContents::GetZoomFactor() const {
auto level = GetZoomLevel();
return blink::PageZoomLevelToZoomFactor(level);
return blink::ZoomLevelToZoomFactor(level);
}
void WebContents::SetTemporaryZoomLevel(double level) {

View File

@@ -174,7 +174,7 @@ std::optional<int> GetZoomLevel(content::WebContents* capturer,
return std::nullopt;
}
double zoom_level = blink::PageZoomLevelToZoomFactor(
double zoom_level = blink::ZoomLevelToZoomFactor(
content::HostZoomMap::GetZoomLevel(captured_wc));
return std::round(100 * zoom_level);
}

View File

@@ -26,8 +26,6 @@ namespace {
namespace IsAllowedLocalFileAccess =
api::pdf_viewer_private::IsAllowedLocalFileAccess;
namespace SetPdfOcrPref = api::pdf_viewer_private::SetPdfOcrPref;
namespace SetPdfPluginAttributes =
api::pdf_viewer_private::SetPdfPluginAttributes;
@@ -141,32 +139,6 @@ PdfViewerPrivateSetPdfDocumentTitleFunction::Run() {
return RespondNow(NoArguments());
}
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() = default;
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::
~PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() = default;
// TODO(codebytere): enable when https://crbug.com/1393069 works properly.
ExtensionFunction::ResponseAction
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::Run() {
return RespondNow(WithArguments(false));
}
PdfViewerPrivateSetPdfOcrPrefFunction::PdfViewerPrivateSetPdfOcrPrefFunction() =
default;
PdfViewerPrivateSetPdfOcrPrefFunction::
~PdfViewerPrivateSetPdfOcrPrefFunction() = default;
// TODO(codebytere): enable when https://crbug.com/1393069 works properly.
ExtensionFunction::ResponseAction PdfViewerPrivateSetPdfOcrPrefFunction::Run() {
std::optional<SetPdfOcrPref::Params> params =
SetPdfOcrPref::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
return RespondNow(WithArguments(false));
}
PdfViewerPrivateSetPdfPluginAttributesFunction::
PdfViewerPrivateSetPdfPluginAttributesFunction() = default;

View File

@@ -64,42 +64,6 @@ class PdfViewerPrivateSetPdfDocumentTitleFunction : public ExtensionFunction {
ResponseAction Run() override;
};
class PdfViewerPrivateIsPdfOcrAlwaysActiveFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("pdfViewerPrivate.isPdfOcrAlwaysActive",
PDFVIEWERPRIVATE_ISPDFOCRALWAYSACTIVE)
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction();
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction(
const PdfViewerPrivateIsPdfOcrAlwaysActiveFunction&) = delete;
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction& operator=(
const PdfViewerPrivateIsPdfOcrAlwaysActiveFunction&) = delete;
protected:
~PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() override;
// Override from ExtensionFunction:
ResponseAction Run() override;
};
class PdfViewerPrivateSetPdfOcrPrefFunction : public ExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("pdfViewerPrivate.setPdfOcrPref",
PDFVIEWERPRIVATE_SETPDFOCRPREF)
PdfViewerPrivateSetPdfOcrPrefFunction();
PdfViewerPrivateSetPdfOcrPrefFunction(
const PdfViewerPrivateSetPdfOcrPrefFunction&) = delete;
PdfViewerPrivateSetPdfOcrPrefFunction& operator=(
const PdfViewerPrivateSetPdfOcrPrefFunction&) = delete;
protected:
~PdfViewerPrivateSetPdfOcrPrefFunction() override;
// Override from ExtensionFunction:
ResponseAction Run() override;
};
class PdfViewerPrivateSetPdfPluginAttributesFunction
: public ExtensionFunction {
public:

View File

@@ -18,8 +18,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "extensions/browser/api/scripting/scripting_constants.h"
#include "extensions/browser/api/scripting/scripting_utils.h"
#include "extensions/browser/extension_api_frame_id_map.h"
#include "extensions/browser/extension_file_task_runner.h"
#include "extensions/browser/extension_registry.h"
@@ -28,6 +26,8 @@
#include "extensions/browser/extension_util.h"
#include "extensions/browser/load_and_localize_file.h"
#include "extensions/browser/script_executor.h"
#include "extensions/browser/scripting_constants.h"
#include "extensions/browser/scripting_utils.h"
#include "extensions/browser/user_script_manager.h"
#include "extensions/common/api/extension_types.h"
#include "extensions/common/api/scripts_internal.h"

View File

@@ -12,9 +12,9 @@
#include <vector>
#include "chrome/common/extensions/api/scripting.h"
#include "extensions/browser/api/scripting/scripting_utils.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/script_executor.h"
#include "extensions/browser/scripting_utils.h"
#include "extensions/common/mojom/code_injection.mojom.h"
#include "extensions/common/user_script.h"

View File

@@ -365,11 +365,10 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
return RespondNow(Error(error));
auto* zoom_controller = contents->GetZoomController();
double zoom_level =
params->zoom_factor > 0
? blink::PageZoomFactorToZoomLevel(params->zoom_factor)
: blink::PageZoomFactorToZoomLevel(
zoom_controller->default_zoom_factor());
double zoom_level = params->zoom_factor > 0
? blink::ZoomFactorToZoomLevel(params->zoom_factor)
: blink::ZoomFactorToZoomLevel(
zoom_controller->default_zoom_factor());
zoom_controller->SetZoomLevel(zoom_level);
@@ -387,7 +386,7 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
return RespondNow(Error("No such tab"));
double zoom_level = contents->GetZoomController()->GetZoomLevel();
double zoom_factor = blink::PageZoomLevelToZoomFactor(zoom_level);
double zoom_factor = blink::ZoomLevelToZoomFactor(zoom_level);
return RespondNow(ArgumentList(tabs::GetZoom::Results::Create(zoom_factor)));
}
@@ -408,7 +407,7 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
tabs::ZoomSettings zoom_settings;
ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
zoom_settings.default_zoom_factor =
blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel());
blink::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel());
return RespondNow(
ArgumentList(tabs::GetZoomSettings::Results::Create(zoom_settings)));

View File

@@ -19,7 +19,8 @@
#include "third_party/blink/public/common/features.h"
#if BUILDFLAG(IS_MAC)
#include "device/base/features.h" // nogncheck
#include "content/common/features.h" // nogncheck
#include "device/base/features.h" // nogncheck
#endif
namespace electron {
@@ -46,6 +47,12 @@ void InitializeFeatureList() {
// 'custom dictionary word list API' spec to crash.
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
#endif
#if BUILDFLAG(IS_MAC)
// Disable window occlusion checker.
disable_features +=
std::string(",") + features::kMacWebContentsOcclusion.name;
#endif
std::string platform_specific_enable_features =
EnablePlatformSpecificFeatures();
if (platform_specific_enable_features.size() > 0) {

View File

@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/process/launch.h"
#include "base/process/process_handle.h"
#include "base/strings/strcat_win.h"
#include "base/strings/string_number_conversions_win.h"
#include "base/strings/utf_string_conversions.h"
@@ -44,24 +45,13 @@ struct PROCESS_BASIC_INFORMATION {
};
HANDLE GetParentProcessHandle(base::ProcessHandle handle) {
NtQueryInformationProcessFunction NtQueryInformationProcess = nullptr;
ResolveNTFunctionPtr("NtQueryInformationProcess", &NtQueryInformationProcess);
if (!NtQueryInformationProcess) {
LOG(ERROR) << "Unable to get NtQueryInformationProcess";
base::ProcessId ppid = base::GetParentProcessId(handle);
if (ppid == 0u) {
LOG(ERROR) << "Could not get parent process handle";
return nullptr;
}
PROCESS_BASIC_INFORMATION pbi;
LONG status =
NtQueryInformationProcess(handle, ProcessBasicInformation, &pbi,
sizeof(PROCESS_BASIC_INFORMATION), nullptr);
if (!NT_SUCCESS(status)) {
LOG(ERROR) << "NtQueryInformationProcess failed";
return nullptr;
}
return ::OpenProcess(PROCESS_ALL_ACCESS, TRUE,
pbi.InheritedFromUniqueProcessId);
return ::OpenProcess(PROCESS_ALL_ACCESS, TRUE, ppid);
}
StringType AddQuoteForArg(const StringType& arg) {

View File

@@ -127,15 +127,15 @@ void SetZoomLevelForWebContents(content::WebContents* web_contents,
}
double GetNextZoomLevel(double level, bool out) {
double factor = blink::PageZoomLevelToZoomFactor(level);
double factor = blink::ZoomLevelToZoomFactor(level);
size_t size = std::size(kPresetZoomFactors);
for (size_t i = 0; i < size; ++i) {
if (!blink::PageZoomValuesEqual(kPresetZoomFactors[i], factor))
if (!blink::ZoomValuesEqual(kPresetZoomFactors[i], factor))
continue;
if (out && i > 0)
return blink::PageZoomFactorToZoomLevel(kPresetZoomFactors[i - 1]);
return blink::ZoomFactorToZoomLevel(kPresetZoomFactors[i - 1]);
if (!out && i != size - 1)
return blink::PageZoomFactorToZoomLevel(kPresetZoomFactors[i + 1]);
return blink::ZoomFactorToZoomLevel(kPresetZoomFactors[i + 1]);
}
return level;
}

View File

@@ -84,7 +84,7 @@ bool WebContentsZoomController::SetZoomLevel(double level) {
// Do not actually rescale the page in manual mode.
if (zoom_mode_ == ZOOM_MODE_MANUAL) {
// If the zoom level hasn't changed, early out to avoid sending an event.
if (blink::PageZoomValuesEqual(zoom_level_, level))
if (blink::ZoomValuesEqual(zoom_level_, level))
return true;
double old_zoom_level = zoom_level_;
@@ -333,7 +333,7 @@ void WebContentsZoomController::RenderFrameHostChanged(
void WebContentsZoomController::SetZoomFactorOnNavigationIfNeeded(
const GURL& url) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (blink::PageZoomValuesEqual(default_zoom_factor(), kPageZoomEpsilon))
if (blink::ZoomValuesEqual(default_zoom_factor(), kPageZoomEpsilon))
return;
content::GlobalRenderFrameHostId old_rfh_id_ =
@@ -357,11 +357,11 @@ void WebContentsZoomController::SetZoomFactorOnNavigationIfNeeded(
std::string host = net::GetHostOrSpecFromURL(url);
std::string scheme = url.scheme();
double zoom_factor = default_zoom_factor();
double zoom_level = blink::PageZoomFactorToZoomLevel(zoom_factor);
double zoom_level = blink::ZoomFactorToZoomLevel(zoom_factor);
if (host_zoom_map_->HasZoomLevel(scheme, host)) {
zoom_level = host_zoom_map_->GetZoomLevelForHostAndScheme(scheme, host);
}
if (blink::PageZoomValuesEqual(zoom_level, GetZoomLevel()))
if (blink::ZoomValuesEqual(zoom_level, GetZoomLevel()))
return;
SetZoomLevel(zoom_level);

View File

@@ -76,13 +76,13 @@ void WebViewGuestDelegate::OnZoomChanged(
if (data.temporary) {
zoom_controller->SetTemporaryZoomLevel(data.new_zoom_level);
} else {
if (blink::PageZoomValuesEqual(data.new_zoom_level,
zoom_controller->GetZoomLevel()))
if (blink::ZoomValuesEqual(data.new_zoom_level,
zoom_controller->GetZoomLevel()))
return;
zoom_controller->SetZoomLevel(data.new_zoom_level);
}
// Change the default zoom factor to match the embedders' new zoom level.
double zoom_factor = blink::PageZoomLevelToZoomFactor(data.new_zoom_level);
double zoom_factor = blink::ZoomLevelToZoomFactor(data.new_zoom_level);
zoom_controller->SetDefaultZoomFactor(zoom_factor);
}
}

View File

@@ -53,7 +53,7 @@ ZoomLevelDelegate::ZoomLevelDelegate(PrefService* pref_service,
ZoomLevelDelegate::~ZoomLevelDelegate() = default;
void ZoomLevelDelegate::SetDefaultZoomLevelPref(double level) {
if (blink::PageZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel()))
if (blink::ZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel()))
return;
ScopedDictPrefUpdate update(pref_service_, kPartitionDefaultZoomLevel);
@@ -79,7 +79,7 @@ void ZoomLevelDelegate::OnZoomLevelChanged(
base::Value::Dict& host_zoom_dictionaries = update.Get();
bool modification_is_removal =
blink::PageZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel());
blink::ZoomValuesEqual(level, host_zoom_map_->GetDefaultZoomLevel());
base::Value::Dict* host_zoom_dictionary =
host_zoom_dictionaries.FindDict(partition_key_);
@@ -109,8 +109,8 @@ void ZoomLevelDelegate::ExtractPerHostZoomLevels(
// will ignore type B values, thus, to have consistency with HostZoomMap's
// internal state, these values must also be removed from Prefs.
if (host.empty() || !zoom_level.has_value() ||
blink::PageZoomValuesEqual(zoom_level.value(),
host_zoom_map_->GetDefaultZoomLevel())) {
blink::ZoomValuesEqual(zoom_level.value(),
host_zoom_map_->GetDefaultZoomLevel())) {
keys_to_remove.push_back(host);
continue;
}

View File

@@ -66,7 +66,7 @@ class Archive : public node::ObjectWrap {
// Reads the offset and size of file.
static void GetFileInfo(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
base::FilePath path;
if (!gin::ConvertFromV8(isolate, args[0], &path)) {
@@ -104,7 +104,7 @@ class Archive : public node::ObjectWrap {
// Returns a fake result of fs.stat(path).
static void Stat(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
base::FilePath path;
if (!gin::ConvertFromV8(isolate, args[0], &path)) {
args.GetReturnValue().Set(v8::False(isolate));
@@ -127,7 +127,7 @@ class Archive : public node::ObjectWrap {
// Returns all files under a directory.
static void Readdir(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
base::FilePath path;
if (!gin::ConvertFromV8(isolate, args[0], &path)) {
args.GetReturnValue().Set(v8::False(isolate));
@@ -145,7 +145,7 @@ class Archive : public node::ObjectWrap {
// Returns the path of file with symbol link resolved.
static void Realpath(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
base::FilePath path;
if (!gin::ConvertFromV8(isolate, args[0], &path)) {
args.GetReturnValue().Set(v8::False(isolate));
@@ -163,7 +163,7 @@ class Archive : public node::ObjectWrap {
// Copy the file out into a temporary file and returns the new path.
static void CopyFileOut(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
base::FilePath path;
if (!gin::ConvertFromV8(isolate, args[0], &path)) {
args.GetReturnValue().Set(v8::False(isolate));
@@ -181,7 +181,7 @@ class Archive : public node::ObjectWrap {
// Return the file descriptor.
static void GetFD(const v8::FunctionCallbackInfo<v8::Value>& args) {
auto* isolate = args.GetIsolate();
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.Holder());
auto* wrap = node::ObjectWrap::Unwrap<Archive>(args.This());
args.GetReturnValue().Set(gin::ConvertToV8(
isolate, wrap->archive_ ? wrap->archive_->GetUnsafeFD() : -1));

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