Process at most 10 pending responses from the thread pool in one go.
10 was chosen arbitrarily.
Test and report by Felix Geisendörfer <felix@debuggable.com>
If you have a circular require chain in which one or more of the modules are
referenced with a ".." relative path, like require("../foo"), node blows up.
This patch un-blows-up that case. There still seem to be issues with
circularity, but this solves one of the more obnoxious ones.
This way let's us do deep comparison between object instances.
I have a suggestion for the sys.inherits function. Today it's impossible to
deep comparison between instance and class.
Take this snippet for example:
function ClassA() {}
function ClassB() {}
sys.inherits(ClassB, ClassA);
var instance = new ClassB();
The instance variable inherits from ClassA but we can't check it (which is
useful sometimes). You can compare the instance against ClassB
(instance.constructor == ClassB) but we can't compare it deeper
(instance.constructor.super == ClassA). The committed change simply assign
super to the super constructor instead of the super prototype.
I can't see any problem with this fix. You can still get the super constructor
by calling super_.prototype.
This is not a bug in process.mixin, but I think it is undesirable
behavior. Right now process.mixin will not copy over keys with undefined
values. To me that is an unexpected filtering that should not happen
unless specifically called for.
Bug #1 occurred when trying to use process.mixin on a function and
produced a fatal exception.
Bug #2 occurred when trying to do a deep merge with an object containing
one or more objects with a nodeType property. In those cases the deep
copy for this part of the object was not performed and a shallow one was
performed instead.
Both of these bugs were artifacts of the jQuery.extend port.
At the same time implement synchronous wrappers of the POSIX functions.
These will be undocumented until we settle on an API. Works like this
// returns promise as before
posix.mkdir("test").addCallback(function () {
sys.puts("done");
});
// returns undefined, executed synchronously.
posix.mkdirSync("test");
sys.puts("done");
This refactoring is a step towards allowing promises to be implemented
purely in javascript.
No longer based on Ragel, but hand-written.
Had to add HTTPConnection.resetParser() because the parser is stricter and
will error out when you try to give it a message after the previous had
"Connection: close". The HTTP client was doing that. Thus we reset the
parser manually after each new connection.