platform/upstream/nodejs.git
9 years agosrc: reduce cpu profiler overhead
Ben Noordhuis [Thu, 29 Jan 2015 17:48:30 +0000 (18:48 +0100)]
src: reduce cpu profiler overhead

Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active.

The benefits are quite substantial on systems where it is expensive to
query the system time (most virtualized environments). Before, it was
common to see over 20% of wall clock time being spent on clock_gettime()
system calls.

PR: https://github.com/iojs/io.js/pull/466
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agobenchmark: don't use template strings
Evan Lucas [Wed, 4 Feb 2015 08:24:28 +0000 (02:24 -0600)]
benchmark: don't use template strings

When running benchmark/compare.js, it is typical to run a version of
node that does not support template strings. This provides backwards
compatibility for comparing benchmarks using older versions of node.

PR-URL: https://github.com/iojs/io.js/pull/714
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: simplified pure consensus seeking
Mikeal Rogers [Sat, 31 Jan 2015 00:04:38 +0000 (19:04 -0500)]
doc: simplified pure consensus seeking

This changes TC addition to a standard TC motion instead
of requiring unanimous consent of all members.

PR-URL: https://github.com/iojs/io.js/pull/677
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: update streams wg charter
Chris Dickinson [Fri, 30 Jan 2015 21:47:27 +0000 (13:47 -0800)]
doc: update streams wg charter

PR-URL: https://github.com/iojs/io.js/pull/599
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agoAdjusting for feedback in the PR.
Mikeal Rogers [Fri, 30 Jan 2015 18:58:44 +0000 (13:58 -0500)]
Adjusting for feedback in the PR.

9 years agoInitial documentation for working groups.
Mikeal Rogers [Sat, 24 Jan 2015 22:11:06 +0000 (17:11 -0500)]
Initial documentation for working groups.

9 years agodoc: add GPG fingerprint for chrisdickinson
Chris Dickinson [Tue, 3 Feb 2015 23:16:13 +0000 (15:16 -0800)]
doc: add GPG fingerprint for chrisdickinson

PR-URL: https://github.com/iojs/io.js/pull/710
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: add TC meeting 2015-01-28 minutes
Rod Vagg [Tue, 3 Feb 2015 04:28:49 +0000 (15:28 +1100)]
doc: add TC meeting 2015-01-28 minutes

PR-URL: https://github.com/iojs/io.js/pull/699
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agoWorking on v1.1.1
Chris Dickinson [Tue, 3 Feb 2015 22:19:29 +0000 (14:19 -0800)]
Working on v1.1.1

9 years ago2015-02-03 io.js v1.1.0 Release v1.1.0
Chris Dickinson [Tue, 3 Feb 2015 22:13:21 +0000 (14:13 -0800)]
2015-02-03 io.js v1.1.0 Release

Notable changes:

* debug: fix v8 post-mortem debugging.
* crypto: publicEncrypt now supports password-protected private keys.
* crypto: ~30% speedup on hashing functions.
* errors
  - better formatting via util.inspect
  - more descriptive errors from fs. This necessitated a
    NODE_MODULE_VERSION bump.
  - more descriptive errors from http.setHeader
* dep updates:
  - npm: upgrade to 2.4.1
  - http-parser: rollback to 2.3.0
  - libuv: update to 1.3.0
  - v8: update to 4.1.0.14
* http.request: inherited properties on options are now respected
* add iterable interface to buffers.
* fs: fix fd leak on `fs.createReadStream`. See 497fd72 for details.
* installer: on Windows, emit WM_SETTINGCHANGE after install to make
  other running processes aware of the PATH changes.
* Added new collaborators:
  - Vladimir Kurchatkin (@vkurchatkin)
  - Micleușanu Nicu (@micnic)

9 years agotools: add release tool and docs, remove old tools
Rod Vagg [Sat, 31 Jan 2015 10:55:37 +0000 (21:55 +1100)]
tools: add release tool and docs, remove old tools

Also added binary download documentation to the README.md and
GPG release key fingerprint for @rvagg.

PR-URL: https://github.com/iojs/io.js/pull/681
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agov8abbr: ASCIISTRINGTAG => ONEBYTESTRINGTAG
Fedor Indutny [Tue, 3 Feb 2015 13:59:48 +0000 (16:59 +0300)]
v8abbr: ASCIISTRINGTAG => ONEBYTESTRINGTAG

Fix: iojs/io.js#461
PR-URL: https://github.com/iojs/io.js/pull/706
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agogyp: enable postmortem support, fix dtrace paths
Fedor Indutny [Tue, 3 Feb 2015 13:59:35 +0000 (16:59 +0300)]
gyp: enable postmortem support, fix dtrace paths

Fix: iojs/io.js#461
PR-URL: https://github.com/iojs/io.js/pull/706
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: fix postmortem support in v8
Fedor Indutny [Tue, 3 Feb 2015 13:59:19 +0000 (16:59 +0300)]
deps: fix postmortem support in v8

