platform/upstream/nodejs.git
11 years ago2013.05.13, Version 0.11.2 (Unstable) v0.11.2
isaacs [Mon, 13 May 2013 21:54:38 +0000 (14:54 -0700)]
2013.05.13, Version 0.11.2 (Unstable)

* uv: Upgrade to 0.11.2

* V8: Upgrade to 3.19.0

* npm: Upgrade to 1.2.21

* build: Makefile should respect configure --prefix (Timothy J Fontaine)

* cluster: use round-robin load balancing (Ben Noordhuis)

* debugger, cluster: each worker has new debug port (Miroslav Bajtoš)

* debugger: `restart` with custom debug port (Miroslav Bajtoš)

* debugger: breakpoints in scripts not loaded yet (Miroslav Bajtoš)

* event: EventEmitter#setMaxListeners() returns this (Sam Roberts)

* events: add EventEmitter.defaultMaxListeners (Ben Noordhuis)

* install: Support $(PREFIX) install target directory prefix (Olof Johansson)

* os: Include netmask in os.networkInterfaces() (Ben Kelly)

* path: add path.isAbsolute(path) (Ryan Doenges)

* stream: Guarantee ordering of 'finish' event (isaacs)

* streams: introduce .cork/.uncork/._writev (Fedor Indutny)

* vm: add support for timeout argument (Andrew Paprocki)

11 years agonpm: Upgrade to 1.2.21
isaacs [Mon, 13 May 2013 21:24:36 +0000 (14:24 -0700)]
npm: Upgrade to 1.2.21

11 years agocluster: use round-robin load balancing
Ben Noordhuis [Tue, 23 Apr 2013 13:11:17 +0000 (15:11 +0200)]
cluster: use round-robin load balancing

Empirical evidence suggests that OS-level load balancing (that is,
having multiple processes listen on a socket and have the operating
system wake up one when a connection comes in) produces skewed load
distributions on Linux, Solaris and possibly other operating systems.

The observed behavior is that a fraction of the listening processes
receive the majority of the connections. From the perspective of the
operating system, that somewhat makes sense: a task switch is expensive,
to be avoided whenever possible. That's why the operating system likes
to give preferential treatment to a few processes, because it reduces
the number of switches.

However, that rather subverts the purpose of the cluster module, which
is to distribute the load as evenly as possible. That's why this commit
adds (and defaults to) round-robin support, meaning that the master
process accepts connections and distributes them to the workers in a
round-robin fashion, effectively bypassing the operating system.

Round-robin is currently disabled on Windows due to how IOCP is wired
up. It works and you can select it manually but it probably results in
a heavy performance hit.

Fixes #4435.

11 years agoMerge branch 'v0.10'
Bert Belder [Mon, 13 May 2013 18:13:39 +0000 (11:13 -0700)]
Merge branch 'v0.10'

Conflicts:
tools/test.py

11 years agochild_process: fix handle delivery
Ben Noordhuis [Fri, 10 May 2013 18:19:17 +0000 (11:19 -0700)]
child_process: fix handle delivery

Commit 9352c19 ("child_process: don't emit same handle twice") trades
one bug for another.

Before said commit, a handle was sometimes delivered with messages it
didn't belong to.

The bug fix introduced another bug that needs some explaining. On UNIX
systems, handles are basically file descriptors that are passed around
with the sendmsg() and recvmsg() system calls, using auxiliary data
(SCM_RIGHTS) as the transport.

node.js and libuv depend on the fact that none of the supported systems
ever emit more than one SCM_RIGHTS message from a recvmsg() syscall.
That assumption is something we should probably address someday for the
sake of portability but that's a separate discussion.

So, SCM_RIGHTS messages are never coalesced. SCM_RIGHTS and normal
messages however _are_ coalesced. That is, recvmsg() might return this:

  recvmsg();  // { "message-with-fd", "message", "message" }

The operating system implicitly breaks pending messages along
SCM_RIGHTS boundaries. Most Unices break before such messages but Linux
also breaks _after_ them.  When the sender looks like this:

  sendmsg("message");
  sendmsg("message-with-fd");
  sendmsg("message");

Then on most Unices the receiver sees messages arriving like this:

  recvmsg();  // { "message" }
  recvmsg();  // { "message-with-fd", "message" }

