| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixes #4046.
|
|
|
|
| |
Fixes #2746.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses #4034. There are two problems happening:
1. The domain is not exited automatically when calling dispose() on it.
Then, since the domain is disposed, attempting to exit it again will do
nothing.
2. The active domain is stored on process.domain. Since thrown errors
call `process.emit('uncaughtException', er)`, and the process is an
event emitter with a `.domain` member, it re-enters the domain a second
time before calling the error handler, pushing it onto the stack again.
Thus, if the handler calls `domain.dispose()`, then the domain is now on
the stack twice, and cannot be exited properly. Since the domain is
disposed, any subsequent IO will be no-op'ed, since we've declared that
this context is done and best forgotten.
The solution here is twofold:
1. In EventEmitter.emit, do not enter the domain if `this===process`.
2. Automatically exit the domain when calling `domain.dispose()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure the deletion event gets reported in the following scenario:
1. Watch a file.
2. The initial stat() goes okay.
3. Something deletes the watched file.
4. The second stat() fails with ENOENT.
The second stat() translates into the first 'change' event but a logic error
stopped it from getting emitted.
Fixes #4027.
|
|
|
|
|
|
|
|
|
|
|
| |
Check that the calls to Integer::New() and Date::New() succeed and bail out if
they don't.
V8 returns an empty handle on stack overflow. Trying to set the empty handle as
a property on an object results in a NULL pointer dereference in release builds
and an assert in debug builds.
Fixes #4015.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A HTTP/1.0 client does not support 'Transfer-Encoding: chunked' unless it
explicitly requests it by sending a 'TE: chunked' header.
Before this commit, node.js always disabled chunked encoding for HTTP/1.0
clients. Now it will scan for the TE header and turn on chunked encoding if
requested and applicable.
Fixes #940.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't execute the callback in the context of the global object.
MakeCallback() tries to apply the active domain to the callback. If the user
polluted the global object with a 'domain' property, as in the code example
below, MakeCallback() will try to apply that.
Example:
domain = {}; // missing var keyword is intentional
crypto.randomBytes(8, cb); // TypeError: undefined is not a function
Fixes #3956.
|
|
|
|
| |
This reverts commit 6b9425fe3783193cf95cb04cbcbcbb97f5a77d31.
|
|
|
|
|
| |
to writeDoubleBE(), writeDoubleLE(), writeFloatBE() and writeFloatLE().
Fixes #3934.
|
| |
|
|
|
|
|
|
|
| |
With this patch the IPC socket is no longer available in the
ChildProcess.stdio array. This shouldn't be very problematic, since
this socket was effectively non-functional; it would never emit any
events.
|
|
|
|
|
|
|
| |
https.get() now accepts either a URL (as a string) or an options object.
Refs #2859.
Fixes #3882.
|
|
|
|
| |
Fixes #3861.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a command with a short stdio array would result in the child's
stdout and stderr objects set to null. For example:
var c = child_process.spawn(cmd, args, {stdio: ['pipe']});
// results in c.stdout === null.
The expected behavior is the above line functioning the same as this one:
var c = child_process.spawn(cmd, args, {stdio: ['pipe', null, null]});
// provides correct (non-null) c.stdout; as does the above, after this fix.
|
|
|
|
|
|
|
|
| |
This fixes the problem that calling pause() on a socket would not
actually prevent 'data' events from being emitted. It also replaces
the existing test by a more elaborate one.
Ref: #3118
|
| |
|
|
|
|
|
| |
The (undocumented) callback argument to .destroy() was not called if the
stream was no longer readable / writable.
|
| |
|
|
|
|
| |
Fixes #2893.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: calling `server.listen()` (no port) on a net.Server triggered the
following libuv assertion:
node: ../deps/uv/src/unix/stream.c:406: uv__write: Assertion `fd_to_send >= 0'
failed.
Cause: uv_tcp_t handles are lazily initialized. Omitting the port made the
handle get initialized even more lazily. Too lazily - it wasn't initialized
when the handle was sent over to the child process.
Solution: implicitly bind to a random port in listen() when the port number
is omitted, it forces the handle to initialize. This is not a change in
behavior, listen() has always been identical to listen(0).
Fixes #3325.
|
| |
|
|
|
|
| |
Fix #3756
|
|
|
|
| |
Closes GH-3739
|
|
|
|
| |
And fix last failing tests
|
|
|
|
|
| |
socket.authorizationError should always be string. Also make sni test
pass.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 928ea564d16da47e615ddac627e0b4d4a40d8196.
Keeping the original Array instance in-place essentially causes a memory leak
on EventEmitters that use an infinite number of event names (an incrementing
counter, for example), which isn't an unreasonable thing to want to do.
Fixes #3702.
|
|
|
|
|
|
|
|
|
| |
* don't assert when fd isn't an open file descriptor
* don't die with a ReferenceError when fd isn't a file descriptor
you can listen() on
Fixes #3699.
|
|\
| |
| |
| |
| | |
Conflicts:
AUTHORS
|
| | |
|
| |
| |
| |
| |
| | |
Fix to remove the first-arg, in case arguments length is more than 2
Add domain.intercept() test about first-arg removal
|
|/
|
|
| |
Fixes #3664.
|
|
|
|
|
|
| |
Otherwise it can be quite difficult to figure out which file is busted.
Closes #3580.
|
|
|
|
|
|
|
|
|
| |
Don't use the double-negate trick to coalesce the timeout argument into a
number, it produces the wrong result for very large timeouts.
Example:
setTimeout(cb, 1e10); // doesn't work, ~~1e10 == 1410065408
|
|
|
|
|
| |
There was a possiblity of insering the string "undefined" into the repl's
command buffer, which would cause interesting results while evaluating.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wrong order of operands was causing problems while trying to use command
buffering:
> {
... a: 3,
...
repl.js:284
if (cmd.trim().match(/^npm /) && !self.bufferedCommand) {
^
TypeError: Cannot call method 'trim' of undefined
at finish (repl.js:284:17)
at REPLServer.self.eval (repl.js:118:5)
at rli.on.e (repl.js:260:20)
at REPLServer.self.eval (repl.js:118:5)
at Interface.<anonymous> (repl.js:250:12)
at Interface.EventEmitter.emit (events.js:88:17)
at Interface._onLine (readline.js:183:10)
at Interface._line (readline.js:502:8)
at Interface._ttyWrite (readline.js:720:14)
at ReadStream.<anonymous> (readline.js:105:12)
Test included.
Closes #3515.
Closes #3517.
Closes #3621.
|
|
|
|
| |
Closes #3542
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Closes #3416
Closes #3477
|