* chore: bump node in DEPS to v22.21.0 * chore: bump node in DEPS to v22.21.1 * chore: update patches * fixup patches/node/api_remove_deprecated_getisolate.patch * src: add percentage support to --max-old-space-size https://github.com/nodejs/node/pull/59082 (cherry picked from commit 851df7ede67192efd3db4847eeb7b254ba62a3ea) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Maddock <smaddock@slack-corp.com>
|
|
Date: Thu, 27 Mar 2025 17:00:11 -0400
|
|
Subject: fix: cppgc initializing twice
|
|
|
|
Refs https://chromium-review.googlesource.com/c/v8/v8/+/6333562
|
|
|
|
cppgc will now be initialized as part of V8::Initialize. For now, skip
|
|
initialization if it's already been initialized.
|
|
|
|
This can be removed/refactored once Node.js upgrades to a version of V8
|
|
containing the above CL.
|
|
|
|
diff --git a/src/node.cc b/src/node.cc
|
|
index b99b5170553af51466fd1ee69af3be5026f3fada..ccb644007b8ebbf3899e64d8097d97208c0de182 100644
|
|
--- a/src/node.cc
|
|
+++ b/src/node.cc
|
|
@@ -1239,7 +1239,7 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
|
|
result->platform_ = per_process::v8_platform.Platform();
|
|
}
|
|
|
|
- if (!(flags & ProcessInitializationFlags::kNoInitializeCppgc)) {
|
|
+ if (!(flags & ProcessInitializationFlags::kNoInitializeCppgc) && !cppgc::IsInitialized()) {
|
|
v8::PageAllocator* allocator = nullptr;
|
|
if (result->platform_ != nullptr) {
|
|
allocator = result->platform_->GetPageAllocator();
|