From 68cd233a7bd76ad660038fae5a42bb54178e1831 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 29 Sep 2017 15:06:45 -0700 Subject: [PATCH] http2: eliminate dead code PR-URL: https://github.com/nodejs/node/pull/15693 Reviewed-By: Matteo Collina Reviewed-By: Anatoli Papirovski --- src/node_http2.cc | 3 --- src/node_http2_core-inl.h | 9 --------- src/node_http2_core.h | 8 -------- 3 files changed, 20 deletions(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 8f666feaf0955f..6175ad5a7f30e6 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -25,9 +25,6 @@ Freelist stream_free_list; Freelist header_free_list; -Freelist - data_chunks_free_list; - Nghttp2Session::Callbacks Nghttp2Session::callback_struct_saved[2] = { Callbacks(false), Callbacks(true)}; diff --git a/src/node_http2_core-inl.h b/src/node_http2_core-inl.h index 29f5b063801d10..15fb3d4f83494c 100644 --- a/src/node_http2_core-inl.h +++ b/src/node_http2_core-inl.h @@ -30,9 +30,6 @@ extern Freelist stream_free_list; extern Freelist header_free_list; -extern Freelist - data_chunks_free_list; - #ifdef NODE_DEBUG_HTTP2 inline int Nghttp2Session::OnNghttpError(nghttp2_session* session, const char* message, @@ -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( diff --git a/src/node_http2_core.h b/src/node_http2_core.h index ff2321d0cb68a2..1a8e9a9f57b13d 100644 --- a/src/node_http2_core.h +++ b/src/node_http2_core.h @@ -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 @@ -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