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 f55ee6e

Browse filesBrowse files
jasnellBridgeAR
authored andcommitted
http2: make --expose-http2 flag a non-op
Make the `http2` module always available. The `--expose-http2` cli flag is made a non-op PR-URL: #15535 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent e416b3e commit f55ee6e
Copy full SHA for f55ee6e

File tree

Expand file treeCollapse file tree

142 files changed

+12
-174
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

142 files changed

+12
-174
lines changed
Open diff view settings
Collapse file

‎benchmark/http2/headers.js‎

Copy file name to clipboardExpand all lines: benchmark/http2/headers.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const PORT = common.PORT;
66
const bench = common.createBenchmark(main, {
77
n: [1e3],
88
nheaders: [0, 10, 100, 1000],
9-
}, { flags: ['--expose-http2', '--no-warnings'] });
9+
}, { flags: ['--no-warnings'] });
1010

1111
function main(conf) {
1212
const n = +conf.n;
Collapse file

‎benchmark/http2/respond-with-fd.js‎

Copy file name to clipboardExpand all lines: benchmark/http2/respond-with-fd.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, {
1111
requests: [100, 1000, 10000, 100000, 1000000],
1212
streams: [100, 200, 1000],
1313
clients: [1, 2]
14-
}, { flags: ['--expose-http2', '--no-warnings'] });
14+
}, { flags: ['--no-warnings'] });
1515

1616
function main(conf) {
1717

Collapse file

‎benchmark/http2/simple.js‎

Copy file name to clipboardExpand all lines: benchmark/http2/simple.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, {
1212
requests: [100, 1000, 10000, 100000],
1313
streams: [100, 200, 1000],
1414
clients: [1, 2]
15-
}, { flags: ['--expose-http2', '--no-warnings'] });
15+
}, { flags: ['--no-warnings'] });
1616

1717
function main(conf) {
1818
const n = +conf.requests;
Collapse file

‎benchmark/http2/write.js‎

Copy file name to clipboardExpand all lines: benchmark/http2/write.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const PORT = common.PORT;
66
const bench = common.createBenchmark(main, {
77
streams: [100, 200, 1000],
88
length: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
9-
}, { flags: ['--expose-http2', '--no-warnings'] });
9+
}, { flags: ['--no-warnings'] });
1010

1111
function main(conf) {
1212
const m = +conf.streams;
Expand file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
-7Lines changed: 0 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Expand file

‎doc/api/http2.md‎

Copy file name to clipboardExpand all lines: doc/api/http2.md
-3Lines changed: 0 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Collapse file

‎doc/node.1‎

Copy file name to clipboardExpand all lines: doc/node.1
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ Emit pending deprecation warnings.
130130
.BR \-\-no\-warnings
131131
Silence all process warnings (including deprecations).
132132

133-
.TP
134-
.BR \-\-expose\-http2
135-
Enable the experimental `'http2'` module.
136-
137133
.TP
138134
.BR \-\-napi\-modules
139135
Enable loading native modules compiled with the ABI-stable Node.js API (N-API)
Collapse file

‎lib/internal/bootstrap_node.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap_node.js
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,6 @@
510510

511511
const config = process.binding('config');
512512

513-
if (!config.exposeHTTP2)
514-
delete NativeModule._source.http2;
515-
516513
NativeModule.require = function(id) {
517514
if (id === 'native_module') {
518515
return NativeModule;
Collapse file

‎lib/internal/module.js‎

Copy file name to clipboardExpand all lines: lib/internal/module.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,11 @@ function stripShebang(content) {
7878

7979
const builtinLibs = [
8080
'assert', 'async_hooks', 'buffer', 'child_process', 'cluster', 'crypto',
81-
'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'net',
81+
'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'http2', 'https', 'net',
8282
'os', 'path', 'perf_hooks', 'punycode', 'querystring', 'readline', 'repl',
8383
'stream', 'string_decoder', 'tls', 'tty', 'url', 'util', 'v8', 'vm', 'zlib'
8484
];
8585

86-
const { exposeHTTP2 } = process.binding('config');
87-
if (exposeHTTP2)
88-
builtinLibs.push('http2');
89-
9086
function addBuiltinLibsToObject(object) {
9187
// Make built-in modules available directly (loaded lazily).
9288
builtinLibs.forEach((name) => {
Collapse file

‎src/node.cc‎

Copy file name to clipboardExpand all lines: src/node.cc
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ std::string config_warning_file; // NOLINT(runtime/string)
244244
// that is used by lib/internal/bootstrap_node.js
245245
bool config_expose_internals = false;
246246

247-
// Set in node.cc by ParseArgs when --expose-http2 is used.
248-
bool config_expose_http2 = false;
249-
250247
bool v8_initialized = false;
251248

252249
bool linux_at_secure = false;
@@ -3801,7 +3798,6 @@ static void PrintHelp() {
38013798
" --abort-on-uncaught-exception\n"
38023799
" aborting instead of exiting causes a\n"
38033800
" core file to be generated for analysis\n"
3804-
" --expose-http2 enable experimental HTTP2 support\n"
38053801
" --trace-warnings show stack traces on process warnings\n"
38063802
" --redirect-warnings=file\n"
38073803
" write warnings to file instead of\n"
@@ -3925,7 +3921,7 @@ static void CheckIfAllowedInEnv(const char* exe, bool is_env,
39253921
"--pending-deprecation",
39263922
"--no-warnings",
39273923
"--napi-modules",
3928-
"--expose-http2",
3924+
"--expose-http2", // keep as a non-op through v9.x
39293925
"--trace-warnings",
39303926
"--redirect-warnings",
39313927
"--trace-sync-io",
@@ -4127,7 +4123,7 @@ static void ParseArgs(int* argc,
41274123
config_expose_internals = true;
41284124
} else if (strcmp(arg, "--expose-http2") == 0 ||
41294125
strcmp(arg, "--expose_http2") == 0) {
4130-
config_expose_http2 = true;
4126+
// Keep as a non-op through v9.x
41314127
} else if (strcmp(arg, "-") == 0) {
41324128
break;
41334129
} else if (strcmp(arg, "--") == 0) {

0 commit comments

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