platform/upstream/nodejs.git
11 years agocore: Move UNWRAP_NO_ABORT to handle_wrap.h
isaacs [Wed, 13 Mar 2013 18:22:33 +0000 (11:22 -0700)]
core: Move UNWRAP_NO_ABORT to handle_wrap.h

Otherwise it cannot be used in StreamWrap.

Forgot to include in last patch, broke the build.

11 years agodoc: path.join() arguments must be strings
Ben Noordhuis [Wed, 13 Mar 2013 17:27:09 +0000 (18:27 +0100)]
doc: path.join() arguments must be strings

In v0.8, non-string arguments were ignored. v0.10 throws an exception.

11 years agonet: handle 'finish' event only after 'connect'
Fedor Indutny [Wed, 13 Mar 2013 12:53:27 +0000 (16:53 +0400)]
net: handle 'finish' event only after 'connect'

11 years agocore: Unwrap without aborting in handle fd getter
isaacs [Wed, 13 Mar 2013 17:16:26 +0000 (10:16 -0700)]
core: Unwrap without aborting in handle fd getter

11 years agoblog: Fix typo in typo fix
isaacs [Wed, 13 Mar 2013 17:15:30 +0000 (10:15 -0700)]
blog: Fix typo in typo fix

11 years agoblog: fix small typo in v0.10.0 release article
Nathan Rajlich [Wed, 13 Mar 2013 02:00:48 +0000 (19:00 -0700)]
blog: fix small typo in v0.10.0 release article

11 years agodoc: events: add 'removeListener' event section
Ben Noordhuis [Mon, 11 Mar 2013 23:03:56 +0000 (00:03 +0100)]
doc: events: add 'removeListener' event section

Amends commit 84221fd by (also) documenting the 'removeListener' event
in a dedicated section, like the 'newListener' event.

Fixes #4977.

11 years agoblog: Post about v0.10.0
isaacs [Mon, 11 Mar 2013 15:56:47 +0000 (08:56 -0700)]
blog: Post about v0.10.0

11 years agoNow working on 0.10.1
isaacs [Mon, 11 Mar 2013 15:49:33 +0000 (08:49 -0700)]
Now working on 0.10.1

11 years agoMerge branch 'v0.10.0-release' into v0.10
isaacs [Mon, 11 Mar 2013 15:49:20 +0000 (08:49 -0700)]
Merge branch 'v0.10.0-release' into v0.10

11 years ago2013.03.11, Version 0.10.0 (Stable) v0.10.0
isaacs [Sat, 9 Mar 2013 17:24:56 +0000 (09:24 -0800)]
2013.03.11, Version 0.10.0 (Stable)

* npm: Upgrade to 1.2.14

* core: Append filename properly in dlopen on windows (isaacs)

* zlib: Manage flush flags appropriately (isaacs)

* domains: Handle errors thrown in nested error handlers (isaacs)

* buffer: Strip high bits when converting to ascii (Ben Noordhuis)

* win/msi: Enable modify and repair (Bert Belder)

* win/msi: Add feature selection for various node parts (Bert Belder)

* win/msi: use consistent registry key paths (Bert Belder)

* child_process: support sending dgram socket (Andreas Madsen)

* fs: Raise EISDIR on Windows when calling fs.read/write on a dir (isaacs)

* unix: fix strict aliasing warnings, macro-ify functions (Ben Noordhuis)

* unix: honor UV_THREADPOOL_SIZE environment var (Ben Noordhuis)

* win/tty: fix typo in color attributes enumeration (Bert Belder)

* win/tty: don't touch insert mode or quick edit mode (Bert Belder)

11 years agostream: Don't emit 'end' unless read() called
isaacs [Sun, 10 Mar 2013 02:05:39 +0000 (18:05 -0800)]
stream: Don't emit 'end' unless read() called

This solves the problem of calling `readable.pipe(writable)` after the
readable stream has already emitted 'end', as often is the case when
writing simple HTTP proxies.

The spirit of streams2 is that things will work properly, even if you
don't set them up right away on the first tick.

This approach breaks down, however, because pipe()ing from an ended
readable will just do nothing.  No more data will ever arrive, and the
writable will hang open forever never being ended.

However, that does not solve the case of adding a `on('end')` listener
after the stream has received the EOF chunk, if it was the first chunk
received (and thus, length was 0, and 'end' got emitted).  So, with
this, we defer the 'end' event emission until the read() function is
called.