The bug fix in commit 9352c19 assumes this behavior. On Linux however,
those messages can also come in like this:

  recvmsg();  // { "message", "message-with-fd" }
  recvmsg();  // { "message" }

In other words, it's incorrect to assume that the file descriptor is
always attached to the first message. This commit makes node wise up.

Fixes #5330.

11 years agoutil: make util.log handle non strings like console.log
Nick Sullivan [Fri, 10 May 2013 01:19:02 +0000 (18:19 -0700)]
util: make util.log handle non strings like console.log

util.log will fail on input that does not support .toString(). Have it
use console.log() instead. Includes tests for hairy data types.

Fixes #5349.

11 years agotest: fix up weakref.cc deprecation warnings
Ben Noordhuis [Mon, 13 May 2013 04:46:52 +0000 (06:46 +0200)]
test: fix up weakref.cc deprecation warnings

11 years agotest: fix up weakref.cc after v8 api change
Ben Noordhuis [Mon, 13 May 2013 04:45:05 +0000 (06:45 +0200)]
test: fix up weakref.cc after v8 api change

11 years agostream_wrap: MayContainNonAscii() is deprecated
Ben Noordhuis [Mon, 13 May 2013 02:28:59 +0000 (04:28 +0200)]
stream_wrap: MayContainNonAscii() is deprecated

V8 3.19.0 deprecates v8::String::MayContainNonAscii(). It always returns
true so there is not much point in keeping the call site around.

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agodeps: upgrade v8 to 3.19.0
Ben Noordhuis [Mon, 13 May 2013 01:28:40 +0000 (03:28 +0200)]
deps: upgrade v8 to 3.19.0

11 years agonpm: Upgrade to 1.2.20
isaacs [Sat, 11 May 2013 00:45:37 +0000 (17:45 -0700)]
npm: Upgrade to 1.2.20

11 years agotest: Darwin file watcher has paths now
isaacs [Fri, 10 May 2013 23:40:03 +0000 (16:40 -0700)]
test: Darwin file watcher has paths now

Even when watching subdirs.

11 years agouv: Upgrade to 0.11.2
isaacs [Fri, 10 May 2013 22:30:53 +0000 (15:30 -0700)]
uv: Upgrade to 0.11.2

11 years agodoc: s/search.npmjs.org/npmjs.org/
isaacs [Thu, 9 May 2013 22:15:39 +0000 (15:15 -0700)]
doc: s/search.npmjs.org/npmjs.org/

11 years agohttp: Use writev instead of the hacky hot end
isaacs [Wed, 8 May 2013 21:28:56 +0000 (14:28 -0700)]
http: Use writev instead of the hacky hot end

11 years agostream: Handle multi-corking properly
isaacs [Wed, 8 May 2013 20:29:54 +0000 (13:29 -0700)]
stream: Handle multi-corking properly

This adds proper support for the following situation:

    w.cork();
    w.write(...);
    w.cork();
    w.write(...);
    w.uncork();
    w.write(...);
    w.uncork();

This is relevant when you have a function (as we do in HTTP) that wants
to use cork, but in some cases, want to have a cork/uncork *around*
that function, without losing the benefits of writev.

11 years agostream: Guarantee ordering of 'finish' event
isaacs [Wed, 8 May 2013 19:54:29 +0000 (12:54 -0700)]
stream: Guarantee ordering of 'finish' event

In synchronous Writable streams (where the _write cb is called on the
current tick), the 'finish' event (and thus the end() callback) can in
some cases be called before all the write() callbacks are called.

Use a counter, and have stream.Transform rely on the 'prefinish' event
instead of the 'finish' event.

This has zero effect on most streams, but it corrects an edge case and
makes it perform more deterministically, which is a Good Thing.

11 years agotest: fix pummel/test-net-many-clients.js
Timothy J Fontaine [Mon, 6 May 2013 23:37:03 +0000 (16:37 -0700)]
test: fix pummel/test-net-many-clients.js

client sockets no longer emit 'connect' event inside the
requestListener, update test-net-many-clients to reflect that

11 years agodoc: document stream.Writable 'error' event
Robert Kowalski [Mon, 6 May 2013 19:53:35 +0000 (21:53 +0200)]
doc: document stream.Writable 'error' event

Fixes #5255.

