Skip to content

Conversation

@agracio
Copy link
Contributor

@agracio agracio commented Jan 13, 2026

Summary

v8::AccessControl enum used in SetAccessor method was declared deprecated in v8 14.2 and removed in v8 14.4.
In order to maintain signature compatibility this PR adds new enum enum AccessControl {DEFAULT = 0}; and defines new SetAccessor method signature for v8 >=14.2.

Old signature:

void SetAccessor(v8::Local<v8::ObjectTemplate> tpl,
                 v8::Local<v8::String> name,
                 Nan::GetterCallback getter,
                 Nan::SetterCallback setter = 0,
                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
                 v8::AccessControl settings = v8::DEFAULT,
                 v8::PropertyAttribute attribute = v8::None);
bool SetAccessor(v8::Local<v8::Object> obj,
                 v8::Local<v8::String> name,
                 Nan::GetterCallback getter,
                 Nan::SetterCallback setter = 0,
                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
                 v8::AccessControl settings = v8::DEFAULT,
                 v8::PropertyAttribute attribute = v8::None)

New signature:

enum AccessControl {DEFAULT = 0};

void SetAccessor(v8::Local<v8::ObjectTemplate> tpl,
                 v8::Local<v8::String> name,
                 Nan::GetterCallback getter,
                 Nan::SetterCallback setter = 0,
                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
                 enum Nan::AccessControl settings = DEFAULT,
                 v8::PropertyAttribute attribute = v8::None);
bool SetAccessor(v8::Local<v8::Object> obj,
                 v8::Local<v8::String> name,
                 Nan::GetterCallback getter,
                 Nan::SetterCallback setter = 0,
                 v8::Local<v8::Value> data = v8::Local<v8::Value>(),
                 enum Nan::AccessControl settings = DEFAULT,
                 v8::PropertyAttribute attribute = v8::None)

AppVeyor: https://ci.appveyor.com/project/agracio/nan/builds/53366215

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.

1 participant