platform/upstream/nodejs.git
10 years agov8: upgrade to 3.22.24.17
Trevor Norris [Thu, 23 Jan 2014 20:14:40 +0000 (12:14 -0800)]
v8: upgrade to 3.22.24.17

10 years agotls: process accumulated input
Fedor Indutny [Thu, 23 Jan 2014 12:55:28 +0000 (16:55 +0400)]
tls: process accumulated input

When creating TLSSocket on top of the regular socket that already
contains some received data, `_tls_wrap.js` should try to write all that
data to the internal `SSL*` instance.

fix #6940

10 years agonode: clear nextTickQueue when using domains
Trevor Norris [Wed, 22 Jan 2014 21:33:16 +0000 (13:33 -0800)]
node: clear nextTickQueue when using domains

When the domain specific code was reintroduced in 828f145 the
conditional to check and clear the nextTickQueue if many items had run
was not introduced. This allows for the application to run out of memory
if domains are being used in an infinite recursive loop.

10 years agodoc: skip type parsing inside code blocks
Vladimir Kurchatkin [Wed, 25 Dec 2013 15:59:25 +0000 (19:59 +0400)]
doc: skip type parsing inside code blocks

Since types are denoted with curly braces it can cause erroneous
replaces in code blocks.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agocrypto: remove duplicate ERR_load_crypto_strings()
Yorkie [Wed, 22 Jan 2014 12:48:46 +0000 (20:48 +0800)]
crypto: remove duplicate ERR_load_crypto_strings()

ERR_load_crypto_strings() registers the error strings for
all libcrypto functions, SSL_load_error_strings() does the
same, but also registers the libssl error strings.

10 years agotest: fix array sorting bug
Ben Noordhuis [Thu, 21 Nov 2013 12:23:43 +0000 (13:23 +0100)]
test: fix array sorting bug

`a === a.sort()` is always true because Array#sort() does an in-place
sort.  Make a copy of the array first.

10 years agocrypto: support custom pbkdf2 digest methods
Ben Noordhuis [Thu, 21 Nov 2013 10:29:07 +0000 (11:29 +0100)]
crypto: support custom pbkdf2 digest methods

Make the HMAC digest method configurable.  Update crypto.pbkdf2() and
crypto.pbkdf2Sync() to take an extra, optional digest argument.

Before this commit, SHA-1 (admittedly the most common method) was used
exclusively.

Fixes #6553.

10 years agonode: remove asyncStack
Trevor Norris [Tue, 21 Jan 2014 23:03:12 +0000 (15:03 -0800)]
node: remove asyncStack

Now that the context stores the active execution stack, and because
removeAsyncListener() always removed the AsyncListener from the queue
and the stack, there's no need to keep a stack around anymore. Instead
the active asyncQueue and the currentContext is able to handle it all.

Signed-off-by: Forrest L Norvell <ogd@aoaioxxysz.net>
10 years agonode: only run same AL once on error
Trevor Norris [Tue, 21 Jan 2014 23:28:23 +0000 (15:28 -0800)]
node: only run same AL once on error

Should have been included with 60fcc11 as it is the same type of fix.

Signed-off-by: Forrest L Norvell <ogd@aoaioxxysz.net>
10 years agopath: improve POSIX path.join() performance
Jo Liss [Tue, 21 Jan 2014 22:24:58 +0000 (22:24 +0000)]
path: improve POSIX path.join() performance

Performance gains are ~4x (~1.5us), but still much slower than a naive
approach. There is some duplicate work done between join(), normalize()
and normalizeArray() so additional optimizations are possible.

Note that this only improves the POSIX implementation.

Thanks to @isaacs and @othiym23 for helping with this optimization.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agocrypto: add newline to cert and key if not present
Fedor Indutny [Mon, 20 Jan 2014 00:37:15 +0000 (00:37 +0000)]
crypto: add newline to cert and key if not present

After one of OpenSSL updates we have stopped accepting PEM private keys
and certificates that doesn't end with a newline (`\n`) character.
Handle this regression in `crypto.js` to make less trouble to our users.

