platform/upstream/nodejs.git
8 years agodoc: improvements to errors.markdown copy
James M Snell [Mon, 28 Dec 2015 19:42:05 +0000 (11:42 -0800)]
doc: improvements to errors.markdown copy

General improvements to errors.markdown including
improved/revised examples

PR-URL: https://github.com/nodejs/node/pull/4454
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc: improvements to dns.markdown copy
James M Snell [Sun, 27 Dec 2015 07:19:45 +0000 (23:19 -0800)]
doc: improvements to dns.markdown copy

General improvements to dns.markdown copy and examples

PR-URL: https://github.com/nodejs/node/pull/4449
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
8 years agodoc: add anchors for _transform _flush _writev in stream.markdown
iamchenxin [Mon, 28 Dec 2015 13:19:59 +0000 (21:19 +0800)]
doc: add anchors for _transform _flush _writev in stream.markdown

PR-URL: https://github.com/nodejs/node/pull/4448
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unused assert module imports
Rich Trott [Sun, 27 Dec 2015 06:45:46 +0000 (22:45 -0800)]
test: remove unused assert module imports

Many test modules load assert but do not use it. This change removes
those instances.

It also removes a handful of other unused variables when they were
nearby.

PR-URL: https://github.com/nodejs/node/pull/4438
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agochild_process: guard against race condition
Rich Trott [Thu, 24 Dec 2015 21:00:29 +0000 (13:00 -0800)]
child_process: guard against race condition

It is possible that the internal hnadleMessage() might try to send to
a channel that has been closed. The result can be an AssertionError.
Guard against this.

Fixes: https://github.com/nodejs/node/issues/4205
PR-URL: https://github.com/nodejs/node/pull/4418
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agohttp: use `self.keepAlive` instead of `self.options.keepAlive`
Damian Schenkelman [Wed, 23 Dec 2015 23:52:01 +0000 (20:52 -0300)]
http: use `self.keepAlive` instead of `self.options.keepAlive`

In http.agent, all other options are directly accessed through
`self.` not `self.options`.

PR-URL: https://github.com/nodejs/node/pull/4407
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unused var from test-assert.js
Rich Trott [Wed, 23 Dec 2015 21:09:34 +0000 (13:09 -0800)]
test: remove unused var from test-assert.js

`aethrow` is defined as a function returned from makeBlock() but the
function is never used and the call to makeBlock() does not run any
tests.

PR-URL: https://github.com/nodejs/node/pull/4405
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agorepl: remove unused function
Rich Trott [Wed, 23 Dec 2015 19:34:07 +0000 (11:34 -0800)]
repl: remove unused function

replStart() was defined but never used. The function has been removed.
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
8 years agohttps: use `servername` in agent key
Fedor Indutny [Tue, 22 Dec 2015 18:22:52 +0000 (13:22 -0500)]
https: use `servername` in agent key

https requests with different SNI values should not be sent over the
same connection, even if the `host` is the same. Server may want to
present different certificate or route the incoming TLS connection
differently, depending on the received servername extension.

Fix: https://github.com/nodejs/node/issues/3940
PR-URL: https://github.com/nodejs/node/pull/4389
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agobuffer: refactor create buffer
Jackson Tian [Fri, 18 Dec 2015 02:09:15 +0000 (10:09 +0800)]
buffer: refactor create buffer

Use createBuffer to reduce new Uint8Array()
and setPrototypeOf.

PR-URL: https://github.com/nodejs/node/pull/4340
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agoassert: typed array deepequal performance fix
Claudio Rodriguez [Thu, 17 Dec 2015 13:05:45 +0000 (10:05 -0300)]
assert: typed array deepequal performance fix

assert.deepEqual: when actual and expected are typed arrays,
wrap them in a new Buffer each to increase performance
significantly.

PR-URL: https://github.com/nodejs/node/pull/4330
Fixes: https://github.com/nodejs/node/issues/4294
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agobuffer: faster case for create Buffer from new Buffer(0)
Jackson Tian [Thu, 17 Dec 2015 09:44:34 +0000 (17:44 +0800)]
buffer: faster case for create Buffer from new Buffer(0)

When create Buffer from a Buffer will copy data
from old to new even though length is zero.

This patch can improve edge case 4x faster.
following is benchmark results.

new: buffers/buffer_zero.js n=1024: 2463.53891
old: buffers/buffer_zero.js n=1024: 618.70801

PR-URL: https://github.com/nodejs/node/pull/4326
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttp: Remove an unnecessary assignment
Bo Borgerson [Thu, 17 Dec 2015 02:31:38 +0000 (18:31 -0800)]
http: Remove an unnecessary assignment

This just removes an assignment to `ret` of a value that's not used before
it's overwritten.  Immediately following the assigment is an `if/else` in
which both branches assign to `ret` without using it.

