platform/upstream/nodejs.git
11 years agosrc: upgrade to new v8 api
Trevor Norris [Wed, 22 May 2013 20:04:41 +0000 (13:04 -0700)]
src: upgrade to new v8 api

Small change that Context::New requires an isolate and returns Local
instead of Persistent.

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 v3.19.3
Trevor Norris [Wed, 22 May 2013 19:56:12 +0000 (12:56 -0700)]
v8: upgrade to v3.19.3

11 years agotest: Fix test-deprecation-flags
isaacs [Wed, 22 May 2013 18:42:38 +0000 (11:42 -0700)]
test: Fix test-deprecation-flags

Test typos missed in util deprecation commit

11 years agoutil: Add debuglog, deprecate console lookalikes
isaacs [Tue, 21 May 2013 22:22:05 +0000 (15:22 -0700)]
util: Add debuglog, deprecate console lookalikes

11 years agoMerge remote-tracking branch ry/v0.10 into master
isaacs [Mon, 20 May 2013 21:43:14 +0000 (14:43 -0700)]
Merge remote-tracking branch ry/v0.10 into master

Conflicts:
AUTHORS
ChangeLog
src/node_crypto.cc
src/node_version.h

11 years agocrypto: Clear error after DiffieHellman key errors
isaacs [Sat, 18 May 2013 00:19:12 +0000 (17:19 -0700)]
crypto: Clear error after DiffieHellman key errors

Fixes #5499

11 years agostring_bytes: strip padding from base64 strings
Trevor Norris [Mon, 20 May 2013 19:35:31 +0000 (12:35 -0700)]
string_bytes: strip padding from base64 strings

Because of variations in different base64 implementation, it's been
decided to strip all padding from the end of a base64 string and
calculate its size from that.

11 years agotls: add localAddress and localPort properties
Ben Noordhuis [Mon, 20 May 2013 13:14:30 +0000 (15:14 +0200)]
tls: add localAddress and localPort properties

Add localAddress and localPort properties to tls.CleartextStream.
Like remoteAddress and localPort, delegate to the backing net.Socket
object.

Refs #5502.

11 years agosrc: Remove superfluous static_cast
isaacs [Fri, 17 May 2013 23:58:05 +0000 (16:58 -0700)]
src: Remove superfluous static_cast

11 years agomodule: use path.sep instead of a custom solution
Robert Kowalski [Fri, 17 May 2013 18:20:20 +0000 (20:20 +0200)]
module: use path.sep instead of a custom solution

Instead of using a custom solution we can use path.sep in
Module._nodeModulePaths

11 years agoblog: Release 0.10.7
isaacs [Fri, 17 May 2013 21:38:02 +0000 (14:38 -0700)]
blog: Release 0.10.7

11 years agoNow working on 0.10.8
isaacs [Fri, 17 May 2013 21:37:44 +0000 (14:37 -0700)]
Now working on 0.10.8

11 years agoMerge branch 'v0.10.7-release' into v0.10
isaacs [Fri, 17 May 2013 21:37:28 +0000 (14:37 -0700)]
Merge branch 'v0.10.7-release' into v0.10

11 years agoMerge remote-tracking branch 'ry/v0.10' into master
isaacs [Fri, 17 May 2013 20:04:02 +0000 (13:04 -0700)]
Merge remote-tracking branch 'ry/v0.10' into master

Conflicts:
AUTHORS
ChangeLog
deps/uv/ChangeLog
deps/uv/config-unix.mk
deps/uv/src/unix/stream.c
deps/uv/src/version.c
deps/uv/uv.gyp
src/node.cc
src/node_buffer.cc
src/node_crypto.cc
src/node_version.h
src/stream_wrap.cc
src/stream_wrap.h

11 years ago2013.05.17, Version 0.10.7 (Stable) v0.10.7
isaacs [Fri, 17 May 2013 20:59:10 +0000 (13:59 -0700)]
2013.05.17, Version 0.10.7 (Stable)

* uv: upgrade to v0.10.7

* npm: Upgrade to 1.2.21

* crypto: Don't ignore verify encoding argument (isaacs)

* buffer, crypto: fix default encoding regression (Ben Noordhuis)