fix #6892

10 years agocrypto: throw only in direct C++ methods
Fedor Indutny [Sun, 19 Jan 2014 23:38:15 +0000 (23:38 +0000)]
crypto: throw only in direct C++ methods

Do not throw in internal C++ methods, that clobbers logic and may lead
to the situations, where both exception was thrown and the value was
returned (via `args.GetReturnValue().Set()`). That doesn't play nicely
with v8.

fix #6912

10 years agonode: `EmitExit` should not call `exit()`
Fedor Indutny [Sat, 18 Jan 2014 22:49:33 +0000 (22:49 +0000)]
node: `EmitExit` should not call `exit()`

Before this commit `RunAtExit` and `env->Dispose()` were never reached,
because `EmitExit` was always colling `exit`.

10 years agoaddons: build and test examples
Fedor Indutny [Sat, 18 Jan 2014 22:49:18 +0000 (22:49 +0000)]
addons: build and test examples

fix #6910

10 years agotext: give more time to test-next-tick-error-spin
Alexis Campailla [Tue, 14 Jan 2014 08:45:00 +0000 (00:45 -0800)]
text: give more time to test-next-tick-error-spin

The previous timeout was too short for certain execution conditions
(Windows, debug build, first execution).

10 years agotest: give test-net-GH-5504 more time to run
Alexis Campailla [Tue, 14 Jan 2014 08:29:57 +0000 (00:29 -0800)]
test: give test-net-GH-5504 more time to run

On Windows debug builds, the test was failing because the timeout
was too short.

10 years agonode: compare AsyncListener instances, not uid's
Trevor Norris [Tue, 21 Jan 2014 17:22:00 +0000 (09:22 -0800)]
node: compare AsyncListener instances, not uid's

Now that process.createAsyncListener() returns a unique object instance
it is no longer necessary to compare the uid's of the objects.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agonode: ensure same AL inst only runs once
Trevor Norris [Tue, 21 Jan 2014 06:53:56 +0000 (22:53 -0800)]
node: ensure same AL inst only runs once

It was possible that the same AL instance was run twice if it were both
attached to the currentContext then again added to the new asyncQueue
generated for the new stack.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agoasync_wrap/timers: remove Add/RemoveAsyncListener
Trevor Norris [Mon, 20 Jan 2014 21:20:11 +0000 (13:20 -0800)]
async_wrap/timers: remove Add/RemoveAsyncListener

The ability to add/remove an AsyncListener to an object after its
creation was an artifact of trying to get AL working with the domain
module. Now that is no longer necessary and other features are going to
be implemented that would be affected by this functionality. So the code
will be removed for now to simplify the implementation process.

In the future this code will likely be reintroduced, but after some
other more important matters have been addressed.

None of this functionality was documented, as is was meant specifically
for domain specific implementation work arounds.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agocrypto: remove most of the `node_isolate` uses
Fedor Indutny [Fri, 17 Jan 2014 23:08:47 +0000 (23:08 +0000)]
crypto: remove most of the `node_isolate` uses

All C++ code should be using `args.GetIsolate()` or `env->isolate()`.
Using static `node_isolate` var limits possible future functionality
(like multi-isolate support).

10 years agotest: relax timing in test-http-exit-delay
Alexis Campailla [Fri, 17 Jan 2014 14:28:47 +0000 (06:28 -0800)]
test: relax timing in test-http-exit-delay

This test was originally intended to guard against regressions for
commit 16b59cbc74c8fe2f8b30f3af4c2f885b7bfb6030.

As such, it only needs to ensure that process exit has not been held up
by the date cache timer, which would fire on the next second.

10 years agotest: debug-signal-cluster increase timeouts
Alexis Campailla [Mon, 13 Jan 2014 14:02:16 +0000 (06:02 -0800)]
test: debug-signal-cluster increase timeouts

The test needs a little more time to run so that it passes for all
builds (eg: Windows, debug)

