Skip to content

Commit

Permalink
src: make IsConstructCall checks consistent
Browse files Browse the repository at this point in the history
The most common way to perfom this check is by using the simple CHECK
macro. This commit suggest making this consistent in favour of the most
commonly used.

PR-URL: #13473
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
danbev authored and addaleax committed Jun 10, 2017
1 parent ad07c46 commit dd158b0
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
Expand Up @@ -3323,7 +3323,7 @@ void CipherBase::Initialize(Environment* env, Local<Object> target) {


void CipherBase::New(const FunctionCallbackInfo<Value>& args) {
CHECK_EQ(args.IsConstructCall(), true);
CHECK(args.IsConstructCall());
CipherKind kind = args[0]->IsTrue() ? kCipher : kDecipher;
Environment* env = Environment::GetCurrent(args);
new CipherBase(env, args.This(), kind);
Expand Down

0 comments on commit dd158b0

Please sign in to comment.