Fix: iojs/io.js#461
PR-URL: https://github.com/iojs/io.js/pull/706
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodtrace: fix removal of unused probes
Glen Keane [Tue, 3 Feb 2015 09:46:34 +0000 (09:46 +0000)]
dtrace: fix removal of unused probes

Fixes Windows compile failures introduced in d75fecf6f

PR-URL: https://github.com/iojs/io.js/pull/703
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agohttp: replace util._extend() with [].slice()
Jonathan Ong [Wed, 28 Jan 2015 04:08:43 +0000 (20:08 -0800)]
http: replace util._extend() with [].slice()

PR-URL: https://github.com/iojs/io.js/pull/634
Reviewed-BY: Nicu Micleușanu <micnic90@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agobenchmark: clean up common.js
Brendan Ashworth [Fri, 30 Jan 2015 02:15:57 +0000 (18:15 -0800)]
benchmark: clean up common.js

This commit cleans up `benchmark/common.js` with a few generic changes
such as the following:

- declare all `require()`'d libraries at the top instead of in the
  middle
- add some empty whitespace where it helps readability
- changes ambiguous variable names
- standardizes most if / else blocks
- missing semicolons

PR-URL: https://github.com/iojs/io.js/pull/662
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agocrypto: support passwords in publicEncrypt
Calvin Metcalf [Tue, 27 Jan 2015 19:58:22 +0000 (14:58 -0500)]
crypto: support passwords in publicEncrypt

Private keys may be used along with publicEncrypt since the private key
includes the public one.  This adds the ability to use encrypted private
keys which previously threw an error.  This commit also makes sure the
user exposed functions have names.

PR-URL: https://github.com/iojs/io.js/pull/626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoprocess: fix regression in unlistening signals
Sam Roberts [Tue, 30 Dec 2014 02:00:02 +0000 (18:00 -0800)]
process: fix regression in unlistening signals

When the last signal listener is removed, the signal wrap should be
closed, restoring the default signal handling behaviour. This is done in
a (patched) process.removeListener(). However, events.removeAllListeners
has an optimization to avoid calling removeListener() if there are no
listeners for the 'removeListener' event, introduced in 56668f54d1. That
caused the following code to fail to terminate:

    process.stdin.resume();
    function listener() {};
    process.on('SIGINT', listener);
    process.removeAllListeners('SIGINT');
    process.kill(process.pid, 'SIGINT')

while the following will terminate:

    process.stdin.resume();
    function listener() {};
    process.on('SIGINT', listener);
    process.removeListener('SIGINT', listener);
    process.kill(process.pid, 'SIGINT')

Replace the method patching with use of the 'newListener' and
'removeListener' events, which will fire no matter which methods are
used to add or remove listeners.

PR-URL: https://github.com/iojs/io.js/pull/687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoevents: remove indeterminancy from event ordering
Sam Roberts [Mon, 2 Feb 2015 03:57:31 +0000 (19:57 -0800)]
events: remove indeterminancy from event ordering

The order of the `newListener` and `removeListener` events with respect
to the actual adding and removing from the underlying listeners array
should be deterministic. There is no compelling reason for leaving it
indeterminate. Changing the ordering is likely to result in breaking
code that was unwittingly relying on the current behaviour, and the
indeterminancy makes it impossible to use these events to determine when
the first or last listener is added for an event.

PR-URL: https://github.com/iojs/io.js/pull/687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: remove unused dtrace probes
Glen Keane [Mon, 2 Feb 2015 18:57:17 +0000 (18:57 +0000)]
src: remove unused dtrace probes

Removed DTRACE_NET_SOCKET_READ and DTRACE_NET_SOCKET_WRITE
as they were never called from within the source code.

PR-URL: https://github.com/iojs/io.js/pull/694
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agonet: check close callback is function
Yosuke Furukawa [Mon, 26 Jan 2015 17:55:19 +0000 (02:55 +0900)]
net: check close callback is function

PR-URL: https://github.com/iojs/io.js/pull/609
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agodgram: check close callback is function
Yosuke Furukawa [Mon, 26 Jan 2015 17:28:18 +0000 (02:28 +0900)]
dgram: check close callback is function

PR-URL: https://github.com/iojs/io.js/pull/609
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agolib: reduce util.is*() usage
cjihrig [Thu, 29 Jan 2015 01:05:53 +0000 (20:05 -0500)]
lib: reduce util.is*() usage

Many of the util.is*() methods used to check data types
simply compare against a single value or the result of
typeof. This commit replaces calls to these methods with
equivalent checks. This commit does not touch calls to the
more complex methods (isRegExp(), isDate(), etc.).

Fixes: https://github.com/iojs/io.js/issues/607
PR-URL: https://github.com/iojs/io.js/pull/647
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: make node-gyp work again on windows
Bert Belder [Thu, 15 Jan 2015 00:39:30 +0000 (01:39 +0100)]
deps: make node-gyp work again on windows

* Fetch from the correct url.
* Link compiled addons with iojs.lib instead of node.lib.
* Disable checksum checks for iojs.lib until our website supports
  them.

