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 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.