platform/upstream/nodejs.git
8 years agodocs: update link to iojs+release ci job
Myles Borins [Wed, 9 Mar 2016 18:05:24 +0000 (10:05 -0800)]
docs: update link to iojs+release ci job

We recently sandboxed the release CI jobs to their own Jenkins instance
This commit updates the links found in `doc/releases.md` to point
people in the right direction.

PR-URL: https://github.com/nodejs/node/pull/5632
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix dns.resolveCname description typo
axvm [Wed, 9 Mar 2016 11:09:24 +0000 (14:09 +0300)]
doc: fix dns.resolveCname description typo

PR-URL: https://github.com/nodejs/node/pull/5622
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotools: reduce verbosity of cpplint
Sakthipriyan Vairamani [Sun, 6 Mar 2016 14:05:42 +0000 (19:35 +0530)]
tools: reduce verbosity of cpplint

Every time `make test` is run, the cpplint prints the file it
successfully linted. None of the other linters in the project does
that. This patch simply removes the "Done processing" message from the
cpplint.

PR-URL: https://github.com/nodejs/node/pull/5578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix typo in fs.symlink
Michaël Zasso [Fri, 4 Mar 2016 08:53:31 +0000 (09:53 +0100)]
doc: fix typo in fs.symlink

PR-URL: https://github.com/nodejs/node/pull/5560
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: document directories in test directory
Michael Barrett [Thu, 3 Mar 2016 23:01:01 +0000 (23:01 +0000)]
doc: document directories in test directory

PR-URL: https://github.com/nodejs/node/pull/5557
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agobuild: correctly detect clang version
Stefan Budeanu [Thu, 3 Mar 2016 21:38:24 +0000 (16:38 -0500)]
build: correctly detect clang version

Use the "Apple LLVM" version number since the banner has changed in
newer versions of Mac OS X, resulting in the obsolete assembler path
being used to compile OpenSSL.

PR-URL: https://github.com/nodejs/node/pull/5553
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: enable no-self-assign ESLint rule
Rich Trott [Thu, 3 Mar 2016 21:45:08 +0000 (13:45 -0800)]
tools: enable no-self-assign ESLint rule

Enabled no-self-assign rule in ESLint.

This required one change in a benchmark file. Changed a loop (that is
outside of the benchmark itself, so performance is not critical) from a
for loop that repeats a string to use String.prototype.repeat() instead.

While at it, took the opportunity to const-ify the benchmark file.

Also moved the "Strict" section in the .eslintrc to match where it is in
the ESLint documentation. Updated the link for Strict rules to point to
the ESLint website rather than the GitHub-hosted code.

PR-URL: https://github.com/nodejs/node/pull/5552
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: update link green to match homepage
silverwind [Thu, 3 Mar 2016 17:50:30 +0000 (18:50 +0100)]
doc: update link green to match homepage

Also fixed a minor color issue with :focus on the title.

PR-URL: https://github.com/nodejs/node/pull/5548
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agotest: check memoryUsage properties The properties on memoryUsage were not checked...
Wyatt Preul [Thu, 3 Mar 2016 16:10:46 +0000 (10:10 -0600)]
test: check memoryUsage properties The properties on memoryUsage were not checked before, this commit checks them.

PR-URL: #5546
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: remove broken debugger scenarios
Rich Trott [Wed, 2 Mar 2016 20:48:53 +0000 (12:48 -0800)]
test: remove broken debugger scenarios

`test-debug-break-on-uncaught` was hanging on the domain and parse error
scenarios. These tests are not run in CI and may have been broken
for a very long time.

Refs: https://github.com/nodejs/node/issues/3156
Refs: https://github.com/nodejs/node/commit/c16963b9
PR-URL: https://github.com/nodejs/node/pull/5532
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <r@va.gg>
8 years agobuild: update Node.js logo on Win installer
Robert Jefe Lindstaedt [Wed, 2 Mar 2016 19:42:42 +0000 (20:42 +0100)]
build: update Node.js logo on Win installer

also change stripe color to RGB 68 136 62

PR-URL: https://github.com/nodejs/node/pull/5531
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agobuild: remove --quiet from eslint invocation
firedfox [Wed, 2 Mar 2016 03:55:53 +0000 (11:55 +0800)]
build: remove --quiet from eslint invocation

All eslint rules are configured to report as errors. Remove useless
--quiet flag from eslint invocation in Makefile and vcbuild.bat.

PR-URL: https://github.com/nodejs/node/pull/5519
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotools: enable no-extra-parens in ESLint
Rich Trott [Tue, 1 Mar 2016 21:27:19 +0000 (13:27 -0800)]
tools: enable no-extra-parens in ESLint

Enable `no-extra-parens`. This rule restricts the use of parentheses to
only where they are necessary. It is set to be restricted to report only
function expressions.

PR-URL: https://github.com/nodejs/node/pull/5512
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add clarification on birthtime in fs stat
Kári Tristan Helgason [Sun, 28 Feb 2016 21:28:17 +0000 (21:28 +0000)]
doc: add clarification on birthtime in fs stat

Clarifies the possibility of birthtime in the fs stat
object being greater than atime or mtime when not available
in the filesystem (see issue for further info).