Also, in pipe(), if the source has emitted 'end' already, we call the
cleanup/onend function on nextTick.  Piping from an already-ended stream
is thus the same as piping from a stream that is in the process of
ending.

Updates many tests that were relying on 'end' coming immediately, even
though they never read() from the req.

Fix #4942

11 years agostream: Avoid nextTick warning filling read buffer
isaacs [Sat, 9 Mar 2013 18:56:17 +0000 (10:56 -0800)]
stream: Avoid nextTick warning filling read buffer

In the function that pre-emptively fills the Readable queue, it relies
on a recursion through:

stream.push(chunk) ->
maybeReadMore(stream, state) ->
  if (not reading more and < hwm) stream.read(0) ->
stream._read() ->
stream.push(chunk) -> repeat.

Since this was only calling read() a single time, and then relying on a
future nextTick to collect more data, it ends up causing a nextTick
recursion error (and potentially a RangeError, even) if you have a very
high highWaterMark, and are getting very small chunks pushed
synchronously in _read (as happens with TLS, or many simple test
streams).

This change implements a new approach, so that read(0) is called
repeatedly as long as it is effective (that is, the length keeps
increasing), and thus quickly fills up the buffer for streams such as
these, without any stacks overflowing.

11 years agoevents: Handle missing error obj when domains in use
Julian Gruber [Fri, 8 Mar 2013 18:41:28 +0000 (19:41 +0100)]
events: Handle missing error obj when domains in use

so `ee.emit('error')` doesn't throw when domains are active

create an empty error only when handled by a domain

test for when no error is provided to an error event

11 years agohttp: ServerRequest does not timeout after 'end'
koichik [Sun, 10 Mar 2013 11:10:19 +0000 (20:10 +0900)]
http: ServerRequest does not timeout after 'end'

Fixes #4967

11 years agohttp: Do not setTimeout a not-yet-existent socket
isaacs [Sun, 10 Mar 2013 02:46:39 +0000 (18:46 -0800)]
http: Do not setTimeout a not-yet-existent socket

Fixes #4967

11 years agouv: Upgrade to 5462dab
isaacs [Sun, 10 Mar 2013 02:34:59 +0000 (18:34 -0800)]
uv: Upgrade to 5462dab

11 years agowin/msi: Fix typos
isaacs [Sat, 9 Mar 2013 17:22:00 +0000 (09:22 -0800)]
win/msi: Fix typos

11 years agonpm: Upgrade to 1.2.14 (fixed)
isaacs [Sat, 9 Mar 2013 17:11:22 +0000 (09:11 -0800)]
npm: Upgrade to 1.2.14 (fixed)

11 years agohttp: check if incoming parser has already been freed
hc [Fri, 8 Mar 2013 11:07:27 +0000 (06:07 -0500)]
http: check if incoming parser has already been freed

Fix #4948

This adds a check before setting the incoming parser
to null. Under certain circumstances it'll already be set to
null by freeParser().

Otherwise this will cause node to crash as it tries to set
null on something that is already null.

11 years agotimers: consistent this keyword in setImmediate
Andreas Madsen [Tue, 26 Feb 2013 17:26:09 +0000 (18:26 +0100)]
timers: consistent this keyword in setImmediate

When calling setImmediate with extra arguments the this keyword in the
callback would refer to the global object, but when not calling
setImmediate with extra arguments this would refer to the returned
handle object.

This commit fixes that inconsistency so its always set handle object.
The handle object was chosen for performance reasons.

11 years agodomain: Fix double-exit on nested domains
isaacs [Sat, 9 Mar 2013 15:00:21 +0000 (07:00 -0800)]
domain: Fix double-exit on nested domains

Minor oversight in fix for #4953.

11 years agoNow working on 0.10.0
isaacs [Sat, 9 Mar 2013 05:52:09 +0000 (21:52 -0800)]
Now working on 0.10.0

11 years agolint
isaacs [Sat, 9 Mar 2013 04:26:26 +0000 (20:26 -0800)]
lint

11 years agostream: Always defer preemptive reading to improve latency
Gil Pedersen [Fri, 8 Mar 2013 08:26:53 +0000 (09:26 +0100)]
stream: Always defer preemptive reading to improve latency

