Skip to content

Commit

Permalink
lib: use capital letters in comments
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
BridgeAR authored and MylesBorins committed May 22, 2018
1 parent 72f3228 commit 0753774
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -107,7 +107,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. ' +
Expand Down Expand Up @@ -176,7 +176,7 @@
'DeprecationWarning', 'DEP0068');
}

// Start the debugger agent
// Start the debugger agent.
process.nextTick(function() {
NativeModule.require('internal/deps/node-inspect/lib/_inspect').start();
});
Expand All @@ -185,7 +185,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
Expand All @@ -203,7 +203,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);
Expand All @@ -217,7 +217,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]);

Expand All @@ -229,10 +229,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);
Expand Down Expand Up @@ -364,7 +364,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,
Expand Down Expand Up @@ -398,7 +398,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');
Expand Down Expand Up @@ -448,14 +448,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');
Expand All @@ -466,7 +466,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.
Expand Down Expand Up @@ -559,7 +559,7 @@
process._tickCallback();
}

// Load preload modules
// Load preload modules.
function preloadModules() {
if (process._preload_modules) {
const {
Expand All @@ -576,13 +576,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 });
}

Expand Down

0 comments on commit 0753774

Please sign in to comment.