Skip to content

Commit b0afac2

Browse files
joyeecheungtargos
authored andcommitted
process: call prepareMainThreadExecution in all main thread scripts
PR-URL: #26468 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b75af15 commit b0afac2

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

lib/internal/main/print_bash_completion.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
'use strict';
22
const { options, aliases } = require('internal/options');
33

4+
const {
5+
prepareMainThreadExecution
6+
} = require('internal/bootstrap/pre_execution');
7+
48
function print(stream) {
59
const all_opts = [...options.keys(), ...aliases.keys()];
610

@@ -18,6 +22,8 @@ function print(stream) {
1822
complete -F _node_complete node node_g`);
1923
}
2024

25+
prepareMainThreadExecution();
26+
2127
markBootstrapComplete();
2228

2329
print(process.stdout);

lib/internal/main/print_help.js

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
const { types } = internalBinding('options');
44
const hasCrypto = Boolean(process.versions.openssl);
55

6+
const {
7+
prepareMainThreadExecution
8+
} = require('internal/bootstrap/pre_execution');
9+
610
const typeLookup = [];
711
for (const key of Object.keys(types))
812
typeLookup[types[key]] = key;
@@ -171,6 +175,8 @@ function print(stream) {
171175
stream.write('\nDocumentation can be found at https://nodejs.org/\n');
172176
}
173177

178+
prepareMainThreadExecution();
179+
174180
markBootstrapComplete();
175181

176182
print(process.stdout);

lib/internal/main/prof_process.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
'use strict';
22

3+
const {
4+
prepareMainThreadExecution
5+
} = require('internal/bootstrap/pre_execution');
6+
7+
prepareMainThreadExecution();
38
markBootstrapComplete();
49
require('internal/v8_prof_processor');

0 commit comments

Comments
 (0)