From 5506006559e852407718ed1a1ddb98aaa6f081b0 Mon Sep 17 00:00:00 2001 From: himself65 Date: Wed, 11 Mar 2020 15:22:34 +0800 Subject: [PATCH] src: remove excess v8 namespace --- src/node_crypto.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index fdaf91acdc0a1c..1befcb612a2027 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -500,7 +500,7 @@ void SecureContext::Initialize(Environment* env, Local target) { env->set_secure_context_constructor_template(t); } -SecureContext::SecureContext(Environment* env, v8::Local wrap) +SecureContext::SecureContext(Environment* env, Local wrap) : BaseObject(env, wrap) { MakeWeak(); env->isolate()->AdjustAmountOfExternalAllocatedMemory(kExternalSize); @@ -3288,7 +3288,7 @@ KeyType KeyObject::GetKeyType() const { } KeyObject::KeyObject(Environment* env, - v8::Local wrap, + Local wrap, KeyType key_type) : BaseObject(env, wrap), key_type_(key_type), @@ -3333,7 +3333,7 @@ void KeyObject::Init(const FunctionCallbackInfo& args) { } } -void KeyObject::InitSecret(v8::Local abv) { +void KeyObject::InitSecret(Local abv) { CHECK_EQ(this->key_type_, kKeyTypeSecret); size_t key_len = abv->ByteLength(); @@ -3397,7 +3397,7 @@ void KeyObject::GetSymmetricKeySize(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(static_cast(key->GetSymmetricKeySize())); } -void KeyObject::Export(const v8::FunctionCallbackInfo& args) { +void KeyObject::Export(const FunctionCallbackInfo& args) { KeyObject* key; ASSIGN_OR_RETURN_UNWRAP(&key, args.Holder()); @@ -3441,7 +3441,7 @@ MaybeLocal KeyObject::ExportPrivateKey( } CipherBase::CipherBase(Environment* env, - v8::Local wrap, + Local wrap, CipherKind kind) : BaseObject(env, wrap), ctx_(nullptr), @@ -4074,7 +4074,7 @@ void CipherBase::Final(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(out.ToBuffer().ToLocalChecked()); } -Hmac::Hmac(Environment* env, v8::Local wrap) +Hmac::Hmac(Environment* env, Local wrap) : BaseObject(env, wrap), ctx_(nullptr) { MakeWeak(); @@ -4199,7 +4199,7 @@ void Hmac::HmacDigest(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(rc.ToLocalChecked()); } -Hash::Hash(Environment* env, v8::Local wrap) +Hash::Hash(Environment* env, Local wrap) : BaseObject(env, wrap), mdctx_(nullptr), has_md_(false), @@ -4449,7 +4449,7 @@ void CheckThrow(Environment* env, SignBase::Error error) { } } -SignBase::SignBase(Environment* env, v8::Local wrap) +SignBase::SignBase(Environment* env, Local wrap) : BaseObject(env, wrap) { } @@ -4476,7 +4476,7 @@ static bool ApplyRSAOptions(const ManagedEVPPKey& pkey, } -Sign::Sign(Environment* env, v8::Local wrap) : SignBase(env, wrap) { +Sign::Sign(Environment* env, Local wrap) : SignBase(env, wrap) { MakeWeak(); } @@ -4800,8 +4800,8 @@ void SignOneShot(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(signature.ToBuffer().ToLocalChecked()); } -Verify::Verify(Environment* env, v8::Local wrap) : - SignBase(env, wrap) { +Verify::Verify(Environment* env, Local wrap) + : SignBase(env, wrap) { MakeWeak(); } @@ -5109,7 +5109,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(out.ToBuffer().ToLocalChecked()); } -DiffieHellman::DiffieHellman(Environment* env, v8::Local wrap) +DiffieHellman::DiffieHellman(Environment* env, Local wrap) : BaseObject(env, wrap), verifyError_(0) { MakeWeak(); } @@ -5475,7 +5475,7 @@ void ECDH::Initialize(Environment* env, Local target) { t->GetFunction(env->context()).ToLocalChecked()).Check(); } -ECDH::ECDH(Environment* env, v8::Local wrap, ECKeyPointer&& key) +ECDH::ECDH(Environment* env, Local wrap, ECKeyPointer&& key) : BaseObject(env, wrap), key_(std::move(key)), group_(EC_KEY_get0_group(key_.get())) {