chore: bump chromium to 140.0.7339.41 (38-x-y) (#48190)

* chore: bump chromium in DEPS to 140.0.7339.41

* chore: update patches

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
electron-roller[bot] 2025-08-28 16:39:10 -04:00 committed by GitHub
commit 207f64fec8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 189 deletions

2
DEPS
View file

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = { vars = {
'chromium_version': 'chromium_version':
'140.0.7339.24', '140.0.7339.41',
'node_version': 'node_version':
'v22.18.0', 'v22.18.0',
'nan_version': 'nan_version':

View file

@ -135,5 +135,4 @@ build_partial_revert_mac_fullscreen_top_chrome_mouse_events.patch
build_set_mac_sdk_minimum_to_10.patch build_set_mac_sdk_minimum_to_10.patch
fix_add_macos_memory_query_fallback_to_avoid_crash.patch fix_add_macos_memory_query_fallback_to_avoid_crash.patch
fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch
chore_restore_some_deprecated_wrapper_utility_in_gin.patch
feat_add_support_for_embedder_snapshot_validation.patch feat_add_support_for_embedder_snapshot_validation.patch

View file

@ -1,174 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Tue, 5 Aug 2025 02:26:29 +0900
Subject: chore: restore some deprecated wrapper utility in gin
Restores part of https://chromium-review.googlesource.com/c/chromium/src/+/6799157
Patch can be removed once cppgc migration is complete
https://github.com/electron/electron/issues/47922
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 5a31687bbd0fca61db3a7c41ed73d938340d6446..b84f5fd336bc4b61b2cd0b2fc92382b00e928701 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -141,7 +141,7 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
: "Objects of this type cannot be created using the "
"constructor"))),
template_(constructor_template_->InstanceTemplate()) {
- template_->SetInternalFieldCount(0);
+ template_->SetInternalFieldCount(kNumberOfInternalFields);
}
ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
diff --git a/gin/per_isolate_data.cc b/gin/per_isolate_data.cc
index 884990426f13a6abca22a60dd8cc0685f8435b23..64ac0a64a05105532f3cda898aeac68c21338e60 100644
--- a/gin/per_isolate_data.cc
+++ b/gin/per_isolate_data.cc
@@ -68,12 +68,32 @@ PerIsolateData* PerIsolateData::From(Isolate* isolate) {
return static_cast<PerIsolateData*>(isolate->GetData(kEmbedderNativeGin));
}
+void PerIsolateData::DeprecatedSetObjectTemplate(DeprecatedWrapperInfo* info,
+ Local<ObjectTemplate> templ) {
+ deprecated_object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
+}
+
void PerIsolateData::SetObjectTemplate(
const WrapperInfo* info,
Local<ObjectTemplate> templ) {
object_templates_[info] = Eternal<ObjectTemplate>(isolate_, templ);
}
+void PerIsolateData::SetFunctionTemplate(DeprecatedWrapperInfo* info,
+ Local<FunctionTemplate> templ) {
+ function_templates_[info] = Eternal<FunctionTemplate>(isolate_, templ);
+}
+
+v8::Local<v8::ObjectTemplate> PerIsolateData::DeprecatedGetObjectTemplate(
+ DeprecatedWrapperInfo* info) {
+ DeprecatedObjectTemplateMap::iterator it =
+ deprecated_object_templates_.find(info);
+ if (it == deprecated_object_templates_.end()) {
+ return v8::Local<v8::ObjectTemplate>();
+ }
+ return it->second.Get(isolate_);
+}
+
v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
const WrapperInfo* info) {
ObjectTemplateMap::iterator it = object_templates_.find(info);
@@ -83,6 +103,15 @@ v8::Local<v8::ObjectTemplate> PerIsolateData::GetObjectTemplate(
return it->second.Get(isolate_);
}
+v8::Local<v8::FunctionTemplate> PerIsolateData::GetFunctionTemplate(
+ DeprecatedWrapperInfo* info) {
+ FunctionTemplateMap::iterator it = function_templates_.find(info);
+ if (it == function_templates_.end()) {
+ return v8::Local<v8::FunctionTemplate>();
+ }
+ return it->second.Get(isolate_);
+}
+
void PerIsolateData::AddDisposeObserver(DisposeObserver* observer) {
dispose_observers_.AddObserver(observer);
}
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
index bce889749415da341e6e6e4082ac06bbeb4bb80a..d748c1cf8cef7da90686686f1b8072bcd530541d 100644
--- a/gin/per_isolate_data.h
+++ b/gin/per_isolate_data.h
@@ -51,11 +51,24 @@ class GIN_EXPORT PerIsolateData {
static PerIsolateData* From(v8::Isolate* isolate);
+ void DeprecatedSetObjectTemplate(
+ DeprecatedWrapperInfo* info,
+ v8::Local<v8::ObjectTemplate> object_template);
+
void SetObjectTemplate(const WrapperInfo* info,
v8::Local<v8::ObjectTemplate> object_template);
+ void SetFunctionTemplate(DeprecatedWrapperInfo* info,
+ v8::Local<v8::FunctionTemplate> function_template);
+
+ v8::Local<v8::ObjectTemplate> DeprecatedGetObjectTemplate(
+ DeprecatedWrapperInfo* info);
+
v8::Local<v8::ObjectTemplate> GetObjectTemplate(const WrapperInfo* info);
+ v8::Local<v8::FunctionTemplate> GetFunctionTemplate(
+ DeprecatedWrapperInfo* info);
+
void AddDisposeObserver(DisposeObserver* observer);
void RemoveDisposeObserver(DisposeObserver* observer);
void NotifyBeforeDispose();
@@ -74,14 +87,20 @@ class GIN_EXPORT PerIsolateData {
}
private:
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
+ DeprecatedObjectTemplateMap;
typedef std::map<const WrapperInfo*, v8::Eternal<v8::ObjectTemplate>>
ObjectTemplateMap;
+ typedef std::map<DeprecatedWrapperInfo*, v8::Eternal<v8::FunctionTemplate>>
+ FunctionTemplateMap;
// PerIsolateData doesn't actually own |isolate_|. Instead, the isolate is
// owned by the IsolateHolder, which also owns the PerIsolateData.
raw_ptr<v8::Isolate, AcrossTasksDanglingUntriaged> isolate_;
raw_ptr<v8::ArrayBuffer::Allocator, DanglingUntriaged> allocator_;
+ DeprecatedObjectTemplateMap deprecated_object_templates_;
ObjectTemplateMap object_templates_;
+ FunctionTemplateMap function_templates_;
base::ObserverList<DisposeObserver> dispose_observers_;
std::shared_ptr<V8ForegroundTaskRunnerBase> task_runner_;
std::shared_ptr<V8ForegroundTaskRunnerBase> user_visible_task_runner_;
diff --git a/gin/public/wrapper_info.h b/gin/public/wrapper_info.h
index 34b5f1c30c05152122f23708a1df62f00296fcd6..dac3459dc822db1b242288293605ab4c4a6cf76f 100644
--- a/gin/public/wrapper_info.h
+++ b/gin/public/wrapper_info.h
@@ -13,6 +13,17 @@
namespace gin {
+enum InternalFields {
+ kWrapperInfoIndex,
+ kEncodedValueIndex,
+ kNumberOfInternalFields,
+};
+
+struct GIN_EXPORT DeprecatedWrapperInfo {
+ static DeprecatedWrapperInfo* From(v8::Local<v8::Object> object);
+ const GinEmbedder embedder;
+};
+
struct GIN_EXPORT WrapperInfo : v8::Object::WrapperTypeInfo {
const WrappablePointerTag pointer_tag;
};
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
index 803b5648e1c3ec3621149e98850bebfbf7f2de75..dd49202103993ee03379acd6873b92bc8fccb786 100644
--- a/gin/wrappable.cc
+++ b/gin/wrappable.cc
@@ -48,7 +48,7 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
CHECK(!templ.IsEmpty());
data->SetObjectTemplate(info, templ);
}
- CHECK_EQ(0, templ->InternalFieldCount());
+ CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
v8::Local<v8::Object> wrapper;
// |wrapper| may be empty in some extreme cases, e.g., when
// Object.prototype.constructor is overwritten.
@@ -56,6 +56,12 @@ v8::MaybeLocal<v8::Object> WrappableBase::GetWrapper(v8::Isolate* isolate) {
return {};
}
+ // Delete the internal fields once gin_helper::DeprecatedWrappable does
+ // not exist anymore.
+ int indices[] = {kWrapperInfoIndex, kEncodedValueIndex};
+ void* values[] = {nullptr, nullptr};
+ wrapper->SetAlignedPointerInInternalFields(2, indices, values);
+
AssociateWithWrapper(isolate, wrapper);
return wrapper;
}

View file

@ -10,11 +10,11 @@ Electron needs this constructor, namely for gin_helper::Constructible
objects. objects.
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 9f9ae85ad432ce71f308d6c56265a96985f42766..5a31687bbd0fca61db3a7c41ed73d938340d6446 100644 index a694f7dc4da4f1bba579ab8c032eea21d8459995..8aaaba327166b1d3b884fe390a389c0c50890af9 100644
--- a/gin/object_template_builder.cc --- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc +++ b/gin/object_template_builder.cc
@@ -144,6 +144,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, @@ -146,6 +146,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
template_->SetInternalFieldCount(0); template_->SetInternalFieldCount(kNumberOfInternalFields);
} }
+ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate, +ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
@ -28,10 +28,10 @@ index 9f9ae85ad432ce71f308d6c56265a96985f42766..5a31687bbd0fca61db3a7c41ed73d938
const ObjectTemplateBuilder& other) = default; const ObjectTemplateBuilder& other) = default;
diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h
index cf4f1ae6598fdede655d33baccda254965566ea5..a4c16dc0ec3ff16413fc2a04225a2401989a084b 100644 index 9d8f6e5de793ea419875d99a0b46898f2e40ead5..c803363b8050f4084c9250fce9b5b8b171082703 100644
--- a/gin/object_template_builder.h --- a/gin/object_template_builder.h
+++ b/gin/object_template_builder.h +++ b/gin/object_template_builder.h
@@ -48,6 +48,9 @@ class GIN_EXPORT ObjectTemplateBuilder { @@ -46,6 +46,9 @@ class GIN_EXPORT ObjectTemplateBuilder {
public: public:
explicit ObjectTemplateBuilder(v8::Isolate* isolate); explicit ObjectTemplateBuilder(v8::Isolate* isolate);
ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name); ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name);

