Skip to content

v12.7.1 Holder() fix fails on Electron 41 (V8 14.6 removed Holder from PropertyCallbackInfo) #1458

@tstone-1

Description

@tstone-1

Summary

PR #1456 (v12.7.1) replaced This() with Holder() in PropertyCallbackInfo contexts to fix Electron 41 compatibility. However, Electron 41 ships V8 14.6 (Chromium 146), which removed both This() and Holder() from PropertyCallbackInfo<Value>. The fix compiles against older V8 versions but fails on Electron 41.0.1.

Build errors

statement.cpp(381,43): error C2039: 'Holder': is not a member of 'v8::PropertyCallbackInfo<v8::Value>'
database.cpp(411,50): error C2039: 'Holder': is not a member of 'v8::PropertyCallbackInfo<v8::Value>'
database.cpp(415,39): error C2039: 'Holder': is not a member of 'v8::PropertyCallbackInfo<v8::Value>'

Reproduction

npm install WiseLibs/better-sqlite3#v12.7.1
npm install electron@41.0.1
npx electron-rebuild

Environment: Windows 11, MSVC 2019 Build Tools, Node 24.x

Expected fix

The V8 14.6 replacement for Holder() on PropertyCallbackInfo is GetReceiver(). The three affected call sites in NODE_GETTER macros should use GetReceiver() instead of Holder() (with a version guard if older V8 support is needed).

Affected files:

  • src/objects/statement.cpp:381
  • src/objects/database.cpp:411, 415

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions