Remove unneeded function wrappers

This commit is contained in:
Jorge Chamorro Bieling 2010-10-21 14:36:00 +02:00 committed by Ryan Dahl
parent 174a3a9a08
commit 99e19aa398
3 changed files with 5 additions and 10 deletions

View File

@ -287,12 +287,10 @@ function setImplmentationMethods (self) {
// calling emit() after recvMsg() has been called again and end up
// emitting null (or another FD).
if (recvMsg.fd !== null) {
(function () {
var fd = recvMsg.fd;
process.nextTick(function () {
self.emit('fd', fd);
});
})();
var fd = recvMsg.fd;
process.nextTick(function () {
self.emit('fd', fd);
});
}
return bytesRead;

View File

@ -616,9 +616,7 @@ if (process.argv[1]) {
}
// REMOVEME: nextTick should not be necessary. This hack to get
// test/simple/test-exception-handler2.js working.
process.nextTick(function() {
module.runMain();
});
process.nextTick(module.runMain);
} else if (process._eval) {
// -e, --eval

View File

@ -9,7 +9,6 @@ ReferenceError: foo is not defined
at Module._compile (node.js:*)
at Object..js (node.js:*)
at Module.load (node.js:*)
at Object.runMain (node.js:*)
at Array.<anonymous> (node.js:*)
at EventEmitter._tickCallback (node.js:*)
at node.js:*