Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove AllCan Read/Write #963

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#define NODE_18_0_MODULE_VERSION 108
#define NODE_19_0_MODULE_VERSION 111
#define NODE_20_0_MODULE_VERSION 115
#define NODE_21_0_MODULE_VERSION 120

#ifdef _MSC_VER
# define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800)
Expand Down Expand Up @@ -2550,7 +2551,9 @@ NAN_DEPRECATED inline void SetAccessor(
, getter_
, setter_
, obj
#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
#endif
, attribute
#if (NODE_MODULE_VERSION < NODE_16_0_MODULE_VERSION)
, signature
Expand Down Expand Up @@ -2596,7 +2599,9 @@ inline void SetAccessor(
, getter_
, setter_
, obj
#if (NODE_MODULE_VERSION < NODE_21_0_MODULE_VERSION)
, settings
#endif
, attribute
);
}
Expand Down Expand Up @@ -2634,7 +2639,15 @@ inline bool SetAccessor(
, New<v8::External>(reinterpret_cast<void *>(setter)));
}

#if (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
#if (NODE_MODULE_VERSION >= NODE_21_0_MODULE_VERSION)
return obj->SetNativeDataProperty(
GetCurrentContext()
, name
, getter_
, setter_
, dataobj
, attribute).FromMaybe(false);
#elif (NODE_MODULE_VERSION >= NODE_6_0_MODULE_VERSION)
return obj->SetAccessor(
GetCurrentContext()
, name
Expand Down