Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2: reduce usage of public require('util') in core.js #26789

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const {
customInspectSymbol: kInspect,
promisify
} = require('internal/util');
const { debuglog } = require('internal/util/debuglog');
const { format } = require('internal/util/inspect');

assertCrypto();

Expand All @@ -18,8 +20,6 @@ const net = require('net');
const { Duplex } = require('stream');
const tls = require('tls');
const { URL } = require('url');
const util = require('util');

const { kIncomingMessage } = require('_http_common');
const { kServerResponse } = require('_http_server');
const JSStreamSocket = require('internal/js_stream_socket');
Expand Down Expand Up @@ -132,7 +132,7 @@ const { UV_EOF } = internalBinding('uv');

const { StreamPipe } = internalBinding('stream_pipe');
const { _connectionListener: httpConnectionListener } = http;
const debug = util.debuglog('http2');
const debug = debuglog('http2');

const kMaxFrameSize = (2 ** 24) - 1;
const kMaxInt = (2 ** 32) - 1;
Expand Down Expand Up @@ -1085,7 +1085,7 @@ class Http2Session extends EventEmitter {
localSettings: this.localSettings,
remoteSettings: this.remoteSettings
};
return `Http2Session ${util.format(obj)}`;
return `Http2Session ${format(obj)}`;
}

// The socket owned by this session
Expand Down Expand Up @@ -1666,7 +1666,7 @@ class Http2Stream extends Duplex {
readableState: this._readableState,
writableState: this._writableState
};
return `Http2Stream ${util.format(obj)}`;
return `Http2Stream ${format(obj)}`;
}

get bufferSize() {
Expand Down