Skip to content

Fix pointer retrieval in NodeObject::Get for V8 version 14 and above#159

Merged
durs merged 2 commits intodurs:masterfrom
gsbelarus:fix-electron-41
Mar 19, 2026
Merged

Fix pointer retrieval in NodeObject::Get for V8 version 14 and above#159
durs merged 2 commits intodurs:masterfrom
gsbelarus:fix-electron-41

Conversation

@gsbelarus
Copy link
Contributor

This fixes an incompatibility with Electron 41

Copilot AI review requested due to automatic review settings March 19, 2026 00:24
@gsbelarus
Copy link
Contributor Author

should fix this issue:

#158

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s ObjectWrap unwrapping helper to remain compatible with newer V8 (>= 14), addressing an incompatibility encountered with Electron 41.

Changes:

  • Use the V8 >= 14 GetAlignedPointerFromInternalField overload that includes an embedder data type tag.
  • Keep backward compatibility by falling back to the pre-V8-14 API via preprocessor guards.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@durs durs merged commit 92407ad into durs:master Mar 19, 2026
0 of 5 checks passed
@durs
Copy link
Owner

durs commented Mar 19, 2026

It's a bit more complicated
It no longer works on Node 25.

V8 < 11.4 Until 2023
GetAlignedPointerFromInternalField(int index)
✅ Stable

V8 11.4 – 13.x 2023–2024
GetAlignedPointerFromInternalField(int index, Tag tag)
🔄 Experimental / Changed

V8 14.1+ 2024+
GetAlignedPointerFromInternalField(int index)
✅ Stable (tags removed from public API)

@AndreiKireyeu
Copy link

hm. I will test with node 25.

@durs
Copy link
Owner

durs commented Mar 19, 2026

It's a bit more complicated It no longer works on Node 25.
V8 < 11.4 Until 2023 GetAlignedPointerFromInternalField(int index) ✅ Stable
V8 11.4 – 13.x 2023–2024 GetAlignedPointerFromInternalField(int index, Tag tag) 🔄 Experimental / Changed
V8 14.1+ 2024+ GetAlignedPointerFromInternalField(int index) ✅ Stable (tags removed from public API)

This is also not true, the AI ​​lied
but in the end, the version with doesn't build for me
GetAlignedPointerFromInternalField(int index, Tag tag)
is there a link to the description?

@durs
Copy link
Owner

durs commented Mar 19, 2026

It seems like this only starts with version V8 14.3
on node v25.8.1 used V8 14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants