Browse Source

Minor stylistic changes.

v0.7.4-release
Herbert Vojčík 15 years ago
committed by Ryan Dahl
parent
commit
7e4c1285dc
  1. 14
      src/node.js

14
src/node.js

@ -26,7 +26,7 @@ process.createChildProcess = removed("childProcess API has changed. See doc/api.
process.inherits = removed("process.inherits() has moved to sys.inherits."); process.inherits = removed("process.inherits() has moved to sys.inherits.");
process.assert = function (x, msg) { process.assert = function (x, msg) {
if (!(x)) throw new Error(msg || "assertion error"); if (!x) throw new Error(msg || "assertion error");
}; };
process.evalcx = process.binding('evals').Script.runInNewContext; process.evalcx = process.binding('evals').Script.runInNewContext;
@ -36,10 +36,8 @@ process.evalcx = process.binding('evals').Script.runInNewContext;
var nextTickQueue = []; var nextTickQueue = [];
process._tickCallback = function () { process._tickCallback = function () {
var l = nextTickQueue.length; for (var l = nextTickQueue.length; l; l--) {
while (l--) { nextTickQueue.shift()();
var cb = nextTickQueue.shift();
cb();
} }
}; };
@ -135,9 +133,9 @@ var stdin;
process.openStdin = function () { process.openStdin = function () {
if (stdin) return stdin; if (stdin) return stdin;
var net = module.requireNative('net') var net = basicRequire('net'),
, fs = module.requireNative('fs') fs = basicRequire('fs'),
, fd = process.binding('stdio').openStdin(); fd = process.binding('stdio').openStdin();
if (process.binding('stdio').isStdinBlocking()) { if (process.binding('stdio').isStdinBlocking()) {
stdin = new net.Stream(fd); stdin = new net.Stream(fd);

Loading…
Cancel
Save