Files
electron/patches/chromium/gin_enable_disable_v8_platform.patch
electron-roller[bot] c98cf69f40 chore: bump chromium to 147.0.7687.0 (main) (#49782)
* chore: bump chromium in DEPS to 147.0.7683.0

* fix(patch): constant moved to header

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(patch): occlusion simplification upstream

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove upstreamed patches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: bump chromium in DEPS to 147.0.7685.0

* fix(patch): V1 Keychain removal

Upstream deleted the V1 Keychain API. Removed V1 hunks and adapted

keychain_password_mac.mm to use KeychainV2 APIs.

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7535923: Rename ozone buildflags

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7528398: [LNA] Rename PNA-named files to LNA-named files

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7534194: Convert some functions in ui::Clipboard to async

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* 7544580: [DevTools] Add command to restart Chrome to DevTools UI bindings

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: bump chromium in DEPS to 147.0.7687.0

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: incorporate learnings into claude skill

I asked Claude to reflect on our upgrade session, consider what it learned and should know in the future, and to update its skill documents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:25:21 -05:00

81 lines
4.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:47:44 -0700
Subject: gin_enable_disable_v8_platform.patch
We don't use gin to create the V8 platform, because we need to inject Node
things.
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 646647b6e257ecc5ff0934fe8204db74651c1510..15904644aa5451c6cb0fc2a46a67678824cd0bec 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -162,11 +162,13 @@ void IsolateHolder::Initialize(ScriptMode mode,
std::string js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
v8::FatalErrorCallback fatal_error_callback,
- v8::OOMErrorCallback oom_error_callback) {
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform) {
CHECK(allocator);
V8Initializer::Initialize(mode, js_command_line_flags,
disallow_v8_feature_flag_overrides,
- oom_error_callback);
+ oom_error_callback,
+ create_v8_platform);
g_array_buffer_allocator = allocator;
g_reference_table = reference_table;
g_fatal_error_callback = fatal_error_callback;
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 3909e70dc1425c2cb02624f4b3017784a2ae6c9d..a57b92f02085d6392e6d9d0cc037df6b972f3c31 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -120,7 +120,8 @@ class GIN_EXPORT IsolateHolder {
std::string js_command_line_flags = {},
bool disallow_v8_feature_flag_overrides = false,
v8::FatalErrorCallback fatal_error_callback = nullptr,
- v8::OOMErrorCallback oom_error_callback = nullptr);
+ v8::OOMErrorCallback oom_error_callback = nullptr,
+ bool create_v8_platform = true);
// 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 5cad9cf7b1a8d3d120c4f2fef5a0a5b2834501c7..6b7dffe9c65ee04787a0dbc39d8d055c4daf0582 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -529,7 +529,8 @@ void SetFeatureFlags() {
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
const std::string& js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
- v8::OOMErrorCallback oom_error_callback) {
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform) {
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -544,7 +545,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
}
SetFlags(mode, js_command_line_flags);
- v8::V8::InitializePlatform(V8Platform::Get());
+ if (create_v8_platform)
+ v8::V8::InitializePlatform(V8Platform::Get());
// Set this as early as possible in order to ensure OOM errors are reported
// correctly.
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 1341b77198431e1c426bff043bdb2bbcf202c8ca..ec64afd9dd91b292604ca834a91b9cfbd52eb853 100644
--- a/gin/v8_initializer.h
+++ b/gin/v8_initializer.h
@@ -32,7 +32,8 @@ class GIN_EXPORT V8Initializer {
static void Initialize(IsolateHolder::ScriptMode mode,
const std::string& js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
- v8::OOMErrorCallback oom_error_callback);
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform = true);
// Get address and size information for currently loaded snapshot.
// If no snapshot is loaded, the return values are null for addresses