diff --git a/src/env-inl.h b/src/env-inl.h index bdf3e8ae453f9f..e30370633fd3da 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -417,12 +417,12 @@ inline void Environment::set_http_parser_buffer(char* buffer) { http_parser_buffer_ = buffer; } -inline http2::http2_state* Environment::http2_state() const { +inline http2::Http2State* Environment::http2_state() const { return http2_state_.get(); } inline void Environment::set_http2_state( - std::unique_ptr buffer) { + std::unique_ptr buffer) { CHECK(!http2_state_); // Should be set only once. http2_state_ = std::move(buffer); } diff --git a/src/env.h b/src/env.h index 7b4a6999755bcf..c098ca1d2b9a9d 100644 --- a/src/env.h +++ b/src/env.h @@ -617,8 +617,8 @@ class Environment { inline char* http_parser_buffer() const; inline void set_http_parser_buffer(char* buffer); - inline http2::http2_state* http2_state() const; - inline void set_http2_state(std::unique_ptr state); + inline http2::Http2State* http2_state() const; + inline void set_http2_state(std::unique_ptr state); inline double* fs_stats_field_array() const; inline void set_fs_stats_field_array(double* fields); @@ -759,7 +759,7 @@ class Environment { double* heap_space_statistics_buffer_ = nullptr; char* http_parser_buffer_; - std::unique_ptr http2_state_; + std::unique_ptr http2_state_; double* fs_stats_field_array_; diff --git a/src/node_http2.cc b/src/node_http2.cc index 2744c8bb43df51..237e5c01b91696 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -2868,7 +2868,7 @@ void Initialize(Local target, Isolate* isolate = env->isolate(); HandleScope scope(isolate); - std::unique_ptr state(new http2_state(isolate)); + std::unique_ptr state(new Http2State(isolate)); #define SET_STATE_TYPEDARRAY(name, field) \ target->Set(context, \ diff --git a/src/node_http2_state.h b/src/node_http2_state.h index ed88f068a04b16..64a0942f7ffa67 100644 --- a/src/node_http2_state.h +++ b/src/node_http2_state.h @@ -84,9 +84,9 @@ namespace http2 { IDX_SESSION_STATS_COUNT }; -class http2_state { +class Http2State { public: - explicit http2_state(v8::Isolate* isolate) : + explicit Http2State(v8::Isolate* isolate) : root_buffer( isolate, sizeof(http2_state_internal)),