From 4b0d6a1cbf9b10b5f6181742ee2b1aa6eeab447e Mon Sep 17 00:00:00 2001 From: andreik Date: Thu, 19 Mar 2026 01:23:31 +0100 Subject: [PATCH 1/2] Fix pointer retrieval in NodeObject::Get for V8 version 14 and above --- src/utils.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index f8fa99f..e4d04ad 100644 --- a/src/utils.h +++ b/src/utils.h @@ -296,7 +296,12 @@ class NodeObject : public ObjectWrap if (handle.IsEmpty() || handle->InternalFieldCount() == 0) { return NULL; } - void *ptr = handle->GetAlignedPointerFromInternalField(0); + void *ptr = nullptr; +#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >= 14 + ptr = handle->GetAlignedPointerFromInternalField(0, v8::kEmbedderDataTypeTagDefault); +#else + ptr = handle->GetAlignedPointerFromInternalField(0); +#endif NodeObject *obj = static_cast(ptr); return static_cast(obj); } From ad8da2897c32e20cd100e014dd1336877f232aef Mon Sep 17 00:00:00 2001 From: Yuri Dursin Date: Thu, 19 Mar 2026 16:21:10 +0300 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index e4d04ad..f9bdbb9 100644 --- a/src/utils.h +++ b/src/utils.h @@ -294,7 +294,7 @@ class NodeObject : public ObjectWrap template static inline T *Unwrap(Local handle) { if (handle.IsEmpty() || handle->InternalFieldCount() == 0) { - return NULL; + return nullptr; } void *ptr = nullptr; #if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >= 14