Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74192dd

Browse filesBrowse files
danbevBethGriggs
authored andcommitted
http2: reduce require calls in http2/core
This commit removes unnecesary requires of http and internal/util in http2/core.js Backport-PR-URL: #22850 PR-URL: #20422 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 41e8931 commit 74192dd
Copy full SHA for 74192dd

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/core.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/core.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ const { onServerStream,
2323
Http2ServerResponse,
2424
} = require('internal/http2/compat');
2525
const { utcDate } = require('internal/http');
26-
const { promisify } = require('internal/util');
26+
const {
27+
promisify,
28+
customInspectSymbol: kInspect
29+
} = require('internal/util');
2730
const { isArrayBufferView } = require('internal/util/types');
28-
const { _connectionListener: httpConnectionListener } = require('http');
31+
const { _connectionListener: httpConnectionListener } = http;
2932
const { createPromise, promiseResolve } = process.binding('util');
3033
const debug = util.debuglog('http2');
3134

@@ -67,7 +70,6 @@ const { constants, nameForErrorCode } = binding;
6770
const NETServer = net.Server;
6871
const TLSServer = tls.Server;
6972

70-
const kInspect = require('internal/util').customInspectSymbol;
7173
const { kIncomingMessage } = require('_http_common');
7274
const { kServerResponse } = require('_http_server');
7375

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.