From 4e31a7f3546bb848058a55b3aa629b5f12d1caf9 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 24 Dec 2018 12:24:08 -0500 Subject: src: introduce DCHECK macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds a DCHECK macro for consistency with the other DCHECK_* macros. PR-URL: https://github.com/nodejs/node/pull/25207 Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- src/base_object-inl.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/base_object-inl.h') diff --git a/src/base_object-inl.h b/src/base_object-inl.h index 84c449a308..f1f1498e6c 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -113,9 +113,7 @@ void BaseObject::ClearWeak() { v8::Local BaseObject::MakeLazilyInitializedJSTemplate(Environment* env) { auto constructor = [](const v8::FunctionCallbackInfo& args) { -#ifdef DEBUG - CHECK(args.IsConstructCall()); -#endif + DCHECK(args.IsConstructCall()); DCHECK_GT(args.This()->InternalFieldCount(), 0); args.This()->SetAlignedPointerInInternalField(0, nullptr); }; -- cgit v1.2.3