mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
src: make IsConstructCall checks consistent
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
ad07c46b00
commit
dd158b096f
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user