Граф коммитов

8049 Коммитов

Автор SHA1 Сообщение Дата
isaacs d5a0940fff stream: Remove pipeOpts.chunkSize
It's not actually necessary for backwards compatibility, isn't
used anywhere, and isn't even tested.  Better to just remove it.
2013-03-06 11:44:30 -08:00
isaacs 8c44869f1d stream: Increase highWaterMark on large reads
If the consumer of a Readable is asking for N bytes, and N > hwm,
then clearly we have set the hwm to low, and ought to increase it.

Fix #4931
2013-03-06 11:44:30 -08:00
isaacs e0cec37d50 stream: Remove unnecessary nextTick usage in Writable
Fix #4928
2013-03-06 11:44:29 -08:00
isaacs 32ac8c0b69 test: Pass cli flags in pummel/test-regress-GH-892 2013-03-06 11:44:29 -08:00
isaacs 5038f40185 node: Add --throw-deprecation
Extremely handy when tracking down a flood of recursive nextTick warnings.
2013-03-06 11:44:29 -08:00
Eugene Girshov 25ba971f41 http: fix multiple timeout events
Fixed up slightly by @isaacs so as not to miss 'timeout' events in some
cases.
2013-03-06 10:45:37 -08:00
Ben Noordhuis fb3ec32b0e net: use close callback, not process.nextTick
Don't emit the 'close' event with process.nextTick.

Closing a handle is an operation that usually *but not always* completes
on the next tick of the event loop, hence using process.nextTick is not
reliable.

Use a proper handle close callback and emit the 'close' event from
inside the callback.

Update tests that depend on the intricacies of the old model.

Fixes #3459.
2013-03-06 16:15:18 +01:00
Ben Noordhuis 958ab661cb handle_wrap: add close callback support 2013-03-06 15:32:40 +01:00
Ben Noordhuis 3d20905b70 handle_wrap: replace unref_ field with flags_ field
Prep work for a follow-up commit that adds support for close callbacks.
2013-03-06 15:25:07 +01:00
Ben Noordhuis 3dbbfd7803 src: remove unused symbols in node_file.cc 2013-03-06 14:45:47 +01:00
Pavel Lang 2ad98725d6 DNS: Support NAPTR queries
They were previously removed in a90bc78534.
2013-03-06 14:31:22 +04:00
isaacs 74784b63d6 cares: Set process._errno, not global.errno
This makes test-internet pass
2013-03-06 14:10:10 +04:00
Scott Blomquist 323120b5c9 child_process: handle ENOENT correctly on Windows 2013-03-05 23:47:35 -08:00
Timothy J Fontaine f9ba9f7bad build: define nightly tag external to build system 2013-03-05 14:43:27 -08:00
isaacs 312289b791 stream: Use class for write buffer entries 2013-03-05 14:27:16 -08:00
isaacs 426b4c6258 stream: _write takes an encoding argument
This vastly reduces the overhead of decodeStrings:false streams,
such as net and http.
2013-03-05 14:27:15 -08:00
isaacs cd68d86c32 stream: Remove output function from _transform
Just use stream.push(outputChunk) instead.
2013-03-05 14:27:15 -08:00
isaacs 049903e333 stream: Split Writable logic into small functions
1. Get rid of unnecessary 'finishing' flag
2. Dont check both ending and ended. Extraneous.

Also: Remove extraneous 'finishing' flag, and don't check both 'ending'
and 'ended', since checking just 'ending' is sufficient.
2013-03-05 14:26:34 -08:00
isaacs e4383c0170 bench: Add flag to be silent in runner
This is helpful in tracking down bailouts and deopts in Stream classes,
without triggering one from the string write in console.log
2013-03-05 14:23:01 -08:00
Nathan Rajlich dd6432dcf0 process: invoke EventEmitter on `process`
This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.
2013-03-05 14:06:36 -08:00
Bert Belder c0a5af8d07 Revert "build, windows: disable SEH"
This is no longer necessary - the underlying issue was fixed in 01fa5ee.
This reverts commit d879042860.
2013-03-05 19:40:02 +01:00
Bert Belder 01fa5ee21d win/openssl: mark assembled object files as seh safe
There are no unsafe structured exception handlers in object files
generated from hand-crafted assembly - because they contain no exception
handlers at all.
2013-03-05 19:39:45 +01:00
Paolo Fragomeni 8e2376b376 Update domain.markdown 2013-03-05 08:15:54 -08:00
Ben Noordhuis f7b06e0bbc deps: upgrade libuv to 0b26af3 2013-03-05 16:10:13 +01:00
Ben Noordhuis 862f7b850d Merge remote-tracking branch 'origin/v0.8' 2013-03-05 15:43:03 +01:00
Ben Noordhuis 532d9929c7 cluster: propagate bind errors
This commit fixes a bug where the cluster module fails to propagate
EADDRINUSE errors.

When a worker starts a (net, http) server, it requests the listen socket
from its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but
instead defer the error until a later syscall. libuv mimics this
behaviour to provide consistent behaviour across platforms but that
means the worker could end up with a socket that is not actually bound
to the requested addresss.

That's why the worker now checks if the socket is bound, raising
EADDRINUSE if that's not the case.