PR: https://github.com/iojs/io.js/pull/422
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
9 years agodeps: make node-gyp fetch tarballs from iojs.org
Ben Noordhuis [Tue, 13 Jan 2015 22:22:49 +0000 (23:22 +0100)]
deps: make node-gyp fetch tarballs from iojs.org

Apply a small patch that makes node-gyp fetch the tarballs from
https://iojs.org/ instead of http://nodejs.org/

A patch better suited for inclusion upstream will be put together
shortly.

PR-URL: https://github.com/iojs/io.js/pull/343
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodeps: upgrade npm to 2.4.1
Forrest L Norvell [Fri, 30 Jan 2015 11:12:07 +0000 (03:12 -0800)]
deps: upgrade npm to 2.4.1

PR-URL: https://github.com/iojs/io.js/pull/663
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoassert: use util.inspect() to create error messages
cjihrig [Fri, 30 Jan 2015 15:25:32 +0000 (10:25 -0500)]
assert: use util.inspect() to create error messages

Currently, JSON.stringify() is used to create error messages
on failed assertions. This causes an error when stringifying
objects with circular references. This commit switches out
JSON.stringify() for util.inspect(), which can handle
circular references.

PR-URL: https://github.com/iojs/io.js/pull/668
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agofs: improve error messages
Bert Belder [Sat, 31 Jan 2015 10:48:34 +0000 (11:48 +0100)]
fs: improve error messages

* Include a description for the error message
* For rename, link, and symlink, include both the source and destination
  path in the error message.
* Expose the destination path as the `dest` property on the error object.
* Fix a bug where `ThrowUVException()` would incorrectly delegate to
  `Environment::TrowErrnoException()`.

API impact:
* Adds an extra overload for node::UVException() which takes 6
  arguments.

PR: https://github.com/iojs/io.js/pull/675
Fixes: https://github.com/iojs/io.js/issues/207
Closes: https://github.com/iojs/io.js/pull/293
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agolib: fix max size check in Buffer constructor
Ben Noordhuis [Thu, 29 Jan 2015 19:57:54 +0000 (20:57 +0100)]
lib: fix max size check in Buffer constructor

A number -> uint32 type coercion bug made buffer sizes
larger than kMaxLength (0x3fffffff) wrap around.

Instead of rejecting the requested size with an exception,
the constructor created a buffer with the wrong size.

PR-URL: https://github.com/iojs/io.js/pull/657
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodgram: implicit binds should be exclusive
Sam Roberts [Sat, 10 Jan 2015 03:25:07 +0000 (04:25 +0100)]
dgram: implicit binds should be exclusive

Server sockets should be shared by default, and client sockets should be
exclusive by default. For net/TCP, this is how it is, for dgram/UDP, its
a little less clear what a client socket is, but a socket that is
auto-bound during a dgram.send() is not usefully shared among cluster
workers, any more than an outgoing TCP connection would be usefully
shared.

Since implicit binds become exclusive, implicit/client dgram sockets can
now be used with cluster on Windows. Before, neither explicit nor
implicitly bound sockets could be used, causing dgram to be completely
unsupported with cluster on Windows. After this change, they become half
supported.

PR: https://github.com/iojs/io.js/pull/325
PR: https://github.com/joyent/node/pull/8643
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agobenchmark: remove extra spacing in http options
Brendan Ashworth [Thu, 29 Jan 2015 06:14:57 +0000 (22:14 -0800)]
benchmark: remove extra spacing in http options

This commit removes the benchmark spacing modification in
`client-request-body.js` and `end-vs-write-end.js` which adds two spaces
to the end of some variables to make sure the lines line up.

The reason behind this is that its totally pointless (the lines don't
actually line up with it) and it disallows you to parse the output with
a tool like awk, or at least makes it a lot harder.

PR-URL: https://github.com/iojs/io.js/pull/650
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agoutil: use on-stack buffer for Utf8Value
Fedor Indutny [Fri, 30 Jan 2015 18:43:31 +0000 (21:43 +0300)]
util: use on-stack buffer for Utf8Value

Improves `crypto.createHash().update().digest()` performance by 10%.

PR-URL: https://github.com/iojs/io.js/pull/670
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agocrypto: use on-stack storage in HashUpdate
Fedor Indutny [Fri, 30 Jan 2015 12:12:48 +0000 (15:12 +0300)]
crypto: use on-stack storage in HashUpdate

Boosts speed up to 10% on primitive `createHash().update().digest()`
benchmark.

PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agostring_bytes: introduce InlineDecoder
Fedor Indutny [Fri, 30 Jan 2015 12:35:11 +0000 (15:35 +0300)]
string_bytes: introduce InlineDecoder

PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agonode: speed up ParseEncoding
Fedor Indutny [Fri, 30 Jan 2015 12:05:28 +0000 (15:05 +0300)]
node: speed up ParseEncoding

Handle most popular cases in a trie-style, branching on a first
character.

Remove useless HandleScope which was only eating time without producing
any value.

PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodocs: add note about default padding in crypto
Calvin Metcalf [Thu, 29 Jan 2015 21:05:41 +0000 (16:05 -0500)]
docs: add note about default padding in crypto

Adds a note that the default padding for publicDecrypt/privateEncrypt
is RSA_PKCS1_PADDING instead of RSA_PKCS1_OAEP_PADDING as it is for
privateDecrypt/publicEncrypt.

PR-URL: https://github.com/iojs/io.js/pull/659
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agohttp: more descriptive setHeader errors
Qasim Zaidi [Sat, 17 Jan 2015 09:03:36 +0000 (14:33 +0530)]
http: more descriptive setHeader errors

PR-URL: https://github.com/iojs/io.js/pull/480
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agodeps: upgrade v8 to 4.1.0.14
Ben Noordhuis [Thu, 29 Jan 2015 02:30:09 +0000 (03:30 +0100)]
deps: upgrade v8 to 4.1.0.14

PR-URL: https://github.com/iojs/io.js/pull/656
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
9 years agodoc: add micnic as collaborator
Micleusanu Nicu [Thu, 29 Jan 2015 06:15:36 +0000 (08:15 +0200)]
doc: add micnic as collaborator

PR-URL: https://github.com/iojs/io.js/pull/651
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodoc: add more info to benchmark/README.md
Fishrock123 [Tue, 27 Jan 2015 23:28:41 +0000 (18:28 -0500)]
doc: add more info to benchmark/README.md

Adds info on the `wrk` prerequisite for http benchmarks and how to
run benchmarks with options.

PR-URL: https://github.com/iojs/io.js/pull/629
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agodeps: update libuv to 1.3.0
Saúl Ibarra Corretgé [Wed, 28 Jan 2015 21:14:19 +0000 (22:14 +0100)]
deps: update libuv to 1.3.0

PR-URL: https://github.com/iojs/io.js/pull/644
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild: configure formatting, add final message
Roman Reiss [Wed, 28 Jan 2015 16:46:19 +0000 (17:46 +0100)]
build: configure formatting, add final message

This restores the pretty-printed options output for improved
readability and adds a final warning message to inform on possibly
scrolled-off warnings.

PR-URL: https://github.com/iojs/io.js/pull/638
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: set default signal dispositions at start-up
Ben Noordhuis [Mon, 26 Jan 2015 23:07:34 +0000 (00:07 +0100)]
src: set default signal dispositions at start-up

Signal dispositions are inherited by child processes.  Restore ours to
sane defaults in case our parent process changed it, to prevent quirky
behavior when the parent does something silly like ignoring SIGSEGV.

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
9 years agosrc: rework early debug signal handling
Ben Noordhuis [Mon, 26 Jan 2015 22:26:33 +0000 (23:26 +0100)]
src: rework early debug signal handling

Instead of installing an early debug signal handler, simply block the
SIGUSR1 signal at start-up and unblock it when the debugger is ready.

Both approaches are functionally equivalent but blocking the signal
accomplishes it in fewer lines of code.

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
9 years agosrc: do platform-specific initialization earlier
Ben Noordhuis [Mon, 26 Jan 2015 22:15:20 +0000 (23:15 +0100)]
src: do platform-specific initialization earlier

Execute the per-platform initialization logic as early as possible,
for two reasons:

1. It opens the way for an upcoming commit to simplify early SIGUSR1
   handling.

2. It should make life easier for embedders because io.js no longer
   mucks around with the file descriptor limit or signal disposition
   of the process.

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
9 years agotest: add http upgrade header regression test
Ben Noordhuis [Tue, 27 Jan 2015 22:02:40 +0000 (23:02 +0100)]
test: add http upgrade header regression test

Add a regression test for https://github.com/iojs/io.js/issues/627.

Before the http_parser rollback to 2.3.0, the request callback was
called but an 'upgrade' event was not emitted, even though there is
an Upgrade header present in the request.

PR-URL: https://github.com/iojs/io.js/pull/628
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
9 years agodeps: roll back http_parser to 2.3.0
Ben Noordhuis [Tue, 27 Jan 2015 21:54:05 +0000 (22:54 +0100)]
deps: roll back http_parser to 2.3.0

Commit 598efcbe ("deps: update http_parser to 2.4.1") introduced a
regression in HTTP Upgrade header handling.

Fixes: https://github.com/iojs/io.js/issues/627
PR-URL: https://github.com/iojs/io.js/pull/628
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
9 years agocrypto: remove use of this._readableState
Calvin Metcalf [Mon, 26 Jan 2015 20:39:52 +0000 (15:39 -0500)]
crypto: remove use of this._readableState

Per #445 this removes a reference to this._readableState in hash._flush. It was
used to get the encoding on the readable side to pass to the writable side but
omitting it just causes the stream to handle the encoding issues.

PR-URL: https://github.com/iojs/io.js/pull/610
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agobuffer: implement `iterable` interface
Vladimir Kurchatkin [Tue, 23 Dec 2014 18:03:54 +0000 (21:03 +0300)]
buffer: implement `iterable` interface