11 years agoos: Include netmask in os.networkInterfaces()
Ben Kelly [Sun, 10 Feb 2013 22:19:43 +0000 (17:19 -0500)]
os: Include netmask in os.networkInterfaces()

re #3765 and #5432
fixes #4743

11 years agosrc: initialize debug-related uv_async_t handles
Miroslav Bajtoš [Thu, 2 May 2013 14:42:49 +0000 (16:42 +0200)]
src: initialize debug-related uv_async_t handles

uv_async_t handles for dispatching of debug messages and
emitting NODE_DEBUG_ENABLED used to be initialized every time
node::EnableDebug() was called, which happened every time
user sends a SIGUSR1.

Now they are initialized only once from node::Init() during
application start.

11 years agodebugger, cluster: each worker has new debug port
Miroslav Bajtoš [Thu, 2 May 2013 06:34:22 +0000 (08:34 +0200)]
debugger, cluster: each worker has new debug port

Implement support for debugging cluster workers. Each worker process
is assigned a new debug port in an increasing sequence.

I.e. when master process uses port 5858, then worker 1 uses port 5859,
worker 2 uses port 5860, and so on.

Introduce new command-line parameter '--debug-port=' which sets debug_port
but does not start debugger. This option works for all node processes, it
is not specific to cluster workers.

Fixes joyent/node#5318.

11 years agostream: make Readable.wrap support empty streams
Daniel Moore [Wed, 1 May 2013 17:46:31 +0000 (13:46 -0400)]
stream: make Readable.wrap support empty streams

This makes Readable.wrap behave properly when the wrapped stream ends
before emitting any data events.

11 years agostream: make Readable.wrap support objectMode
Daniel Moore [Mon, 29 Apr 2013 13:25:08 +0000 (09:25 -0400)]
stream: make Readable.wrap support objectMode

Added a check to see if the stream is in objectMode before deciding
whether to include or exclude data from an old-style wrapped stream.

11 years agotest: don't use total_seconds() because of py2.6
Timothy J Fontaine [Tue, 7 May 2013 22:17:33 +0000 (15:17 -0700)]
test: don't use total_seconds() because of py2.6

11 years agotest: don't use total_seconds() because of py2.6
Timothy J Fontaine [Tue, 7 May 2013 22:17:33 +0000 (15:17 -0700)]
test: don't use total_seconds() because of py2.6

11 years agostream_wrap: fix memory leak on early return
Brian White [Tue, 7 May 2013 22:01:42 +0000 (18:01 -0400)]
stream_wrap: fix memory leak on early return

11 years agostream_wrap: remove unused arg from WriteBuffer
Trevor Norris [Tue, 7 May 2013 19:38:14 +0000 (12:38 -0700)]
stream_wrap: remove unused arg from WriteBuffer

WriteBuffer was changed in the cork/uncork implementation (60ed2c54).
The unused argument has been removed.

11 years agotest: report test duration in TAP progress
Timothy J Fontaine [Tue, 7 May 2013 18:59:22 +0000 (11:59 -0700)]
test: report test duration in TAP progress

11 years agotest: report test duration in TAP progress
Timothy J Fontaine [Tue, 7 May 2013 18:59:22 +0000 (11:59 -0700)]
test: report test duration in TAP progress

11 years agotest: reap children when cluster-bind-twice fails
Timothy J Fontaine [Mon, 6 May 2013 18:31:57 +0000 (11:31 -0700)]
test: reap children when cluster-bind-twice fails

11 years agobuild: only use DESTDIR instead of PREFIX for pkg
Timothy J Fontaine [Thu, 2 May 2013 20:54:37 +0000 (13:54 -0700)]
build: only use DESTDIR instead of PREFIX for pkg

Preserve default install prefix seen in process.config, but use DESTDIR
for installing to deliniate 32/64 versions, avoid conflicts with PREFIX
settings in config.mk

11 years agobuild: only use DESTDIR instead of PREFIX for pkg
Timothy J Fontaine [Thu, 2 May 2013 20:54:37 +0000 (13:54 -0700)]
build: only use DESTDIR instead of PREFIX for pkg

Preserve default install prefix seen in process.config, but use DESTDIR
for installing to deliniate 32/64 versions, avoid conflicts with PREFIX
settings in config.mk

11 years agodoc: update options for exec and execFile
Kevin Locke [Fri, 26 Apr 2013 23:14:39 +0000 (17:14 -0600)]
doc: update options for exec and execFile

The stdio and customFds options are never used by exec or execFile,
remove them from the documentation for these functions.

11 years agoMerge branch 'v0.10'
Bert Belder [Fri, 3 May 2013 09:33:47 +0000 (11:33 +0200)]
Merge branch 'v0.10'

11 years agobuild: vcbuild.bat fix for Visual Studio 2012
Miroslav Bajtoš [Fri, 3 May 2013 06:51:51 +0000 (08:51 +0200)]
build: vcbuild.bat fix for Visual Studio 2012

Change vcbuild.bat to ignore VCINSTALLDIR environment variable,
always check for specific VS version and set GYP_MSVS_VERSION
accordingly. Otherwise GYP generates project files in format
that cannot be compiled by VS2012.

11 years agotest: EventEmitter#setMaxListeners() returns this
Sam Roberts [Thu, 2 May 2013 23:38:16 +0000 (16:38 -0700)]
test: EventEmitter#setMaxListeners() returns this

Add a regression test for commit f8d8122.

11 years agoevent: make setMaxListeners() return this
Sam Roberts [Tue, 30 Apr 2013 22:26:14 +0000 (15:26 -0700)]
event: make setMaxListeners() return this

setMaxListeners was the only EventEmitter method that returned
undefined, so could not be chained.

11 years agoMerge remote-tracking branch 'origin/v0.10'
Ben Noordhuis [Thu, 2 May 2013 23:13:44 +0000 (01:13 +0200)]
Merge remote-tracking branch 'origin/v0.10'

11 years agodoc: document return values of EventEmitter methods
Sam Roberts [Tue, 30 Apr 2013 22:24:48 +0000 (15:24 -0700)]
doc: document return values of EventEmitter methods

11 years agodoc: link joyent logo in website footer
isaacs [Thu, 2 May 2013 16:47:46 +0000 (09:47 -0700)]
doc: link joyent logo in website footer

11 years agodebugger: breakpoints in scripts not loaded yet
Miroslav Bajtoš [Fri, 26 Apr 2013 06:05:33 +0000 (08:05 +0200)]
debugger: breakpoints in scripts not loaded yet

When developer calls setBreakpoint with an unknown script name,
we convert the script name into regular expression matching all
paths ending with given name (name can be a relative path too).

To create such breakpoint in V8, we use type `scriptRegEx`
instead of `scriptId` for `setbreakpoint` request.

To restore such breakpoint, we save the original script name
send by the user. We use this original name to set (restore)
breakpoint in the new child process.

This is a back-port of commit 5db936d from the master branch.

11 years agoRevert "deps: downgrade openssl to v1.0.0f"
Ben Noordhuis [Wed, 1 May 2013 14:21:21 +0000 (16:21 +0200)]
Revert "deps: downgrade openssl to v1.0.0f"

After much investigation it turns out that the affected servers are
buggy.  user-service.condenastdigital.com:443 in particular seems to
reject large TLS handshake records. Cutting down the number of
advertised ciphers or disabling SNI fixes the issue.

Similarly, passing { secureOptions: constants.SSL_OP_NO_TLSv1_2 }
seems to fix most connection issues with IIS servers.

Having to work around buggy servers is annoying for our users but not
a reason to downgrade OpenSSL. Therefore, revert it.

This reverts commit 4fdb8acdaef4c3cb1d855e992ada0e63fee520a6.

11 years agodoc: Fix require.extensions documentation
isaacs [Tue, 30 Apr 2013 14:40:43 +0000 (07:40 -0700)]
doc: Fix require.extensions documentation

1. The stability index must come first, or it messes up the markdown
2. require.extensions is an Object, not an Array.

Close #5387

11 years agohttps: implement https.Server#setTimeout()
Ben Noordhuis [Tue, 30 Apr 2013 10:43:32 +0000 (12:43 +0200)]
https: implement https.Server#setTimeout()

Like commit d258fb0 ("http: More useful setTimeout API on server") but
this time for the https module.

Fixes #5361.

11 years agovm: add support for timeout argument
Andrew Paprocki [Mon, 8 Oct 2012 19:24:08 +0000 (21:24 +0200)]
vm: add support for timeout argument

Add a watchdog class which executes a timer in a separate event loop in
a separate thread that will terminate v8 execution if it expires.

