@@ -87,7 +87,6 @@ static const int X509_NAME_FLAGS = ASN1_STRFLGS_ESC_CTRL
8787namespace node {
8888namespace crypto {
8989
90- using v8::AccessorSignature;
9190using v8::Array;
9291using v8::Boolean;
9392using v8::Context;
@@ -110,8 +109,8 @@ using v8::Object;
110109using v8::ObjectTemplate;
111110using v8::Persistent;
112111using v8::PropertyAttribute;
113- using v8::PropertyCallbackInfo;
114112using v8::ReadOnly;
113+ using v8::Signature;
115114using v8::String;
116115using v8::Value;
117116
@@ -551,14 +550,18 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
551550 t->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " kTicketKeyIVIndex" ),
552551 Integer::NewFromUnsigned (env->isolate (), kTicketKeyIVIndex ));
553552
554- t->PrototypeTemplate ()->SetAccessor (
553+ Local<FunctionTemplate> ctx_getter_templ =
554+ FunctionTemplate::New (env->isolate (),
555+ CtxGetter,
556+ env->as_external (),
557+ Signature::New (env->isolate (), t));
558+
559+
560+ t->PrototypeTemplate ()->SetAccessorProperty (
555561 FIXED_ONE_BYTE_STRING (env->isolate (), " _external" ),
556- CtxGetter,
557- nullptr ,
558- env->as_external (),
559- DEFAULT,
560- static_cast <PropertyAttribute>(ReadOnly | DontDelete),
561- AccessorSignature::New (env->isolate (), t));
562+ ctx_getter_templ,
563+ Local<FunctionTemplate>(),
564+ static_cast <PropertyAttribute>(ReadOnly | DontDelete));
562565
563566 target->Set (secureContextString, t->GetFunction ());
564567 env->set_secure_context_constructor_template (t);
@@ -1572,8 +1575,7 @@ int SecureContext::TicketCompatibilityCallback(SSL* ssl,
15721575#endif
15731576
15741577
1575- void SecureContext::CtxGetter (Local<String> property,
1576- const PropertyCallbackInfo<Value>& info) {
1578+ void SecureContext::CtxGetter (const FunctionCallbackInfo<Value>& info) {
15771579 SecureContext* sc;
15781580 ASSIGN_OR_RETURN_UNWRAP (&sc, info.This ());
15791581 Local<External> ext = External::New (info.GetIsolate (), sc->ctx_ );
@@ -1643,14 +1645,17 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
16431645 env->SetProtoMethod (t, " getALPNNegotiatedProtocol" , GetALPNNegotiatedProto);
16441646 env->SetProtoMethod (t, " setALPNProtocols" , SetALPNProtocols);
16451647
1646- t->PrototypeTemplate ()->SetAccessor (
1648+ Local<FunctionTemplate> ssl_getter_templ =
1649+ FunctionTemplate::New (env->isolate (),
1650+ SSLGetter,
1651+ env->as_external (),
1652+ Signature::New (env->isolate (), t));
1653+
1654+ t->PrototypeTemplate ()->SetAccessorProperty (
16471655 FIXED_ONE_BYTE_STRING (env->isolate (), " _external" ),
1648- SSLGetter,
1649- nullptr ,
1650- env->as_external (),
1651- DEFAULT,
1652- static_cast <PropertyAttribute>(ReadOnly | DontDelete),
1653- AccessorSignature::New (env->isolate (), t));
1656+ ssl_getter_templ,
1657+ Local<FunctionTemplate>(),
1658+ static_cast <PropertyAttribute>(ReadOnly | DontDelete));
16541659}
16551660
16561661
@@ -2811,8 +2816,7 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
28112816
28122817
28132818template <class Base >
2814- void SSLWrap<Base>::SSLGetter (Local<String> property,
2815- const PropertyCallbackInfo<Value>& info) {
2819+ void SSLWrap<Base>::SSLGetter (const FunctionCallbackInfo<Value>& info) {
28162820 Base* base;
28172821 ASSIGN_OR_RETURN_UNWRAP (&base, info.This ());
28182822 SSL* ssl = base->ssl_ ;
@@ -4828,14 +4832,17 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
48284832 env->SetProtoMethod (t, " setPublicKey" , SetPublicKey);
48294833 env->SetProtoMethod (t, " setPrivateKey" , SetPrivateKey);
48304834
4831- t->InstanceTemplate ()->SetAccessor (
4835+ Local<FunctionTemplate> verify_error_getter_templ =
4836+ FunctionTemplate::New (env->isolate (),
4837+ DiffieHellman::VerifyErrorGetter,
4838+ env->as_external (),
4839+ Signature::New (env->isolate (), t));
4840+
4841+ t->InstanceTemplate ()->SetAccessorProperty (
48324842 env->verify_error_string (),
4833- DiffieHellman::VerifyErrorGetter,
4834- nullptr ,
4835- env->as_external (),
4836- DEFAULT,
4837- attributes,
4838- AccessorSignature::New (env->isolate (), t));
4843+ verify_error_getter_templ,
4844+ Local<FunctionTemplate>(),
4845+ attributes);
48394846
48404847 target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellman" ),
48414848 t->GetFunction ());
@@ -4850,14 +4857,17 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
48504857 env->SetProtoMethod (t2, " getPublicKey" , GetPublicKey);
48514858 env->SetProtoMethod (t2, " getPrivateKey" , GetPrivateKey);
48524859
4853- t2->InstanceTemplate ()->SetAccessor (
4860+ Local<FunctionTemplate> verify_error_getter_templ2 =
4861+ FunctionTemplate::New (env->isolate (),
4862+ DiffieHellman::VerifyErrorGetter,
4863+ env->as_external (),
4864+ Signature::New (env->isolate (), t2));
4865+
4866+ t2->InstanceTemplate ()->SetAccessorProperty (
48544867 env->verify_error_string (),
4855- DiffieHellman::VerifyErrorGetter,
4856- nullptr ,
4857- env->as_external (),
4858- DEFAULT,
4859- attributes,
4860- AccessorSignature::New (env->isolate (), t2));
4868+ verify_error_getter_templ2,
4869+ Local<FunctionTemplate>(),
4870+ attributes);
48614871
48624872 target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellmanGroup" ),
48634873 t2->GetFunction ());
@@ -5173,8 +5183,7 @@ void DiffieHellman::SetPrivateKey(const FunctionCallbackInfo<Value>& args) {
51735183}
51745184
51755185
5176- void DiffieHellman::VerifyErrorGetter (Local<String> property,
5177- const PropertyCallbackInfo<Value>& args) {
5186+ void DiffieHellman::VerifyErrorGetter (const FunctionCallbackInfo<Value>& args) {
51785187 HandleScope scope (args.GetIsolate ());
51795188
51805189 DiffieHellman* diffieHellman;
0 commit comments