Skip to content

Commit 8691d8b

Browse files
committed
http2: eliminate dead code
PR-URL: #15693 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
1 parent 8f4db31 commit 8691d8b

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

src/node_http2.cc

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ Freelist<Nghttp2Stream, FREELIST_MAX> stream_free_list;
2525

2626
Freelist<nghttp2_header_list, FREELIST_MAX> header_free_list;
2727

28-
Freelist<nghttp2_data_chunks_t, FREELIST_MAX>
29-
data_chunks_free_list;
30-
3128
Nghttp2Session::Callbacks Nghttp2Session::callback_struct_saved[2] = {
3229
Callbacks(false),
3330
Callbacks(true)};

src/node_http2_core-inl.h

-9
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ extern Freelist<Nghttp2Stream, FREELIST_MAX> stream_free_list;
3030

3131
extern Freelist<nghttp2_header_list, FREELIST_MAX> header_free_list;
3232

33-
extern Freelist<nghttp2_data_chunks_t, FREELIST_MAX>
34-
data_chunks_free_list;
35-
3633
#ifdef NODE_DEBUG_HTTP2
3734
inline int Nghttp2Session::OnNghttpError(nghttp2_session* session,
3835
const char* message,
@@ -905,12 +902,6 @@ inline void Nghttp2Stream::ReadStop() {
905902
id_, 0);
906903
}
907904

908-
nghttp2_data_chunks_t::~nghttp2_data_chunks_t() {
909-
for (unsigned int n = 0; n < nbufs; n++) {
910-
free(buf[n].base);
911-
}
912-
}
913-
914905
Nghttp2Session::Callbacks::Callbacks(bool kHasGetPaddingCallback) {
915906
nghttp2_session_callbacks_new(&callbacks);
916907
nghttp2_session_callbacks_set_on_begin_headers_callback(

src/node_http2_core.h

-8
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class Nghttp2Stream;
4040

4141
struct nghttp2_stream_write_t;
4242
struct nghttp2_data_chunk_t;
43-
struct nghttp2_data_chunks_t;
4443

4544
#define MAX_BUFFER_COUNT 10
4645
#define SEND_BUFFER_RECOMMENDED_SIZE 4096
@@ -508,13 +507,6 @@ struct nghttp2_data_chunk_t {
508507
nghttp2_data_chunk_t* next = nullptr;
509508
};
510509

511-
struct nghttp2_data_chunks_t {
512-
unsigned int nbufs = 0;
513-
uv_buf_t buf[MAX_BUFFER_COUNT];
514-
515-
inline ~nghttp2_data_chunks_t();
516-
};
517-
518510
} // namespace http2
519511
} // namespace node
520512

0 commit comments

Comments
 (0)