@@ -63,6 +63,7 @@ static const int X509_NAME_FLAGS = ASN1_STRFLGS_ESC_CTRL
6363namespace  node  {
6464namespace  crypto  {
6565
66+ using  v8::AccessorSignature;
6667using  v8::Array;
6768using  v8::Boolean;
6869using  v8::Context;
@@ -324,7 +325,8 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
324325      nullptr ,
325326      env->as_external (),
326327      DEFAULT,
327-       static_cast <PropertyAttribute>(ReadOnly | DontDelete));
328+       static_cast <PropertyAttribute>(ReadOnly | DontDelete),
329+       AccessorSignature::New (env->isolate (), t));
328330
329331  target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " SecureContext"  ),
330332              t->GetFunction ());
@@ -1138,9 +1140,7 @@ int SecureContext::TicketKeyCallback(SSL* ssl,
11381140
11391141void  SecureContext::CtxGetter (Local<String> property,
11401142                              const  PropertyCallbackInfo<Value>& info) {
1141-   HandleScope scope (info.GetIsolate ());
1142- 
1143-   SSL_CTX* ctx = Unwrap<SecureContext>(info.Holder ())->ctx_ ;
1143+   SSL_CTX* ctx = Unwrap<SecureContext>(info.This ())->ctx_ ;
11441144  Local<External> ext = External::New (info.GetIsolate (), ctx);
11451145  info.GetReturnValue ().Set (ext);
11461146}
@@ -1213,7 +1213,8 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
12131213      nullptr ,
12141214      env->as_external (),
12151215      DEFAULT,
1216-       static_cast <PropertyAttribute>(ReadOnly | DontDelete));
1216+       static_cast <PropertyAttribute>(ReadOnly | DontDelete),
1217+       AccessorSignature::New (env->isolate (), t));
12171218}
12181219
12191220
@@ -2357,10 +2358,8 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
23572358
23582359template  <class  Base >
23592360void  SSLWrap<Base>::SSLGetter(Local<String> property,
2360-                         const  PropertyCallbackInfo<Value>& info) {
2361-   HandleScope scope (info.GetIsolate ());
2362- 
2363-   SSL* ssl = Unwrap<Base>(info.Holder ())->ssl_ ;
2361+                               const  PropertyCallbackInfo<Value>& info) {
2362+   SSL* ssl = Unwrap<Base>(info.This ())->ssl_ ;
23642363  Local<External> ext = External::New (info.GetIsolate (), ssl);
23652364  info.GetReturnValue ().Set (ext);
23662365}
@@ -4298,12 +4297,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
42984297  env->SetProtoMethod (t, " setPublicKey"  , SetPublicKey);
42994298  env->SetProtoMethod (t, " setPrivateKey"  , SetPrivateKey);
43004299
4301-   t->InstanceTemplate ()->SetAccessor (env->verify_error_string (),
4302-                                      DiffieHellman::VerifyErrorGetter,
4303-                                      nullptr ,
4304-                                      env->as_external (),
4305-                                      DEFAULT,
4306-                                      attributes);
4300+   t->InstanceTemplate ()->SetAccessor (
4301+       env->verify_error_string (),
4302+       DiffieHellman::VerifyErrorGetter,
4303+       nullptr ,
4304+       env->as_external (),
4305+       DEFAULT,
4306+       attributes,
4307+       AccessorSignature::New (env->isolate (), t));
43074308
43084309  target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellman"  ),
43094310              t->GetFunction ());
@@ -4318,12 +4319,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
43184319  env->SetProtoMethod (t2, " getPublicKey"  , GetPublicKey);
43194320  env->SetProtoMethod (t2, " getPrivateKey"  , GetPrivateKey);
43204321
4321-   t2->InstanceTemplate ()->SetAccessor (env->verify_error_string (),
4322-                                       DiffieHellman::VerifyErrorGetter,
4323-                                       nullptr ,
4324-                                       env->as_external (),
4325-                                       DEFAULT,
4326-                                       attributes);
4322+   t2->InstanceTemplate ()->SetAccessor (
4323+       env->verify_error_string (),
4324+       DiffieHellman::VerifyErrorGetter,
4325+       nullptr ,
4326+       env->as_external (),
4327+       DEFAULT,
4328+       attributes,
4329+       AccessorSignature::New (env->isolate (), t2));
43274330
43284331  target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellmanGroup"  ),
43294332              t2->GetFunction ());
0 commit comments