From ffe572addd837432dda3d08ecb417c8e28d365cb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 17 Aug 2017 14:23:57 +0200 Subject: [PATCH] src: replace assert() with CHECK() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14663 Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Daniel Bevenius Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Gibson Fahnestock --- src/node_http2_core-inl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_http2_core-inl.h b/src/node_http2_core-inl.h index 9bf471ccbc30cb..bd5b0287f107e1 100755 --- a/src/node_http2_core-inl.h +++ b/src/node_http2_core-inl.h @@ -285,7 +285,7 @@ inline ssize_t Nghttp2Session::OnStreamRead(nghttp2_session *session, GetTrailers(session, handle, stream, flags); } - assert(offset <= length); + CHECK(offset <= length); return offset; } @@ -296,7 +296,7 @@ inline ssize_t Nghttp2Session::OnSelectPadding(nghttp2_session *session, size_t maxPayloadLen, void *user_data) { Nghttp2Session *handle = static_cast(user_data); - assert(handle->HasGetPaddingCallback()); + CHECK(handle->HasGetPaddingCallback()); ssize_t padding = handle->GetPadding(frame->hd.length, maxPayloadLen); DEBUG_HTTP2("Nghttp2Session %s: using padding, size: %d\n", handle->TypeName(), padding); @@ -547,7 +547,7 @@ inline void Nghttp2Session::MarkDestroying() { } inline int Nghttp2Session::Free() { - assert(session_ != nullptr); + CHECK(session_ != nullptr); DEBUG_HTTP2("Nghttp2Session %s: freeing session\n", TypeName()); // Stop the loop uv_prepare_stop(&prep_);