Add timeout argument to functions in vm module which use the watchdog
if a non-zero timeout is specified.

11 years agotools: fix test.py after v8 upgrade
Ben Noordhuis [Mon, 29 Apr 2013 21:08:02 +0000 (23:08 +0200)]
tools: fix test.py after v8 upgrade

test.py imports deps/v8/tools/utils.py but that file is gone after the
upgrade to 3.18.4 in commit 2f75785. Resurrect the file in tools/

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agodeps: upgrade v8 to 3.18.4
Ben Noordhuis [Mon, 29 Apr 2013 20:35:21 +0000 (22:35 +0200)]
deps: upgrade v8 to 3.18.4

11 years agodebugger: fix bug in breakpoint regex escaping
Miroslav Bajtoš [Mon, 29 Apr 2013 12:09:26 +0000 (14:09 +0200)]
debugger: fix bug in breakpoint regex escaping

Fix a bug in setBreakpoint() where not all regex characters are escaped
when constructing scriptRegEx for V8.

11 years agoRevert "deps: downgrade openssl to v1.0.0f"
Ben Noordhuis [Mon, 29 Apr 2013 12:15:07 +0000 (14:15 +0200)]
Revert "deps: downgrade openssl to v1.0.0f"

This commit undoes the downgrade from OpenSSL v1.0.1e to v1.0.0f,
effectively upgrading OpenSSL to v1.0.1e again. The reason for the
downgrade was to work around compatibility issues with certain TLS
servers in the stable branch. See the commit log of 4fdb8ac and the
linked issue for details. We're going to revisit that in the master
branch.

This reverts commit 4fdb8acdaef4c3cb1d855e992ada0e63fee520a6.

11 years agohttp: forward-port missing bits from 01e2920
Ben Noordhuis [Mon, 29 Apr 2013 12:12:24 +0000 (14:12 +0200)]
http: forward-port missing bits from 01e2920

Forward-port the comments from commit 01e2920 (v0.10) to the master
branch. Everything else from that patch already exists in master.

It didn't merge cleanly because lib/http.js has been split up in
several files.

11 years agoMerge remote-tracking branch 'origin/v0.10'
Ben Noordhuis [Mon, 29 Apr 2013 12:08:51 +0000 (14:08 +0200)]
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
AUTHORS
ChangeLog
deps/uv/ChangeLog
deps/uv/src/version.c
lib/http.js
src/node_crypto.cc
src/node_os.cc
src/node_version.h
test/simple/helper-debugger-repl.js

11 years agodeps: downgrade openssl to v1.0.0f
Ben Noordhuis [Fri, 26 Apr 2013 12:49:54 +0000 (14:49 +0200)]
deps: downgrade openssl to v1.0.0f

Several people have reported issues with IIS and Resin servers (or maybe
SSL terminators sitting in front of those servers) that are fixed by
downgrading OpenSSL. The AESNI performance improvements were nice but
stability is more important. Downgrade OpenSSL from 1.0.1e to 1.0.0f.

Fixes #5360 (and others).

11 years agodoc: cluster: s/server.destroy/server.close/
Ben Noordhuis [Mon, 29 Apr 2013 10:06:30 +0000 (12:06 +0200)]
doc: cluster: s/server.destroy/server.close/

Fixes #5379.

11 years agodoc: Deprecate require.extensions
isaacs [Mon, 29 Apr 2013 05:10:24 +0000 (22:10 -0700)]
doc: Deprecate require.extensions

11 years agodoc: stream writev cleanups
isaacs [Sun, 28 Apr 2013 06:41:16 +0000 (23:41 -0700)]
doc: stream writev cleanups

11 years agobenchmark: add chunked-encoding benchmark
Fedor Indutny [Mon, 8 Apr 2013 22:04:38 +0000 (02:04 +0400)]
benchmark: add chunked-encoding benchmark

11 years agotest: fix timing sensitive tests
Fedor Indutny [Mon, 8 Apr 2013 12:40:31 +0000 (16:40 +0400)]
test: fix timing sensitive tests

11 years agohttp: write buffers when chunked to embrace writev
Fedor Indutny [Mon, 8 Apr 2013 12:40:21 +0000 (16:40 +0400)]
http: write buffers when chunked to embrace writev

