@@ -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;
@@ -315,7 +316,8 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) {
315
316
nullptr ,
316
317
env->as_external (),
317
318
DEFAULT,
318
- static_cast <PropertyAttribute>(ReadOnly | DontDelete));
319
+ static_cast <PropertyAttribute>(ReadOnly | DontDelete),
320
+ AccessorSignature::New (env->isolate (), t));
319
321
320
322
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " SecureContext" ),
321
323
t->GetFunction ());
@@ -1146,9 +1148,7 @@ int SecureContext::TicketKeyCallback(SSL* ssl,
1146
1148
1147
1149
void SecureContext::CtxGetter (Local<String> property,
1148
1150
const PropertyCallbackInfo<Value>& info) {
1149
- HandleScope scope (info.GetIsolate ());
1150
-
1151
- SSL_CTX* ctx = Unwrap<SecureContext>(info.Holder ())->ctx_ ;
1151
+ SSL_CTX* ctx = Unwrap<SecureContext>(info.This ())->ctx_ ;
1152
1152
Local<External> ext = External::New (info.GetIsolate (), ctx);
1153
1153
info.GetReturnValue ().Set (ext);
1154
1154
}
@@ -1216,7 +1216,8 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
1216
1216
nullptr ,
1217
1217
env->as_external (),
1218
1218
DEFAULT,
1219
- static_cast <PropertyAttribute>(ReadOnly | DontDelete));
1219
+ static_cast <PropertyAttribute>(ReadOnly | DontDelete),
1220
+ AccessorSignature::New (env->isolate (), t));
1220
1221
}
1221
1222
1222
1223
@@ -2203,10 +2204,8 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
2203
2204
2204
2205
template <class Base >
2205
2206
void SSLWrap<Base>::SSLGetter(Local<String> property,
2206
- const PropertyCallbackInfo<Value>& info) {
2207
- HandleScope scope (info.GetIsolate ());
2208
-
2209
- SSL* ssl = Unwrap<Base>(info.Holder ())->ssl_ ;
2207
+ const PropertyCallbackInfo<Value>& info) {
2208
+ SSL* ssl = Unwrap<Base>(info.This ())->ssl_ ;
2210
2209
Local<External> ext = External::New (info.GetIsolate (), ssl);
2211
2210
info.GetReturnValue ().Set (ext);
2212
2211
}
@@ -4144,12 +4143,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
4144
4143
env->SetProtoMethod (t, " setPublicKey" , SetPublicKey);
4145
4144
env->SetProtoMethod (t, " setPrivateKey" , SetPrivateKey);
4146
4145
4147
- t->InstanceTemplate ()->SetAccessor (env->verify_error_string (),
4148
- DiffieHellman::VerifyErrorGetter,
4149
- nullptr ,
4150
- env->as_external (),
4151
- DEFAULT,
4152
- attributes);
4146
+ t->InstanceTemplate ()->SetAccessor (
4147
+ env->verify_error_string (),
4148
+ DiffieHellman::VerifyErrorGetter,
4149
+ nullptr ,
4150
+ env->as_external (),
4151
+ DEFAULT,
4152
+ attributes,
4153
+ AccessorSignature::New (env->isolate (), t));
4153
4154
4154
4155
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellman" ),
4155
4156
t->GetFunction ());
@@ -4164,12 +4165,14 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) {
4164
4165
env->SetProtoMethod (t2, " getPublicKey" , GetPublicKey);
4165
4166
env->SetProtoMethod (t2, " getPrivateKey" , GetPrivateKey);
4166
4167
4167
- t2->InstanceTemplate ()->SetAccessor (env->verify_error_string (),
4168
- DiffieHellman::VerifyErrorGetter,
4169
- nullptr ,
4170
- env->as_external (),
4171
- DEFAULT,
4172
- attributes);
4168
+ t2->InstanceTemplate ()->SetAccessor (
4169
+ env->verify_error_string (),
4170
+ DiffieHellman::VerifyErrorGetter,
4171
+ nullptr ,
4172
+ env->as_external (),
4173
+ DEFAULT,
4174
+ attributes,
4175
+ AccessorSignature::New (env->isolate (), t2));
4173
4176
4174
4177
target->Set (FIXED_ONE_BYTE_STRING (env->isolate (), " DiffieHellmanGroup" ),
4175
4178
t2->GetFunction ());
0 commit comments