11 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Sat, 9 Mar 2013 02:59:44 +0000 (18:59 -0800)]
Merge remote-tracking branch 'ry/v0.8' into master

Conflicts:
AUTHORS
ChangeLog
src/node_version.h

11 years agotest: Fail faster in simple/test-cluster-bind-twice-v2
isaacs [Sat, 9 Mar 2013 02:31:21 +0000 (18:31 -0800)]
test: Fail faster in simple/test-cluster-bind-twice-v2

Crashing on windows, but at least now it's a crash rathert han a timeout.

11 years agotest: Kill zombies when debugger-client fails on windows
isaacs [Fri, 8 Mar 2013 17:29:13 +0000 (09:29 -0800)]
test: Kill zombies when debugger-client fails on windows

11 years agotest: Don't run async operation in process 'exit'
isaacs [Fri, 8 Mar 2013 17:10:57 +0000 (09:10 -0800)]
test: Don't run async operation in process 'exit'

Also, this seems to occasionally cause some annoying file-locking
errors in Windows.  Not sure if this is the best fix, but it seems
to make the warnings go away in that spot.

11 years agotest: Use copy instead of symlink in child-process-fork-exec-path
isaacs [Fri, 8 Mar 2013 16:29:36 +0000 (08:29 -0800)]
test: Use copy instead of symlink in child-process-fork-exec-path

11 years agotest: Trim cat output for windows
isaacs [Fri, 8 Mar 2013 00:29:30 +0000 (16:29 -0800)]
test: Trim cat output for windows

11 years agotest: Sending dgram sockets to child procs not supported on windows
isaacs [Fri, 8 Mar 2013 00:13:52 +0000 (16:13 -0800)]
test: Sending dgram sockets to child procs not supported on windows

11 years agocore: Append filename properly in dlopen on windows
isaacs [Thu, 7 Mar 2013 23:14:22 +0000 (15:14 -0800)]
core: Append filename properly in dlopen on windows

Fixes simple/test-module-loading on win32

11 years agotest: Make stream2-transform less timing-dependent
isaacs [Thu, 7 Mar 2013 22:28:32 +0000 (14:28 -0800)]
test: Make stream2-transform less timing-dependent

11 years agotest: Don't fail tls-session-cache if openssl is bad
isaacs [Thu, 7 Mar 2013 20:04:17 +0000 (12:04 -0800)]
test: Don't fail tls-session-cache if openssl is bad

11 years agozlib: Manage flush flags appropriately
isaacs [Fri, 8 Mar 2013 15:55:45 +0000 (07:55 -0800)]
zlib: Manage flush flags appropriately

If you call z.flush();z.write('foo'); then it would try to write 'foo'
before the flush was done, triggering an assertion in the zlib binding.

Closes #4950

11 years agodomains: Handle errors thrown in nested error handlers
isaacs [Fri, 8 Mar 2013 19:12:15 +0000 (11:12 -0800)]
domains: Handle errors thrown in nested error handlers

If a domain error handler throws, it should be caught if it was
in a stack of nested domains.

Fix #4953

11 years agobuffer: speed up ascii character scanning
Ben Noordhuis [Thu, 6 Dec 2012 04:26:35 +0000 (05:26 +0100)]
buffer: speed up ascii character scanning

Speed up ASCII character scanning and conversion by 25% to 30% by scanning and
converting whole words instead of individual bytes.

11 years agobuffer: strip high bits when converting to ascii
Ben Noordhuis [Thu, 6 Dec 2012 04:13:14 +0000 (05:13 +0100)]
buffer: strip high bits when converting to ascii

Consider the following example:

  console.log(Buffer('ú').toString('ascii'));

Before this commit, the contents of the buffer was used as-is and hence it
prints 'ú'.

Now, it prints 'C:'. Perhaps not much of an improvement but it conforms to what
the documentation says it does: strip off the high bits.

Fixes #4371.

11 years agoRevert "http: check if incoming parser has already been freed"
isaacs [Fri, 8 Mar 2013 22:35:00 +0000 (14:35 -0800)]
Revert "http: check if incoming parser has already been freed"

This reverts commit 9f4c3b0d45f858d3d3021ef4b8edebf6005008ff.

11 years agohttp: check if incoming parser has already been freed
hheennrryy@gmail.com [Fri, 8 Mar 2013 11:07:27 +0000 (06:07 -0500)]
http: check if incoming parser has already been freed

