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 42bbaa3

Browse filesBrowse files
danbevMylesBorins
authored andcommitted
http2: reduce require calls in http2/core
This commit removes unnecesary requires of http and internal/util in http2/core.js 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 e397d19 commit 42bbaa3
Copy full SHA for 42bbaa3

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
@@ -68,10 +68,13 @@ const { onServerStream,
6868
Http2ServerResponse,
6969
} = require('internal/http2/compat');
7070
const { utcDate } = require('internal/http');
71-
const { promisify } = require('internal/util');
71+
const {
72+
promisify,
73+
customInspectSymbol: kInspect
74+
} = require('internal/util');
7275
const { isArrayBufferView } = require('internal/util/types');
7376
const { defaultTriggerAsyncIdScope } = require('internal/async_hooks');
74-
const { _connectionListener: httpConnectionListener } = require('http');
77+
const { _connectionListener: httpConnectionListener } = http;
7578
const { createPromise, promiseResolve } = process.binding('util');
7679
const debug = util.debuglog('http2');
7780

@@ -119,7 +122,6 @@ const { constants, nameForErrorCode } = binding;
119122
const NETServer = net.Server;
120123
const TLSServer = tls.Server;
121124

122-
const kInspect = require('internal/util').customInspectSymbol;
123125
const { kIncomingMessage } = require('_http_common');
124126
const { kServerResponse } = require('_http_server');
125127

0 commit comments

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