PR-URL: https://github.com/nodejs/node/pull/4323
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agoos: fix crash in GetInterfaceAddresses
Martin Bark [Mon, 14 Dec 2015 21:36:21 +0000 (21:36 +0000)]
os: fix crash in GetInterfaceAddresses

If uv_interface_addresses() returns UV_ENOSYS then interfaces and count
are uninitialised. This can cause a segmentation fault inside
GetInterfaceAddresses when it tries to use the invalid interfaces[].
Fix the issue by returning from GetInterfaceAddresses on the UV_ENOSYS
error.

This issue was observed when using uCLibc-ng version 1.0.9 because
uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly
undefines HAVE_IFADDRS_H.

Signed-off-by: Martin Bark <martin@barkynet.com>
PR-URL: https://github.com/nodejs/node/pull/4272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agotest: add test-domain-exit-dispose-again back
Julien Gilli [Sat, 12 Dec 2015 01:43:04 +0000 (17:43 -0800)]
test: add test-domain-exit-dispose-again back

1c8584997346d549dd5ff4bb787f48f52440a9cb "fixed"
test-domain-exit-dispose-again by changing its logic to test that
process.domain was cleared properly in case an error was thrown from a
timer's callback.

However, it became clear when reviewing a recent change that refactors
lib/timers.js that it was not quite the intention of the original test.
Thus, this change adds the original implementation of
test-domain-exit-dispose-again back, with comments that make its
implementation easier to understand.

It also preserve the changes made by
1c8584997346d549dd5ff4bb787f48f52440a9cb, but it moves them to a new
test file named test-timers-reset-process-domain-on-throw.js.

PR: #4256
PR-URL: https://github.com/nodejs/node/pull/4256
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agohttp: remove excess calls to removeSocket
Dave [Sun, 6 Dec 2015 12:55:02 +0000 (04:55 -0800)]
http: remove excess calls to removeSocket

socket.destroy() triggers a 'close' event from the socket which triggers
the onClose handler of HTTPAgent which calls self.removeSocket(). So by
calling self.removeSocket() prior to socket.destroy() we end up with two
calls to self.removeSocket().

If there are pending requests, removeSocket ends up creating a new socket.
So if there are pending requests, each time a request completes, we tear
down one socket and create two more. So the total number of sockets grows
exponentially and without regard for any maxSockets settings. This was
noticed in https://github.com/nodejs/node/issues/4050. Let's get rid of
the extra calls to removeSocket so we only call it once per completed
request.

PR-URL: https://github.com/nodejs/node/pull/4172
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agocrypto: load PFX chain the same way as regular one
Fedor Indutny [Sat, 5 Dec 2015 21:53:30 +0000 (16:53 -0500)]
crypto: load PFX chain the same way as regular one

Load the certificate chain from the PFX file the same as we do it for a
regular certificate chain.

Fix: #4127
PR-URL: https://github.com/nodejs/node/pull/4165
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agorepl: Fixed node repl history edge case.
Mudit Ameta [Tue, 1 Dec 2015 20:49:01 +0000 (02:19 +0530)]
repl: Fixed node repl history edge case.

If the deprecated NODE_REPL_HISTORY_FILE is set to default
node history file path ($HOME/.node_repl_history) and the file
doesn't exist, then node creates the file and then crashes when
it tries to parse that file as JSON thinking that it's an older
JSON formatted history file. This fixes that bug.

This patch also prevents node repl from throwing if the old
history file is empty or if $HOME/.node_repl_history is empty.

Fixes: https://github.com/nodejs/node/issues/4102
PR-URL: https://github.com/nodejs/node/pull/4108
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agochild_process: flush consuming streams
Dave [Mon, 30 Nov 2015 10:41:51 +0000 (02:41 -0800)]
child_process: flush consuming streams

When a client calls read() with a nonzero argument
on a Socket, that Socket sets this._consuming to true.
It never sets this._consuming back to false.
ChildProcess.flushStdio() currently doesn't flush
any streams where _consuming is truthy. But, that means
that it never flushes any stream that has ever been read from.
This prevents a child process from ever closing if one of
its streams has been read from, causing issue #4049. This
commit allows consuming streams to be flushed, and the
child process to emit a close event.

Fixes: https://github.com/nodejs/node/issues/4049
PR-URL: https://github.com/nodejs/node/pull/4071
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agoutil: faster arrayToHash
Jackson Tian [Sun, 22 Nov 2015 09:08:45 +0000 (17:08 +0800)]
util: faster arrayToHash

The `util.format()` is used frequently, make the method faster
is better.

R-URL: https://github.com/nodejs/node/pull/3964
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agorepl: use String#repeat instead of Array#join
Evan Lucas [Wed, 18 Nov 2015 12:59:43 +0000 (06:59 -0600)]
repl: use String#repeat instead of Array#join

String#repeat is quite a bit faster than new Array().join().

PR-URL: https://github.com/nodejs/node/pull/3900
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodeps: backport 066747e from upstream V8
Ali Ijaz Sheikh [Mon, 11 Jan 2016 19:39:51 +0000 (11:39 -0800)]
deps: backport 066747e from upstream V8