Fix #4948

This adds a check before setting the incoming parser
to null. Under certain circumstances it'll already be set to
null by freeParser().

Otherwise this will cause node to crash as it tries to set
null on something that is already null.

11 years agodoc: Add wrk's license to LICENSE file
isaacs [Fri, 8 Mar 2013 21:47:36 +0000 (13:47 -0800)]
doc: Add wrk's license to LICENSE file

11 years agowin/msi: enable modify and repair
Bert Belder [Fri, 8 Mar 2013 00:44:42 +0000 (01:44 +0100)]
win/msi: enable modify and repair

11 years agowin/msi: miscellaneous style cleanups
Bert Belder [Thu, 7 Mar 2013 17:25:06 +0000 (18:25 +0100)]
win/msi: miscellaneous style cleanups

11 years agowin/msi: don't include architecture in start menu group name
Bert Belder [Thu, 7 Mar 2013 17:22:43 +0000 (18:22 +0100)]
win/msi: don't include architecture in start menu group name

11 years agowin/msi: update 'install finished' message
Bert Belder [Thu, 7 Mar 2013 17:22:06 +0000 (18:22 +0100)]
win/msi: update 'install finished' message

11 years agowin/msi: clean up the 'documentation shortcuts' feature
Bert Belder [Thu, 7 Mar 2013 17:01:57 +0000 (18:01 +0100)]
win/msi: clean up the 'documentation shortcuts' feature

11 years agowin/msi: refactor 'node.js runtime' feature
Bert Belder [Thu, 7 Mar 2013 16:48:43 +0000 (17:48 +0100)]
win/msi: refactor 'node.js runtime' feature

* This feature now includes the start menu items.
* 'nodejsvars.bat' was renamed to 'nodevars.bat'.
* Improved feature description.

11 years agowin/msi: make 'add to path' a separate feature
Bert Belder [Thu, 7 Mar 2013 13:44:46 +0000 (14:44 +0100)]
win/msi: make 'add to path' a separate feature

11 years agowin/msi: separate features for ETW and perfctr support
Bert Belder [Thu, 7 Mar 2013 13:08:38 +0000 (14:08 +0100)]
win/msi: separate features for ETW and perfctr support

11 years agowin/msi: make npm a feature separate from the runtime
Bert Belder [Thu, 7 Mar 2013 10:55:47 +0000 (11:55 +0100)]
win/msi: make npm a feature separate from the runtime

11 years agowin/msi: use consistent registry key paths
Bert Belder [Thu, 7 Mar 2013 10:37:07 +0000 (11:37 +0100)]
win/msi: use consistent registry key paths

11 years agowin/msi: don't create empty npm folder in %appdata%
Bert Belder [Wed, 6 Mar 2013 14:41:12 +0000 (15:41 +0100)]
win/msi: don't create empty npm folder in %appdata%

Npm creates this folder when it's needed. Creating it in the installer
violates the per-user / per-machine scope separation.

11 years agowin/msi: don't install pdb file
Bert Belder [Wed, 6 Mar 2013 14:39:07 +0000 (15:39 +0100)]
win/msi: don't install pdb file

It's only available in debug builds, and we're not providing
installer packages for debug builds anyway.

11 years agowin/msi: define features before directories/components
Bert Belder [Thu, 28 Feb 2013 14:29:00 +0000 (15:29 +0100)]
win/msi: define features before directories/components

11 years agowin: make nodejsvars.bat detect whether npm is available
Bert Belder [Fri, 8 Mar 2013 00:28:18 +0000 (01:28 +0100)]
win: make nodejsvars.bat detect whether npm is available

11 years agostream: Emit error on stream object, not global
isaacs [Fri, 8 Mar 2013 15:35:35 +0000 (07:35 -0800)]
stream: Emit error on stream object, not global

Apparently this function got abstracted out at some point, and 'this'
wasn't changed to the correct object.

11 years agoRevert "build, windows: disable SEH"
Bert Belder [Tue, 5 Mar 2013 18:38:28 +0000 (19:38 +0100)]
Revert "build, windows: disable SEH"

This is no longer necessary - the underlying issue was fixed in 01fa5ee.
This reverts commit d87904286024f5ceb6a2d0d5f17e919c775830a0.