This makes possible to use `for..of` loop with
buffers. Also related `keys`, `values` and `entries`
methods are added for feature parity with `Uint8Array`.

PR-URL: https://github.com/iojs/io.js/pull/525
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoconsole: allow Object.prototype fields as labels
cjihrig [Fri, 23 Jan 2015 01:16:36 +0000 (20:16 -0500)]
console: allow Object.prototype fields as labels

Console.prototype.timeEnd() returns NaN if the timer label
corresponds to a property on Object.prototype. This commit
uses a Map to construct the _times object.

Fixes: https://github.com/joyent/node/issues/9069
PR-URL: https://github.com/iojs/io.js/pull/563
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agocrypto: implement privateEncrypt/publicDecrypt
Fedor Indutny [Tue, 27 Jan 2015 19:58:14 +0000 (22:58 +0300)]
crypto: implement privateEncrypt/publicDecrypt

PR-URL: https://github.com/iojs/io.js/pull/625
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fix iojs/io.js#477

9 years agowatchdog: fix timeout for early polling return
Saúl Ibarra Corretgé [Tue, 27 Jan 2015 12:40:40 +0000 (13:40 +0100)]
watchdog: fix timeout for early polling return

Switch from running the loop with UV_RUN_ONCE to UV_RUN_DEFAULT, because
it's possible that the poll returns earlier than expected and thus the
timer is not run on a single interation.

The loop is not stopped either from the timer callback or from the async
handle's.

PR-URL: https://github.com/iojs/io.js/pull/622
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agobenchmark: add bench-(url & events) make targets
Yosuke Furukawa [Fri, 23 Jan 2015 23:56:04 +0000 (08:56 +0900)]
benchmark: add bench-(url & events) make targets

PR-URL: https://github.com/iojs/io.js/pull/584
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agoRevert "doc: clarify fs.symlink and fs.symlinkSync parameters"
Bert Belder [Tue, 23 Dec 2014 23:54:39 +0000 (00:54 +0100)]
Revert "doc: clarify fs.symlink and fs.symlinkSync parameters"

The offending doc change clarified nothing, but put the arguments to
fs.symlink() and fs.symlinkSync() in the wrong order.

This reverts commit 8146f2e6077df08ff9db01d400c186dc90df2d61.

BUG: https://github.com/joyent/node/issues/8920
PR: https://github.com/joyent/node/pull/8936

9 years agowin,msi: broadcast WM_SETTINGCHANGE after install
Mathias Küsel [Tue, 27 Jan 2015 15:01:23 +0000 (16:01 +0100)]
win,msi: broadcast WM_SETTINGCHANGE after install

In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all
windows after modifying the PATH environment variable. This ensures that
the new PATH is visible to other processes without restarting windows
(although it's still necessary to close and reopen active console
windows).

Unfortunately, the broadcast doesn't always happen, for unknown reasons.
That's why this patch adds a custom action that unconditionally
broadcasts a WM_SETTINGCHANGE message.

Bug: https://github.com/iojs/io.js/issues/603
PR: https://github.com/iojs/io.js/pull/613
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agobuild: remove artefacts on distclean
Johan Bergström [Tue, 13 Jan 2015 03:24:32 +0000 (14:24 +1100)]
build: remove artefacts on distclean

since .pkg-files already lives in out/ they're already gone. instead of
moving artefacts into out/ (which might mess with upload scripts),
delete their current location.

PR-URL: https://github.com/iojs/io.js/pull/323
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotest: fs.createReadStream().destroy() fd leak
Rod Vagg [Thu, 4 Dec 2014 05:37:36 +0000 (16:37 +1100)]
test: fs.createReadStream().destroy() fd leak

PR-URL: https://github.com/iojs/io.js/pull/56
Reviewed-By: Rod Vagg <rod@vagg.org>
See PR for long discussion

9 years agofs: fix fd leak in ReadStream.destroy()
Alex Kocharin [Thu, 14 Aug 2014 20:29:56 +0000 (00:29 +0400)]
fs: fix fd leak in ReadStream.destroy()

PR-URL: https://github.com/iojs/io.js/pull/56
Reviewed-By: Rod Vagg <rod@vagg.org>
See PR for long discussion

9 years agodoc: add links for http_parser/libuv upgrades
Michael Hart [Fri, 16 Jan 2015 19:04:55 +0000 (14:04 -0500)]
doc: add links for http_parser/libuv upgrades

PR-URL: https://github.com/iojs/io.js/pull/471
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agosrc: remove excessive license boilerplate
Aleksey Smolenchuk [Mon, 26 Jan 2015 21:13:28 +0000 (13:13 -0800)]
src: remove excessive license boilerplate

PR-URL: https://github.com/iojs/io.js/pull/611
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: fix net.Server.listen bind behavior
Andres Suarez [Mon, 19 Jan 2015 02:24:11 +0000 (21:24 -0500)]
doc: fix net.Server.listen bind behavior