View file

@ -317,10 +317,10 @@ index 7e17594c30ac3cf8cb484b53563b03fc75bd2e0b..0e4a68f2fd8179640f877cb258b40496
// Although ScreenCaptureKit is available in 12.3 there were some bugs that // Although ScreenCaptureKit is available in 12.3 there were some bugs that
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1a9626dca 100644 index cedd951a80e055a6af8aa17460d77e1b3e76fff3..997c239f337f5c049a75518809a56480a5abf9f3 100644
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc --- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc +++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
@@ -321,8 +321,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( @@ -323,8 +323,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
break; break;
} }
@ -338,7 +338,7 @@ index a5bc6f63c771fdf68ed9251285eac9d2c91acdc0..f719ff68e18093791bf13e434f40a3d1
// For the other capturers, when a bug reports the type of capture it's // For the other capturers, when a bug reports the type of capture it's
// easy enough to determine which capturer was used, but it's a little // easy enough to determine which capturer was used, but it's a little
// fuzzier with window capture. // fuzzier with window capture.
@@ -338,13 +346,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync( @@ -340,13 +348,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
} }
#endif // defined(USE_AURA) || BUILDFLAG(IS_MAC) #endif // defined(USE_AURA) || BUILDFLAG(IS_MAC)

View file

@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 24d2fc92266d1d398ee43e08a56cc05d9ff6eca3..748d041e518350f49c6aef88275893c19616d014 100644 index 4288bf261741e4260b7a3117618fa19d39b20d2c..981aaaf9510d4354e02381266cf629a98c4d6ef6 100644
--- a/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -11374,6 +11374,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { @@ -11376,6 +11376,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
target_rph_id); target_rph_id);
} }

View file

@ -582,7 +582,7 @@ index 2d5cad5d7a4ab9292a5f966123687dee06f4512b..ae798fc8f923a9b590c0d9ed703946a2
return kAttributes; return kAttributes;
} }
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index adce27e6feaed7172cac9bdcd1b2e83930eb0a77..d912bdedc246503bb4114393baee14fc95c54eb9 100644 index dfc54c87eabbb33277ed145e78f8eef592da9ea2..5024ea32655edd62c02565a5e9e1d802c348c663 100644
--- a/content/browser/BUILD.gn --- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -345,6 +345,7 @@ source_set("browser") { @@ -345,6 +345,7 @@ source_set("browser") {

View file

@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't
necessary. necessary.
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 8d6d0963ac818a16ce63b41f61dd91325fd81c53..5f7449c93a9fd21838d6765e06ddd3362808d418 100644 index e887bbb4792382d4aa2ceaed018c492e258d00fe..98f1270a3f74f9a1ce641f629e5ae6100fefec13 100644
--- a/testing/variations/fieldtrial_testing_config.json --- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -24885,6 +24885,21 @@ @@ -24897,6 +24897,21 @@
] ]
} }
], ],