summaryrefslogtreecommitdiff
path: root/src/base_object-inl.h
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-12-24 12:24:08 -0500
committercjihrig <cjihrig@gmail.com>2018-12-26 12:25:32 -0500
commit4e31a7f3546bb848058a55b3aa629b5f12d1caf9 (patch)
treebe0a04047b005c611070d14cb1fc59fbbee936d1 /src/base_object-inl.h
parentc2b4269b77822aee6d07ae427a3341abdbaa8c3f (diff)
downloadandroid-node-v8-4e31a7f3546bb848058a55b3aa629b5f12d1caf9.tar.gz
android-node-v8-4e31a7f3546bb848058a55b3aa629b5f12d1caf9.tar.bz2
android-node-v8-4e31a7f3546bb848058a55b3aa629b5f12d1caf9.zip
src: introduce DCHECK macro
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 <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'src/base_object-inl.h')
-rw-r--r--src/base_object-inl.h4
1 files changed, 1 insertions, 3 deletions
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<v8::FunctionTemplate>
BaseObject::MakeLazilyInitializedJSTemplate(Environment* env) {
auto constructor = [](const v8::FunctionCallbackInfo<v8::Value>& args) {
-#ifdef DEBUG
- CHECK(args.IsConstructCall());
-#endif
+ DCHECK(args.IsConstructCall());
DCHECK_GT(args.This()->InternalFieldCount(), 0);
args.This()->SetAlignedPointerInInternalField(0, nullptr);
};