PR-URL: https://github.com/iojs/io.js/pull/503
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: update writable streams default encoding
Johnny Ray Austin [Mon, 19 Jan 2015 01:48:32 +0000 (20:48 -0500)]
doc: update writable streams default encoding

Setting the default encoding for a writable stream does
not return a boolean (true if successful or false if not)
as the docs indicate. Instead, if the operation is successful
nothing is returned and the method throws an error when
something goes wrong.

This stems from a contribution that was tweaked but the
docs were never updated accordingly.

PR-URL: https://github.com/iojs/io.js/pull/502
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: fix minor grammar mistake in streams docs
ttrfwork [Mon, 26 Jan 2015 07:32:11 +0000 (10:32 +0300)]
doc: fix minor grammar mistake in streams docs

PR-URL: https://github.com/iojs/io.js/pull/606
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agobuild: disable v8 snapshots
Ben Noordhuis [Sat, 24 Jan 2015 00:06:07 +0000 (01:06 +0100)]
build: disable v8 snapshots

Snapshots speed up start-up by a few milliseconds but are potentially
dangerous because of the fixed hash seed that is used for strings and
dictionaries, making collision denial-of-service attacks possible.

Release builds on iojs.org have snapshots disabled but source builds
did not, until now.

The risk for individual source builds is low; the binary gets a random
32 bits hash seed that should be hard to guess by an external attacker.

It's when binaries are distributed by, for example, a distro vendor
that the fixed hash seed becomes a vulnerability, because then it's
possible to target a large group of people at once.

People that really need the faster start-up time can use the new
--with-snapshot configure flag.

PR-URL: https://github.com/iojs/io.js/pull/585
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agoversions: add http-parser patchlevel
Johan Bergström [Mon, 26 Jan 2015 23:08:44 +0000 (10:08 +1100)]
versions: add http-parser patchlevel

PR-URL: https://github.com/iojs/io.js/pull/614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agochild_process: clone spawn options argument
cjihrig [Fri, 23 Jan 2015 22:18:55 +0000 (17:18 -0500)]
child_process: clone spawn options argument

spawnSync() modifies the options argument. This commit makes
a copy of options before any modifications occur.

Fixes: https://github.com/iojs/io.js/issues/576
PR-URL: https://github.com/iojs/io.js/pull/579
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodeps: update http_parser to 2.4.2
Fedor Indutny [Sun, 25 Jan 2015 18:23:45 +0000 (21:23 +0300)]
deps: update http_parser to 2.4.2

Fix: https://github.com/iojs/io.js/issues/588
PR-URL: https://github.com/iojs/io.js/pull/604
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: add seishun as a collaborator
Nikolai Vavilov [Sat, 24 Jan 2015 21:38:10 +0000 (23:38 +0200)]
doc: add seishun as a collaborator

PR-URL: https://github.com/iojs/io.js/pull/598
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agochild_process: remove redundant condition
Vladimir Kurchatkin [Mon, 19 Jan 2015 15:48:56 +0000 (18:48 +0300)]
child_process: remove redundant condition

There is no need to check `flowing` since `resume` does
nothing when `flowing` is already true.

PR-URL: https://github.com/iojs/io.js/pull/511
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agohttp: don't bother making a copy of the options
Jonathan Ong [Sat, 24 Jan 2015 18:41:24 +0000 (10:41 -0800)]
http: don't bother making a copy of the options

Alternative to https://github.com/iojs/io.js/pull/592. The `options` object is never overwritten, so making a copy is not necessary.

This solves issues such as https://github.com/petkaantonov/urlparser/issues where the options object is created from a constructor.

PR-URL: https://github.com/iojs/io.js/pull/593
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agodoc: add vkurchatkin as collaborator
Vladimir Kurchatkin [Sat, 24 Jan 2015 18:29:05 +0000 (21:29 +0300)]
doc: add vkurchatkin as collaborator

PR-URL: https://github.com/iojs/io.js/pull/591
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agoWorking on 1.0.5
Rod Vagg [Sat, 24 Jan 2015 11:40:43 +0000 (22:40 +1100)]
Working on 1.0.5

9 years ago2015-01-24 io.js v1.0.4 Release v1.0.4
Rod Vagg [Sat, 24 Jan 2015 11:33:10 +0000 (22:33 +1100)]
2015-01-24 io.js v1.0.4 Release

Notable changes:

* npm upgrade to 2.3.0 fixes Windows "uid is undefined" errors
* crypto.pseudoRandomBytes() is now an alias for crypto.randomBytes()
  and will block if there is insufficient entropy to produce secure
  values. See https://github.com/iojs/io.js/commit/e5e5980 for details.
* Patch for V8 to properly detect ARMv6; binaries now work again on
  ARMv6 (Raspberry Pi etc.)
* Minor V8 upgrade from 4.1.0.7 to 4.1.0.12
* 'punycode' core module bumped from stability level 2-Unstable,
  to 3-Stable