11 years agowin/openssl: mark assembled object files as seh safe
Bert Belder [Tue, 5 Mar 2013 18:36:29 +0000 (19:36 +0100)]
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.

11 years agowindows/msi: fix msi build issue with WiX 3.7/3.8
Raymond Feng [Sat, 2 Mar 2013 18:08:08 +0000 (10:08 -0800)]
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

11 years agouv: Upgrade to b68ee40
isaacs [Fri, 8 Mar 2013 02:17:28 +0000 (18:17 -0800)]
uv: Upgrade to b68ee40

11 years agobench: Do math on numbers in compare.js, not strings
isaacs [Thu, 7 Mar 2013 19:56:53 +0000 (11:56 -0800)]
bench: Do math on numbers in compare.js, not strings

11 years agouv: Upgrade to f89125e
isaacs [Wed, 6 Mar 2013 23:44:08 +0000 (15:44 -0800)]
uv: Upgrade to f89125e

11 years agochild_process: support sending dgram socket
Andreas Madsen [Wed, 27 Feb 2013 18:31:24 +0000 (19:31 +0100)]
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.

11 years agodoc: dgram: add v0.10 bind() behavior note
Ben Noordhuis [Thu, 7 Mar 2013 13:13:01 +0000 (14:13 +0100)]
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.

11 years agodoc: dgram: document bind() callback argument
Ben Noordhuis [Thu, 7 Mar 2013 13:10:47 +0000 (14:10 +0100)]
doc: dgram: document bind() callback argument

11 years agoblog: Post for v0.8.22
isaacs [Thu, 7 Mar 2013 00:22:23 +0000 (16:22 -0800)]
blog: Post for v0.8.22

11 years agoNow working on 0.8.23
isaacs [Thu, 7 Mar 2013 00:20:00 +0000 (16:20 -0800)]
Now working on 0.8.23

11 years agoMerge branch 'v0.8.22-release' into v0.8
isaacs [Thu, 7 Mar 2013 00:19:29 +0000 (16:19 -0800)]
Merge branch 'v0.8.22-release' into v0.8

11 years ago2013.03.07, Version 0.8.22 (Stable) v0.8.22
isaacs [Wed, 6 Mar 2013 23:47:29 +0000 (15:47 -0800)]
2013.03.07, Version 0.8.22 (Stable)

* npm: Update to 1.2.14

* cluster: propagate bind errors (Ben Noordhuis)

* crypto: don't assert when calling Cipher#final() twice (Ben Noordhuis)

* build, windows: disable SEH (Ben Noordhuis)

11 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Wed, 6 Mar 2013 23:43:02 +0000 (15:43 -0800)]
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

11 years agonpm: Update to 1.2.14
isaacs [Wed, 6 Mar 2013 23:41:06 +0000 (15:41 -0800)]
npm: Update to 1.2.14

11 years agoblog: Update streams2 feature post to match actual doc
isaacs [Wed, 6 Mar 2013 22:19:16 +0000 (14:19 -0800)]
blog: Update streams2 feature post to match actual doc

11 years agoNow working on 0.9.13
isaacs [Wed, 6 Mar 2013 21:59:58 +0000 (13:59 -0800)]
Now working on 0.9.13

Probably that will be 0.10.0 instead, though.

11 years agodoc: fix ChangeLog typo
isaacs [Wed, 6 Mar 2013 21:59:25 +0000 (13:59 -0800)]
doc: fix ChangeLog typo

11 years agoMerge branch 'v0.9.12-release'
isaacs [Wed, 6 Mar 2013 21:59:07 +0000 (13:59 -0800)]
Merge branch 'v0.9.12-release'

11 years agoblog: Post for 0.9.12
isaacs [Wed, 6 Mar 2013 21:56:56 +0000 (13:56 -0800)]
blog: Post for 0.9.12

11 years ago2013.03.06, Version 0.9.12 (Unstable) v0.9.12
isaacs [Wed, 6 Mar 2013 20:43:35 +0000 (12:43 -0800)]
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)

11 years agoV8: Reapply floating patches
isaacs [Wed, 6 Mar 2013 20:58:37 +0000 (12:58 -0800)]
V8: Reapply floating patches

11 years agoV8: Upgrade to 3.14.5.8
isaacs [Wed, 6 Mar 2013 20:57:49 +0000 (12:57 -0800)]
V8: Upgrade to 3.14.5.8