10 years agodebug client: connect after child is ready
Alexis Campailla [Fri, 6 Dec 2013 16:58:15 +0000 (08:58 -0800)]
debug client: connect after child is ready

We now wait to connect to the debuggee until we know that
its error stream has data, to ensure that the output message
"connecting..... ok" appears after "Debugger listening on port xyz"

I also increased the test timeout to let the more complex
tests finish in time on Windows

This change fixes the following unit tests on Windows:
 test-debugger-repl.js\r test-debugger-repl-term.js\r test-debugger-repl-utf8.js
 test-debugger-repl-restart.js

10 years agotest: move debugger repl into own section
Timothy J Fontaine [Tue, 14 Jan 2014 01:24:14 +0000 (17:24 -0800)]
test: move debugger repl into own section

10 years agotest: refactor to use common testcfg
Timothy J Fontaine [Tue, 14 Jan 2014 01:09:12 +0000 (17:09 -0800)]
test: refactor to use common testcfg

10 years agotest: ignore tests when built without OpenSSL CLI
Fedor Indutny [Sat, 18 Jan 2014 12:18:25 +0000 (12:18 +0000)]
test: ignore tests when built without OpenSSL CLI

fix #6880

10 years agolib: introduce `.setMaxSendFragment(size)`
Fedor Indutny [Fri, 17 Jan 2014 18:46:49 +0000 (18:46 +0000)]
lib: introduce `.setMaxSendFragment(size)`

fix #6889

10 years agodoc: tls: note that SSLv2 is disabled by default
Ben Noordhuis [Mon, 20 Jan 2014 15:19:00 +0000 (16:19 +0100)]
doc: tls: note that SSLv2 is disabled by default

As of commit 39aa894, SSLv2 support is disabled by default.  Update
the documentation to reflect that.

10 years agodoc: tls: clarify server cipher list
Ben Noordhuis [Mon, 20 Jan 2014 15:12:37 +0000 (16:12 +0100)]
doc: tls: clarify server cipher list

* Make it clear that ECDHE-RSA-AES128-SHA256 and AES128-GCM-SHA256 are
  TLS v1.2 ciphers.

* Note that RC4 is under suspicion.

10 years agosrc: don't mark addon_register_func as dllimport
Ben Noordhuis [Wed, 15 Jan 2014 11:50:01 +0000 (12:50 +0100)]
src: don't mark addon_register_func as dllimport

addon_register_func and its cousin addon_context_register_func are type
definitions, dllimport and dllexport are name mangling directives, i.e.
they're quite unrelated concepts.  MinGW complains about mixing them
when cross-compiling native add-ons.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Bert Belder <bertbelder@gmail.com>
10 years agotls: make cert/pfx optional in tls.createServer()
Ben Noordhuis [Thu, 16 Jan 2014 17:06:56 +0000 (18:06 +0100)]
tls: make cert/pfx optional in tls.createServer()

Not all ciphers require the presence of a certificate.  Remove the
check in lib/_tls_wrap.js.

Fixes #6887.

10 years agotls: show human-readable error messages
Ben Noordhuis [Fri, 17 Jan 2014 17:15:36 +0000 (18:15 +0100)]
tls: show human-readable error messages

Before this commit, verification exceptions had err.message set to the
OpenSSL error code (e.g. 'UNABLE_TO_VERIFY_LEAF_SIGNATURE').

This commit moves the error code to err.code and replaces err.message
with a human-readable error.  Example:

    // before
    {
      message: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
    }

    // after
    {
      code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
      message: 'unable to verify the first certificate'
    }

UNABLE_TO_VERIFY_LEAF_SIGNATURE is a good example of why you want this:
the error code suggests that it's the last certificate that fails to
validate while it's actually the first certificate in the chain.

Going by the number of mailing list posts and StackOverflow questions,
it's a source of confusion to many people.

10 years agoMerge remote-tracking branch 'origin/v0.10'
Trevor Norris [Wed, 15 Jan 2014 21:49:55 +0000 (13:49 -0800)]
Merge remote-tracking branch 'origin/v0.10'

Conflicts:
lib/domain.js

