@@ -63,6 +63,7 @@ static const int X509_NAME_FLAGS = ASN1_STRFLGS_ESC_CTRL
63
63
namespace node {
64
64
namespace crypto {
65
65
66
+ using v8::AccessorSignature;
66
67
using v8::Array;
67
68
using v8::Boolean ;
68
69
using v8::Context;
@@ -324,7 +325,8 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
324
325
nullptr ,
325
326
env->as_external (),
326
327
DEFAULT,
327
- static_cast <PropertyAttribute>(ReadOnly | DontDelete));
328
+ static_cast <PropertyAttribute>(ReadOnly | DontDelete),
329
+ AccessorSignature::New (env->isolate (), t));
328
330
329
331
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " SecureContext" ),
330
332
t->GetFunction ());
@@ -1138,9 +1140,7 @@ int SecureContext::TicketKeyCallback(SSL* ssl,
1138
1140
1139
1141
void SecureContext::CtxGetter (Local<String> property,
1140
1142
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_ ;
1144
1144
Local<External> ext = External::New (info.GetIsolate (), ctx);
1145
1145
info.GetReturnValue ().Set (ext);
1146
1146
}
@@ -1213,7 +1213,8 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
1213
1213
nullptr ,
1214
1214
env->as_external (),
1215
1215
DEFAULT,
1216
- static_cast <PropertyAttribute>(ReadOnly | DontDelete));
1216
+ static_cast <PropertyAttribute>(ReadOnly | DontDelete),
1217
+ AccessorSignature::New (env->isolate (), t));
1217
1218
}
1218
1219
1219
1220
@@ -2357,10 +2358,8 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
2357
2358
2358
2359
template <class Base >
2359
2360
void 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_ ;
2364
2363
Local<External> ext = External::New (info.GetIsolate (), ssl);
2365
2364
info.GetReturnValue ().Set (ext);
2366
2365
}
@@ -4298,12 +4297,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
4298
4297
env->SetProtoMethod (t, " setPublicKey" , SetPublicKey);
4299
4298
env->SetProtoMethod (t, " setPrivateKey" , SetPrivateKey);
4300
4299
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));
4307
4308
4308
4309
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellman" ),
4309
4310
t->GetFunction ());
@@ -4318,12 +4319,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
4318
4319
env->SetProtoMethod (t2, " getPublicKey" , GetPublicKey);
4319
4320
env->SetProtoMethod (t2, " getPrivateKey" , GetPrivateKey);
4320
4321
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));
4327
4330
4328
4331
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellmanGroup" ),
4329
4332
t2->GetFunction ());
0 commit comments