aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-07-01 20:32:41 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-07-01 20:32:41 -0700
commita1e8fcc5ae93b95c558732469235bf1176a5c639 (patch)
tree56c9a5ec263e4e3b40b16219733a85742b28f7c1 /lib
parent5a2155dc711d516b1d28650f92fa7e3b935d2c44 (diff)
parentefca5456b8dd3e94b3af02ccaf94d032ded6a48c (diff)
downloadandroid-node-v8-a1e8fcc5ae93b95c558732469235bf1176a5c639.tar.gz
android-node-v8-a1e8fcc5ae93b95c558732469235bf1176a5c639.tar.bz2
android-node-v8-a1e8fcc5ae93b95c558732469235bf1176a5c639.zip
Merge branch 'v0.4'
Diffstat (limited to 'lib')
-rw-r--r--lib/_debugger.js18
-rw-r--r--lib/http.js12
-rw-r--r--lib/tty_posix.js6
3 files changed, 13 insertions, 23 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js
index 9b898e3515..2714fc52dc 100644
--- a/lib/_debugger.js
+++ b/lib/_debugger.js
@@ -785,7 +785,7 @@ Interface.prototype.handleCommand = function(cmd) {
self._lastCommand = null;
self.tryQuit();
- } else if (/^r(un)?$/.test(cmd)) {
+ } else if (/^r(un)?/.test(cmd)) {
self._lastCommand = null;
if (self.child) {
self.restartQuestion(function(yes) {
@@ -805,7 +805,7 @@ Interface.prototype.handleCommand = function(cmd) {
self.trySpawn();
}
- } else if (/^help$/.test(cmd)) {
+ } else if (/^help/.test(cmd)) {
console.log(helpMessage);
term.prompt();
@@ -819,7 +819,7 @@ Interface.prototype.handleCommand = function(cmd) {
term.prompt();
});
- } else if (/^info(\s+breakpoint)?$/.test(cmd)) {
+ } else if (/info +breakpoints/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -867,7 +867,7 @@ Interface.prototype.handleCommand = function(cmd) {
term.prompt();
});
- } else if (/^b(ack)?t(race)?$/.test(cmd)) {
+ } else if (/^backtrace/.test(cmd) || /^bt/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -905,7 +905,7 @@ Interface.prototype.handleCommand = function(cmd) {
self.printScripts(cmd.indexOf('full') > 0);
term.prompt();
- } else if (/^c(ontinue)?$/.test(cmd)) {
+ } else if (/^c(ontinue)?/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -916,7 +916,7 @@ Interface.prototype.handleCommand = function(cmd) {
self.resume();
});
- } else if (/^k(ill)?$/.test(cmd)) {
+ } else if (/^k(ill)?/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -934,7 +934,7 @@ Interface.prototype.handleCommand = function(cmd) {
self.term.prompt();
}
- } else if (/^n(ext)?$/.test(cmd)) {
+ } else if (/^next/.test(cmd) || /^n/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -943,7 +943,7 @@ Interface.prototype.handleCommand = function(cmd) {
// Wait for break point. (disable raw mode?)
});
- } else if (/^s(tep)?$/.test(cmd)) {
+ } else if (/^step/.test(cmd) || /^s/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
@@ -952,7 +952,7 @@ Interface.prototype.handleCommand = function(cmd) {
// Wait for break point. (disable raw mode?)
});
- } else if (/^p(rint)?$/.test(cmd)) {
+ } else if (/^print/.test(cmd) || /^p/.test(cmd)) {
if (!client) {
self.printNotConnected();
return;
diff --git a/lib/http.js b/lib/http.js
index 0927a862d6..0d48dbcb5b 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1154,12 +1154,6 @@ Agent.prototype.appendMessage = function(options) {
this.queue.push(req);
req._queue = this.queue;
- /*
- req.on('finish', function () {
- self._cycle();
- });
- */
-
this._cycle();
return req;
@@ -1385,8 +1379,6 @@ Agent.prototype._cycle = function() {
var first = this.queue[0];
if (!first) return;
- var haveConnectingSocket = false;
-
// First try to find an available socket.
for (var i = 0; i < this.sockets.length; i++) {
var socket = this.sockets[i];
@@ -1406,13 +1398,11 @@ Agent.prototype._cycle = function() {
self._cycle(); // try to dispatch another
return;
}
-
- if (socket._httpConnecting) haveConnectingSocket = true;
}
// If no sockets are connecting, and we have space for another we should
// be starting a new connection to handle this request.
- if (!haveConnectingSocket && this.sockets.length < this.maxSockets) {
+ if (this.sockets.length < this.maxSockets) {
this._establishNewConnection();
}
diff --git a/lib/tty_posix.js b/lib/tty_posix.js
index b745a6a79d..6b12204169 100644
--- a/lib/tty_posix.js
+++ b/lib/tty_posix.js
@@ -71,14 +71,14 @@ function ReadStream(fd) {
} else {
// Nobody's watching anyway
self.removeListener('data', onData);
- self.on('newlistener', onNewListener);
+ self.on('newListener', onNewListener);
}
}
function onNewListener(event) {
if (event == 'keypress') {
self.on('data', onData);
- self.removeListener('newlistener', onNewListener);
+ self.removeListener('newListener', onNewListener);
}
}
@@ -331,7 +331,7 @@ WriteStream.prototype.cursorTo = function(x, y) {
if (typeof x !== 'number')
throw new Error("Can't set cursor row without also setting it's column");
- if (typeof x === 'number') {
+ if (typeof y !== 'number') {
this.write('\x1b[' + (x + 1) + 'G');
} else {
this.write('\x1b[' + (y + 1) + ';' + (x + 1) + 'H');