diff options
author | Tobias Nießen <tniessen@tnie.de> | 2018-05-20 18:44:06 +0300 |
---|---|---|
committer | Tobias Nießen <tniessen@tnie.de> | 2018-05-26 13:29:31 +0300 |
commit | 39f209649fc290fe92cc3b87edfffa6a854ecb03 (patch) | |
tree | e7c7c595355c3ce1dbd59d89070a7427572d256f /src/req_wrap-inl.h | |
parent | 13493e99bfd208bc6e5381a918384049384cc2ed (diff) |
src: add CHECK_NULL/CHECK_NOT_NULL macros
This change introduces CHECK_NULL and CHECK_NOT_NULL macros
similar to their definition in v8 and replaces instances of
CHECK/CHECK_EQ/CHECK_NE with these where it seems appropriate.
PR-URL: https://github.com/nodejs/node/pull/20914
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/req_wrap-inl.h')
-rw-r--r-- | src/req_wrap-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/req_wrap-inl.h b/src/req_wrap-inl.h index 7e9e2d9fbbf..4f9da1c4f35 100644 --- a/src/req_wrap-inl.h +++ b/src/req_wrap-inl.h @@ -123,7 +123,7 @@ struct MakeLibuvRequestCallback<ReqT, void(*)(ReqT*, Args...)> { } static F For(ReqWrap<ReqT>* req_wrap, F v) { - CHECK_EQ(req_wrap->original_callback_, nullptr); + CHECK_NULL(req_wrap->original_callback_); req_wrap->original_callback_ = reinterpret_cast<typename ReqWrap<ReqT>::callback_t>(v); return Wrapper; |