* timers: fix setInterval() assert (Ben Noordhuis)

11 years agodoc: Fix link to open issues on GitHub.
Brandon Frohs [Thu, 16 May 2013 14:03:25 +0000 (11:03 -0300)]
doc: Fix link to open issues on GitHub.

11 years agocrypto: Don't ignore verify encoding argument
isaacs [Fri, 17 May 2013 20:55:29 +0000 (13:55 -0700)]
crypto: Don't ignore verify encoding argument

11 years agofs_event: use cached Persistent syms instead
Trevor Norris [Thu, 16 May 2013 22:45:53 +0000 (15:45 -0700)]
fs_event: use cached Persistent syms instead

Instead of String::New every time, use a Persistent sym. This can be
accomplished in two ways:

1) Local<String> str = *persistent_str_sym;

2) Handle<String> str = persistent_str_sym;

I've chosen to use the latter method for simplicity's sake.

Other small changes include creating syms on Initialize and removing
unnecessary Local casting on return values.

11 years agosrc: add node_isolates
Trevor Norris [Thu, 16 May 2013 22:58:33 +0000 (15:58 -0700)]
src: add node_isolates

Few primitives weren't being passed node_isolate. Adding them for
consistency.

11 years agobuffer, crypto: fix default encoding regression
Ben Noordhuis [Wed, 15 May 2013 15:52:00 +0000 (17:52 +0200)]
buffer, crypto: fix default encoding regression