10 years agodomains: exit() only affects active domains
Ryan Graham [Thu, 9 Jan 2014 05:19:31 +0000 (21:19 -0800)]
domains: exit() only affects active domains

domain.create().exit() should not clear the domain stack if the domain
instance does not exist within the stack.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agoblog: TJ is the new node core project lead
isaacs [Wed, 15 Jan 2014 17:03:45 +0000 (09:03 -0800)]
blog: TJ is the new node core project lead

10 years agogyp: fix build with python 2.6
Fedor Indutny [Mon, 13 Jan 2014 16:51:57 +0000 (16:51 +0000)]
gyp: fix build with python 2.6

fix #6859

10 years agodeps: update gyp to 1eae492b
Fedor Indutny [Mon, 13 Jan 2014 16:50:37 +0000 (16:50 +0000)]
deps: update gyp to 1eae492b

10 years agotest: terminate gracefully in cluster-net-send
Alexis Campailla [Mon, 13 Jan 2014 12:57:58 +0000 (04:57 -0800)]
test: terminate gracefully in cluster-net-send

Killing the worker without ensuring the socket was closed
was causing intermittent ECONNRESET errors.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 13 Jan 2014 22:56:41 +0000 (14:56 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 13 Jan 2014 22:56:12 +0000 (14:56 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
deps/uv/ChangeLog
deps/uv/build.mk
deps/uv/src/version.c
deps/uv/test/test-ipc.c
deps/v8/src/objects.cc
src/node.cc
src/node_os.cc

10 years agodoc: streams must be open to be passed to child
Sam Roberts [Thu, 9 Jan 2014 01:16:17 +0000 (17:16 -0800)]
doc: streams must be open to be passed to child

spawn stdio options can be a 'stream', but the following code
fails with "Incorrect value for stdio stream: [object Object]",
despite being a stream. The problem is the test isn't really
for a stream, its for an object with a numeric `.fd` property,
and streams do not have an fd until their async 'open' event
has occurred. This is reasonable, but was not documented.

    child_process.spawn('date', [], {stdio: [
      'ignore',
      fs.createWriteStream('out.txt',{flags:'a'}),
      'ignore']})

10 years agotest: close debug client in test-debugger-client
Alexis Campailla [Mon, 13 Jan 2014 21:16:25 +0000 (13:16 -0800)]
test: close debug client in test-debugger-client

Killing the debuggee without first closing the socket can result
in an ECONNRESET error.

10 years agohttp: concatenate duplicate headers by default
Alex Kocharin [Mon, 6 Jan 2014 07:59:40 +0000 (11:59 +0400)]
http: concatenate duplicate headers by default

10 years agosrc: return empty set on ENOSYS for interfaces
Timothy J Fontaine [Sun, 12 Jan 2014 18:04:21 +0000 (10:04 -0800)]
src: return empty set on ENOSYS for interfaces

If node was compiled with --no-ifaddrs to support older operating
systems, don't throw instead simply return an empty object

Fixes #6846

10 years agov8: backport codereview.chromium.org/11362182
svenpanne@chromium.org [Fri, 9 Nov 2012 11:30:05 +0000 (11:30 +0000)]
v8: backport codereview.chromium.org/11362182

Keep the number of descriptors below
DescriptorArray::kMaxNumberOfDescriptors even for accessors

Review URL: https://codereview.chromium.org/11362182

10 years agoutil: handle escaped forward slashes correctly
Tom Gallacher [Fri, 10 Jan 2014 19:53:47 +0000 (19:53 +0000)]
util: handle escaped forward slashes correctly

Fixes #6835

10 years agodoc: Fix argument typo in SimpleProtocol example
gluxon [Wed, 1 Jan 2014 21:26:14 +0000 (16:26 -0500)]
doc: Fix argument typo in SimpleProtocol example

10 years agodomain: fix off-by-one in Domain.exit()
Ryan Graham [Thu, 9 Jan 2014 05:36:54 +0000 (21:36 -0800)]
domain: fix off-by-one in Domain.exit()

We want to clear the found domain and the domains after it.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agohttp: use writev on chunked encoding
Trevor Norris [Sat, 7 Dec 2013 01:17:02 +0000 (17:17 -0800)]
http: use writev on chunked encoding

Now will process all write() that were done on a single tick in a single
writev().

10 years agotest: check RR scheduler has necessary methods
Jeff Barczewski [Thu, 9 Jan 2014 13:03:33 +0000 (07:03 -0600)]
test: check RR scheduler has necessary methods

The RR cluster scheduler replaces the normal StreamWrap handle. Because
of this the AsyncListener method failed to be in place when domains were
in use.

The issue was resolved in 828f145 by reverting having domains use
AsyncListeners.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agosrc: OnFatalError handler must abort()
Timothy J Fontaine [Thu, 9 Jan 2014 21:33:51 +0000 (13:33 -0800)]
src: OnFatalError handler must abort()

We are in an unrecoverable state if v8 throws a FatalError, actually
ask the operating system to dump core in this case.

Fixes #6836

10 years agonode: AsyncListener use separate storage mechanism
Trevor Norris [Fri, 3 Jan 2014 22:02:51 +0000 (14:02 -0800)]
node: AsyncListener use separate storage mechanism

Before when an AsyncListener object was created and the "create"
callback returned a value, it was necessary to construct a new Object
with the same callbacks but add a place for the new storage value.

Now, instead, a separate storage array is kept on the context which is
used for any return value of the "create" callback. This significantly
reduces the number of Objects that need to be created.

Also added a flags property to the context to quickly check if a
specific callback was available either on the context or on the
AsyncListener instance itself.

Few other minor changes for readability that were difficult to separate
into their own commit.

This has not been optimized yet.

10 years agosrc: revert domain using AsyncListeners
Trevor Norris [Thu, 9 Jan 2014 19:11:40 +0000 (11:11 -0800)]
src: revert domain using AsyncListeners

This is a slightly modified revert of bc39bdd.

Getting domains to use AsyncListeners became too much of a challenge
with many edge cases. While this is still a goal, it will have to be
deferred for now until more test coverage can be provided.

10 years agoconfigure: always set `arm_float_abi`
Fedor Indutny [Wed, 8 Jan 2014 21:08:29 +0000 (01:08 +0400)]
configure: always set `arm_float_abi`

When not specified as a configure flag, and not derived from system
configuration, `arm_float_abi` should be set to `'default'`.

fix #6789

10 years agochild_process: better error reporting for exec
Fedor Indutny [Sat, 4 Jan 2014 21:50:54 +0000 (01:50 +0400)]
child_process: better error reporting for exec

Report path to executable and argv on error, stderr is not enough in
many cases.

fix #6796

10 years agodeps: fix openssl assembly error on ia32 win32
Fedor Indutny [Wed, 8 Jan 2014 19:05:01 +0000 (23:05 +0400)]
deps: fix openssl assembly error on ia32 win32

`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

10 years agodoc: fix typo in cluster page
Lorenz Leutgeb [Mon, 6 Jan 2014 14:29:24 +0000 (15:29 +0100)]
doc: fix typo in cluster page

10 years agodeps: update openssl to 1.0.1f
Fedor Indutny [Mon, 6 Jan 2014 15:35:36 +0000 (19:35 +0400)]
deps: update openssl to 1.0.1f

10 years agouv: Upgrade to v0.10.22
Timothy J Fontaine [Tue, 7 Jan 2014 22:05:24 +0000 (14:05 -0800)]
uv: Upgrade to v0.10.22

10 years agobuild: unconditionally disable -Werror
Ben Noordhuis [Tue, 7 Jan 2014 16:51:41 +0000 (17:51 +0100)]
build: unconditionally disable -Werror

Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp
no longer works with newer versions of V8.

We support a wide range of compilers, it's simply not feasible to
squelch all warnings, never mind that the libraries in deps/ are
not under our control.

Fixes #6817.

10 years agonpm: Upgrade to 1.3.23
isaacs [Tue, 7 Jan 2014 01:02:07 +0000 (17:02 -0800)]
npm: Upgrade to 1.3.23

10 years agostream: writes may return false but forget to emit drain
ayanamist [Fri, 3 Jan 2014 11:37:16 +0000 (19:37 +0800)]
stream: writes may return false but forget to emit drain

If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.

If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.

So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.

10 years agodoc: Add forward secrecy section to TLS docs
Lorenz Leutgeb [Sun, 5 Jan 2014 11:07:54 +0000 (12:07 +0100)]
doc: Add forward secrecy section to TLS docs

This fixes confusion connected to comparison of ECDH
with RSA and wrong information on forward secrecy.

10 years agocrypto: introduce .setEngine(engine, [flags])
Fedor Indutny [Sat, 14 Dec 2013 11:28:07 +0000 (15:28 +0400)]
crypto: introduce .setEngine(engine, [flags])

10 years agonode: properly check uid when adding AsyncListener
Trevor Norris [Sat, 4 Jan 2014 00:46:09 +0000 (16:46 -0800)]
node: properly check uid when adding AsyncListener

Instead of checking the uid on the array index of the queue, instead the
object property "uid" was checked on the queue iteself. Because this
will always evaluate to "undefined" the same listener could be added
multiple times to the same context.

10 years agonode: change AsyncListener API
Trevor Norris [Fri, 3 Jan 2014 00:40:30 +0000 (16:40 -0800)]
node: change AsyncListener API

There was a flaw in the old API that has been fixed. Now the
asyncListener callback is now the "create" object property in the
callback object, and is optional.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Wed, 1 Jan 2014 00:28:49 +0000 (16:28 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agoblog: Post for v0.11.10
Timothy J Fontaine [Wed, 1 Jan 2014 00:24:58 +0000 (16:24 -0800)]
blog: Post for v0.11.10

10 years agoNow working on 0.11.11
Timothy J Fontaine [Wed, 1 Jan 2014 00:21:08 +0000 (16:21 -0800)]
Now working on 0.11.11

10 years agoMerge branch 'v0.11.10-release'
Timothy J Fontaine [Wed, 1 Jan 2014 00:20:58 +0000 (16:20 -0800)]
Merge branch 'v0.11.10-release'

10 years ago2013.12.31, Version 0.11.10 (Unstable) v0.11.10
Timothy J Fontaine [Tue, 31 Dec 2013 23:37:12 +0000 (15:37 -0800)]
2013.12.31, Version 0.11.10 (Unstable)

* http_parser: update to 2.2

* uv: Upgrade to v0.11.17

* v8: Upgrade to 3.22.24.10

* buffer: optimize writeInt* methods (Paul Loyd)

* child_process: better error handling (Alexis Campailla)

* cluster: do not synchronously emit 'setup' event (Sam Roberts)

* cluster: restore backwards compatibility and various fixes (Sam Roberts)

* crypto: remove unnecessary OpenSSL_add_all_digests (Yorkie)

* crypto: support GCM authenticated encryption mode. (Ingmar Runge)

* dns: add resolveSoa and 'SOA' rrtype (Tuğrul Topuz)

* events: move EE c'tor guts to EventEmitter.init (Bert Belder)

* http: DELETE shouldn't default to chunked encoding (Lalit Kapoor)

* http: parse the status message in a http response. (Cam Swords)

* node: fix removing AsyncListener in callback (Vladimir Kurchatkin)

* node: follow specification, zero-fill ArrayBuffers (Trevor Norris)

* openssl: use ASM optimized routines (Fedor Indutny)

* process: allow nextTick infinite recursion (Trevor Norris)

* querystring: remove `name` from `stringify()` (Yorkie)

* timers: setImmediate v8 optimization fix (pflannery)

* tls: add serialNumber to getPeerCertificate() (Ben Noordhuis)

* tls: reintroduce socket.encrypted (Fedor Indutny)

* tls: fix handling of asterisk in SNI context (Fedor Indutny)

* util: Format negative zero as '-0' (David Chan)

* vm: fix race condition in timeout (Alexis Campailla)

* windows: fix dns lookup of localhost with ipv6 (Alexis Campailla)

10 years agov8: Upgrade to 3.22.24.10
Timothy J Fontaine [Tue, 31 Dec 2013 23:02:38 +0000 (15:02 -0800)]
v8: Upgrade to 3.22.24.10

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Tue, 31 Dec 2013 22:57:46 +0000 (14:57 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agodoc: document that `process.send` is synchronous
Maciej Małecki [Tue, 12 Nov 2013 10:28:44 +0000 (11:28 +0100)]
doc: document that `process.send` is synchronous

Ref #2598

10 years agodoc: clarify process on exit safe usage
Timothy J Fontaine [Tue, 31 Dec 2013 22:48:20 +0000 (14:48 -0800)]
doc: clarify process on exit safe usage

10 years agodocs: process.on('exit') receives exit code
Ron Korving [Wed, 6 Nov 2013 03:23:35 +0000 (12:23 +0900)]
docs: process.on('exit') receives exit code

The fact that the "exit" event passes the exit code as an argument
as omitted from the documentation. This adds the explanation and
augments the example code to show that.

10 years agodns: add resolveSoa and 'SOA' rrtype
Tuğrul Topuz [Mon, 21 Oct 2013 13:47:57 +0000 (16:47 +0300)]
dns: add resolveSoa and 'SOA' rrtype

You can now query for SOA records by either passing 'SOA' to `resolve`
or by using the new `resolveSoa`

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Tue, 31 Dec 2013 21:56:15 +0000 (13:56 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
lib/cluster.js
lib/dgram.js
lib/net.js

10 years agotest: fix test-cluster-eaccess to work on windows
Timothy J Fontaine [Tue, 31 Dec 2013 19:57:13 +0000 (11:57 -0800)]
test: fix test-cluster-eaccess to work on windows

10 years agotest: fix assumption of worker exit on disconnect
Sam Roberts [Tue, 31 Dec 2013 05:36:49 +0000 (21:36 -0800)]
test: fix assumption of worker exit on disconnect

Master was disconnecting its workers as soon as they both started up.
Meanwhile, the workers were trying to listen. Its a race, sometimes the
disconnect would happen between when worker gets the response message,
and acks that message with a 'listening'. This worked OK after v0.11
introduced a behaviour where disconnect would always exit the worker,
but once that backwards-incompatible behaviour is removed, the worker
lives long enough to try and respond to the master, and child_process
errors at the attempt to send from a disconnected child.

10 years agocluster: do not synchronously emit 'setup' event
Sam Roberts [Wed, 18 Dec 2013 00:04:20 +0000 (16:04 -0800)]
cluster: do not synchronously emit 'setup' event

This is a problem present in both v0.10, and v0.11, where the 'setup'
event is synchronously emitted by `cluster.setupMaster()`, a mostly
harmless anti-pattern.

10 years agocluster: only forcibly exit worker on unclean exit
Sam Roberts [Tue, 3 Dec 2013 03:00:39 +0000 (19:00 -0800)]
cluster: only forcibly exit worker on unclean exit

Fix inadvertent v0.11 changes to the definition of suicide, particularly
the relationship between suicide state, the disconnect event, and when
exit should occur.

In v0.10, workers don't forcibly exit on disconnect, it doesn't give
them time to do a graceful finish of open client connections, they exit
under normal node rules - when there is nothing left to do. But on
unexpected disconnect they do exit so the workers aren't left around
after the master.

Note that a test as-written was invalid, it failed against the v0.10
cluster API, demonstrating that it was an undocumented API change.

10 years agocluster: disconnect callback should always occur
Sam Roberts [Thu, 12 Dec 2013 18:34:16 +0000 (10:34 -0800)]
cluster: disconnect callback should always occur

Fixes issue in 0.11 where callback doesn't occur if worker count is
currently zero.  In 0.10 callback occurs after worker count is zero, and
occurs in next tick if worker count is currently zero.

10 years agocluster: replace erroneous comma with semicolon
Sam Roberts [Tue, 3 Dec 2013 01:24:58 +0000 (17:24 -0800)]
cluster: replace erroneous comma with semicolon

10 years agouv: Upgrade to v0.11.17
Timothy J Fontaine [Tue, 31 Dec 2013 18:33:54 +0000 (10:33 -0800)]
uv: Upgrade to v0.11.17

10 years agocluster: report more errors to workers
Fedor Indutny [Fri, 27 Dec 2013 17:20:52 +0000 (21:20 +0400)]
cluster: report more errors to workers

Some errors for listening and binding to a socket were not properly
delivered to workers.

fix #6767

10 years agodoc: Fix doc heading for 'response' event
Benjamin Waters [Tue, 31 Dec 2013 00:51:51 +0000 (19:51 -0500)]
doc: Fix doc heading for 'response' event

Add colon to event heading to ensure it matches other events.

Fixes joyent/node#5687

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 30 Dec 2013 23:55:47 +0000 (15:55 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agodeps: update gyp to 828ce09
Fedor Indutny [Wed, 18 Dec 2013 14:58:47 +0000 (18:58 +0400)]
deps: update gyp to 828ce09

10 years agotimers: setImmediate v8 optimization fix
pflannery [Tue, 10 Dec 2013 05:01:25 +0000 (05:01 +0000)]
timers: setImmediate v8 optimization fix

Prevent v8 disabling optimization for scenario "bad value context for
arguments value".

Solves #6631

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agodoc: Fix missing backtick in debugger doc
Dav Glass [Wed, 24 Jul 2013 18:17:28 +0000 (13:17 -0500)]
doc: Fix missing backtick in debugger doc

10 years agoquerystring: remove `name` from `stringify()`
Yorkie [Sat, 28 Dec 2013 12:59:57 +0000 (20:59 +0800)]
querystring: remove `name` from `stringify()`

QueryString.stringify() allowed a fourth argument that was used as a
conditional in the return value, but was undocumented, not used by core
and always was always false/undefiend. So the argument and conditional
have been removed.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agobuild: add settings for VS 2013 to vcbuild.bat
Lev Gimelfarb [Fri, 27 Dec 2013 19:39:55 +0000 (14:39 -0500)]
build: add settings for VS 2013 to vcbuild.bat

Search for VS2013 compiler 1st, before falling back to older ones. This
allows compiling using the latest VS2013.

10 years agodeps: update gyp to 828ce09
Fedor Indutny [Wed, 18 Dec 2013 14:58:47 +0000 (18:58 +0400)]
deps: update gyp to 828ce09

10 years agodoc: Missing word 'are' in documentation
Benjamin Waters [Thu, 26 Dec 2013 03:08:10 +0000 (22:08 -0500)]
doc: Missing word 'are' in documentation

Fix simple spelling mistake in documentation.

fix #5808

10 years agonpm: Upgrade to v1.3.22
isaacs [Thu, 26 Dec 2013 03:15:23 +0000 (19:15 -0800)]
npm: Upgrade to v1.3.22

10 years agosrc: only access stack of non-null errors
Vladimir Kurchatkin [Mon, 23 Dec 2013 06:18:08 +0000 (10:18 +0400)]
src: only access stack of non-null errors

Avoid segmentation fault when `null` is thrown

10 years agoutil: introduce CHECK_EQ/CHECK_NE
Fedor Indutny [Thu, 19 Dec 2013 06:02:19 +0000 (10:02 +0400)]
util: introduce CHECK_EQ/CHECK_NE

10 years agoRevert "util: more strict check for bool/number/string"
Trevor Norris [Fri, 20 Dec 2013 21:44:56 +0000 (13:44 -0800)]
Revert "util: more strict check for bool/number/string"

This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.

10 years agotls: reintroduce socket.encrypted
Fedor Indutny [Thu, 19 Dec 2013 09:04:34 +0000 (13:04 +0400)]
tls: reintroduce socket.encrypted

Just a property that is always `true` for TLS sockets.

fix #6735