From bae4e709b8c06437405a12d117cd0ecb2ad42aa2 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 15 Sep 2026 15:59:43 +0200 Subject: [PATCH] deps: V8: cherry-pick 1246d3bfab1a Original commit message: [api] avoid applying IsGarbageCollectedType The updated version of http://crrev.com/c/8379082 was not enough to remove the resolution of IsGarbageCollectedType which would hit the static_assert(sizeof(T)) assertion. This patch explicitly rejects void again before checking the trait. Change-Id: Ieef4126bcba04e1e3c2bd62e89b7410a47cd2b29 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8411047 Reviewed-by: Leszek Swirski Commit-Queue: Joyee Cheung Cr-Commit-Position: refs/heads/main@{#109868} Refs: https://github.com/v8/v8/commit/1246d3bfab1a5df2d967cfbbab2b42fb2238893e Signed-off-by: Joyee Cheung PR-URL: https://github.com/nodejs/node/pull/66537 Reviewed-By: Richard Lau Reviewed-By: Chengzhong Wu Reviewed-By: Filip Skokan Reviewed-By: Yagiz Nizipli --- common.gypi | 2 +- deps/v8/include/v8-context.h | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common.gypi b/common.gypi index 5586cbce856..e70270a793b 100644 --- a/common.gypi +++ b/common.gypi @@ -44,7 +44,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.8', + 'v8_embedder_string': '-node.9', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8-context.h b/deps/v8/include/v8-context.h index 02b6f5c855d..6608be2d621 100644 --- a/deps/v8/include/v8-context.h +++ b/deps/v8/include/v8-context.h @@ -7,14 +7,15 @@ #include +#include #include #include "cppgc/type-traits.h" // NOLINT(build/include_directory) -#include "v8-data.h" // NOLINT(build/include_directory) -#include "v8-local-handle.h" // NOLINT(build/include_directory) -#include "v8-maybe.h" // NOLINT(build/include_directory) -#include "v8-snapshot.h" // NOLINT(build/include_directory) -#include "v8config.h" // NOLINT(build/include_directory) +#include "v8-data.h" // NOLINT(build/include_directory) +#include "v8-local-handle.h" // NOLINT(build/include_directory) +#include "v8-maybe.h" // NOLINT(build/include_directory) +#include "v8-snapshot.h" // NOLINT(build/include_directory) +#include "v8config.h" // NOLINT(build/include_directory) namespace v8 { @@ -328,7 +329,7 @@ class V8_EXPORT Context : public Data { EmbedderDataTypeTag tag); template - requires cppgc::IsGarbageCollectedTypeV + requires(!std::is_void_v) && cppgc::IsGarbageCollectedTypeV void SetAlignedPointerInEmbedderData(int index, T* value, CppHeapPointerTag tag) { SetAlignedPointerInEmbedderDataInternal(index, static_cast(value),