Skip to content

Commit

Permalink
http2: remove unnecessary v8 qualified names
Browse files Browse the repository at this point in the history
This commit removes v8 qualified identifiers that have using directives
to be consistent with the rest of the code in node_http2.cc.

PR-URL: #20420
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
danbev authored and MylesBorins committed May 4, 2018
1 parent b2bbc36 commit e397d19
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Http2Options::Http2Options(Environment* env) {
// a bit differently. For now, let's let nghttp2 take care of it.
nghttp2_option_set_builtin_recv_extension_type(options_, NGHTTP2_ALTSVC);

AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
AliasedBuffer<uint32_t, Uint32Array>& buffer =
env->http2_state()->options_buffer;
uint32_t flags = buffer[IDX_OPTIONS_FLAGS];

Expand Down Expand Up @@ -191,7 +191,7 @@ Http2Options::Http2Options(Environment* env) {
}

void Http2Session::Http2Settings::Init() {
AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
AliasedBuffer<uint32_t, Uint32Array>& buffer =
env()->http2_state()->settings_buffer;
uint32_t flags = buffer[IDX_SETTINGS_COUNT];

Expand Down Expand Up @@ -270,7 +270,7 @@ Local<Value> Http2Session::Http2Settings::Pack() {
void Http2Session::Http2Settings::Update(Environment* env,
Http2Session* session,
get_setting fn) {
AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
AliasedBuffer<uint32_t, Uint32Array>& buffer =
env->http2_state()->settings_buffer;
buffer[IDX_SETTINGS_HEADER_TABLE_SIZE] =
fn(**session, NGHTTP2_SETTINGS_HEADER_TABLE_SIZE);
Expand All @@ -288,7 +288,7 @@ void Http2Session::Http2Settings::Update(Environment* env,

// Initializes the shared TypedArray with the default settings values.
void Http2Session::Http2Settings::RefreshDefaults(Environment* env) {
AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
AliasedBuffer<uint32_t, Uint32Array>& buffer =
env->http2_state()->settings_buffer;

buffer[IDX_SETTINGS_HEADER_TABLE_SIZE] =
Expand Down Expand Up @@ -505,7 +505,7 @@ Http2Session::~Http2Session() {
}

inline bool HasHttp2Observer(Environment* env) {
AliasedBuffer<uint32_t, v8::Uint32Array>& observers =
AliasedBuffer<uint32_t, Uint32Array>& observers =
env->performance_state()->observers;
return observers[performance::NODE_PERFORMANCE_ENTRY_TYPE_HTTP2] != 0;
}
Expand All @@ -522,7 +522,7 @@ void Http2Stream::EmitStatistics() {
if (!HasHttp2Observer(env))
return;
HandleScope handle_scope(env->isolate());
AliasedBuffer<double, v8::Float64Array>& buffer =
AliasedBuffer<double, Float64Array>& buffer =
env->http2_state()->stream_stats_buffer;
buffer[IDX_STREAM_STATS_ID] = entry->id();
if (entry->first_byte() != 0) {
Expand Down Expand Up @@ -561,7 +561,7 @@ void Http2Session::EmitStatistics() {
if (!HasHttp2Observer(env))
return;
HandleScope handle_scope(env->isolate());
AliasedBuffer<double, v8::Float64Array>& buffer =
AliasedBuffer<double, Float64Array>& buffer =
env->http2_state()->session_stats_buffer;
buffer[IDX_SESSION_STATS_TYPE] = entry->type();
buffer[IDX_SESSION_STATS_PINGRTT] = entry->ping_rtt() / 1e6;
Expand Down Expand Up @@ -690,7 +690,7 @@ ssize_t Http2Session::OnCallbackPadding(size_t frameLen,
Local<Context> context = env()->context();
Context::Scope context_scope(context);

AliasedBuffer<uint32_t, v8::Uint32Array>& buffer =
AliasedBuffer<uint32_t, Uint32Array>& buffer =
env()->http2_state()->padding_buffer;
buffer[PADDING_BUF_FRAME_LENGTH] = frameLen;
buffer[PADDING_BUF_MAX_PAYLOAD_LENGTH] = maxPayloadLen;
Expand Down Expand Up @@ -2158,7 +2158,7 @@ void Http2Session::RefreshState(const FunctionCallbackInfo<Value>& args) {
ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder());
DEBUG_HTTP2SESSION(session, "refreshing state");

AliasedBuffer<double, v8::Float64Array>& buffer =
AliasedBuffer<double, Float64Array>& buffer =
env->http2_state()->session_state_buffer;

nghttp2_session* s = **session;
Expand Down Expand Up @@ -2448,7 +2448,7 @@ void Http2Stream::RefreshState(const FunctionCallbackInfo<Value>& args) {

DEBUG_HTTP2STREAM(stream, "refreshing state");

AliasedBuffer<double, v8::Float64Array>& buffer =
AliasedBuffer<double, Float64Array>& buffer =
env->http2_state()->stream_state_buffer;

nghttp2_stream* str = **stream;
Expand Down

0 comments on commit e397d19

Please sign in to comment.