Browse Source

src: replace assert() with CHECK()

PR-URL: https://github.com/nodejs/node/pull/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>
canary-base
Ben Noordhuis 7 years ago
committed by James M Snell
parent
commit
01160dd6e9
  1. 6
      src/node_http2_core-inl.h

6
src/node_http2_core-inl.h

@ -285,7 +285,7 @@ end:
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<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);
@ -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_);

Loading…
Cancel
Save