11 years agonet: implement ._writev for .cork/uncork() support
Fedor Indutny [Tue, 9 Apr 2013 08:56:56 +0000 (12:56 +0400)]
net: implement ._writev for .cork/uncork() support

Add Writev method to StreamWrap class for writing mixed array of strings
and buffers. Expose this method for TCP class.

11 years agostreams: introduce .cork/.uncork/._writev
Fedor Indutny [Sun, 14 Apr 2013 12:15:15 +0000 (08:15 -0400)]
streams: introduce .cork/.uncork/._writev

11 years agodebugger: breakpoints in scripts not loaded yet
Miroslav Bajtoš [Fri, 26 Apr 2013 06:05:33 +0000 (08:05 +0200)]
debugger: breakpoints in scripts not loaded yet

When developer calls setBreakpoint with an unknown script name,
we convert the script name into regular expression matching all
paths ending with given name (name can be a relative path too).

To create such breakpoint in V8, we use type `scriptRegEx`
instead of `scriptId` for `setbreakpoint` request.

To restore such breakpoint, we save the original script name
send by the user. We use this original name to set (restore)
breakpoint in the new child process.

11 years agodebugger: `restart` with custom debug port
Miroslav Bajtoš [Fri, 26 Apr 2013 19:07:56 +0000 (21:07 +0200)]
debugger: `restart` with custom debug port

Fixed a bug in debugger repl where `restart` command did not work
when a custom debug port was specified via command-line option
--port={number}.

File test/simple/helper-debugger-repl.js was extracted
from test/simple/test-debugger-repl.js

11 years agodebugger: print port number when connecting to debuggee
Miroslav Bajtoš [Fri, 26 Apr 2013 19:09:08 +0000 (21:09 +0200)]
debugger: print port number when connecting to debuggee

To improve troubleshooting of debugger problems in the future,
the debugger repl now prints the port it is connecting to.

11 years agodebugger: `restart` with custom debug port
Miroslav Bajtoš [Fri, 26 Apr 2013 19:07:56 +0000 (21:07 +0200)]
debugger: `restart` with custom debug port

Fixed a bug in debugger repl where `restart` command did not work
when a custom debug port was specified via command-line option
--port={number}.

File test/simple/helper-debugger-repl.js was extracted
from test/simple/test-debugger-repl.js

11 years agotest: cluster: unhide child errors in bind-twice
Ben Noordhuis [Thu, 25 Apr 2013 20:01:24 +0000 (22:01 +0200)]
test: cluster: unhide child errors in bind-twice

Errors in leaf child processes weren't picked up by the test runner
because they didn't get bubbled up to the main process. Don't forcibly
kill the child processes; tell them to quit gracefully, then inspect
their exit codes.

11 years agotest: cluster: rename bind-twice-v2 to bind-twice
Ben Noordhuis [Thu, 25 Apr 2013 20:02:42 +0000 (22:02 +0200)]
test: cluster: rename bind-twice-v2 to bind-twice

11 years agotest: cluster: remove bind-twice-v1 test
Ben Noordhuis [Thu, 25 Apr 2013 20:00:06 +0000 (22:00 +0200)]
test: cluster: remove bind-twice-v1 test

It tests the same thing as bind-twice-v2, only not as in-depth.

11 years agobuild: Makefile should respect configure --prefix
Timothy J Fontaine [Wed, 24 Apr 2013 17:15:36 +0000 (10:15 -0700)]
build: Makefile should respect configure --prefix

Fixes a regression that got introduced in commit ddf4d1a.

11 years agoChangeLog: Merge in v0.8
isaacs [Tue, 23 Apr 2013 21:43:46 +0000 (14:43 -0700)]
ChangeLog: Merge in v0.8

Close #5355

11 years agoblog: Post for v0.10.5
isaacs [Tue, 23 Apr 2013 21:08:01 +0000 (14:08 -0700)]
blog: Post for v0.10.5

11 years agoNow working on 0.10.6
isaacs [Tue, 23 Apr 2013 21:07:23 +0000 (14:07 -0700)]
Now working on 0.10.6

11 years agoMerge branch 'v0.10.5-release' into v0.10
isaacs [Tue, 23 Apr 2013 21:07:09 +0000 (14:07 -0700)]
Merge branch 'v0.10.5-release' into v0.10

