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 <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
danbev committed Jun 8, 2017
1 parent b4da30f commit f38302d
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 f38302d

Please sign in to comment.