Fixes: https://github.com/nodejs/node/issues/2222
PR-URL: https://github.com/nodejs/node/pull/5479
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix typo in child_process documentation
Evan Lucas [Sun, 28 Feb 2016 12:23:20 +0000 (06:23 -0600)]
doc: fix typo in child_process documentation

TSCP should be TCP

PR-URL: https://github.com/nodejs/node/pull/5474
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: update NAN urls in ROADMAP.md and doc/releases.md
ronkorving [Sun, 28 Feb 2016 07:46:23 +0000 (16:46 +0900)]
doc: update NAN urls in ROADMAP.md and doc/releases.md

PR-URL: https://github.com/nodejs/node/pull/5472
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: apply Linux workaround to Linux only
Rich Trott [Sun, 28 Feb 2016 06:18:22 +0000 (22:18 -0800)]
test: apply Linux workaround to Linux only

Do not try Ubuntu/SUSE/Debian-specific hostnames for IPv6 localhost
unless we are on Linux.

Fixes: https://github.com/nodejs/node/issues/4546
PR-URL: https://github.com/nodejs/node/pull/5471
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: increase timeout for test-tls-fast-writing
Rich Trott [Sun, 28 Feb 2016 00:02:29 +0000 (16:02 -0800)]
test: increase timeout for test-tls-fast-writing

Increase timeout for test from 500ms to 1000ms so busy slow machines
don't produce false positives.

Fixes: https://github.com/nodejs/node/issues/4964
PR-URL: https://github.com/nodejs/node/pull/5466
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agodoc: add Testing WG
Rich Trott [Fri, 26 Feb 2016 22:20:43 +0000 (14:20 -0800)]
doc: add Testing WG

Add the proposed Testing WG. WORKING_GROUPS.md indicates that opening
a pull request to that file is the way to request that a charter be
ratified by the TC. So, that's what this is.

The charter document is currently:
https://github.com/nodejs/testing/blob/master/Charter.md

PR-URL: https://github.com/nodejs/node/pull/5461
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agodoc: fix crypto function indentation level
Brian White [Fri, 26 Feb 2016 21:56:41 +0000 (16:56 -0500)]
doc: fix crypto function indentation level

PR-URL: https://github.com/nodejs/node/pull/5460
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: retry on known SmartOS bug
Rich Trott [Fri, 26 Feb 2016 17:29:19 +0000 (09:29 -0800)]
test: retry on known SmartOS bug

There is a known issue with SmartOS that is generally worked around
in `tools/test.py`. However, a more robust workaround is required for
some tests that open many network connections.

`test-http-regr-gh-2928` is one such test.

Fixes: https://github.com/nodejs/node/issues/5445
Refs: https://github.com/nodejs/node/pull/3941
PR-URL: https://github.com/nodejs/node/pull/5454
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agobenchmark: add benchmark for buf.compare()
Rich Trott [Fri, 26 Feb 2016 00:26:39 +0000 (16:26 -0800)]
benchmark: add benchmark for buf.compare()

There is a benchmark for the class method `Buffer.compare()` but not for
the instance method `buf.compare()`. This adds that benchmark.

I used this to confirm a performance regression in an implementation I
was considering. While the implementation was a bust, it does seem like
the benchmark is worthwhile.

The benchmark is nearly identical to the existing `Buffer.compare()`
benchmark except, of course, that it calls `buf.compare()` instead.

PR-URL: https://github.com/nodejs/node/pull/5441
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agotest: fix flaky child-process-fork-regr-gh-2847
Santiago Gimeno [Wed, 24 Feb 2016 22:47:47 +0000 (23:47 +0100)]
test: fix flaky child-process-fork-regr-gh-2847

The test is still failing sometimes because when trying to establish the
second connection, the server is already closed. Bring back the code
that handled this case and was removed in the last refactoring of the
test. Also ignore the errors that might happen when sending the second
handle to the worker because it may already have exited.

PR-URL: https://github.com/nodejs/node/pull/5422
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agocrypto: PBKDF2 works with `int` not `ssize_t`
Fedor Indutny [Tue, 23 Feb 2016 20:53:45 +0000 (15:53 -0500)]
crypto: PBKDF2 works with `int` not `ssize_t`

Change types of all PBKDF2 params to `int` as they are `int` in `evp.h`.

Check that `raw_keylen` fits into `int` before passing it to OpenSSL.

Fix: #5396
PR-URL: https://github.com/nodejs/node/pull/5397
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
8 years agourl: group slashed protocols by protocol name
nettofarah [Tue, 23 Feb 2016 07:47:22 +0000 (23:47 -0800)]
url: group slashed protocols by protocol name

Reorder slashed protocols so they are grouped by protocol name. This is
done so it doesn't look like we're duplicating protocol names at the
bottom of the list.

PR-URL: https://github.com/nodejs/node/pull/5380
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agotest: fix test-timers.reliability on OS X
Rich Trott [Tue, 23 Feb 2016 06:14:32 +0000 (22:14 -0800)]
test: fix test-timers.reliability on OS X

Fixes: https://github.com/nodejs/node/issues/4404
PR-URL: https://github.com/nodejs/node/pull/5379
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotools: apply custom buffer lint rule to /lib only
Rich Trott [Mon, 22 Feb 2016 22:24:38 +0000 (14:24 -0800)]
tools: apply custom buffer lint rule to /lib only

The lint rule is there to avoid a circular-dependency issue that only
applies to `/lib`. In preparation for linting `/benchmark`, apply that
rule to `/lib` only to avoid churn in `/benchmark`.

