Files
electron/patches/chromium/feat_allow_passing_of_objecttemplate_to_objecttemplatebuilder.patch
electron-roller[bot] a90ccc753b chore: bump chromium to 145.0.7577.0 (main) (#49175)
* chore: bump chromium in DEPS to 145.0.7572.0

* chore: update patches (trivial only)

* chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

Polished the edits and formatted the result. No real changes.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7232079 "7232079: Use WindowsToExclude to exclude PiP window in macOS screencapture device"

* chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7214586 "7214586: Refactor SelectFileDialogLinuxPortal to request XDG portal on demand"
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910 "7237910: Remove g_gtk_ui global"

* 7228586: Migrate SystemMemoryInfo from ByteCount to ByteSize

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7228586

* 7207583: GlobalRenderFrameHostId to ChildProcessId

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7207583

* 7205548: Remove uses of BodyAsStringCallbackDeprecated (extensions/)

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7205548

* chore: bump chromium in DEPS to 145.0.7574.0

* chore: update libc++ filenames

* chore: update patches (trivial only)

* chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7246150 "7246150: Fix crash in ScreenCaptureKitDeviceMac due to null PIPScreenCaptureCoordinator"

* fixup! chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch

* fixup! chore(patch-conflict): feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

* 7239572: [OOPIF PDF] Enable OOPIF PDF by default on Windows/macOS/Linux

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7239572

* chore: bump chromium in DEPS to 145.0.7576.0

* fixup! chore(patch-conflict): feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch

* chore: update patches (trivial only)

* chore: add note to keep patch that was upstreamed but reverted

fix_restore_original_resize_performance_on_macos.patch was organically upstreamed but that change got reverted just after the current roll's cutoff.

I've added a note in the patch contents so the patch sticks around and so we can keep it after the revert is included.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7255334 "7255334: Revert 'Fix jank when resizing browser window'"

* chore: bump chromium in DEPS to 145.0.7577.0

* chore: update patches (trivial only)

* chore(patch-conflict): keep patch after revert

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7255334 "7255334: Revert 'Fix jank when resizing browser window'"

* 7237910: Remove g_gtk_ui global

I tried to find a way to avoid the patch, but other approaches seemed complex and involved.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7237910

* 7251900: Reland "Remove callback_helpers.h include from is_callback.h (try 5)"

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7251900

* 7170174: [LNA] Retry requests for cached local resources

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7170174

* fix: PDFs use OOPIF (behavior change)

* fixup! 7237910: Remove g_gtk_ui global

* fixup! 7251900: Reland "Remove callback_helpers.h include from is_callback.h (try 5)"

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-12-16 12:32:38 -05:00

44 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@electronjs.org>
Date: Fri, 6 Oct 2023 14:15:20 -0400
Subject: feat: allow passing of ObjectTemplate to ObjectTemplateBuilder
https://chromium-review.googlesource.com/c/chromium/src/+/4905829 removed the
ObjectTemplateBuilder constructor which allows passing in an ObjectTemplate.
Electron needs this constructor, namely for gin_helper::Constructible
objects.
diff --git a/gin/object_template_builder.cc b/gin/object_template_builder.cc
index 196749df48a41595da226a4baec72051446fc442..256e6634d9689ebcc53dfc8849587a73ad311463 100644
--- a/gin/object_template_builder.cc
+++ b/gin/object_template_builder.cc
@@ -145,6 +145,13 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
template_->SetInternalFieldCount(kNumberOfInternalFields);
}
+ObjectTemplateBuilder::ObjectTemplateBuilder(v8::Isolate* isolate,
+ const char* type_name,
+ v8::Local<v8::ObjectTemplate> tmpl)
+ : isolate_(isolate), type_name_(type_name), template_(tmpl) {
+ template_->SetInternalFieldCount(kNumberOfInternalFields);
+}
+
ObjectTemplateBuilder::ObjectTemplateBuilder(
const ObjectTemplateBuilder& other) = default;
diff --git a/gin/object_template_builder.h b/gin/object_template_builder.h
index cf4f1ae6598fdede655d33baccda254965566ea5..a4c16dc0ec3ff16413fc2a04225a2401989a084b 100644
--- a/gin/object_template_builder.h
+++ b/gin/object_template_builder.h
@@ -48,6 +48,9 @@ class GIN_EXPORT ObjectTemplateBuilder {
public:
explicit ObjectTemplateBuilder(v8::Isolate* isolate);
ObjectTemplateBuilder(v8::Isolate* isolate, const char* type_name);
+ ObjectTemplateBuilder(v8::Isolate* isolate,
+ const char* type_name,
+ v8::Local<v8::ObjectTemplate> tmpl);
ObjectTemplateBuilder(const ObjectTemplateBuilder& other);
~ObjectTemplateBuilder();