Skip to content

Commit

Permalink
http2: eliminate dead code
Browse files Browse the repository at this point in the history
PR-URL: #15693
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
  • Loading branch information
jasnell authored and MylesBorins committed Oct 11, 2017
1 parent 078ee27 commit 68cd233
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
3 changes: 0 additions & 3 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ Freelist<Nghttp2Stream, FREELIST_MAX> stream_free_list;

Freelist<nghttp2_header_list, FREELIST_MAX> header_free_list;

Freelist<nghttp2_data_chunks_t, FREELIST_MAX>
data_chunks_free_list;

Nghttp2Session::Callbacks Nghttp2Session::callback_struct_saved[2] = {
Callbacks(false),
Callbacks(true)};
Expand Down
9 changes: 0 additions & 9 deletions src/node_http2_core-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ extern Freelist<Nghttp2Stream, FREELIST_MAX> stream_free_list;

extern Freelist<nghttp2_header_list, FREELIST_MAX> header_free_list;

extern Freelist<nghttp2_data_chunks_t, FREELIST_MAX>
data_chunks_free_list;

#ifdef NODE_DEBUG_HTTP2
inline int Nghttp2Session::OnNghttpError(nghttp2_session* session,
const char* message,
Expand Down Expand Up @@ -905,12 +902,6 @@ inline void Nghttp2Stream::ReadStop() {
id_, 0);
}

nghttp2_data_chunks_t::~nghttp2_data_chunks_t() {
for (unsigned int n = 0; n < nbufs; n++) {
free(buf[n].base);
}
}

Nghttp2Session::Callbacks::Callbacks(bool kHasGetPaddingCallback) {
nghttp2_session_callbacks_new(&callbacks);
nghttp2_session_callbacks_set_on_begin_headers_callback(
Expand Down
8 changes: 0 additions & 8 deletions src/node_http2_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class Nghttp2Stream;

struct nghttp2_stream_write_t;
struct nghttp2_data_chunk_t;
struct nghttp2_data_chunks_t;

#define MAX_BUFFER_COUNT 10
#define SEND_BUFFER_RECOMMENDED_SIZE 4096
Expand Down Expand Up @@ -508,13 +507,6 @@ struct nghttp2_data_chunk_t {
nghttp2_data_chunk_t* next = nullptr;
};

struct nghttp2_data_chunks_t {
unsigned int nbufs = 0;
uv_buf_t buf[MAX_BUFFER_COUNT];

inline ~nghttp2_data_chunks_t();
};

} // namespace http2
} // namespace node

Expand Down

0 comments on commit 68cd233

Please sign in to comment.