Skip to content

Commit e5feb7d

Browse files
jasnellMylesBorins
authored andcommitted
http2: eliminate dead code
PR-URL: #15693 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
1 parent 420139f commit e5feb7d

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

‎src/node_http2.cc‎

Lines changed: 0 additions & 3 deletions
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‎

Lines changed: 0 additions & 9 deletions
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
inlineintNghttp2Session::OnNghttpError(nghttp2_session* session,
3835
constchar* 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 (unsignedint n = 0; n < nbufs; n++){
910-
free(buf[n].base);
911-
}
912-
}
913-
914905
Nghttp2Session::Callbacks::Callbacks(boolkHasGetPaddingCallback){
915906
nghttp2_session_callbacks_new(&callbacks);
916907
nghttp2_session_callbacks_set_on_begin_headers_callback(

‎src/node_http2_core.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class Nghttp2Stream;
4040

4141
structnghttp2_stream_write_t;
4242
structnghttp2_data_chunk_t;
43-
structnghttp2_data_chunks_t;
4443

4544
#defineMAX_BUFFER_COUNT10
4645
#defineSEND_BUFFER_RECOMMENDED_SIZE4096
@@ -508,13 +507,6 @@ struct nghttp2_data_chunk_t{
508507
nghttp2_data_chunk_t* next = nullptr;
509508
};
510509

511-
structnghttp2_data_chunks_t{
512-
unsignedint 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)