lib: use capital letters in comments

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
Ruben Bridgewater 2018-05-07 02:16:04 +02:00
parent 7cc303415c
commit dc1737881e
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -26,7 +26,7 @@
setupProcessObject();
// do this good and early, since it handles errors.
// Do this good and early, since it handles errors.
setupProcessFatal();
setupV8();
@ -108,7 +108,7 @@
});
process.argv[0] = process.execPath;
// Handle `--debug*` deprecation and invalidation
// Handle `--debug*` deprecation and invalidation.
if (process._invalidDebug) {
process.emitWarning(
'`node --debug` and `node --debug-brk` are invalid. ' +
@ -177,7 +177,7 @@
'DeprecationWarning', 'DEP0068');
}
// Start the debugger agent
// Start the debugger agent.
process.nextTick(function() {
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
});
@ -186,7 +186,7 @@
NativeModule.require('internal/v8_prof_processor');
} else {
// There is user code to be run
// There is user code to be run.
// If this is a worker in cluster mode, start up the communication
// channel. This needs to be done before any user code gets executed
@ -204,7 +204,7 @@
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_START);
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_END);
// User passed '-e' or '--eval' arguments to Node without '-i' or
// '--interactive'
// '--interactive'.
perf.markMilestone(
NODE_PERFORMANCE_MILESTONE_PRELOAD_MODULE_LOAD_START);
@ -218,7 +218,7 @@
evalScript('[eval]');
} else if (process.argv[1] && process.argv[1] !== '-') {
perf.markMilestone(NODE_PERFORMANCE_MILESTONE_MODULE_LOAD_START);
// make process.argv[1] into a full path
// Make process.argv[1] into a full path.
const path = NativeModule.require('path');
process.argv[1] = path.resolve(process.argv[1]);
@ -230,10 +230,10 @@
preloadModules();
perf.markMilestone(
NODE_PERFORMANCE_MILESTONE_PRELOAD_MODULE_LOAD_END);
// check if user passed `-c` or `--check` arguments to Node.
// Check if user passed `-c` or `--check` arguments to Node.
if (process._syntax_check_only != null) {
const fs = NativeModule.require('fs');
// read the source
// Read the source.
const filename = CJSModule._resolveFilename(process.argv[1]);
const source = fs.readFileSync(filename, 'utf-8');
checkScriptSyntax(source, filename);
@ -365,7 +365,7 @@
function setupGlobalConsole() {
const originalConsole = global.console;
const CJSModule = NativeModule.require('internal/modules/cjs/loader');
// Setup Node.js global.console
// Setup Node.js global.console.
const wrappedConsole = NativeModule.require('console');
Object.defineProperty(global, 'console', {
configurable: true,
@ -399,7 +399,7 @@
return;
}
const { addCommandLineAPI, consoleCall } = process.binding('inspector');
// Setup inspector command line API
// Setup inspector command line API.
const { makeRequireFunction } =
NativeModule.require('internal/modules/cjs/helpers');
const path = NativeModule.require('path');
@ -449,14 +449,14 @@
exceptionHandlerState.captureFn(er);
} else if (!process.emit('uncaughtException', er)) {
// If someone handled it, then great. otherwise, die in C++ land
// since that means that we'll exit the process, emit the 'exit' event
// since that means that we'll exit the process, emit the 'exit' event.
try {
if (!process._exiting) {
process._exiting = true;
process.emit('exit', 1);
}
} catch (er) {
// nothing to be done about it at this point.
} catch {
// Nothing to be done about it at this point.
}
try {
const { kExpandStackSymbol } = NativeModule.require('internal/util');
@ -467,7 +467,7 @@
}
// If we handled an error, then make sure any ticks get processed
// by ensuring that the next Immediate cycle isn't empty
// by ensuring that the next Immediate cycle isn't empty.
NativeModule.require('timers').setImmediate(noop);
// Emit the after() hooks now that the exception has been handled.
@ -560,7 +560,7 @@
process._tickCallback();
}
// Load preload modules
// Load preload modules.
function preloadModules() {
if (process._preload_modules) {
const {
@ -577,13 +577,13 @@
stripShebang, stripBOM
} = NativeModule.require('internal/modules/cjs/helpers');
// remove Shebang
// Remove Shebang.
source = stripShebang(source);
// remove BOM
// Remove BOM.
source = stripBOM(source);
// wrap it
// Wrap it.
source = CJSModule.wrap(source);
// compile the script, this will throw if it fails
// Compile the script, this will throw if it fails.
new vm.Script(source, { displayErrors: true, filename });
}