diff options
author | kiyomizumia <melissa@stroly.jp> | 2018-11-14 03:53:12 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-24 12:41:15 +0300 |
commit | 71bc7e1ce6881b4e6fe50459cc9866d47f96e4a4 (patch) | |
tree | f72b9a7fa2d414a7ce4ea6857b44700822af664c /src/stream_base-inl.h | |
parent | 65d8179b0d10b4a53564d360c21d0260ec4b1686 (diff) |
src: add DCHECK macros
This adds check statements for debugging and refactors the code
accordingly.
PR-URL: https://github.com/nodejs/node/pull/24359
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/stream_base-inl.h')
-rw-r--r-- | src/stream_base-inl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index 1d6ec17b802..7e2bbaa1730 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -448,9 +448,8 @@ inline void StreamReq::Done(int status, const char* error_str) { } inline void StreamReq::ResetObject(v8::Local<v8::Object> obj) { -#ifdef DEBUG - CHECK_GT(obj->InternalFieldCount(), StreamReq::kStreamReqField); -#endif + DCHECK_GT(obj->InternalFieldCount(), StreamReq::kStreamReqField); + obj->SetAlignedPointerInInternalField(0, nullptr); // BaseObject field. obj->SetAlignedPointerInInternalField(StreamReq::kStreamReqField, nullptr); } |