Fixes #2721.
2013-03-05 15:23:55 +01:00
Felix Böhm 3e64b5677f events: loop backwards in removeListener
`removeAllListeners` is removing events from end to start. Therefore
it spends O(n^2) time, since `removeListener` is searching from start to
end.
2013-03-05 12:47:57 +04:00
Trevor Norris d09ab61dcd events: code consistency
v8 likes when smaller functions have a single return point, and cleaned
up the single non-strict check.
2013-03-04 11:59:55 -08:00
Trevor Norris 04688614f7 events: remove type check for event type
Strict checking for typeof types broke backwards compatibility for other
libraries. This reverts those checks.

The subclass test has been changed to ensure all operations can be
performed on the inherited EE before instantiation. Including the
ability to set event names with numbers.
2013-03-04 11:57:35 -08:00
Ben Noordhuis ecf9f606c9 doc: add url.resolve() usage examples
Fixes #4913.
2013-03-04 20:54:36 +01:00
Bert Belder 890dc2eeb1 win/msi: make msi build work when spaces are present in the path 2013-03-04 19:47:05 +01:00
isaacs 119cbf4854 stream: Don't require read(0) to emit 'readable' event
When a readable listener is added, call read(0) so that data will flow in, up to
the high water mark.

Otherwise, it's somewhat confusing that you have to listen for readable,
and ALSO call read() (when it will certainly return null) just to get some
data out of the stream.

See: #4720
2013-03-04 07:38:32 -08:00
Xidorn Quan 009ba02e18 dns: fix ReferenceError in resolve() error path
A typo in the variable name makes it throw a ReferenceError instead of
the expected "Unknown type" error when dns.resolve() is passed a bad
record type argument.

Fixes the following exception:

  ReferenceError: type is not defined
    at Object.exports.resolve (dns.js:189:40)
    at /Users/bnoordhuis/src/master/test/simple/test-c-ares.js:48:9
    <snip>
2013-03-04 16:20:40 +01:00
Rod Vagg a6a1659d85 link to LevelUP modules wiki page, not level-hooks 2013-03-03 22:12:53 -08:00
Rod Vagg 906f824bab link to LevelUP modules wiki page, not level-hooks 2013-03-03 22:12:09 -08:00
isaacs e428bb7eae cluster: Rename destroy() to kill(signal=SIGTERM)
Fix #4133, bringing the cluster worker API more in line with the
child process API.
2013-03-03 17:26:38 -08:00
isaacs 384f1be739 stream: Writable.end(chunk) after end is an error
Calling end(data) calls write(data).  Doing this after end should
raise a 'write after end' error.

However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.

This is a re-hash of 5222d19a11, but
without assuming that the data passed to end() is valid, and thus
breaking a bunch of tests.
2013-03-03 17:26:38 -08:00
Aaron Cannon 0c57b31190 doc: Add crypto.pseudoRandomBytes, fix typo 2013-03-03 15:30:49 -08:00
Dave Olszewski 22aa767421 make repl compatible with domains
The try/catch in repl.js keeps any active domain from catching the
error.  Since the domain may not even be enterd until the code is run,
it's not possible to avoid the try/catch, so emit on the domain when an
error is thrown.
2013-03-03 15:28:45 -08:00
Ben Noordhuis 80ea63b958 Revert "stream: Writable.end(chunk) after end is an error"
It's breaking ~22 tests, Needs further investigation.

This reverts commit 5222d19a11.
2013-03-03 02:21:28 +01:00
isaacs f5d84965d7 doc: Typo in ChangeLog
downgrade TO 3.14
2013-03-02 16:10:21 -08:00
isaacs 5222d19a11 stream: Writable.end(chunk) after end is an error
Calling end(data) calls write(data).  Doing this after end should
raise a 'write after end' error.

However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.
2013-03-02 16:09:16 -08:00
isaacs 63edde0e01 events: Handle emit('error') before ctor
The previous commit did not handle the case when the event type
is 'error', since that is checked before reading the handler.
2013-03-02 15:11:23 -08:00
isaacs d345c1173a events: Handle emit before constructor call 2013-03-02 15:01:20 -08:00
Ben Noordhuis 2d51036fb9 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	doc/api/http.markdown
	test/simple/test-crypto.js
2013-03-02 23:13:35 +01:00
Ben Noordhuis 426cbedb44 test: make simple/test-dgram-pingpong respect PORT
Don't use hard-coded port numbers, use common.PORT instead.

Should fix the occasional Jenkins failure; the builds run in parallel.
2013-03-02 23:04:06 +01:00
isaacs 4ac73d2c99 net: s/closed/ended/ in write-after-fin message 2013-03-02 11:50:33 -08:00
isaacs 2106ef000c net: Provide better error when writing after FIN
The stock writable stream "write after end" message is overly vague, if
you have clearly not called end() yourself yet.

When we receive a FIN from the other side, and call destroySoon() as a
result, then generate an EPIPE error (which is what would happen if you
did actually write to the socket), with a message explaining what
actually happened.
2013-03-02 11:26:39 -08:00
Raymond Feng 47e115063b windows/msi: fix msi build issue with WiX 3.7/3.8
The `heat` tool that gathers NPM source files wasn't getting called.
Closes #4896
2013-03-02 20:06:45 +01:00
Timothy J Fontaine 0b70a14abf test: optionally set common.PORT via env variable
This is a back-port of commit 17a8126 from the master branch.
2013-03-02 19:09:39 +01:00