Skip to content

Commit

Permalink
Fix builds for Electron 29 (#966)
Browse files Browse the repository at this point in the history
`ObjectTemplate::SetAccessor` signature has changed in the V8 >= 12, and
no longer accepts `v8::AccessControl` parameter. The `v8::AccessControl`
enum is in fact a single value now so no public users of nan would be
broken if we just stop passing it down to V8.
  • Loading branch information
indutny-signal authored Feb 27, 2024
1 parent e14bdcd commit 1b630dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -2550,7 +2550,9 @@ NAN_DEPRECATED inline void SetAccessor(
, getter_
, setter_
, obj
#if !defined(V8_MAJOR_VERSION) || V8_MAJOR_VERSION < 12
, settings
#endif
, attribute
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
, signature
Expand Down Expand Up @@ -2596,7 +2598,9 @@ inline void SetAccessor(
, getter_
, setter_
, obj
#if !defined(V8_MAJOR_VERSION) || V8_MAJOR_VERSION < 12
, settings
#endif
, attribute
);
}
Expand Down

0 comments on commit 1b630dd

Please sign in to comment.