diff options
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r-- | src/node_crypto.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4cf3ac5652b..75f0ecb264a 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -366,7 +366,8 @@ void SecureContext::Initialize(Environment* env, Local<Object> target) { t->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kTicketKeyIVIndex"), Integer::NewFromUnsigned(env->isolate(), kTicketKeyIVIndex)); - target->Set(secureContextString, t->GetFunction()); + target->Set(secureContextString, + t->GetFunction(env->context()).ToLocalChecked()); env->set_secure_context_constructor_template(t); } @@ -2561,7 +2562,7 @@ void CipherBase::Initialize(Environment* env, Local<Object> target) { env->SetProtoMethod(t, "setAAD", SetAAD); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "CipherBase"), - t->GetFunction()); + t->GetFunction(env->context()).ToLocalChecked()); } @@ -3195,7 +3196,8 @@ void Hmac::Initialize(Environment* env, v8::Local<Object> target) { env->SetProtoMethod(t, "update", HmacUpdate); env->SetProtoMethod(t, "digest", HmacDigest); - target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Hmac"), t->GetFunction()); + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Hmac"), + t->GetFunction(env->context()).ToLocalChecked()); } @@ -3314,7 +3316,8 @@ void Hash::Initialize(Environment* env, v8::Local<Object> target) { env->SetProtoMethod(t, "update", HashUpdate); env->SetProtoMethod(t, "digest", HashDigest); - target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Hash"), t->GetFunction()); + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Hash"), + t->GetFunction(env->context()).ToLocalChecked()); } @@ -3508,7 +3511,8 @@ void Sign::Initialize(Environment* env, v8::Local<Object> target) { env->SetProtoMethod(t, "update", SignUpdate); env->SetProtoMethod(t, "sign", SignFinal); - target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Sign"), t->GetFunction()); + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Sign"), + t->GetFunction(env->context()).ToLocalChecked()); } @@ -3710,7 +3714,7 @@ void Verify::Initialize(Environment* env, v8::Local<Object> target) { env->SetProtoMethod(t, "verify", VerifyFinal); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Verify"), - t->GetFunction()); + t->GetFunction(env->context()).ToLocalChecked()); } @@ -3948,7 +3952,7 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) { attributes); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "DiffieHellman"), - t->GetFunction()); + t->GetFunction(env->context()).ToLocalChecked()); Local<FunctionTemplate> t2 = env->NewFunctionTemplate(DiffieHellmanGroup); t2->InstanceTemplate()->SetInternalFieldCount(1); @@ -3977,7 +3981,7 @@ void DiffieHellman::Initialize(Environment* env, Local<Object> target) { attributes); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "DiffieHellmanGroup"), - t2->GetFunction()); + t2->GetFunction(env->context()).ToLocalChecked()); } @@ -4326,7 +4330,7 @@ void ECDH::Initialize(Environment* env, Local<Object> target) { env->SetProtoMethod(t, "setPrivateKey", SetPrivateKey); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "ECDH"), - t->GetFunction()); + t->GetFunction(env->context()).ToLocalChecked()); } |