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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
  • Loading branch information
bnoordhuis authored and MylesBorins committed Sep 12, 2017
1 parent 34d1a77 commit ffe572a
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 ffe572a

Please sign in to comment.