11 years agoinstall: Support $(PREFIX) install target directory prefix
Olof Johansson [Tue, 23 Apr 2013 18:17:09 +0000 (20:17 +0200)]
install: Support $(PREFIX) install target directory prefix

This change introduces support for the common PREFIX variable in the
Makefile and install.py, instead of having /usr/local hardcoded. This
makes it much easier to install node to custom locations e.g. in a
user's home directory.

The PREFIX variable defaults to /usr/local.

11 years ago2013.04.23, Version 0.10.5 (Stable) v0.10.5
isaacs [Tue, 23 Apr 2013 01:00:41 +0000 (18:00 -0700)]
2013.04.23, Version 0.10.5 (Stable)

* uv: Upgrade to 0.10.5 (isaacs)

* build: added support for Visual Studio 2012 (Miroslav Bajtoš)

* http: Don't try to destroy nonexistent sockets (isaacs)

* crypto: LazyTransform on properties, not methods (isaacs)

* assert: put info in err.message, not err.name (Ryan Doenges)

* dgram: fix no address bind() (Ben Noordhuis)

* handle_wrap: fix NULL pointer dereference (Ben Noordhuis)

* os: fix unlikely buffer overflow in os.type() (Ben Noordhuis)

* stream: Fix unshift() race conditions (isaacs)

11 years agobuild: added support for Visual Studio 2012
Miroslav Bajtoš [Tue, 23 Apr 2013 07:38:17 +0000 (09:38 +0200)]
build: added support for Visual Studio 2012

11 years agouv: Upgrade to 0.10.5
isaacs [Tue, 23 Apr 2013 00:39:05 +0000 (17:39 -0700)]
uv: Upgrade to 0.10.5

11 years agoos: Fix uname() error handling on sunos
isaacs [Mon, 22 Apr 2013 17:18:46 +0000 (10:18 -0700)]
os: Fix uname() error handling on sunos

The uname function can return any non-negative int to indicate success.

Strange, but that's how it is documented.  This also fixes a similar
buffer overflow in the even more unlikely event that info.release is
> 255 characters, similar to how 78c5de5 did for info.sysname.

11 years agohttp: Don't try to destroy nonexistent sockets
isaacs [Mon, 22 Apr 2013 15:52:42 +0000 (08:52 -0700)]
http: Don't try to destroy nonexistent sockets

Fixes #3740

In the case of pipelined requests, you can have a situation where
the socket gets destroyed via one req/res object, but then trying
to destroy *another* req/res on the same socket will cause it to
call undefined.destroy(), since it was already removed from that
message.

Add a guard to OutgoingMessage.destroy and IncomingMessage.destroy
to prevent this error.

11 years agohttp: Don't try to destroy nonexistent sockets
isaacs [Mon, 22 Apr 2013 15:52:42 +0000 (08:52 -0700)]
http: Don't try to destroy nonexistent sockets

Fixes #3740

In the case of pipelined requests, you can have a situation where
the socket gets destroyed via one req/res object, but then trying
to destroy *another* req/res on the same socket will cause it to
call undefined.destroy(), since it was already removed from that
message.

Add a guard to OutgoingMessage.destroy and IncomingMessage.destroy
to prevent this error.

11 years agotest: fix dgram-bind-default-address on osx
isaacs [Fri, 19 Apr 2013 15:32:24 +0000 (08:32 -0700)]
test: fix dgram-bind-default-address on osx

Allow the IPv4-mapped-as-IPv6 style address.

11 years agocrypto: LazyTransform on properties, not methods
isaacs [Mon, 8 Apr 2013 15:43:20 +0000 (08:43 -0700)]
crypto: LazyTransform on properties, not methods

It needs to apply the Transform class when the _readableState,
_writableState, or _transformState properties are accessed,
otherwise things like setEncoding and on('data') don't work
properly.

Also, the methods wrappers are no longer needed, since they're only
problematic because they access the undefined properties.

11 years agosrc: fix potential memory leak on early return
mscdex [Sun, 21 Apr 2013 03:21:13 +0000 (23:21 -0400)]
src: fix potential memory leak on early return

11 years agosrc: don't initialize variable before assignment
mscdex [Sun, 21 Apr 2013 03:21:05 +0000 (23:21 -0400)]
src: don't initialize variable before assignment