11 years agohttp: More useful setTimeout API on server
isaacs [Mon, 4 Mar 2013 07:29:22 +0000 (23:29 -0800)]
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

11 years agobench: Use environ to run compares more than once
isaacs [Wed, 6 Mar 2013 20:32:59 +0000 (12:32 -0800)]
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!

11 years agostream: Raise readable high water mark in powers of 2
isaacs [Wed, 6 Mar 2013 17:55:00 +0000 (09:55 -0800)]
stream: Raise readable high water mark in powers of 2

This prevents excessively raising the buffer level in tiny increments in
pathological cases.

11 years agostream: Allow strings in Readable.push/unshift
isaacs [Wed, 6 Mar 2013 07:37:37 +0000 (23:37 -0800)]
stream: Allow strings in Readable.push/unshift

Fix #4909

11 years agostream: Remove bufferSize option
isaacs [Wed, 6 Mar 2013 06:57:15 +0000 (22:57 -0800)]
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.

11 years agostream: Remove pipeOpts.chunkSize
isaacs [Wed, 6 Mar 2013 06:16:46 +0000 (22:16 -0800)]
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.

11 years agostream: Increase highWaterMark on large reads
isaacs [Wed, 6 Mar 2013 06:09:27 +0000 (22:09 -0800)]
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

11 years agostream: Remove unnecessary nextTick usage in Writable
isaacs [Wed, 6 Mar 2013 01:53:37 +0000 (17:53 -0800)]
stream: Remove unnecessary nextTick usage in Writable

Fix #4928

11 years agotest: Pass cli flags in pummel/test-regress-GH-892
isaacs [Wed, 6 Mar 2013 01:47:12 +0000 (17:47 -0800)]
test: Pass cli flags in pummel/test-regress-GH-892

11 years agonode: Add --throw-deprecation
isaacs [Wed, 6 Mar 2013 01:46:37 +0000 (17:46 -0800)]
node: Add --throw-deprecation

Extremely handy when tracking down a flood of recursive nextTick warnings.

11 years agohttp: fix multiple timeout events
Eugene Girshov [Mon, 4 Mar 2013 20:44:56 +0000 (22:44 +0200)]
http: fix multiple timeout events

Fixed up slightly by @isaacs so as not to miss 'timeout' events in some
cases.

11 years agonet: use close callback, not process.nextTick
Ben Noordhuis [Wed, 6 Mar 2013 15:15:17 +0000 (16:15 +0100)]
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.

11 years agohandle_wrap: add close callback support
Ben Noordhuis [Wed, 6 Mar 2013 14:32:40 +0000 (15:32 +0100)]
handle_wrap: add close callback support

11 years agohandle_wrap: replace unref_ field with flags_ field
Ben Noordhuis [Wed, 6 Mar 2013 14:24:20 +0000 (15:24 +0100)]
handle_wrap: replace unref_ field with flags_ field

Prep work for a follow-up commit that adds support for close callbacks.

11 years agosrc: remove unused symbols in node_file.cc
Ben Noordhuis [Wed, 6 Mar 2013 13:45:47 +0000 (14:45 +0100)]
src: remove unused symbols in node_file.cc

11 years agoDNS: Support NAPTR queries
Pavel Lang [Tue, 18 Sep 2012 09:21:38 +0000 (11:21 +0200)]
DNS: Support NAPTR queries

They were previously removed in a90bc78534d94940a6b726c01cf8427c296b4c63.

11 years agocares: Set process._errno, not global.errno
isaacs [Wed, 6 Mar 2013 09:07:46 +0000 (01:07 -0800)]
cares: Set process._errno, not global.errno

This makes test-internet pass

11 years agochild_process: handle ENOENT correctly on Windows
Scott Blomquist [Sat, 16 Feb 2013 01:25:57 +0000 (17:25 -0800)]
child_process: handle ENOENT correctly on Windows

11 years agoprocess: invoke EventEmitter on `process`
Nathan Rajlich [Tue, 5 Mar 2013 20:17:48 +0000 (12:17 -0800)]
process: invoke EventEmitter on `process`

This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.

11 years agobuild: define nightly tag external to build system
Timothy J Fontaine [Tue, 5 Mar 2013 19:05:50 +0000 (11:05 -0800)]
build: define nightly tag external to build system