From cbf7d7ce1cde953501b31c1d7de680743cd04c7d Mon Sep 17 00:00:00 2001 From: himself65 Date: Wed, 13 May 2020 13:44:41 +0800 Subject: [PATCH] src: replace to CHECK_NOT_NULL in node_crypto --- src/node_crypto.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d53a6d2f2325fe..d2f67808ce9bde 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2923,7 +2923,7 @@ ByteSource ByteSource::NullTerminatedCopy(Environment* env, ByteSource ByteSource::FromSymmetricKeyObject(Local handle) { CHECK(handle->IsObject()); KeyObject* key = Unwrap(handle.As()); - CHECK(key); + CHECK_NOT_NULL(key); return Foreign(key->GetSymmetricKey(), key->GetSymmetricKeySize()); } @@ -3129,7 +3129,7 @@ static ManagedEVPPKey GetPublicOrPrivateKeyFromJs( } else { CHECK(args[*offset]->IsObject()); KeyObject* key = Unwrap(args[*offset].As()); - CHECK(key); + CHECK_NOT_NULL(key); CHECK_NE(key->GetKeyType(), kKeyTypeSecret); (*offset) += 4; return key->GetAsymmetricKey(); @@ -3271,7 +3271,7 @@ MaybeLocal KeyObject::Create(Environment* env, } KeyObject* key = Unwrap(obj); - CHECK(key); + CHECK_NOT_NULL(key); if (key_type == kKeyTypePublic) key->InitPublic(pkey); else