This backport fixes a performance pathology in how arrays grow/shrink.

Fixes: https://github.com/nodejs/node/issues/3538
V8-Commit: https://github.com/v8/v8/commit/066747ea053012a99e0cd3e20f36b8ed053b2124
PR-URL: https://github.com/nodejs/node/pull/4625
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Original commit message:
  Make sure that NormalizeElements and ShouldConvertToFastElements are …

  …based on the same values

  BUG=v8:4518
  LOG=n

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

  Cr-Commit-Position: refs/heads/master@{#32265}

Commit metadata for v4.x-staging:
PR-URL: https://github.com/nodejs/node/pull/4655
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unused `util` imports
Rich Trott [Wed, 23 Dec 2015 09:33:56 +0000 (01:33 -0800)]
test: remove unused `util` imports

A number of tests in `test/parallel` were importing the `util` module
via `require()` but not using `util` for anything. This removes those
`require()` statements.

PR-URL: https://github.com/nodejs/node/pull/4562
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unnecessary assignments
Rich Trott [Thu, 24 Dec 2015 00:02:12 +0000 (16:02 -0800)]
test: remove unnecessary assignments

common.js needs to be loaded in all tests so that there is checking
for variable leaks and possibly other things. However, it does not
need to be assigned to a variable if nothing in common.js is referred
to elsewhere in the test.

The main tradeoff for this bit of code churn is that it gets the code
base most of the way to being able to enable the no-unused-vars rule in
eslint.

(The non-tooling benefit is that it lessens cognitive load when reading
tests as it is an immediate indication that none of the functions or
properties in common.js will be used by the test.)

PR-URL: https://github.com/nodejs/node/pull/4563
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agorepl: fix require('3rdparty') regression
Ben Noordhuis [Wed, 9 Dec 2015 20:55:29 +0000 (21:55 +0100)]
repl: fix require('3rdparty') regression

Fix module loading of third-party modules in the REPL by inheriting
module.paths from the REPL's parent module.

Commit ee72ee7 ("module,repl: remove repl require() hack") introduced
a regression where require() of modules in node_modules directories
no longer worked in the REPL (and fortunately only in the REPL.)
It turns out we didn't have test coverage for that but we do now.

Fixes: https://github.com/nodejs/node/issues/4208
PR-URL: https://github.com/nodejs/node/pull/4215
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agosrc: define Is* util functions with macros
cjihrig [Wed, 2 Dec 2015 16:49:35 +0000 (11:49 -0500)]
src: define Is* util functions with macros

The Is* type checking functions in node_util.cc are mostly
the same boilerplate. This commit defines them using a macro.

Refs: https://github.com/nodejs/node/pull/4100
PR-URL: https://github.com/nodejs/node/pull/4118
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Conflicts:
src/node_util.cc

8 years agoutil: determine object types in C++
cjihrig [Tue, 1 Dec 2015 16:27:39 +0000 (11:27 -0500)]
util: determine object types in C++

Determine object types of regular expressions, Dates, Maps, and
Sets in the C++ layer instead of depending on toString()
behavior in JavaScript.

PR-URL: https://github.com/nodejs/node/pull/4100
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotest: move ArrayStream to common
cjihrig [Wed, 25 Nov 2015 21:38:01 +0000 (16:38 -0500)]
test: move ArrayStream to common

A number of REPL tests define the same ArrayStream object. This
commit moves the repeated code into common.js.

PR-URL: https://github.com/nodejs/node/pull/4027
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Conflicts:
test/common.js

8 years agoutil: move .decorateErrorStack to internal/util
Ben Noordhuis [Wed, 25 Nov 2015 21:37:43 +0000 (22:37 +0100)]
util: move .decorateErrorStack to internal/util

Move the method that was added in commit 8ca412b from earlier this month
from lib/util.js to lib/internal/util.js.

Avoids exposing a method that we may not wish to expose just yet, seeing
how it relies on implementation details.

PR-URL: https://github.com/nodejs/node/pull/4026
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agomodule,repl: remove repl require() hack
Ben Noordhuis [Wed, 25 Nov 2015 21:27:29 +0000 (22:27 +0100)]
module,repl: remove repl require() hack

Remove a hack that was introduced in commit bb6d468d from November 2010.
This is groundwork for a follow-up commit that makes it possible to use
internal modules in lib/repl.js.

PR-URL: https://github.com/nodejs/node/pull/4026
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Conflicts:
lib/module.js

8 years agorepl: attach location info to syntax errors
cjihrig [Wed, 25 Nov 2015 00:55:51 +0000 (19:55 -0500)]
repl: attach location info to syntax errors

Currently, when a file with a syntax error is imported in the
REPL, no information is provided on the error's location. This
commit adds the error's location to the stack trace.

Refs: https://github.com/nodejs/node/issues/2762
Refs: https://github.com/nodejs/node/issues/3411
Refs: https://github.com/nodejs/node/issues/3784
PR-URL: https://github.com/nodejs/node/pull/4013
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agoutil: add decorateErrorStack()
cjihrig [Wed, 25 Nov 2015 00:52:35 +0000 (19:52 -0500)]
util: add decorateErrorStack()

This commit adds the decorateErrorStack() method. This function
uses the internal util's getHiddenValue() method to extract
arrow messages from error objects and attach them to the
error's stack trace.

PR-URL: https://github.com/nodejs/node/pull/4013
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agoutil,src: allow lookup of hidden values
cjihrig [Mon, 23 Nov 2015 19:58:18 +0000 (14:58 -0500)]
util,src: allow lookup of hidden values

This commit adds an internal util method that makes hidden
values in the C++ layer visible in JS.

PR-URL: https://github.com/nodejs/node/pull/3988
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Conflicts:
lib/internal/util.js

8 years agodeps: backport 200315c from V8 upstream
Vladimir Kurchatkin [Thu, 3 Dec 2015 12:34:52 +0000 (15:34 +0300)]
deps: backport 200315c from V8 upstream

Original commit message:

  Make AstRawString deduplication encoding-agnostic.

  R=jkummerow@chromium.org
  BUG=v8:4450
  LOG=N

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

  Cr-Commit-Position: refs/heads/master@{#31624}

Ref: https://github.com/nodejs/node/pull/4160
PR-URL: https://github.com/nodejs/node/pull/4128
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
8 years agodoc: improvements to dgram.markdown copy
James M Snell [Sun, 27 Dec 2015 06:25:13 +0000 (22:25 -0800)]
doc: improvements to dgram.markdown copy

General improvements to dgram.markdown copy

PR-URL: https://github.com/nodejs/node/pull/4437
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
8 years agodoc: improvements to debugger.markdown copy
James M Snell [Sun, 27 Dec 2015 05:19:35 +0000 (21:19 -0800)]
doc: improvements to debugger.markdown copy

General improvements to debugger.markdown

PR-URL: https://github.com/nodejs/node/pull/4436
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: improvements to console.markdown copy
James M Snell [Sat, 26 Dec 2015 17:13:23 +0000 (09:13 -0800)]
doc: improvements to console.markdown copy

Several improvements including a few new examples

PR-URL: https://github.com/nodejs/node/pull/4428
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: fix spelling error in lib/url.js comment
Nik Nyby [Tue, 22 Dec 2015 20:17:25 +0000 (15:17 -0500)]
doc: fix spelling error in lib/url.js comment

PR-URL: https://github.com/nodejs/node/pull/4390
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: refactor test-net-connect-options-ipv6
Rich Trott [Wed, 23 Dec 2015 08:58:14 +0000 (00:58 -0800)]
test: refactor test-net-connect-options-ipv6

Remove unused variable and refactor checking for event firing.

PR-URL: https://github.com/nodejs/node/pull/4395
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agotest: use platformTimeout() in more places
Brian White [Tue, 22 Dec 2015 17:43:44 +0000 (12:43 -0500)]
test: use platformTimeout() in more places

Without these changes, the pi1-raspbian-wheezy CI node was timing
out on these tests.

PR-URL: https://github.com/nodejs/node/pull/4387
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: improve assert.markdown copy
James M Snell [Sun, 20 Dec 2015 03:08:13 +0000 (19:08 -0800)]
doc: improve assert.markdown copy

General improvements to assert.markdown copy including
new and improved examples

PR-URL: https://github.com/nodejs/node/pull/4360
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agotest: fix race condition in test-http-client-onerror
Devin Nakamura [Fri, 18 Dec 2015 15:50:11 +0000 (10:50 -0500)]
test: fix race condition in test-http-client-onerror

Occasionally test-http-client-onerror will fail with a refused connection.
This patch fixes the possibility that connections will be attempted before
server is listening.

PR-URL: https://github.com/nodejs/node/pull/4346
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: fix flaky test-net-error-twice
Brian White [Fri, 18 Dec 2015 06:35:23 +0000 (01:35 -0500)]
test: fix flaky test-net-error-twice

On Windows there can exist some race condition where the
notification of the client's `socket.destroy()` isn't received
before the server writes to the socket. This race condition was
more evident/reproducible on a single core system.

This commit fixes the flakiness by waiting until the server's
connection event handler has been called to destroy the client
socket and perform the server socket write.

Fixes: https://github.com/nodejs/node/issues/4057
PR-URL: https://github.com/nodejs/node/pull/4342
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
8 years agotest: try other ipv6 localhost alternatives
Brian White [Thu, 17 Dec 2015 06:16:46 +0000 (01:16 -0500)]
test: try other ipv6 localhost alternatives

PR-URL: https://github.com/nodejs/node/pull/4325
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodeps: upgrade libuv to 1.8.0
Saúl Ibarra Corretgé [Sun, 13 Dec 2015 11:07:04 +0000 (12:07 +0100)]
deps: upgrade libuv to 1.8.0

Fixes: https://github.com/nodejs/node/issues/3718
PR-URL: https://github.com/nodejs/node/pull/4276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agosrc: refactor vcbuild configure args creation
Rod Vagg [Fri, 16 Oct 2015 11:32:06 +0000 (22:32 +1100)]
src: refactor vcbuild configure args creation

remove a bunch of variables and rely on %configure_flags% where
possible, also allow for an external %config_flags% variable to supply
additional arguments to configure to match the behaviour of the Makefile

PR-URL: https://github.com/nodejs/node/pull/3399
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
8 years agodoc: copyedit releases.md
Rich Trott [Mon, 21 Dec 2015 21:52:39 +0000 (13:52 -0800)]
doc: copyedit releases.md

PR-URL: https://github.com/nodejs/node/pull/4384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: catch the WORKING_GROUPS.md bootstrap docs up to date
James M Snell [Sun, 20 Dec 2015 17:02:08 +0000 (09:02 -0800)]
doc: catch the WORKING_GROUPS.md bootstrap docs up to date

* Link to the separate CODE_OF_CONDUCT.md file in nodejs/node
* Link to the ModerationPolicy.md file in nodejs/TSC

PR-URL: https://github.com/nodejs/node/pull/4367
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agodoc: fix link in addons.markdown
Nicholas Young [Thu, 17 Dec 2015 15:38:44 +0000 (09:38 -0600)]
doc: fix link in addons.markdown

Update link from github.com/rvagg to github.com/nodejs

PR-URL: https://github.com/nodejs/node/pull/4331
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: Typo in buffer.markdown referencing buf.write()
chrisjohn404 [Thu, 17 Dec 2015 08:11:48 +0000 (01:11 -0700)]
doc: Typo in buffer.markdown referencing buf.write()

The buffer's write function is documented below the
buf.toString function and all of the docs reference
"buf" instead of "buffer".

PR-URL: https://github.com/nodejs/node/pull/4324
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: fix debug-port-cluster flakiness
Ben Noordhuis [Wed, 16 Dec 2015 14:20:46 +0000 (15:20 +0100)]
test: fix debug-port-cluster flakiness

Rewrite the test so that stderr reordering of the child processes won't
confuse the test's expectations.

PR-URL: https://github.com/nodejs/node/pull/4310
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agoudp: remove a needless instanceof Buffer check
ronkorving [Wed, 16 Dec 2015 02:09:13 +0000 (11:09 +0900)]
udp: remove a needless instanceof Buffer check

When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.

PR-URL: https://github.com/nodejs/node/pull/4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: document the cache parameter for fs.realpathSync
Jackson Tian [Tue, 15 Dec 2015 03:12:21 +0000 (11:12 +0800)]
doc: document the cache parameter for fs.realpathSync

PR-URL: https://github.com/nodejs/node/pull/4285
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: add test for tls.parseCertString
Evan Lucas [Tue, 15 Dec 2015 00:33:47 +0000 (18:33 -0600)]
test: add test for tls.parseCertString

It does not currently have any explicit tests to verify the behavior.

PR-URL: https://github.com/nodejs/node/pull/4283
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: fix, modernize examples in docs
James M Snell [Mon, 14 Dec 2015 23:20:25 +0000 (15:20 -0800)]
doc: fix, modernize examples in docs

* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency

PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: clarify error events in HTTP module documentation
Lenny Markus [Mon, 14 Dec 2015 18:25:10 +0000 (10:25 -0800)]
doc: clarify error events in HTTP module documentation

Make it clear that error with throw if error listener is
not registered.

PR-URL: https://github.com/nodejs/node/pull/4275
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agosrc: fix deprecation message for ErrnoException
Martin von Gagern [Mon, 14 Dec 2015 09:50:37 +0000 (10:50 +0100)]
src: fix deprecation message for ErrnoException

Fix copy paste error in deprecation message

PR-URL: https://github.com/nodejs/node/pull/4269
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Rod Vagg <r@va.gg>
8 years agotls_wrap: inherit from the `AsyncWrap` first
Fedor Indutny [Mon, 14 Dec 2015 05:58:37 +0000 (00:58 -0500)]
tls_wrap: inherit from the `AsyncWrap` first

`WrapperInfo` casts pointer in JS object's internal field to
`AsyncWrap`. This approach fails miserably for `TLSWrap` because it was
inhereted from the `StreamBase` first, creating different kind of
`vtable` for the whole class.

Reorder parent classes to put `AsyncWrap` first.

Fix: https://github.com/nodejs/node/issues/4250
PR-URL: https://github.com/nodejs/node/pull/4268
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agonode: remove unused variables in AppendExceptionLine
Yazhong Liu [Sun, 13 Dec 2015 15:37:27 +0000 (23:37 +0800)]
node: remove unused variables in AppendExceptionLine

PR-URL: https://github.com/nodejs/node/pull/4264
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix improper http.get sample code
Hideki Yamamura [Sun, 13 Dec 2015 04:25:44 +0000 (13:25 +0900)]
doc: fix improper http.get sample code

Refs: https://github.com/nodejs/node-v0.x-archive/pull/25471
Refs: https://github.com/nodejs/node-v0.x-archive/issues/8443
PR-URL: https://github.com/nodejs/node/pull/4263
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agosrc: fix line numbers on core errors
cjihrig [Fri, 11 Dec 2015 19:57:45 +0000 (14:57 -0500)]
src: fix line numbers on core errors

In dfee4e3712ac4673b5fc472a8f77ac65bdc65f87, the module wrapper
and line offset used when wrapping module code was changed to
better report errors on the first line of modules. However, that
commit did not update the runInThisContext() call used to
execute the core modules, so their error line numbers have been
off by one. This commit provides the correct lineOffset for core
modules.

Refs: https://github.com/nodejs/node/pull/2867
PR-URL: https://github.com/nodejs/node/pull/4254
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotest: use regular timeout times for ARMv8
Jeremiah Senkpiel [Thu, 10 Dec 2015 20:03:59 +0000 (15:03 -0500)]
test: use regular timeout times for ARMv8

ARMv8 machines are typically quite fast and likely may not need
extended timeout times.

PR-URL: https://github.com/nodejs/node/pull/4248
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: parallelize test-repl-persistent-history
Jeremiah Senkpiel [Fri, 11 Dec 2015 22:45:53 +0000 (17:45 -0500)]
test: parallelize test-repl-persistent-history

Refs: https://github.com/nodejs/node/pull/2224#issuecomment-127356413
PR-URL: https://github.com/nodejs/node/pull/4247
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: Fixing broken links to the v8 wiki
Tom Gallacher [Fri, 11 Dec 2015 13:45:12 +0000 (13:45 +0000)]
doc: Fixing broken links to the v8 wiki

PR-URL: https://github.com/nodejs/node/pull/4241
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc: move description of 'equals' method to right place
janriemer [Thu, 10 Dec 2015 09:12:15 +0000 (10:12 +0100)]
doc: move description of 'equals' method to right place

the description of buffer.equals(otherBuffer) was at the wrong
place; move it underneath the method signature

PR-URL: https://github.com/nodejs/node/pull/4227
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: copyedit console doc
Rich Trott [Thu, 10 Dec 2015 04:19:30 +0000 (20:19 -0800)]
doc: copyedit console doc

PR-URL: https://github.com/nodejs/node/pull/4225
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add mcollina to collaborators
Matteo Collina [Wed, 9 Dec 2015 21:54:48 +0000 (13:54 -0800)]
doc: add mcollina to collaborators

Hello everyone!

PR-URL: https://github.com/nodejs/node/pull/4220
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
8 years agodoc: add rmg to collaborators
Ryan Graham [Wed, 9 Dec 2015 21:54:06 +0000 (13:54 -0800)]
doc: add rmg to collaborators

PR-URL: https://github.com/nodejs/node/pull/4219
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
8 years agodoc: add calvinmetcalf to collaborators
Calvin Metcalf [Wed, 9 Dec 2015 21:55:09 +0000 (13:55 -0800)]
doc: add calvinmetcalf to collaborators

PR-URL: https://github.com/nodejs/node/pull/4218
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
8 years agodoc: harmonize description of `ca` argument
Ben Noordhuis [Wed, 9 Dec 2015 19:20:32 +0000 (20:20 +0100)]
doc: harmonize description of `ca` argument

Different sections said different things about what the `ca` argument
should look like.  This commit harmonizes them.

Ref: https://github.com/nodejs/node/pull/4099
PR-URL: https://github.com/nodejs/node/pull/4213
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: fix domain-top-level-error-handler-throw
Santiago Gimeno [Sun, 20 Dec 2015 12:21:35 +0000 (13:21 +0100)]
test: fix domain-top-level-error-handler-throw

Check the stderr output in the `close` event as it's not guaranteed to
be fully available when the `exit` event is fired.

PR: #4364
PR-URL: https://github.com/nodejs/node/pull/4364
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
8 years agotest: don't assume openssl s_client supports -ssl3
Ben Noordhuis [Tue, 8 Dec 2015 22:46:07 +0000 (23:46 +0100)]
test: don't assume openssl s_client supports -ssl3

Scan the child process's stderr for an 'unknown flag' error message and
mark the test as skipped if found.

Fixes: https://github.com/nodejs/node/issues/3927
PR-URL: https://github.com/nodejs/node/pull/4204
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agoconfigure: fix arm vfpv2
Jörg Krause [Tue, 8 Dec 2015 20:53:06 +0000 (21:53 +0100)]
configure: fix arm vfpv2

The gcc -mfpu flag for VFPv2 is vfp, not vfpv2 (there is no vfpv2) [1].

[1] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

PR-URL: https://github.com/nodejs/node/pull/4203
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotest: fix tls-inception flakiness
Santiago Gimeno [Tue, 8 Dec 2015 13:57:22 +0000 (14:57 +0100)]
test: fix tls-inception flakiness

When sending a very large buffer (400000 bytes) the test fails due to
the client socket from the `a` server erroring with `ECONNRESET`.
There's a race condition between the closing of this socket and the `ssl`
socket closing on the other side of the connection. To improve things,
destroy the socket as soon as possible: in the `end` event of the `dest`
socket.

PR-URL: https://github.com/nodejs/node/pull/4195
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agotest: fix tls-inception
Santiago Gimeno [Tue, 8 Dec 2015 12:36:38 +0000 (13:36 +0100)]
test: fix tls-inception

Make sure all the data is read before checking its validity.
Remove `gotHello` variable and just check that the ssl `end` event
is received.
Remove unused variables.

PR-URL: https://github.com/nodejs/node/pull/4195
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agotls_wrap: slice buffer properly in `ClearOut`
Fedor Indutny [Tue, 8 Dec 2015 03:15:43 +0000 (22:15 -0500)]
tls_wrap: slice buffer properly in `ClearOut`

Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.

Fix: https://github.com/nodejs/node/issues/4161
PR-URL: https://github.com/nodejs/node/pull/4184
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agodoc: copyedit child_process doc
Rich Trott [Tue, 8 Dec 2015 03:31:38 +0000 (19:31 -0800)]
doc: copyedit child_process doc

PR-URL: https://github.com/nodejs/node/pull/4188
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc: copyedit buffer doc
Rich Trott [Tue, 8 Dec 2015 03:21:24 +0000 (19:21 -0800)]
doc: copyedit buffer doc

PR-URL: https://github.com/nodejs/node/pull/4187
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: clarify assert.fail doc
Rich Trott [Tue, 8 Dec 2015 03:03:21 +0000 (19:03 -0800)]
doc: clarify assert.fail doc

PR-URL: https://github.com/nodejs/node/pull/4186
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc: copyedit addons doc
Rich Trott [Tue, 8 Dec 2015 02:50:25 +0000 (18:50 -0800)]
doc: copyedit addons doc

PR-URL: https://github.com/nodejs/node/pull/4185
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agodoc: update AUTHORS list
Rod Vagg [Tue, 8 Dec 2015 01:46:33 +0000 (12:46 +1100)]
doc: update AUTHORS list

Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/nodejs/node/pull/4183
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: change references from node to Node.js
Roman Klauke [Mon, 7 Dec 2015 19:20:50 +0000 (20:20 +0100)]
doc: change references from node to Node.js

Some API doc referenced Node.js with "node" or "node.js". This commit
replaces these references.

PR-URL:https://github.com/nodejs/node/pull/4177
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc: add brief Node.js overview to README
wurde [Mon, 7 Dec 2015 05:29:24 +0000 (23:29 -0600)]
doc: add brief Node.js overview to README

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4174

8 years agorepl: display error message when loading directory
Prince J Wesley [Sun, 6 Dec 2015 09:16:52 +0000 (14:46 +0530)]
repl: display error message when loading directory

When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.

PR-URL: https://github.com/nodejs/node/pull/4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agonode: s/doNTCallbackX/nextTickCallbackWithXArgs/
Rod Vagg [Sun, 6 Dec 2015 02:28:15 +0000 (13:28 +1100)]
node: s/doNTCallbackX/nextTickCallbackWithXArgs/

Rename doNTCallback functions for clarity when profiling, these make
sense internally but the "NT" in particular is a bit obtuse to be
immediately understandable by non-core developers.

PR-URL: https://github.com/nodejs/node/pull/4167
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agosrc: use GetCurrentProcessId() for process.pid
Ben Noordhuis [Fri, 4 Dec 2015 23:31:49 +0000 (00:31 +0100)]
src: use GetCurrentProcessId() for process.pid

Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc
use `GetCurrentProcessId()` on Windows for the PID in log messages.
`GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8.

This commit makes `process.pid` use `GetCurrentProcessId()` instead of
`_getpid()` for consistency.

PR-URL: https://github.com/nodejs/node/pull/4163
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agotest: mark test-cluster-shared-leak flaky
Rich Trott [Sat, 5 Dec 2015 06:40:14 +0000 (22:40 -0800)]
test: mark test-cluster-shared-leak flaky

test-cluster-shared-leak is flaky on Windows.

Refs: https://github.com/nodejs/node/issues/3956

PR-URL: https://github.com/nodejs/node/pull/4162
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agobuffer: Prevent Buffer constructor deopt
Bryce Baril [Fri, 4 Dec 2015 18:08:51 +0000 (10:08 -0800)]
buffer: Prevent Buffer constructor deopt

The Buffer constructor will generally get inlined, but any call to the Buffer
constructor for a string without encoding will cause an eager deoptimization
of any function that inlined the Buffer constructor. This is due to a an
out-of-bounds read on `arguments[1]`. This change prevents that deopt.

PR-URL: https://github.com/nodejs/node/pull/4158
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agobuild: add "--partly-static" build options
Super Zheng [Fri, 4 Dec 2015 08:14:24 +0000 (16:14 +0800)]
build: add "--partly-static" build options

A lot of machines don't upgrade libstdc++.so library for a long time,
but the new version of node requires the latest GLIBCXX.

Using "--fully-static" configurable options may resolve this problem,
but the side effect is that the size of the executable file will be
increased.

Adding "--partly-static" configurable options it will only build
libgcc and libstdc++ libraries into executable file, resolve the
problem and control the size of file.

PR-URL: https://github.com/nodejs/node/pull/4152
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agodoc, test: symbols as event names
Bryan English [Fri, 4 Dec 2015 06:58:18 +0000 (22:58 -0800)]
doc, test: symbols as event names

* Document that Symbol can used as event names.
* Add test for using Symbol as event names

PR-URL: https://github.com/nodejs/node/pull/4151
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add iarna to collaborators
Rebecca Turner [Thu, 3 Dec 2015 23:48:00 +0000 (15:48 -0800)]
doc: add iarna to collaborators

PR-URL: https://github.com/nodejs/node/pull/4144
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add JungMinu to collaborators
Minwoo Jung [Thu, 3 Dec 2015 23:49:56 +0000 (08:49 +0900)]
doc: add JungMinu to collaborators

PR-URL: https://github.com/nodejs/node/pull/4143
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <http://www.cjihrig.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add zkat to collaborators
Kat Marchán [Thu, 3 Dec 2015 23:45:39 +0000 (15:45 -0800)]
doc: add zkat to collaborators

PR-URL: https://github.com/nodejs/node/pull/4142
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rebecca Turner <me@re-becca.org>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: improve child_process.markdown wording
yorkie [Thu, 3 Dec 2015 22:07:01 +0000 (06:07 +0800)]
doc: improve child_process.markdown wording

PR-URL: https://github.com/nodejs/node/pull/4138
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: url.format - true slash postfix behaviour
fansworld-claudio [Wed, 2 Dec 2015 17:58:50 +0000 (14:58 -0300)]
doc: url.format - true slash postfix behaviour

Change url.format's references to slash postfixing to reflect
true behaviour (it only automatically postfixes slashes to the
slashedProtocols when host is present).

Fixes: #3361

PR-URL: https://github.com/nodejs/node/pull/4119
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agotest: skip long path tests on non-Windows
Rafał Pocztarski [Wed, 2 Dec 2015 17:13:27 +0000 (18:13 +0100)]
test: skip long path tests on non-Windows

If not running on Windows it skips the long path tests in:

* test-fs-long-path.js
* test-require-long-path.js

Fixes: https://github.com/nodejs/node/issues/2255
PR-URL: https://github.com/nodejs/node/pull/4116
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agosrc: don't print garbage errors
cjihrig [Wed, 2 Dec 2015 01:34:45 +0000 (20:34 -0500)]
src: don't print garbage errors

If JS throws an object whose toString() method throws, then Node
attempts to print an empty message, but actually prints garbage.
This commit checks for this case, and prints a message instead.

Fixes: https://github.com/nodejs/node/issues/4079
PR-URL: https://github.com/nodejs/node/pull/4112
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agotest: fix flaky test-net-socket-local-address
Rich Trott [Tue, 1 Dec 2015 21:13:40 +0000 (13:13 -0800)]
test: fix flaky test-net-socket-local-address

test-net-socket-local-address had a race condition that resulted in
unreliability on FreeBSD and Windows. This changes fixes the issue.

Fixes: https://github.com/nodejs/node/issues/2475
PR-URL: https://github.com/nodejs/node/pull/4109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agotest: improve cluster-disconnect-handles test
Brian White [Tue, 1 Dec 2015 04:56:35 +0000 (23:56 -0500)]
test: improve cluster-disconnect-handles test

This commit fixes two issues in test-cluster-disconnect-handles:

1. If the master's TCP connection to the worker fails, the worker
process stays alive and causes many other tests that use the same
common port number to also fail (with EADDRINUSE).

2. One particular problem that can cause the master's TCP connection
to fail is attempting an IPv6 connection to the worker when no IPv6
network interfaces are available.

PR-URL: https://github.com/nodejs/node/pull/4084
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: eliminate multicast test FreeBSD flakiness
Rich Trott [Thu, 26 Nov 2015 03:41:09 +0000 (19:41 -0800)]
test: eliminate multicast test FreeBSD flakiness

test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry
Pi. This refactoring fixes the issue by eliminating a race condition.

Fixes: https://github.com/nodejs/node/issues/2474
PR-URL: https://github.com/nodejs/node/pull/4042
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>