Refs: https://github.com/nodejs/node/issues/3983#issuecomment-158956113
PR-URL: https://github.com/nodejs/node/pull/5371
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix links in tls, cluster docs
Alexander Makarenko [Fri, 19 Feb 2016 13:54:37 +0000 (16:54 +0300)]
doc: fix links in tls, cluster docs

Fix missing links described in #5322.

PR-URL: https://github.com/nodejs/node/pull/5364
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: fix relative links in net docs
Evan Lucas [Mon, 22 Feb 2016 07:28:55 +0000 (01:28 -0600)]
doc: fix relative links in net docs

They were not being processed as relative links.

PR-URL: https://github.com/nodejs/node/pull/5358
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotools: enable additional lint rules
Rich Trott [Mon, 22 Feb 2016 05:19:32 +0000 (21:19 -0800)]
tools: enable additional lint rules

Enable additional likely-uncontroversial lint rules:

* `comma-dangle` set to prohibit dangling commas on objects and arrays
that are defined on a single line. Multi-line definitions can use or
omit a trailing comma.

* `no-unused-labels` Prohibits defining a label that is not used.

* `no-path-concat` Prohibits string-concatenation using i`__dirname` and
`__filename`. Use `path.join()`, `path.resolve()`, or template strings
instead.

* `no-new-symbol` disallow use of `new` operator with `Symbol` object.
Violating this rule would result in a `TypeError` at runtime.`

PR-URL: https://github.com/nodejs/node/pull/5357
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agotest: increase timeouts on some unref timers tests
Jeremiah Senkpiel [Sun, 21 Feb 2016 16:05:55 +0000 (11:05 -0500)]
test: increase timeouts on some unref timers tests

Fix: https://github.com/nodejs/node/issues/5351
Refs: https://github.com/nodejs/node/pull/4561
PR-URL: https://github.com/nodejs/node/pull/5352

Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agotest: prevent flakey test on pi2
Trevor Norris [Wed, 2 Mar 2016 22:23:55 +0000 (15:23 -0700)]
test: prevent flakey test on pi2

Looping rapidly and making new connections causes problems on pi2.
Instead create a new connection when an old connection has already been
made. Running a stress test of 600 times and they all passed.

Fixes: https://github.com/nodejs/node/issues/5302
PR-URL: https://github.com/nodejs/node/pull/5537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agotest: mitigate flaky test-http-agent
Rich Trott [Sun, 21 Feb 2016 03:30:21 +0000 (19:30 -0800)]
test: mitigate flaky test-http-agent

Reduce number of clients from 100 to 16 as Raspberry Pi in CI starts to
exhibit flakiness around 22 or so clients.

Fixes: https://github.com/nodejs/node/issues/5184
PR-URL: https://github.com/nodejs/node/pull/5346
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove flaky designation from fixed tests
Rich Trott [Fri, 26 Feb 2016 21:28:25 +0000 (13:28 -0800)]
test: remove flaky designation from fixed tests

`test-tls-ticket-cluster` and `test-vm-syntax-error-stderr` are no
longer flaky.

Refs: https://github.com/nodejs/node/issues/2510
Refs: https://github.com/nodejs/node/issues/2660
PR-URL: https://github.com/nodejs/node/pull/5459
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agotest: refactor test-dgram-udp4
Santiago Gimeno [Sat, 20 Feb 2016 16:36:35 +0000 (17:36 +0100)]
test: refactor test-dgram-udp4

This test was sometimes timing out in `OS X`. Remove the timeout and
clean up the code.

Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/5339

8 years agotools: add Node.js-specific ESLint rules
Rich Trott [Fri, 19 Feb 2016 07:01:06 +0000 (23:01 -0800)]
tools: add Node.js-specific ESLint rules

Add these rules:

* no-restricted-modules: See
http://eslint.org/docs/rules/no-restricted-modules. It has been
configured to prohibit the use of the deprecated `sys` and `_linklist`
modules.
* no-new-require: See http://eslint.org/docs/rules/no-new-require
* no-mixed-requires: http://eslint.org/docs/rules/no-mixed-requires

PR-URL: https://github.com/nodejs/node/pull/5320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodebugger: remove unneeded callback check
Rich Trott [Fri, 19 Feb 2016 07:12:51 +0000 (23:12 -0800)]
debugger: remove unneeded callback check

In `lib/_debugger.js`, remove check for `cb` in line 571 as it is
guaranteed to be truthy due to line 521.

PR-URL: https://github.com/nodejs/node/pull/5319
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: fix typo in pbkdf2Sync code sample
Marc Cuva [Thu, 18 Feb 2016 19:12:56 +0000 (11:12 -0800)]
doc: fix typo in pbkdf2Sync code sample

Function name in code sample had the wrong capitalization.

PR-URL: https://github.com/nodejs/node/pull/5306
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: add missing property in cluster example
Rafael Cepeda [Thu, 18 Feb 2016 17:56:05 +0000 (11:56 -0600)]
doc: add missing property in cluster example

`Cluster.setupMaster(options)` Options object was missing an `args`
property on the example.

PR-URL: https://github.com/nodejs/node/pull/5305
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: improve httpVersionMajor / httpVersionMajor
Jackson Tian [Thu, 18 Feb 2016 09:15:28 +0000 (17:15 +0800)]
doc: improve httpVersionMajor / httpVersionMajor

The description of httpVersionMajor & httpVersionMinor should
have same context like httpVersion.

PR-URL: https://github.com/nodejs/node/pull/5296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodeps: cherry-pick 2e4da65 from v8's 4.8 upstream
Michael Dawson [Wed, 17 Feb 2016 22:18:00 +0000 (17:18 -0500)]
deps: cherry-pick 2e4da65 from v8's 4.8 upstream

Float v8 patch, which has been committed to v8 master and
backported to 4.8 and 4.9 in google repos, onto 4.8 v8 in
deps to resolve https://github.com/nodejs/node/issues/5089

Original title/commit from google repos for 4.8 is:
 PPC: [turbofan] Support for CPU models lacking isel.
 https://github.com/v8/v8/commit/2e4da65332753a4fed679be81634b7685616b1fd

PR-URL: https://github.com/nodejs/node/pull/5293
Fixes: https://github.com/nodejs/node/issues/5089
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
8 years agodoc: improve unhandledException doc copy
James M Snell [Wed, 17 Feb 2016 19:10:46 +0000 (11:10 -0800)]
doc: improve unhandledException doc copy

Rework the doc a bit to tighten it up, including removing the
use of `you`

Fix some line wrapping issues.

PR-URL: https://github.com/nodejs/node/pull/5287
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
...

8 years agodoc: fix buf.readInt16LE output
Chinedu Francis Nwafili [Wed, 17 Feb 2016 13:11:53 +0000 (08:11 -0500)]
doc: fix buf.readInt16LE output

Previous example didn't account for the 1 byte offset

PR-URL: https://github.com/nodejs/node/pull/5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: document base64url encoding support
Tristan Slominski [Mon, 15 Feb 2016 17:44:53 +0000 (11:44 -0600)]
doc: document base64url encoding support

Documents that creating a buffer from base64 encoded string
transparently supports "URL and Filename Safe Alphabet" base64url
encoding.

PR-URL: https://github.com/nodejs/node/pull/5243
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Alejandro Oviedo <alejandro.oviedo.g@gmail.com>
8 years agohttp: remove old, confusing comment
Brian White [Mon, 15 Feb 2016 09:51:05 +0000 (04:51 -0500)]
http: remove old, confusing comment

The comment refers to a property (called `_pendings`) that no longer
exists.

PR-URL: https://github.com/nodejs/node/pull/5233
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agohttp: remove unnecessary check
Brian White [Mon, 15 Feb 2016 09:47:06 +0000 (04:47 -0500)]
http: remove unnecessary check

The value passed to `process.nextTick()` which is passed to the
callback is already a valid object, so the conditional will always
evaluate to true.

PR-URL: https://github.com/nodejs/node/pull/5233
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agobuild: skip msi build if WiX is not found
Tsarevich Dmitry [Sat, 13 Feb 2016 21:17:23 +0000 (00:17 +0300)]
build: skip msi build if WiX is not found

If none of VS2013/VS2015 WiX installs are found on a builder
machine, skip node build and notify user about.

PR-URL: https://github.com/nodejs/node/pull/5220
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: update removeListener behaviour
Vaibhav [Fri, 12 Feb 2016 09:48:21 +0000 (15:18 +0530)]
doc: update removeListener behaviour

This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: nodejs/node#4759

PR-URL: https://github.com/nodejs/node/pull/5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agodoc: add note for binary safe string reading
Anton Andesen [Tue, 9 Feb 2016 08:31:07 +0000 (08:31 +0000)]
doc: add note for binary safe string reading

`readable.setEncoding(null)` - may be the most preferable way to proxy
a binary data without any encoding/decoding overhead

PR-URL: https://github.com/nodejs/node/pull/5155
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agorepl: handle quotes within regexp literal
Prince J Wesley [Sat, 6 Feb 2016 06:44:27 +0000 (12:14 +0530)]
repl: handle quotes within regexp literal

PR-URL: https://github.com/nodejs/node/pull/5117
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
8 years agostring_decoder: fix performance regression
Brian White [Thu, 11 Feb 2016 15:31:47 +0000 (10:31 -0500)]
string_decoder: fix performance regression

This commit reverts the const usage introduced by 68a6abc
because v8 currently cannot optimize functions that contain
these uses of const (unsupported phi use of const variable).
The performance difference in this case can be up to ~130%
for non-ascii/binary string encodings.

PR-URL: https://github.com/nodejs/node/pull/5134
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agostream: prevent object map change in TransformState
Evan Lucas [Tue, 2 Feb 2016 00:17:48 +0000 (18:17 -0600)]
stream: prevent object map change in TransformState

TransformState has the writeencoding property that gets set on the
first _write. It is not declared when the transform state is initially
constructed and can cause a deopt.

PR-URL: https://github.com/nodejs/node/pull/5032
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: remove unneeded bind() and related comments
Aayush Naik [Mon, 1 Feb 2016 10:34:14 +0000 (16:04 +0530)]
test: remove unneeded bind() and related comments

As mentioned in the comment of the changed file, "a libuv limitation
makes it necessary to bind()". But, that is not the case in this test.
The subsequent call to send() results in an implicit bind().

PR-URL: https://github.com/nodejs/node/pull/5023
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
8 years agobuffer: remove duplicated code in fromObject
HUANG Wei [Fri, 29 Jan 2016 10:15:32 +0000 (18:15 +0800)]
buffer: remove duplicated code in fromObject

Add fromArrayLike() to handle logic of copying in values from array-like
argument.

PR-URL: https://github.com/nodejs/node/pull/4948
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agodoc: clarify when writable.write callback is called
Kevin Locke [Fri, 22 Jan 2016 00:07:50 +0000 (16:07 -0800)]
doc: clarify when writable.write callback is called

The current documentation for writable.write only specifies that the
callback is called "once the data has been fully handled".  It is
ambiguous whether this means "successfully handled" and, if so,
whether the callback is called if the data can not be successfully
handled (i.e. an error occurs).

The ambiguity is not only in the documentation.  The stream class
implementations differ on this point.  stream.Writable invokes the
callback with any errors that occur during parameter checking or
during calls to _write.  However, not all classes return all errors
to _write. zlib.Zlib does pass argument and state errors to the
_write (_transform) callback, but does not pass data errors.
http.OutgoingMessage passes argument type errors and some other types
of errors, but not all.

This inconsistency is behind issue #1746 and, I suspect, other issues
in client code which passes a callback to write.

This commit takes no position on whether the callback error behavior
should changed, but simply attempts to document the current behavior
in a way that is open to changes so that users are not caught by
surprise.

PR-URL: https://github.com/nodejs/node/pull/4810
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
8 years agotest: move cluster tests to parallel
Rich Trott [Wed, 20 Jan 2016 03:54:35 +0000 (19:54 -0800)]
test: move cluster tests to parallel

Two cluster tests have recently changed so that they are no longer
resource intensive. Move them back to parallel.

Ref: https://github.com/nodejs/node/pull/4736
Ref: https://github.com/nodejs/node/pull/4739
PR-URL: https://github.com/nodejs/node/pull/4774
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agostream: prevent object map change in ReadableState
Evan Lucas [Tue, 19 Jan 2016 14:53:38 +0000 (08:53 -0600)]
stream: prevent object map change in ReadableState

ReadableState has the resumeScheduled property that helps determine if
a stream should be resumed. It was not assigned in the constructor.
When stream.resume is called on a readable stream that is not flowing,
it is set to true. This changes the property map of the ReadableState
which can cause a deopt in onEofChunk and needMoreData.

PR-URL: https://github.com/nodejs/node/pull/4761
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
8 years agosrc: return UV_EAI_NODATA on empty lookup
cjihrig [Fri, 15 Jan 2016 21:54:13 +0000 (16:54 -0500)]
src: return UV_EAI_NODATA on empty lookup

AfterGetAddrInfo() can potentially return an empty array of
results without setting an error value. The JavaScript layer
expects the array to have at least one value if an error is
not returned. This commit sets a UV_EAI_NODATA error when an
empty result array is detected.

Fixes: https://github.com/nodejs/node/issues/4545
PR-URL: https://github.com/nodejs/node/pull/4715
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
8 years agobuild: add option to select VS version
julien.waechter [Tue, 12 Jan 2016 08:21:46 +0000 (09:21 +0100)]
build: add option to select VS version

This changes vcbuild.bat to accept a new parameter (vc2015 or vc2013)
to select the version of Visual Studio to use.

PR-URL: https://github.com/nodejs/node/pull/4645
Reviewed-By: João Reis <reis@janeasystems.com>
8 years agodoc: add info to docs on how to submit docs patch
Sequoia McDowell [Fri, 8 Jan 2016 18:32:50 +0000 (13:32 -0500)]
doc: add info to docs on how to submit docs patch

The docs mentioned that the docs source live in
the node source, but did not link to same.

PR-URL: https://github.com/nodejs/node/pull/4591
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: add onboarding resources
Jeremiah Senkpiel [Mon, 9 Nov 2015 22:52:43 +0000 (17:52 -0500)]
doc: add onboarding resources

PR-URL: https://github.com/nodejs/node/pull/3726
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agolib: freelist: use .pop() for allocation
Anton Khlynovskiy [Tue, 26 Jan 2016 12:13:12 +0000 (15:13 +0300)]
lib: freelist: use .pop() for allocation

Array#pop() is known to be faster than Array#shift().
To be exact, it's O(1) vs. O(n). In this case there's no difference
from which side of the "pool" array the object is retrieved,
so .pop() should be preferred.

PR-URL: https://github.com/nodejs/node/pull/2174
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
8 years agowin,build: support Visual C++ Build Tools 2015
João Reis [Wed, 9 Mar 2016 11:58:06 +0000 (11:58 +0000)]
win,build: support Visual C++ Build Tools 2015

Invoke MSBuild specifying the target platform as generated by Gyp.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/5627

8 years agodoc: update V8 URL
Craig Akimoto [Wed, 2 Mar 2016 19:16:24 +0000 (11:16 -0800)]
doc: update V8 URL

https://code.google.com/p/v8/ redirects to the V8 issue tracker

PR-URL: https://github.com/nodejs/node/pull/5530
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: document fs.datasync(Sync)
Ron Korving [Wed, 24 Feb 2016 03:41:05 +0000 (12:41 +0900)]
doc: document fs.datasync(Sync)

The APIs are implemented but currently not documented.

PR-URL: https://github.com/nodejs/node/pull/5402
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: add Evan Lucas to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:17:57 +0000 (22:17 +1100)]
doc: add Evan Lucas to the CTC

8 years agodoc: add Rich Trott to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:19:01 +0000 (22:19 +1100)]
doc: add Rich Trott to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5276
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add Ali Ijaz Sheikh to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:19:41 +0000 (22:19 +1100)]
doc: add Ali Ijaz Sheikh to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5277
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add Сковорода Никита Андреевич to the CTC
Rod Vagg [Wed, 17 Feb 2016 11:20:24 +0000 (22:20 +1100)]
doc: add Сковорода Никита Андреевич to the CTC

Approved at CTC meeting
https://github.com/nodejs/node/issues/5409
Reviewers are CTC members who voted for this.

PR-URL: https://github.com/nodejs/node/pull/5278
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
8 years agodoc: add "building node with ninja" guide
Jeremiah Senkpiel [Tue, 19 Jan 2016 20:24:42 +0000 (15:24 -0500)]
doc: add "building node with ninja" guide

PR-URL: https://github.com/nodejs/node/pull/4767
Refs: https://github.com/nodejs/docs/pull/38
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
8 years agohttp,util: fix typos in comments
Alexander Makarenko [Wed, 17 Feb 2016 11:40:55 +0000 (14:40 +0300)]
http,util: fix typos in comments

Fix several typos in comments.

PR-URL: https://github.com/nodejs/node/pull/5279
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: clarify code of conduct reporting
Julie Pagano [Fri, 5 Feb 2016 20:33:31 +0000 (12:33 -0800)]
doc: clarify code of conduct reporting

Clarifies the code of conduct by making the following changes:

- Adds section headings to make it easier to quickly parse.
- Adds easy to find contact information.
- Adds link to TSC moderation policies.
- Moves attribution to the bottom of the page.

PR-URL: https://github.com/nodejs/node/pull/5107
Reviewed-By: Myles Borins <mborins@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kat Marchán <kzm@sykosomatic.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: fix links in Addons docs
Alexander Makarenko [Thu, 4 Feb 2016 10:20:03 +0000 (13:20 +0300)]
doc: fix links in Addons docs

Put links in a lexical order. Add missing links. Remove duplicates.

PR-URL: https://github.com/nodejs/node/pull/5072
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agostream: fix no data on partial decode
Brian White [Sun, 14 Feb 2016 17:25:40 +0000 (12:25 -0500)]
stream: fix no data on partial decode

Before this commit, it was possible to push a partial character
to a readable stream where it was decoded as an empty string and
then added to the internal buffer. This caused the stream to not
emit any data, even when the rest of the character bytes were pushed
separately, because of a non-zero length check of the first chunk in
the internal buffer.

Fixes: https://github.com/nodejs/node/issues/5223
PR-URL: https://github.com/nodejs/node/pull/5226
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agoWorking on v4.4.1
Myles Borins [Wed, 9 Mar 2016 06:47:06 +0000 (22:47 -0800)]
Working on v4.4.1

PR-URL: https://github.com/nodejs/node/pull/5301

8 years ago2016-03-08, Version 4.4.0 'Argon' (LTS) v4.4.0
Myles Borins [Thu, 18 Feb 2016 16:54:32 +0000 (08:54 -0800)]
2016-03-08, Version 4.4.0 'Argon' (LTS)

In December we announced that we would be doing a minor release in order to
get a number of voted on SEMVER-MINOR changes into LTS. Our ability to release this
was delayed due to the unforeseen security release v4.3. We are quickly bumping to
v4.4 in order to bring you the features that we had committed to releasing.

This release also includes over 70 fixes to our docs and over 50 fixes to tests.

The SEMVER-MINOR changes include:
  * deps:
    - An update to v8 that introduces a new flag --perf_basic_prof_only_functions (Ali Ijaz Sheikh) https://github.com/nodejs/node/pull/3609
  * http:
    - A new feature in http(s) agent that catches errors on *keep alived* connections (José F. Romaniello) https://github.com/nodejs/node/pull/4482
  * src:
    - Better support for Big-Endian systems (Bryon Leung) https://github.com/nodejs/node/pull/3410
  * tls:
    - A new feature that allows you to pass common SSL options to `tls.createSecurePair` (Коренберг Марк) https://github.com/nodejs/node/pull/2441
  * tools
    - a new flag `--prof-process` which will execute the tick processor on the provided isolate files (Matt Loring) https://github.com/nodejs/node/pull/4021

Notable semver patch changes include:

  * buld:
    - Support python path that includes spaces. This should be of particular interest to our Windows users who may have python living in `c:/Program Files` (Felix Becker) https://github.com/nodejs/node/pull/4841
  * https:
    - A potential fix for https://github.com/nodejs/node/issues/3692 HTTP/HTTPS client requests throwing EPROTO (Fedor Indutny) https://github.com/nodejs/node/pull/4982
  * installer:
    - More readable profiling information from isolate tick logs (Matt Loring) https://github.com/nodejs/node/pull/3032
  * *npm:
    - upgrade to npm 2.14.20 (Kat Marchán) https://github.com/nodejs/node/pull/5510
  * process:
    - Add support for symbols in event emitters. Symbols didn't exist when it was written ¯\_(ツ)_/¯ (cjihrig) https://github.com/nodejs/node/pull/4798
  * querystring:
    - querystring.parse() is now 13-22% faster! (Brian White) https://github.com/nodejs/node/pull/4675
  * streams:
    - performance improvements for moving small buffers that shows a 5% throughput gain. IoT projects have been seen to be as much as 10% faster with this change! (Matteo Collina) https://github.com/nodejs/node/pull/4354
  * tools:
    - eslint has been updated to version 2.1.0 (Rich Trott) https://github.com/nodejs/node/pull/5214

PR-URL: https://github.com/nodejs/node/pull/5301

8 years agodeps: upgrade to npm 2.14.20
Kat Marchán [Tue, 1 Mar 2016 18:35:25 +0000 (10:35 -0800)]
deps: upgrade to npm 2.14.20

PR-URL: https://github.com/nodejs/node/pull/5510
Review-by: Myles Borins <mborins@us.ibm.com>
8 years agodoc: remove out-of-date matter from internal docs
Rich Trott [Wed, 24 Feb 2016 22:21:16 +0000 (14:21 -0800)]
doc: remove out-of-date matter from internal docs

Remove out-of-date stability index material from `tools/doc/README.md`.
The stability index is documented in `doc/api/documentation.markdown`.

PR-URL: https://github.com/nodejs/node/pull/5421
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: explicit about VS 2015 support in readme
Phillip Johnsen [Wed, 24 Feb 2016 07:19:36 +0000 (08:19 +0100)]
doc: explicit about VS 2015 support in readme

`vcbuild.bat` already supports both Visual Studio 2013 and 2015.

PR-URL: https://github.com/nodejs/node/pull/5406
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: copyedit util doc
Rich Trott [Tue, 23 Feb 2016 23:05:26 +0000 (15:05 -0800)]
doc: copyedit util doc

Add verbs to make sentence fragments less fragmentary.

PR-URL: https://github.com/nodejs/node/pull/5399
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agodoc: mention prototype check in deepStrictEqual()
cjihrig [Mon, 22 Feb 2016 17:26:32 +0000 (12:26 -0500)]
doc: mention prototype check in deepStrictEqual()

The docs for assert.deepStrictEqual() do not currently mention
that prototypes are compared for objects. This commit adds that
information to the documentation.

Fixes: https://github.com/nodejs/node/issues/5365
PR-URL: https://github.com/nodejs/node/pull/5367
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: s/http/https in Myles Borins' GitHub link
Rod Vagg [Mon, 22 Feb 2016 05:20:08 +0000 (16:20 +1100)]
doc: s/http/https in Myles Borins' GitHub link

PR-URL: https://github.com/nodejs/node/pull/5356
Reviewed-By: Myles Borins <myles.borins@gmail.com>
8 years agodoc: clarify error handling in net.createServer
Dirceu Pereira Tiegs [Sun, 21 Feb 2016 18:07:27 +0000 (15:07 -0300)]
doc: clarify error handling in net.createServer

Remove indications that an error argument is sent to the `listen()` callback.

Fixes: https://github.com/nodejs/node/issues/5345
PR-URL: https://github.com/nodejs/node/pull/5353
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agodoc: `require` behavior on case-insensitive systems
Hugo Wood [Fri, 19 Feb 2016 20:55:23 +0000 (21:55 +0100)]
doc: `require` behavior on case-insensitive systems

This adds a paragraph in the Module Caching Caveats section about the
behavior of require when Node is running on top of a file system (e.g.
HFS) or operating system (e.g. Windows) that will not consider the case
of file paths to find files.

Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: remove flaky mark for test-debug-no-context
Rich Trott [Fri, 19 Feb 2016 04:23:22 +0000 (20:23 -0800)]
test: remove flaky mark for test-debug-no-context

test-debug-no-context flakiness was worked around in issue 5269 but the
flaky designation was left for the test. This change removes it.

Refs: https://github.com/nodejs/node/pull/5269
PR-URL: https://github.com/nodejs/node/pull/5317
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: add test for https server close event
Braydon Fuller [Fri, 5 Feb 2016 20:38:32 +0000 (15:38 -0500)]
test: add test for https server close event

PR-URL: https://github.com/nodejs/node/pull/5106
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agotest: use String.prototype.repeat() for clarity
Rich Trott [Thu, 18 Feb 2016 23:01:12 +0000 (15:01 -0800)]
test: use String.prototype.repeat() for clarity

There are a few places where tests repeatedly concatenate strings to
themselves in order to make them very long. Using `.repeat()` makes the
code clearer.

For example, before:

    for (var i = 0; i < 8; ++i) lots_of_headers += lots_of_headers;

After:

    lots_of_headers = lots_of_headers.repeat(256);

Using `.repeat()` makes it clear that the string will be repeated 256
times rather than 8 times. ("What?! That first one doesn't repeat 256
times! It only repeats 8... Oh, wait. Yes, I see your point now.")

PR-URL: https://github.com/nodejs/node/pull/5311
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: update repo docs to use 'CTC'
Alexis Campailla [Thu, 18 Feb 2016 17:26:43 +0000 (18:26 +0100)]
doc: update repo docs to use 'CTC'

PR-URL: https://github.com/nodejs/node/pull/5304
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agotest: mitigate flaky test-debug-no-context
Rich Trott [Wed, 17 Feb 2016 03:59:56 +0000 (19:59 -0800)]
test: mitigate flaky test-debug-no-context

Change test so that it passes on the occasional win10 access violation.

The workaround here can be undone when issue 5268 is resolved.

The test still detects the defect it was written to detect. There are
two assertions that detect the defect and only one was disabled.

Ref: https://github.com/nodejs/node/issues/5268
Fixes: https://github.com/nodejs/node/issues/4343
PR-URL: https://github.com/nodejs/node/pull/5269
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agonet: use `_server` for internal book-keeping
Fedor Indutny [Tue, 16 Feb 2016 20:09:31 +0000 (15:09 -0500)]
net: use `_server` for internal book-keeping

The role of `this.server` is now split between `this._server` and
`this.server`. Where the first one is used for counting active
connections of `net.Server`, and the latter one is just a public API for
users' consumption.

The reasoning for this is simple, `TLSSocket` instances wrap
`net.Socket` instances, thus both refer to the `net.Server` through the
`this.server` property. However, only one of them should be used for
`net.Server` connection count book-keeping, otherwise double-decrement
will happen on socket destruction.

Fix: #5083
PR-URL: https://github.com/nodejs/node/pull/5262
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agodoc: improvements to crypto.markdown copy
Alexander Makarenko [Mon, 15 Feb 2016 00:40:53 +0000 (03:40 +0300)]
doc: improvements to crypto.markdown copy

Fix several typos. Add missing links.

PR-URL: https://github.com/nodejs/node/pull/5230
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agoconsole: apply null as `this` for util.format
Jackson Tian [Sun, 14 Feb 2016 07:32:33 +0000 (15:32 +0800)]
console: apply null as `this` for util.format

Util.format is just a stateless function. Apply current console
as `this` is unnecessary.

PR-URL: https://github.com/nodejs/node/pull/5222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agocluster: dont rely on `this` in `fork`
Igor Klopov [Sat, 13 Feb 2016 11:35:40 +0000 (06:35 -0500)]
cluster: dont rely on `this` in `fork`

PR-URL: https://github.com/nodejs/node/pull/5216
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agonode: set process._eventsCount to 0 on startup
Evan Lucas [Fri, 12 Feb 2016 21:14:42 +0000 (15:14 -0600)]
node: set process._eventsCount to 0 on startup

process is an EventEmitter. There are operations that increment and
decrement the _eventsCount property of an EventEmitter.
process._eventsCount would previously get set to NaN. This change makes
process._eventsCount be calculated as expected.

PR-URL: https://github.com/nodejs/node/pull/5208
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agobuild: treat aarch64 as arm64
Johan Bergström [Thu, 11 Feb 2016 02:57:20 +0000 (13:57 +1100)]
build: treat aarch64 as arm64

`Makefile` is now consistent with `configure` regarding
how we treat aarch64.

PR-URL: https://github.com/nodejs/node/pull/5191
Fixes: https://github.com/nodejs/node/issues/5175
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotls: nullify `.ssl` on handle close
Fedor Indutny [Tue, 9 Feb 2016 21:00:24 +0000 (16:00 -0500)]
tls: nullify `.ssl` on handle close

This is an intermediate fix for an issue of accessing `TLSWrap` fields
after the parent handle was destroyed. While `close` listener cleans up
this field automatically, it can be done even earlier at the
`TLSWrap.close` call.

Proper fix is going to be submitted and landed after this one.

Fix: #5108
PR-URL: https://github.com/nodejs/node/pull/5168
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
8 years agodebugger: assert test before accessing this.binding
Prince J Wesley [Mon, 8 Feb 2016 22:03:19 +0000 (03:33 +0530)]
debugger: assert test before accessing this.binding

PR-URL: https://github.com/nodejs/node/pull/5145
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agocrypto: have fixed NodeBIOs return EOF
Adam Langley [Fri, 5 Feb 2016 19:22:49 +0000 (11:22 -0800)]
crypto: have fixed NodeBIOs return EOF

Prior to this change, the NodeBIO objects used to wrap fixed data had
`num` equal to -1. This caused them to return -1 and set the retry flags
when they ran out of data. Since the data is fixed, that's incorrect.
Instead they should return zero to signal EOF.

This change adds a new, static function, NodeBIO::NewFixed to create a
BIO that wraps fixed data and which returns zero when exhausted.

The practical impact of this is limited since most (all?) the parsing
functions that these BIOs get passed to consider any return value less
than one to be EOF and ignore the retry flags anyway.

PR-URL: https://github.com/nodejs/node/pull/5105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agobuild: add a help message and removed a TODO.
Ojas Shirekar [Fri, 5 Feb 2016 05:10:53 +0000 (10:40 +0530)]
build: add a help message and removed a TODO.

Add a help message for --systemtap-includes
optparse.SUPPRESS_HELP was replaced by help message
and the TODO comment was removed

Refs: https://github.com/nodejs/node/issues/4607
PR-URL: https://github.com/nodejs/node/pull/5080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agobuild: remove redundant TODO in configure
Ojas Shirekar [Fri, 5 Feb 2016 05:05:17 +0000 (10:35 +0530)]
build: remove redundant TODO in configure

Remove a redundant TODO in configure:
"# TODO(srl295): EBCDIC should be 'e'"
as there is no plan to support EBCDIC systems any time soon.

Refs: https://github.com/nodejs/node/issues/4607
PR-URL: https://github.com/nodejs/node/pull/5080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>