* chore: bump node in DEPS to v24.14.0 * lib: prefer call() over apply() if argument list is not array https://github.com/nodejs/node/pull/60796 * build,deps: replace cjs-module-lexer with merve https://github.com/nodejs/node/pull/61456 * chore: fixup patch indices * test: use fixture directories for sea tests https://github.com/nodejs/node/pull/61167 * src: throw RangeError on failed ArrayBuffer BackingStore allocation https://github.com/nodejs/node/pull/61480 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> 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 0bc086ccd1ff449c0f3fb08a972a0c45d3178f1c..b9d35e60f39d1edd910cd0fc1e57157458db93f5 100644
|
|
--- a/src/node.cc
|
|
+++ b/src/node.cc
|
|
@@ -1244,7 +1244,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();
|