0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

8070 Commits

Author SHA1 Message Date
isaacs
e7b8bad3d9 bench: Do math on numbers in compare.js, not strings 2013-03-07 11:56:53 -08:00
isaacs
f23ec6b3cf uv: Upgrade to f89125e 2013-03-07 11:53:18 -08:00
Andreas Madsen
bdf7ac2c5d child_process: support sending dgram socket
child.send can send net servers and sockets. Now that we have support
for dgram clusters this functionality should be extended to include
dgram sockets.
2013-03-07 17:51:17 +01:00
Ben Noordhuis
71694361f9 doc: dgram: add v0.10 bind() behavior note
dgram.Socket#bind() is always asynchronous now. Add a note at the top
of the documentation that explains how to upgrade.

Fixes #4944.
2013-03-07 14:13:42 +01:00
Ben Noordhuis
924f603e26 doc: dgram: document bind() callback argument 2013-03-07 14:11:46 +01:00
isaacs
f780c6f598 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	deps/npm/html/api/bin.html
	deps/npm/html/api/bugs.html
	deps/npm/html/api/commands.html
	deps/npm/html/api/config.html
	deps/npm/html/api/deprecate.html
	deps/npm/html/api/docs.html
	deps/npm/html/api/edit.html
	deps/npm/html/api/explore.html
	deps/npm/html/api/help-search.html
	deps/npm/html/api/init.html
	deps/npm/html/api/install.html
	deps/npm/html/api/link.html
	deps/npm/html/api/load.html
	deps/npm/html/api/ls.html
	deps/npm/html/api/npm.html
	deps/npm/html/api/outdated.html
	deps/npm/html/api/owner.html
	deps/npm/html/api/pack.html
	deps/npm/html/api/prefix.html
	deps/npm/html/api/prune.html
	deps/npm/html/api/publish.html
	deps/npm/html/api/rebuild.html
	deps/npm/html/api/restart.html
	deps/npm/html/api/root.html
	deps/npm/html/api/run-script.html
	deps/npm/html/api/search.html
	deps/npm/html/api/shrinkwrap.html
	deps/npm/html/api/start.html
	deps/npm/html/api/stop.html
	deps/npm/html/api/submodule.html
	deps/npm/html/api/tag.html
	deps/npm/html/api/test.html
	deps/npm/html/api/uninstall.html
	deps/npm/html/api/unpublish.html
	deps/npm/html/api/update.html
	deps/npm/html/api/version.html
	deps/npm/html/api/view.html
	deps/npm/html/api/whoami.html
	deps/npm/html/doc/README.html
	deps/npm/html/doc/adduser.html
	deps/npm/html/doc/bin.html
	deps/npm/html/doc/bugs.html
	deps/npm/html/doc/build.html
	deps/npm/html/doc/bundle.html
	deps/npm/html/doc/cache.html
	deps/npm/html/doc/changelog.html
	deps/npm/html/doc/coding-style.html
	deps/npm/html/doc/completion.html
	deps/npm/html/doc/config.html
	deps/npm/html/doc/dedupe.html
	deps/npm/html/doc/deprecate.html
	deps/npm/html/doc/developers.html
	deps/npm/html/doc/disputes.html
	deps/npm/html/doc/docs.html
	deps/npm/html/doc/edit.html
	deps/npm/html/doc/explore.html
	deps/npm/html/doc/faq.html
	deps/npm/html/doc/folders.html
	deps/npm/html/doc/global.html
	deps/npm/html/doc/help-search.html
	deps/npm/html/doc/help.html
	deps/npm/html/doc/index.html
	deps/npm/html/doc/init.html
	deps/npm/html/doc/install.html
	deps/npm/html/doc/json.html
	deps/npm/html/doc/link.html
	deps/npm/html/doc/ls.html
	deps/npm/html/doc/npm.html
	deps/npm/html/doc/outdated.html
	deps/npm/html/doc/owner.html
	deps/npm/html/doc/pack.html
	deps/npm/html/doc/prefix.html
	deps/npm/html/doc/prune.html
	deps/npm/html/doc/publish.html
	deps/npm/html/doc/rebuild.html
	deps/npm/html/doc/registry.html
	deps/npm/html/doc/removing-npm.html
	deps/npm/html/doc/restart.html
	deps/npm/html/doc/rm.html
	deps/npm/html/doc/root.html
	deps/npm/html/doc/run-script.html
	deps/npm/html/doc/scripts.html
	deps/npm/html/doc/search.html
	deps/npm/html/doc/semver.html
	deps/npm/html/doc/shrinkwrap.html
	deps/npm/html/doc/star.html
	deps/npm/html/doc/stars.html
	deps/npm/html/doc/start.html
	deps/npm/html/doc/stop.html
	deps/npm/html/doc/submodule.html
	deps/npm/html/doc/tag.html
	deps/npm/html/doc/test.html
	deps/npm/html/doc/uninstall.html
	deps/npm/html/doc/unpublish.html
	deps/npm/html/doc/update.html
	deps/npm/html/doc/version.html
	deps/npm/html/doc/view.html
	deps/npm/html/doc/whoami.html
	deps/npm/man/man1/ls.1
	deps/npm/man/man1/npm.1
	deps/npm/man/man3/npm.3
	deps/npm/node_modules/npm-registry-client/lib/publish.js
	deps/npm/node_modules/npm-registry-client/package.json
	deps/npm/package.json
	doc/blog/feature/streams2.md