* Added new collaborators:
  - Thorsten Lorenz (@thlorenz)
  - Stephen Belanger (@qard)
  - Jeremiah Senkpiel (@fishrock123)
  - Evan Lucas (@evanlucas)
  - Brendan Ashworth (@brendanashworth)

9 years agodoc: update "net" section in node to io.js changes
Andres Suarez [Fri, 23 Jan 2015 04:56:16 +0000 (23:56 -0500)]
doc: update "net" section in node to io.js changes

PR-URL: https://github.com/iojs/io.js/pull/567
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agotools: remove old updateAuthors.awk script
Rod Vagg [Fri, 23 Jan 2015 23:00:56 +0000 (10:00 +1100)]
tools: remove old updateAuthors.awk script

Using the new tools/update-authors.sh script so this is
redundant

PR-URL: https://github.com/iojs/io.js/pull/582
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: update AUTHORS list
Rod Vagg [Fri, 23 Jan 2015 23:00:12 +0000 (10:00 +1100)]
doc: update AUTHORS list

Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/582
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: adds brendanashworth as collaborator
Brendan Ashworth [Sat, 24 Jan 2015 02:25:11 +0000 (18:25 -0800)]
doc: adds brendanashworth as collaborator

Moment of truth?

PR-URL: https://github.com/iojs/io.js/pull/587
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodoc: add evanlucas to collaborators
Evan Lucas [Fri, 23 Jan 2015 23:01:54 +0000 (17:01 -0600)]
doc: add evanlucas to collaborators

PR-URL: https://github.com/iojs/io.js/pull/581
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: alphabetize all.markdown
Brendan Ashworth [Fri, 23 Jan 2015 03:30:05 +0000 (19:30 -0800)]
doc: alphabetize all.markdown

Previously `toc.markdown` was alphabetized but `all.markdown` was not.

PR-URL: https://github.com/iojs/io.js/pull/566
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: add Fishrock123 to collaborators
Fishrock123 [Fri, 23 Jan 2015 22:40:45 +0000 (17:40 -0500)]
doc: add Fishrock123 to collaborators

PR-URL: #580
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agodoc: add qard to collaborators
Stephen Belanger [Fri, 23 Jan 2015 22:12:28 +0000 (14:12 -0800)]
doc: add qard to collaborators

PR-URL: #578
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodeps: make node-gyp work again on windows
Bert Belder [Thu, 15 Jan 2015 00:39:30 +0000 (01:39 +0100)]
deps: make node-gyp work again on windows

* Fetch from the correct url.
* Link compiled addons with iojs.lib instead of node.lib.
* Disable checksum checks for iojs.lib until our website supports
  them.

PR: https://github.com/iojs/io.js/pull/422
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
9 years agodeps: make node-gyp fetch tarballs from iojs.org
Ben Noordhuis [Tue, 13 Jan 2015 22:22:49 +0000 (23:22 +0100)]
deps: make node-gyp fetch tarballs from iojs.org

Apply a small patch that makes node-gyp fetch the tarballs from
https://iojs.org/ instead of http://nodejs.org/

A patch better suited for inclusion upstream will be put together
shortly.

PR-URL: https://github.com/iojs/io.js/pull/343
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodeps: upgrade npm to 2.3.0
Forrest L Norvell [Fri, 23 Jan 2015 14:56:30 +0000 (06:56 -0800)]
deps: upgrade npm to 2.3.0

* Windows improvements: no more uid is undefined errors, use `%COMSPEC%`
  when set in preference to hardcoded `cmd`, improved handling of Git
  remotes.
* Add caching based on Last-Modified / If-Modified-Since headers in
  addition to Etag-based cache validation.

PR-URL: https://github.com/iojs/io.js/pull/573
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: adding thlorenz to list of collaborators
Thorsten Lorenz [Fri, 23 Jan 2015 21:47:57 +0000 (16:47 -0500)]
doc: adding thlorenz to list of collaborators

Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>, Jeremiah Senkpiel <fishrock123@rocketmail.com>, Bert Belder <bertbelder@gmail.com>
PR-URL: https://github.com/iojs/io.js/pull/577

9 years agolib: move default address logic to `net._listen2`
Vladimir Kurchatkin [Wed, 21 Jan 2015 12:38:44 +0000 (15:38 +0300)]
lib: move default address logic to `net._listen2`

When address is not provided to `server.listen()`, `_connectionKey` and
error messages should include actual address and correct family.

PR-URL: https://github.com/iojs/io.js/pull/539
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: delete parallel/test-process-active-wraps
Ben Noordhuis [Fri, 23 Jan 2015 16:31:48 +0000 (17:31 +0100)]
test: delete parallel/test-process-active-wraps

It is supposed to test an internal debug feature but what it effectively
ends up testing, is the exact lifecyle of different kinds of internal
handles.

Lifecycles are different across releases and platforms, making the test
fail intermittently or, in some environments, consistently.  It's not a
good test, delete it.

PR-URL: https://github.com/iojs/io.js/pull/575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agotest: fix parallel/test-http-destroyed-socket-write2
Ben Noordhuis [Fri, 23 Jan 2015 16:14:36 +0000 (17:14 +0100)]
test: fix parallel/test-http-destroyed-socket-write2

