Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes comments more consistent. #1241

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
});
EventEmitter.call(process);

process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated
process.EventEmitter = EventEmitter; // process.EventEmitter is deprecated.

// do this good and early, since it handles errors.
startup.processFatal();
Expand Down Expand Up @@ -59,19 +59,19 @@
});

} else if (process.argv[1] == 'debug') {
// Start the debugger agent
// Start the debugger agent.
var d = NativeModule.require('_debugger');
d.start();

} else if (process.argv[1] == '--debug-agent') {
// Start the debugger agent
// Start the debugger agent.
var d = NativeModule.require('_debug_agent');
d.start();

} else {
// There is user code to be run
// There is user code to be run.

// Load any preload modules
// Load any preload modules.
if (process._preload_modules) {
var Module = NativeModule.require('module');
process._preload_modules.forEach(function(module) {
Expand All @@ -83,7 +83,7 @@
// User passed '-e' or '--eval' arguments to Node.
evalScript('[eval]');
} else if (process.argv[1]) {
// make process.argv[1] into a full path
// make process.argv[1] into a full path.
var path = NativeModule.require('path');
process.argv[1] = path.resolve(process.argv[1]);

Expand Down Expand Up @@ -238,8 +238,8 @@
if (!caught)
caught = 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
// If someone handled it, then great. Otherwise, die in C++ land
// since that means that we'll exit the process, emit the 'exit' event.
if (!caught) {
try {
if (!process._exiting) {
Expand All @@ -250,7 +250,7 @@
// nothing to be done about it at this point.
}

// if we handled an error, then make sure any ticks get processed
// if we handled an error, then make sure any ticks get processed.
} else {
NativeModule.require('timers').setImmediate(process._tickCallback);
}
Expand All @@ -267,11 +267,11 @@
};

startup.processConfig = function() {
// used for `process.config`, but not a real module
// used for `process.config`, but not a real module.
var config = NativeModule._source.config;
delete NativeModule._source.config;

// strip the gyp comment line at the beginning
// strip the gyp comment line at the beginning.
config = config.split('\n')
.slice(1)
.join('\n')
Expand All @@ -296,7 +296,7 @@
var _runMicrotasks = {};

// This tickInfo thing is used so that the C++ code in src/node.cc
// can have easy accesss to our nextTick state, and avoid unnecessary
// can have easy accesss to our nextTick state, and avoid unnecessary.
var tickInfo = {};

// *Must* match Environment::TickInfo::Fields in src/env.h.
Expand Down Expand Up @@ -425,7 +425,7 @@
hasBeenNotifiedProperty.set(promise, true);
if (!process.emit('unhandledRejection', reason, promise)) {
// Nobody is listening.
// TODO(petkaantonov) Take some default action, see #830
// TODO(petkaantonov) Take some default action, see #830.
} else
hadListeners = true;
}
Expand Down Expand Up @@ -502,7 +502,7 @@
var stream;
var tty_wrap = process.binding('tty_wrap');

// Note stream._type is used for test-module-load-list.js
// Note stream._type is used for test-module-load-list.js.

switch (tty_wrap.guessHandleType(fd)) {
case 'TTY':
Expand Down Expand Up @@ -548,7 +548,7 @@
break;

default:
// Probably an error on in uv_guess_handle()
// Probably an error on in uv_guess_handle().
throw new Error('Implement me. Unknown stream file type!');
}

Expand Down Expand Up @@ -630,12 +630,12 @@
writable: false
});
}
// Make sure the stdin can't be `.end()`-ed
// Make sure the stdin can't be `.end()`-ed.
stdin._writableState.ended = true;
break;

default:
// Probably an error on in uv_guess_handle()
// Probably an error on in uv_guess_handle().
throw new Error('Implement me. Unknown stdin file type!');
}

Expand Down Expand Up @@ -690,7 +690,7 @@
throw new TypeError('invalid pid');
}

// preserve null signal
// preserve null signal.
if (0 === sig) {
err = process._kill(pid, 0);
} else {
Expand Down Expand Up @@ -722,7 +722,7 @@
startup.lazyConstants().hasOwnProperty(event);
}

// Detect presence of a listener for the special signal types
// Detect presence of a listener for the special signal types.
process.on('newListener', function(type, listener) {
if (isSignal(type) &&
!signalWraps.hasOwnProperty(type)) {
Expand Down