2013-03-06 15:43:02 -08:00
isaacs
80fb580936 npm: Update to 1.2.14 2013-03-06 15:41:06 -08:00
isaacs
277a2545d2 blog: Update streams2 feature post to match actual doc 2013-03-06 14:19:16 -08:00
isaacs
7df4652d7b Now working on 0.9.13
Probably that will be 0.10.0 instead, though.
2013-03-06 13:59:58 -08:00
isaacs
ff2639f9ea doc: fix ChangeLog typo 2013-03-06 13:59:25 -08:00
isaacs
b5dffdd696 Merge branch 'v0.9.12-release' 2013-03-06 13:59:07 -08:00
isaacs
116d6c4402 blog: Post for 0.9.12 2013-03-06 13:57:57 -08:00
isaacs
0debf5a829 2013.03.06, Version 0.9.12 (Unstable)
* stream: Allow strings in Readable.push/unshift (isaacs)

* stream: Remove bufferSize option (isaacs)

* stream: Increase highWaterMark on large reads (isaacs)

* stream: _write: takes an encoding argument (isaacs)

* stream: _transform: remove no output() method, provide encoding (isaacs)

* stream: Don't require read(0) to emit 'readable' event (isaacs)

* node: Add --throw-deprecation (isaacs)

* http: fix multiple timeout events (Eugene Girshov)

* http: More useful setTimeout API on server (isaacs)

* net: use close callback, not process.nextTick (Ben Noordhuis)

* net: Provide better error when writing after FIN (isaacs)

* dns: Support NAPTR queries (Pavel Lang)

* dns: fix ReferenceError in resolve() error path (Xidorn Quan)

* child_process: handle ENOENT correctly on Windows (Scott Blomquist)

* cluster: Rename destroy() to kill(signal=SIGTERM) (isaacs)

* build: define nightly tag external to build system (Timothy J Fontaine)

* build: make msi build work when spaces are present in the path (Bert Belder)

* build: fix msi build issue with WiX 3.7/3.8 (Raymond Feng)

* repl: make compatible with domains (Dave Olszewski)

* events: Code cleanup and performance improvements (Trevor Norris)
2013-03-06 13:06:10 -08:00
isaacs
51c8b0ede3 V8: Reapply floating patches 2013-03-06 12:59:59 -08:00
isaacs
81c278d58d V8: Upgrade to 3.14.5.8 2013-03-06 12:59:58 -08:00
isaacs
d258fb0212 http: More useful setTimeout API on server
This adds the following to HTTP:

* server.setTimeout(msecs, callback)
  Sets all new connections to time out after the specified time, at
  which point it emits 'timeout' on the server, passing the socket as an
  argument.
  In this way, timeouts can be handled in one place consistently.
* req.setTimeout(), res.setTimeout()
  Essentially an alias to req/res.socket.setTimeout(), but without
  having to delve into a "buried" object.  Adds a listener on the
  req/res object, but not on the socket.
* server.timeout
  Number of milliseconds before incoming connections time out.
  (Default=1000*60*2, as before.)

Furthermore, if the user sets up their own timeout listener on either
the server, the request, or the response, then the default behavior
(destroying the socket) is suppressed.

Fix #3460
2013-03-06 12:43:48 -08:00
isaacs
db5d58e842 bench: Use environ to run compares more than once
This will run the benchmarks the number of times specified by NODE_BENCH_RUNS,
to attempt to reduce variability.

If the number of runs is high enough, it'll also throw out the top and bottom
quartiles, since that's where the outliers will be.

It's not very fancy statistics-fu, but it's better than nothing.

Also, linted this file.  It had tabs in it.  TABS!
2013-03-06 12:33:05 -08:00
isaacs
9208c89058 stream: Raise readable high water mark in powers of 2
This prevents excessively raising the buffer level in tiny increments in
pathological cases.
2013-03-06 11:44:30 -08:00
isaacs
a978bedee7 stream: Allow strings in Readable.push/unshift
Fix #4909
2013-03-06 11:44:30 -08:00
isaacs
b0f6789a78 stream: Remove bufferSize option
Now that highWaterMark increases when there are large reads, this
greatly reduces the number of calls necessary to _read(size), assuming
that _read actually respects the size argument.
2013-03-06 11:44:30 -08:00
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
Nathan Rajlich
4d809e297f process: invoke EventEmitter on process
This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.
2013-03-05 21:15:45 -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