@@ -80,7 +80,6 @@ static const int X509_NAME_FLAGS = ASN1_STRFLGS_ESC_CTRL
8080namespace node {
8181namespace crypto {
8282
83- using v8::AccessorSignature;
8483using v8::Array;
8584using v8::Boolean;
8685using v8::Context;
@@ -103,8 +102,8 @@ using v8::Object;
103102using v8::ObjectTemplate;
104103using v8::Persistent;
105104using v8::PropertyAttribute;
106- using v8::PropertyCallbackInfo;
107105using v8::ReadOnly;
106+ using v8::Signature;
108107using v8::String;
109108using v8::Value;
110109
@@ -544,14 +543,18 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
544543 t->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " kTicketKeyIVIndex" ),
545544 Integer::NewFromUnsigned (env->isolate (), kTicketKeyIVIndex ));
546545
547- t->PrototypeTemplate ()->SetAccessor (
546+ Local<FunctionTemplate> ctx_getter_templ =
547+ FunctionTemplate::New (env->isolate (),
548+ CtxGetter,
549+ env->as_external (),
550+ Signature::New (env->isolate (), t));
551+
552+
553+ t->PrototypeTemplate ()->SetAccessorProperty (
548554 FIXED_ONE_BYTE_STRING (env->isolate (), " _external" ),
549- CtxGetter,
550- nullptr ,
551- env->as_external (),
552- DEFAULT,
553- static_cast <PropertyAttribute>(ReadOnly | DontDelete),
554- AccessorSignature::New (env->isolate (), t));
555+ ctx_getter_templ,
556+ Local<FunctionTemplate>(),
557+ static_cast <PropertyAttribute>(ReadOnly | DontDelete));
555558
556559 target->Set (secureContextString, t->GetFunction ());
557560 env->set_secure_context_constructor_template (t);
@@ -1565,8 +1568,7 @@ int SecureContext::TicketCompatibilityCallback(SSL* ssl,
15651568#endif
15661569
15671570
1568- void SecureContext::CtxGetter (Local<String> property,
1569- const PropertyCallbackInfo<Value>& info) {
1571+ void SecureContext::CtxGetter (const FunctionCallbackInfo<Value>& info) {
15701572 SecureContext* sc;
15711573 ASSIGN_OR_RETURN_UNWRAP (&sc, info.This ());
15721574 Local<External> ext = External::New (info.GetIsolate (), sc->ctx_ );
@@ -1636,14 +1638,17 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
16361638 env->SetProtoMethod (t, " getALPNNegotiatedProtocol" , GetALPNNegotiatedProto);
16371639 env->SetProtoMethod (t, " setALPNProtocols" , SetALPNProtocols);
16381640
1639- t->PrototypeTemplate ()->SetAccessor (
1641+ Local<FunctionTemplate> ssl_getter_templ =
1642+ FunctionTemplate::New (env->isolate (),
1643+ SSLGetter,
1644+ env->as_external (),
1645+ Signature::New (env->isolate (), t));
1646+
1647+ t->PrototypeTemplate ()->SetAccessorProperty (
16401648 FIXED_ONE_BYTE_STRING (env->isolate (), " _external" ),
1641- SSLGetter,
1642- nullptr ,
1643- env->as_external (),
1644- DEFAULT,
1645- static_cast <PropertyAttribute>(ReadOnly | DontDelete),
1646- AccessorSignature::New (env->isolate (), t));
1649+ ssl_getter_templ,
1650+ Local<FunctionTemplate>(),
1651+ static_cast <PropertyAttribute>(ReadOnly | DontDelete));
16471652}
16481653
16491654
@@ -2804,8 +2809,7 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
28042809
28052810
28062811template <class Base >
2807- void SSLWrap<Base>::SSLGetter (Local<String> property,
2808- const PropertyCallbackInfo<Value>& info) {
2812+ void SSLWrap<Base>::SSLGetter (const FunctionCallbackInfo<Value>& info) {
28092813 Base* base;
28102814 ASSIGN_OR_RETURN_UNWRAP (&base, info.This ());
28112815 SSL* ssl = base->ssl_ ;
@@ -4797,14 +4801,17 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
47974801 env->SetProtoMethod (t, " setPublicKey" , SetPublicKey);
47984802 env->SetProtoMethod (t, " setPrivateKey" , SetPrivateKey);
47994803
4800- t->InstanceTemplate ()->SetAccessor (
4804+ Local<FunctionTemplate> verify_error_getter_templ =
4805+ FunctionTemplate::New (env->isolate (),
4806+ DiffieHellman::VerifyErrorGetter,
4807+ env->as_external (),
4808+ Signature::New (env->isolate (), t));
4809+
4810+ t->InstanceTemplate ()->SetAccessorProperty (
48014811 env->verify_error_string (),
4802- DiffieHellman::VerifyErrorGetter,
4803- nullptr ,
4804- env->as_external (),
4805- DEFAULT,
4806- attributes,
4807- AccessorSignature::New (env->isolate (), t));
4812+ verify_error_getter_templ,
4813+ Local<FunctionTemplate>(),
4814+ attributes);
48084815
48094816 target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellman" ),
48104817 t->GetFunction ());
@@ -4819,14 +4826,17 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
48194826 env->SetProtoMethod (t2, " getPublicKey" , GetPublicKey);
48204827 env->SetProtoMethod (t2, " getPrivateKey" , GetPrivateKey);
48214828
4822- t2->InstanceTemplate ()->SetAccessor (
4829+ Local<FunctionTemplate> verify_error_getter_templ2 =
4830+ FunctionTemplate::New (env->isolate (),
4831+ DiffieHellman::VerifyErrorGetter,
4832+ env->as_external (),
4833+ Signature::New (env->isolate (), t2));
4834+
4835+ t2->InstanceTemplate ()->SetAccessorProperty (
48234836 env->verify_error_string (),
4824- DiffieHellman::VerifyErrorGetter,
4825- nullptr ,
4826- env->as_external (),
4827- DEFAULT,
4828- attributes,
4829- AccessorSignature::New (env->isolate (), t2));
4837+ verify_error_getter_templ2,
4838+ Local<FunctionTemplate>(),
4839+ attributes);
48304840
48314841 target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellmanGroup" ),
48324842 t2->GetFunction ());
@@ -5142,8 +5152,7 @@ void DiffieHellman::SetPrivateKey(const FunctionCallbackInfo<Value>& args) {
51425152}
51435153
51445154
5145- void DiffieHellman::VerifyErrorGetter (Local<String> property,
5146- const PropertyCallbackInfo<Value>& args) {
5155+ void DiffieHellman::VerifyErrorGetter (const FunctionCallbackInfo<Value>& args) {
51475156 HandleScope scope (args.GetIsolate ());
51485157
51495158 DiffieHellman* diffieHellman;
0 commit comments