Skip to content

Commit

Permalink
crypto: use SetNull instead of Set
Browse files Browse the repository at this point in the history
This commit updates the only usage of Set(Null(env->isolate()) to use
SetNull() instead which is used in other places in node_crypto.cc.

PR-URL: nodejs#17521
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
danbev authored and addaleax committed Dec 7, 2017
1 parent 8514ea9 commit 0bc10b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
@@ -1595,7 +1595,7 @@ void SecureContext::GetCertificate(const FunctionCallbackInfo<Value>& args) {
else
cert = wrap->issuer_;
if (cert == nullptr)
return args.GetReturnValue().Set(Null(env->isolate()));
return args.GetReturnValue().SetNull();

int size = i2d_X509(cert, nullptr);
Local<Object> buff = Buffer::New(env, size).ToLocalChecked();

0 comments on commit 0bc10b0

Please sign in to comment.