Ameliorate a timing sensitivity issue by switching from setImmediate()
to setTimeout() with a 50 ms timeout.

This commit also adds EPIPE as an accepted error (besides ECONNABORT
and ECONNRESET) because that's a plausible outcome given the timing
sensitive nature of test.

PR-URL: https://github.com/iojs/io.js/pull/575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agotest: fix parallel/test-dgram-error-message-address
Ben Noordhuis [Fri, 23 Jan 2015 16:11:14 +0000 (17:11 +0100)]
test: fix parallel/test-dgram-error-message-address

The test expects EADDRNOTAVAIL when trying to bind to address 111::1.
Systems that have IPv6 disabled throw EAFNOSUPPORT instead, however.
Update the test accordingly.

PR-URL: https://github.com/iojs/io.js/pull/575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodebugger: don't override module binding
Vladimir Kurchatkin [Fri, 23 Jan 2015 14:09:42 +0000 (17:09 +0300)]
debugger: don't override module binding

Overriding module argument with const causes a SyntaxError. This
commit changes the variable name to remove the error.

PR-URL: https://github.com/iojs/io.js/pull/572
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agostream: use nop as write() callback if omitted
cjihrig [Fri, 23 Jan 2015 01:46:43 +0000 (20:46 -0500)]
stream: use nop as write() callback if omitted

This commit introduces a nop function that is used as the
Writable.prototype.write() callback when one is not provided.
This saves on function object creation.

PR-URL: https://github.com/iojs/io.js/pull/564
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: dns.lookupService has wrong header level
Icer Liang [Thu, 22 Jan 2015 07:10:09 +0000 (15:10 +0800)]
doc: dns.lookupService has wrong header level

PR-URL: https://github.com/iojs/io.js/pull/552
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: note in docs about missing interfaces
Todd Kennedy [Wed, 21 Jan 2015 19:32:37 +0000 (14:32 -0500)]
doc: note in docs about missing interfaces

Update the documentation for `os.networkInterfaces` to note that any
interface that has not been assigned an address will not be displayed in
the results

Fixes: https://github.com/iojs/io.js/issues/498
PR-URL: https://github.com/iojs/io.js/pull/543
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: bump punycode api stability to 'stable'
Ben Noordhuis [Fri, 16 Jan 2015 18:36:59 +0000 (19:36 +0100)]
doc: bump punycode api stability to 'stable'

The punycode library has been in the tree for over three years now and
has been de facto stable for all that time, if not perhaps de jure.
Let's make it official.

PR-URL: https://github.com/iojs/io.js/pull/470
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: add TC meeting 2015-01-21 minutes
Rod Vagg [Thu, 22 Jan 2015 04:45:13 +0000 (15:45 +1100)]
doc: add TC meeting 2015-01-21 minutes

PR-URL: https://github.com/iojs/io.js/pull/549
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agolib,src: make pseudoRandomBytes alias randomBytes
Calvin Metcalf [Thu, 22 Jan 2015 02:30:27 +0000 (21:30 -0500)]
lib,src: make pseudoRandomBytes alias randomBytes

Previously pseudoRandomBytes worked similarly to randomBytes but in the
event of insufficient entropy would silently return non-secure values.

As of f68a116, the entropy pool blocks if there is insufficient entropy
instead of giving an error so there is now no longer a case where
pseudoRandomBytes would act differently than randomBytes.

Docs are updated to remove pseudoRandomBytes and to clarify that
randomBytes now does block instead of erring when entropy is low.

PR-URL: https://github.com/iojs/io.js/pull/557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoconfigure: remove unused arm_neon variable
Ben Noordhuis [Thu, 22 Jan 2015 20:52:33 +0000 (21:52 +0100)]
configure: remove unused arm_neon variable

Remove the configure check, the flag was dropped in V8 3.28.

PR-URL: https://github.com/iojs/io.js/pull/559
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoconfigure: disable vfpv3 on armv6
Ben Noordhuis [Thu, 22 Jan 2015 20:51:38 +0000 (21:51 +0100)]
configure: disable vfpv3 on armv6

VFPv3 is ARMv7-only, enabling it for ARMv6 is therefore always wrong.
Mea culpa, I do believe I'm the original author of that change.

Fixes: https://github.com/iojs/io.js/issues/283
PR-URL: https://github.com/iojs/io.js/pull/559
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodeps: fix v8 armv6 run-time detection
Ben Noordhuis [Thu, 22 Jan 2015 20:50:35 +0000 (21:50 +0100)]
deps: fix v8 armv6 run-time detection

The elf_platform suffix in /proc/cpuinfo moved to the model name field
in Linux 3.8.

Out-of-tree patch pending https://codereview.chromium.org/867713003/

Fixes: https://github.com/iojs/io.js/issues/283
PR-URL: https://github.com/iojs/io.js/pull/559
Reviewed-By: Fedor Indutny <fedor@indutny.com>