The default encoding is 'buffer'. When the input is a string, treat it
as 'binary'. Fixes the following assertion:

  node: ../src/string_bytes.cc:309: static size_t
  node::StringBytes::StorageSize(v8::Handle<v8::Value>, node::encoding):
  Assertion `0 && "buffer encoding specified but string provided"'
  failed.

Introduced in 64fc34b2.

Fixes #5482.

11 years agodoc: fix missing Class in header
Ryuichi Okumura [Sun, 7 Apr 2013 08:40:55 +0000 (17:40 +0900)]
doc: fix missing Class in header

11 years agodoc: fix the link to Stream document
Ryuichi Okumura [Sun, 7 Apr 2013 08:19:50 +0000 (17:19 +0900)]
doc: fix the link to Stream document

11 years agohttp: don't slice unless necessary
Trevor Norris [Wed, 15 May 2013 21:58:14 +0000 (14:58 -0700)]
http: don't slice unless necessary

The incoming Buffer was being sliced just to possibly not be used.
Instead place the .slice inside the conditional to not be created unless
necessary.

11 years agodtrace: enable uv's probes if enabled
Timothy J Fontaine [Tue, 16 Apr 2013 23:18:07 +0000 (16:18 -0700)]
dtrace: enable uv's probes if enabled

11 years agotimers: fix setInterval() assert
Ben Noordhuis [Thu, 21 Mar 2013 11:19:03 +0000 (12:19 +0100)]
timers: fix setInterval() assert

Test case:

  var t = setInterval(function() {}, 1);
  process.nextTick(t.unref);

Output:

  Assertion failed: (args.Holder()->InternalFieldCount() > 0),
  function Unref, file ../src/handle_wrap.cc, line 78.

setInterval() returns a binding layer object. Make it stop doing that,
wrap the raw process.binding('timer_wrap').Timer object in a Timeout
object.

Fixes #4261.

11 years agomodule: use path.sep instead of custom solution
Robert Kowalski [Sat, 11 May 2013 20:43:11 +0000 (22:43 +0200)]
module: use path.sep instead of custom solution

Instead of using a custom solution for path delimiters we can use
path.sep in Module._initPaths

11 years agohttp: don't escape request path, reject bad chars
Ben Noordhuis [Wed, 15 May 2013 20:25:45 +0000 (22:25 +0200)]
http: don't escape request path, reject bad chars

Commit 38149bb changes http.get() and http.request() to escape unsafe
characters. However, that creates an incompatibility with v0.10 that
is difficult to work around: if you escape the path manually, then in
v0.11 it gets escaped twice. Change lib/http.js so it no longer tries
to fix up bad request paths, simply reject them with an exception.

The actual check is rather basic right now. The full check for illegal
characters is difficult to implement efficiently because it requires a
few characters of lookahead. That's why it currently only checks for
spaces because those are guaranteed to create an invalid request.

Fixes #5474.

11 years agonet: emit dns 'lookup' event before connect
Ben Noordhuis [Tue, 7 May 2013 18:55:12 +0000 (11:55 -0700)]
net: emit dns 'lookup' event before connect

net.connect() and net.createConnection() now emit a 'lookup' event
after resolving the hostname but before connecting.

Fixes #5418.

11 years agodeps: fix up header files in cares.gyp
Ben Noordhuis [Wed, 15 May 2013 20:46:49 +0000 (22:46 +0200)]
deps: fix up header files in cares.gyp

Please msbuild, update the header list.

11 years agodeps: reapply c-ares floating patch
Ben Noordhuis [Wed, 15 May 2013 19:25:11 +0000 (21:25 +0200)]
deps: reapply c-ares floating patch

11 years agodoc: improve exports/module.exports consistency
Ryan Graham [Mon, 8 Apr 2013 16:59:58 +0000 (09:59 -0700)]
doc: improve exports/module.exports consistency

While they reference the same object, they are only interchangeable
for updates, not assignment.

11 years agodoc: clarify exports and module.exports
Ryan Graham [Mon, 8 Apr 2013 16:59:15 +0000 (09:59 -0700)]
doc: clarify exports and module.exports

When exporting a single function you must use `module.exports` instead
of the `exports` convenience reference.

11 years agouv: upgrade to v0.11.3
Bert Belder [Wed, 15 May 2013 00:13:42 +0000 (17:13 -0700)]
uv: upgrade to v0.11.3

11 years agouv: upgrade to v0.10.7
Bert Belder [Tue, 14 May 2013 23:52:47 +0000 (16:52 -0700)]
uv: upgrade to v0.10.7

11 years agouv: Upgrade to 0.10.6
isaacs [Tue, 14 May 2013 21:41:41 +0000 (14:41 -0700)]
uv: Upgrade to 0.10.6

11 years agonpm: Upgrade to 1.2.21
isaacs [Tue, 14 May 2013 21:37:59 +0000 (14:37 -0700)]
npm: Upgrade to 1.2.21

11 years agoblog: Release 0.10.6
isaacs [Tue, 14 May 2013 21:35:14 +0000 (14:35 -0700)]
blog: Release 0.10.6

11 years agoNow working on v0.10.7
isaacs [Tue, 14 May 2013 21:33:56 +0000 (14:33 -0700)]
Now working on v0.10.7

11 years agoMerge branch 'v0.10.6-release' into v0.10
isaacs [Tue, 14 May 2013 21:33:33 +0000 (14:33 -0700)]
Merge branch 'v0.10.6-release' into v0.10

11 years agodns: add getServers and setServers
Timothy J Fontaine [Wed, 8 May 2013 19:56:08 +0000 (12:56 -0700)]
dns: add getServers and setServers

getServers returns an array of ips that are currently being used for
resolution

setServers takes an array of ips that are to be used for resolution,
this will throw if there's invalid input but preserve the original
configuration

11 years agocrypto: Pass encodings for Hmac digest
isaacs [Fri, 3 May 2013 01:38:04 +0000 (18:38 -0700)]
crypto: Pass encodings for Hmac digest

11 years ago2013.05.14, Version 0.10.6 (Stable) v0.10.6
isaacs [Tue, 14 May 2013 18:42:16 +0000 (11:42 -0700)]
2013.05.14, Version 0.10.6 (Stable)

* module: Deprecate require.extensions (isaacs)

* stream: make Readable.wrap support objectMode, empty streams (Daniel Moore)

* child_process: fix handle delivery (Ben Noordhuis)

* crypto: Fix performance regression (isaacs)

* src: DRY string encoding/decoding (isaacs)

11 years agocrypto: Pass encodings to C++ for Sign/Verify
isaacs [Fri, 3 May 2013 01:34:25 +0000 (18:34 -0700)]
crypto: Pass encodings to C++ for Sign/Verify

11 years agocrypto: use StringBytes::Encode
isaacs [Thu, 2 May 2013 22:32:32 +0000 (15:32 -0700)]
crypto: use StringBytes::Encode

11 years agocrypto: Pass strings to binding layer directly
isaacs [Thu, 2 May 2013 19:28:48 +0000 (12:28 -0700)]
crypto: Pass strings to binding layer directly

11 years agobuffer: DRY string encoding using StringBytes
isaacs [Thu, 2 May 2013 17:44:45 +0000 (10:44 -0700)]
buffer: DRY string encoding using StringBytes

This also templatizes the Buffer::*Slice functions, and the template
function probably cannot be safely used outside of Node.  However, it
also SHOULD not be used outside of Node, so this is arguably a feature
as well as a caveat.

11 years agosrc: use StringBytes for DecodeWrite/DecodeBytes/Encode
isaacs [Thu, 2 May 2013 17:49:20 +0000 (10:49 -0700)]
src: use StringBytes for DecodeWrite/DecodeBytes/Encode

Bonus: this makes node::Encode actually work properly with base64,
ucs2, hex, etc.

11 years agosrc: Use StringBytes in StreamWrap
isaacs [Wed, 1 May 2013 22:40:13 +0000 (15:40 -0700)]
src: Use StringBytes in StreamWrap

11 years agosrc: Add StringBytes static util class
isaacs [Wed, 1 May 2013 22:40:43 +0000 (15:40 -0700)]
src: Add StringBytes static util class

Four functions:

- StringBytes::StorageSize()
- StringBytes::Size()
- StringBytes::Write()
- StringBytes::Encode()

11 years agotools: remove unnecessary cpplint rules
isaacs [Wed, 1 May 2013 22:36:09 +0000 (15:36 -0700)]
tools: remove unnecessary cpplint rules

We don't actually care about header order much, and since we never use
stl classes, 'string' isn't an issue for node ever.

11 years agostream: Make default encoding configurable
isaacs [Thu, 2 May 2013 19:25:50 +0000 (12:25 -0700)]
stream: Make default encoding configurable

Pretty much everything assumes strings to be utf-8, but crypto
traditionally used binary strings, so we need to keep the default
that way until most users get off of that pattern.

11 years agostream: don't create unnecessary buffers in Readable
isaacs [Tue, 30 Apr 2013 22:09:54 +0000 (15:09 -0700)]
stream: don't create unnecessary buffers in Readable

If there is an encoding, and we do 'stream.push(chunk, enc)', and the
encoding argument matches the stated encoding, then we're converting from
a string, to a buffer, and then back to a string.  Of course, this is a
completely pointless bit of work, so it's best to avoid it when we know
that we can do so safely.

11 years agolint
isaacs [Tue, 30 Apr 2013 22:02:19 +0000 (15:02 -0700)]
lint

11 years agobenchmark: hash stream
isaacs [Tue, 30 Apr 2013 21:50:21 +0000 (14:50 -0700)]
benchmark: hash stream

11 years agoblog: Release v0.11.2
isaacs [Tue, 14 May 2013 18:35:43 +0000 (11:35 -0700)]
blog: Release v0.11.2

11 years agotest: increase workers to 8 in cluster-disconnect
Benoit Vallée [Tue, 30 Apr 2013 04:25:23 +0000 (12:25 +0800)]
test: increase workers to 8 in cluster-disconnect

Increasing the number of workers from 2 to 8 makes this test
more likely to trigger race conditions. See #5330 for background.

11 years agodoc: clarify subsystems in CONTRIBUTING.md
Ben Noordhuis [Tue, 14 May 2013 10:31:38 +0000 (12:31 +0200)]
doc: clarify subsystems in CONTRIBUTING.md

11 years agodeps: upgrade c-ares to 1.10.0
Ben Noordhuis [Mon, 13 May 2013 23:54:58 +0000 (01:54 +0200)]
deps: upgrade c-ares to 1.10.0

11 years agoNow working on 0.11.3
isaacs [Mon, 13 May 2013 22:54:19 +0000 (15:54 -0700)]
Now working on 0.11.3

11 years agoMerge branch 'v0.11.2-release'
isaacs [Mon, 13 May 2013 22:54:05 +0000 (15:54 -0700)]
Merge branch 'v0.11.2-release'

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.