11 years agocluster: clean up lib/cluster.js
Ben Noordhuis [Mon, 15 Apr 2013 12:17:17 +0000 (14:17 +0200)]
cluster: clean up lib/cluster.js

Clean up and DRY the cluster source code. Fix a few bugs while we're
here:

* Short-lived handles in long-lived worker processes were never
  reclaimed, resulting in resource leaks.

* Handles in the master process are now closed when the last worker
  that holds a reference to them quits. Previously, they were only
  closed at cluster shutdown.

* The cluster object no longer exposes functions/properties that are
  only valid in the 'other' process, e.g. cluster.fork() is no longer
  exported in worker processes.

So much goodness and still manages to reduce the line count from 590
to 320.

11 years agolint
isaacs [Fri, 19 Apr 2013 23:25:11 +0000 (16:25 -0700)]
lint

11 years agoevents: add EventEmitter.defaultMaxListeners
Ben Noordhuis [Fri, 4 May 2012 15:45:27 +0000 (17:45 +0200)]
events: add EventEmitter.defaultMaxListeners

Class property that controls the maximum number of listeners for all
instances of EventEmitter.

Fixes #3014.

Conflicts:
lib/events.js

11 years agov8: reapply floating patches
Ben Noordhuis [Mon, 8 Apr 2013 18:34:11 +0000 (20:34 +0200)]
v8: reapply floating patches

11 years agoV8: Upgrade to 3.18.1
isaacs [Fri, 19 Apr 2013 17:50:44 +0000 (10:50 -0700)]
V8: Upgrade to 3.18.1

11 years agopath: add path.isAbsolute(path)
Ryan Doenges [Sun, 14 Apr 2013 19:44:40 +0000 (12:44 -0700)]
path: add path.isAbsolute(path)

An absolute path will always open the same location regardless of your
current working directory. For posix, this just means path.charAt(0) ===
'/', but on Windows it's a little more complicated.

Fixes joyent/node#5299.

11 years agoblog: v0.11.1 does not work on windows x64
isaacs [Fri, 19 Apr 2013 16:21:29 +0000 (09:21 -0700)]
blog: v0.11.1 does not work on windows x64

11 years agoNow working on 0.11.2
isaacs [Fri, 19 Apr 2013 16:14:44 +0000 (09:14 -0700)]
Now working on 0.11.2

11 years agoMerge branch 'v0.11.1-release'
isaacs [Fri, 19 Apr 2013 16:14:24 +0000 (09:14 -0700)]
Merge branch 'v0.11.1-release'

11 years agoblog: Post about 0.11.1
isaacs [Fri, 19 Apr 2013 16:12:34 +0000 (09:12 -0700)]
blog: Post about 0.11.1

11 years agoblog: Post about 0.10.4
isaacs [Fri, 19 Apr 2013 16:12:22 +0000 (09:12 -0700)]
blog: Post about 0.10.4

11 years ago2013.04.19, Version 0.11.1 (Unstable) v0.11.1
isaacs [Fri, 19 Apr 2013 14:39:44 +0000 (07:39 -0700)]
2013.04.19, Version 0.11.1 (Unstable)

* V8: upgrade to 3.18.0

* uv: Upgrade to v0.11.1

* http: split into multiple separate modules (Timothy J Fontaine)

* http: escape unsafe characters in request path (Ben Noordhuis)

* url: Escape all unwise characters (isaacs)

* build: depend on v8 postmortem-metadata if enabled (Paddy Byers)

* etw: update prototypes to match dtrace provider (Timothy J Fontaine)

* buffer: change output of Buffer.prototype.toJSON() (David Braun)

* dtrace: actually use the _handle.fd value (Timothy J Fontaine)

* dtrace: pass more arguments to probes (Dave Pacheco)

* build: allow building with dtrace on osx (Dave Pacheco)

* zlib: allow passing options to convenience methods (Kyle Robinson Young)

11 years agotest: fix dgram-bind-default-address on osx
isaacs [Fri, 19 Apr 2013 15:32:24 +0000 (08:32 -0700)]
test: fix dgram-bind-default-address on osx

Allow the IPv4-mapped-as-IPv6 style address.

11 years agosrc: replace Holder() with This()
Trevor Norris [Thu, 18 Apr 2013 23:52:07 +0000 (16:52 -0700)]
src: replace Holder() with This()

Switch to always use args.This() to retrieve object instance.