Skip to content

Commit 0753774

Browse files
BridgeARMylesBorins
authored andcommitted
lib: use capital letters in comments
PR-URL: #20567 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 72f3228 commit 0753774

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/internal/bootstrap/node.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
setupProcessObject();
2828

29-
// do this good and early, since it handles errors.
29+
// Do this good and early, since it handles errors.
3030
setupProcessFatal();
3131

3232
setupV8();
@@ -107,7 +107,7 @@
107107
});
108108
process.argv[0] = process.execPath;
109109

110-
// Handle `--debug*` deprecation and invalidation
110+
// Handle `--debug*` deprecation and invalidation.
111111
if (process._invalidDebug) {
112112
process.emitWarning(
113113
'`node --debug` and `node --debug-brk` are invalid. ' +
@@ -176,7 +176,7 @@
176176
'DeprecationWarning', 'DEP0068');
177177
}
178178

179-
// Start the debugger agent
179+
// Start the debugger agent.
180180
process.nextTick(function() {
181181
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
182182
});
@@ -185,7 +185,7 @@
185185
NativeModule.require('internal/v8_prof_processor');
186186

187187
} else {
188-
// There is user code to be run
188+
// There is user code to be run.
189189

190190
// If this is a worker in cluster mode, start up the communication
191191
// channel. This needs to be done before any user code gets executed
@@ -203,7 +203,7 @@
203203
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_START);
204204
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_END);
205205
// User passed '-e' or '--eval' arguments to Node without '-i' or
206-
// '--interactive'
206+
// '--interactive'.
207207

208208
perf.markMilestone(
209209
NODE_PERFORMANCE_MILESTONE_PRELOAD_MODULE_LOAD_START);
@@ -217,7 +217,7 @@
217217
evalScript('[eval]');
218218
} else if (process.argv[1] && process.argv[1] !== '-') {
219219
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_START);
220-
// make process.argv[1] into a full path
220+
// Make process.argv[1] into a full path.
221221
const path = NativeModule.require('path');
222222
process.argv[1] = path.resolve(process.argv[1]);
223223

@@ -229,10 +229,10 @@
229229
preloadModules();
230230
perf.markMilestone(
231231
NODE_PERFORMANCE_MILESTONE_PRELOAD_MODULE_LOAD_END);
232-
// check if user passed `-c` or `--check` arguments to Node.
232+
// Check if user passed `-c` or `--check` arguments to Node.
233233
if (process._syntax_check_only != null) {
234234
const fs = NativeModule.require('fs');
235-
// read the source
235+
// Read the source.
236236
const filename = CJSModule._resolveFilename(process.argv[1]);
237237
const source = fs.readFileSync(filename, 'utf-8');
238238
checkScriptSyntax(source, filename);
@@ -364,7 +364,7 @@
364364
function setupGlobalConsole() {
365365
const originalConsole = global.console;
366366
const CJSModule = NativeModule.require('internal/modules/cjs/loader');
367-
// Setup Node.js global.console
367+
// Setup Node.js global.console.
368368
const wrappedConsole = NativeModule.require('console');
369369
Object.defineProperty(global, 'console', {
370370
configurable: true,
@@ -398,7 +398,7 @@
398398
return;
399399
}
400400
const { addCommandLineAPI, consoleCall } = process.binding('inspector');
401-
// Setup inspector command line API
401+
// Setup inspector command line API.
402402
const { makeRequireFunction } =
403403
NativeModule.require('internal/modules/cjs/helpers');
404404
const path = NativeModule.require('path');
@@ -448,14 +448,14 @@
448448
exceptionHandlerState.captureFn(er);
449449
} else if (!process.emit('uncaughtException', er)) {
450450
// If someone handled it, then great. otherwise, die in C++ land
451-
// since that means that we'll exit the process, emit the 'exit' event
451+
// since that means that we'll exit the process, emit the 'exit' event.
452452
try {
453453
if (!process._exiting) {
454454
process._exiting = true;
455455
process.emit('exit', 1);
456456
}
457-
} catch (er) {
458-
// nothing to be done about it at this point.
457+
} catch {
458+
// Nothing to be done about it at this point.
459459
}
460460
try {
461461
const { kExpandStackSymbol } = NativeModule.require('internal/util');
@@ -466,7 +466,7 @@
466466
}
467467

468468
// If we handled an error, then make sure any ticks get processed
469-
// by ensuring that the next Immediate cycle isn't empty
469+
// by ensuring that the next Immediate cycle isn't empty.
470470
NativeModule.require('timers').setImmediate(noop);
471471

472472
// Emit the after() hooks now that the exception has been handled.
@@ -559,7 +559,7 @@
559559
process._tickCallback();
560560
}
561561

562-
// Load preload modules
562+
// Load preload modules.
563563
function preloadModules() {
564564
if (process._preload_modules) {
565565
const {
@@ -576,13 +576,13 @@
576576
stripShebang, stripBOM
577577
} = NativeModule.require('internal/modules/cjs/helpers');
578578

579-
// remove Shebang
579+
// Remove Shebang.
580580
source = stripShebang(source);
581-
// remove BOM
581+
// Remove BOM.
582582
source = stripBOM(source);
583-
// wrap it
583+
// Wrap it.
584584
source = CJSModule.wrap(source);
585-
// compile the script, this will throw if it fails
585+
// Compile the script, this will throw if it fails.
586586
new vm.Script(source, { displayErrors: true, filename });
587587
}
588588

0 commit comments

Comments
 (0)