Skip to content

Commit

Permalink
src: replace assert() with CHECK()
Browse files Browse the repository at this point in the history
PR-URL: #14663
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
bnoordhuis authored and MylesBorins committed Sep 10, 2017
1 parent 3a399ab commit 32c5c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_http2_core-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -296,7 +296,7 @@ inline ssize_t Nghttp2Session::OnSelectPadding(nghttp2_session *session,
size_t maxPayloadLen,
void *user_data) {
Nghttp2Session *handle = static_cast<Nghttp2Session *>(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);
Expand Down Expand Up @@ -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_);
Expand Down

0 comments on commit 32c5c26

Please sign in to comment.