platform/upstream/nodejs.git
9 years agofs: add type checking to makeCallback()
cjihrig [Wed, 18 Feb 2015 17:55:13 +0000 (12:55 -0500)]
fs: add type checking to makeCallback()

This commit adds proper type checking to makeCallback(). Anything
other than undefined or a function will throw.

PR-URL: https://github.com/iojs/io.js/pull/866
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agofs: properly handle fd passed to truncate()
Bruno Jouhier [Sat, 7 Feb 2015 18:27:20 +0000 (19:27 +0100)]
fs: properly handle fd passed to truncate()

Currently, fs.truncate() silently fails when a file descriptor
is passed as the first argument. This commit changes this
behavior to properly call fs.ftruncate().

PR-URL: https://github.com/joyent/node/pull/9161
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Conflicts:
lib/fs.js

9 years agodoc: use HTTPS URL for the API documentation page
Shinnosuke Watanabe [Sat, 21 Feb 2015 06:51:38 +0000 (15:51 +0900)]
doc: use HTTPS URL for the API documentation page

PR-URL: https://github.com/iojs/io.js/pull/913
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agonet: make Server.prototype.unref() persistent
cjihrig [Sat, 3 Jan 2015 04:14:25 +0000 (23:14 -0500)]
net: make Server.prototype.unref() persistent

Currently, the unref() method does not remember any state
if called before the server's handle has been created. This
commit adds state to track calls to ref() and unref().

PR-URL: https://github.com/iojs/io.js/pull/897
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agosmalloc: extend user API
Trevor Norris [Fri, 20 Feb 2015 17:32:29 +0000 (10:32 -0700)]
smalloc: extend user API

node::Environment isn't accessible to user APIs, so extend smalloc to
also accept v8::Isolate.

Fixes: 75adde07 "src: remove `node_isolate` from source"
PR-URL: https://github.com/iojs/io.js/pull/905
Reviewed-by: Fedor Indutny <fedor@indutny.com>
9 years agodoc: fix PR reference in CHANGELOG
Brian White [Fri, 20 Feb 2015 13:23:34 +0000 (08:23 -0500)]
doc: fix PR reference in CHANGELOG

The CHANGELOG referenced PR 847, but should really be 846.

PR-URL: https://github.com/iojs/io.js/pull/903
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: fix typo, rephrase cipher change in CHANGELOG
Rod Vagg [Fri, 20 Feb 2015 09:31:58 +0000 (20:31 +1100)]
doc: fix typo, rephrase cipher change in CHANGELOG

PR-URL: https://github.com/iojs/io.js/pull/902
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agoWorking on v1.3.0
Rod Vagg [Fri, 20 Feb 2015 09:29:54 +0000 (20:29 +1100)]
Working on v1.3.0

9 years ago2015-02-20 io.js v1.3.0 Release v1.3.0
Rod Vagg [Fri, 20 Feb 2015 09:25:12 +0000 (20:25 +1100)]
2015-02-20 io.js v1.3.0 Release

Notable changes:

* url: `url.resolve('/path/to/file', '.')` now returns `/path/to/`
  with the trailing slash, `url.resolve('/', '.')` returns `/`.
  https://github.com/iojs/io.js/issues/278 (Amir Saboury)
* tls: tls (and in turn https) now rely on a stronger default
  cipher suite which excludes the RC4 cipher. If you still want to
  use RC4, you have to specify your own ciphers suite.
  https://github.com/iojs/io.js/issues/826 (Roman Reiss)

9 years agodoc: update AUTHORS list
Rod Vagg [Fri, 20 Feb 2015 01:37:11 +0000 (12:37 +1100)]
doc: update AUTHORS list

Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/900
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: add TC meeting 2015-02-04 minutes
Rod Vagg [Wed, 18 Feb 2015 13:20:20 +0000 (00:20 +1100)]
doc: add TC meeting 2015-02-04 minutes

Closes #701
PR-URL: https://github.com/iojs/io.js/pull/876
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: remove outdated language on consensus
Emily Rose [Thu, 19 Feb 2015 22:27:53 +0000 (14:27 -0800)]
doc: remove outdated language on consensus

PR: https://github.com/iojs/io.js/pull/898
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
9 years agonet: unref timer in parent sockets
Fedor Indutny [Thu, 19 Feb 2015 13:14:36 +0000 (14:14 +0100)]
net: unref timer in parent sockets

`TLSSocket` wraps the original `net.Socket`, but writes/reads to/from
`TLSSocket` do not touch the timers of original `net.Socket`.

Introduce `socket._parent` property, and iterate through all parents
to unref timers and prevent timeout event on original `net.Socket`.

Fix: https://github.com/joyent/node/issues/9242
PR-URL: https://github.com/iojs/io.js/pull/891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agofs: ensure nullCheck() callback is a function
cjihrig [Thu, 19 Feb 2015 04:10:15 +0000 (23:10 -0500)]
fs: ensure nullCheck() callback is a function

Currently, nullCheck() will attempt to invoke any truthy value
as a function if the path argument contains a null character.
This commit validates that the callback is actually a function
before trying to invoke it. fs.access() was vulnerable to this
bug, as nullCheck() was called prior to type checking its
callback.

PR-URL: https://github.com/iojs/io.js/pull/887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: document 'ciphers' option of tls.connect
Roman Reiss [Wed, 18 Feb 2015 16:55:11 +0000 (17:55 +0100)]
doc: document 'ciphers' option of tls.connect

This option has been there for a long time, but has never been
documented. It's functionally identical to the server counterpart.

PR-URL: https://github.com/iojs/io.js/pull/845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: ensure that file descriptors 0-2 are valid
Ben Noordhuis [Wed, 18 Feb 2015 02:43:29 +0000 (03:43 +0100)]
src: ensure that file descriptors 0-2 are valid

Check that stdin, stdout and stderr map to open file descriptors and
remap them to /dev/null if that isn't the case.  Protects against
information leaks or worse when io.js is started with closed stdio
file descriptors.

PR-URL: https://github.com/iojs/io.js/pull/875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agosrc: fix typo in error message
Ben Noordhuis [Tue, 17 Feb 2015 21:53:21 +0000 (22:53 +0100)]
src: fix typo in error message

PR-URL: https://github.com/iojs/io.js/pull/875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agosrc: fix add-on builds, partially revert 8aed9d66
Ben Noordhuis [Tue, 17 Feb 2015 18:35:59 +0000 (19:35 +0100)]
src: fix add-on builds, partially revert 8aed9d66

Commit 8aed9d66 ("src: cleanup `Isolate::GetCurrent()`") breaks building
add-ons because of the following:

    In file included from ../node_modules/nan/nan.h:27:0,
                     from ../src/binding.cc:18:
    /home/bnoordhuis/src/v1.x/src/node_object_wrap.h: In member function
    'v8::Local<v8::Object> node::ObjectWrap::handle()':
    /home/bnoordhuis/src/v1.x/src/node_object_wrap.h:39:46: error: base
    operand of '->' has non-pointer type 'v8::Persistent<v8::Object>'
         return v8::Local<v8::Object>::New(handle_->GetIsolate(),
                                           persistent());

Mea culpa, I was one of the reviewers.

PR-URL: https://github.com/iojs/io.js/pull/868
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
9 years agodoc: fix typo miliseconds -> milliseconds
jigsaw [Tue, 17 Feb 2015 15:10:17 +0000 (00:10 +0900)]
doc: fix typo miliseconds -> milliseconds

PR-URL: https://github.com/iojs/io.js/pull/865
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agobuffer: fix pool offset adjustment
Trevor Norris [Mon, 16 Feb 2015 21:09:50 +0000 (14:09 -0700)]
buffer: fix pool offset adjustment

If the Buffer allocation isn't a slice then there's no need to adjust
the pool offset after realloc'ing the space available.

Fixes: 6462519 "buffer, doc: misc. fix and cleanup"

9 years agotls: more secure defaults
Roman Reiss [Sun, 15 Feb 2015 17:43:36 +0000 (18:43 +0100)]
tls: more secure defaults

This updates the default cipher suite to an more secure list, which
prefers strong ciphers with Forward Secrecy. Additionally, it enables
`honorCipherOrder` by default.

Noteable effect of this change is that the insecure RC4 ciphers are
disabled and that Chrome negotiates a more secure ECDHE cipher.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/826

9 years agotest: remove flaky test functionality
Rod Vagg [Thu, 12 Feb 2015 01:39:40 +0000 (12:39 +1100)]
test: remove flaky test functionality

Reverts https://github.com/joyent/node/pull/8689

PR-URL: https://github.com/iojs/io.js/pull/812
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: add comma in README to increase clarity
Jimmy Hsu [Sun, 15 Feb 2015 00:52:30 +0000 (16:52 -0800)]
doc: add comma in README to increase clarity

Minor change to increase clarity of what is being referenced to.

9 years agotest: fix parallel/test-tls-getcipher
Roman Reiss [Sun, 15 Feb 2015 17:35:14 +0000 (18:35 +0100)]
test: fix parallel/test-tls-getcipher

The test blindly assumes that the default cipher suite supports RC4
ciphers. This corrects the case where RC4 might not be available in the
default ciphers by setting the client to use the same suite as the
server.

PR-URL: https://github.com/iojs/io.js/pull/853
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: add a few querystring benchmarks
Brian White [Sun, 15 Feb 2015 04:26:50 +0000 (23:26 -0500)]
benchmark: add a few querystring benchmarks

PR-URL: https://github.com/iojs/io.js/pull/847
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agotest: verify fields in spawn{Sync} errors
cjihrig [Fri, 13 Feb 2015 21:39:24 +0000 (16:39 -0500)]
test: verify fields in spawn{Sync} errors

This commit validates the properties of ENOENT error objects
returned by spawn() and spawnSync().

PR-URL: https://github.com/iojs/io.js/pull/838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agodoc: correct `it's` to `its` in process
Charmander [Fri, 13 Feb 2015 21:25:29 +0000 (13:25 -0800)]
doc: correct `it's` to `its` in process

"This event is emitted when io.js empties its event loop..."

PR-URL: https://github.com/iojs/io.js/pull/837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add geek as collaborator
Wyatt Preul [Fri, 13 Feb 2015 18:49:30 +0000 (12:49 -0600)]
doc: add geek as collaborator
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: #835

9 years agourl: reslove urls with . and ..
Amir Saboury [Sat, 10 Jan 2015 03:01:32 +0000 (22:01 -0500)]
url: reslove urls with . and ..

'.' and '..' are directory specs and resolving urls with or
without the hostname with '.' and '..' should add a trailing
slash to the end of the url.

Fixes: https://github.com/joyent/node/issues/8992
PR-URL: https://github.com/iojs/io.js/pull/278
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agonet: remove use of arguments in Server constructor
cjihrig [Wed, 24 Sep 2014 03:08:35 +0000 (23:08 -0400)]
net: remove use of arguments in Server constructor

The current implementation uses the arguments object in the Server()
constructor. Since both arguments to Server() are optional, there was a
high likelihood of accessing a non-existent element in arguments, which
carries a performance overhead. This commit replaces the arguments
object with named arguments.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Conflicts:
lib/net.js

9 years agodoc: grammar fix in smalloc
Debjeet Biswas [Sun, 8 Feb 2015 22:45:03 +0000 (04:15 +0530)]
doc: grammar fix in smalloc

PR-URL: https://github.com/joyent/node/pull/9164
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
9 years agotest: Timeout#unref() does not return instance
Jan Schär [Mon, 9 Feb 2015 15:51:12 +0000 (16:51 +0100)]
test: Timeout#unref() does not return instance

Timeout#unref() call returns undefined, not this. The test already
worked before, because the interval was still unref'd, and the test also
succeeds without clearing the interval.

PR-URL: https://github.com/joyent/node/pull/9171
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
Conflicts:
test/simple/test-timers-unref.js

9 years agodoc: fix code syntax
Dan Dascalescu [Thu, 12 Feb 2015 07:25:01 +0000 (23:25 -0800)]
doc: fix code syntax

Add a ';' to the end of a function call in documentation.

PR-URL: https://github.com/joyent/node/pull/9198
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agomodule: replace NativeModule.require
Herbert Vojčík [Thu, 12 Feb 2015 13:50:47 +0000 (14:50 +0100)]
module: replace NativeModule.require

The NativeModule system passes NativeModule.require transparently and so
is unnecessary to call explicitly.

The only one which should have the prefix is the in line 295, where
actually implements a big fs-based module system and actually requires a
native module. That is left unchanged.

PR-URL: https://github.com/joyent/node/pull/9201
Ref: https://github.com/joyent/node/issues/2009
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Conflicts:
lib/module.js

9 years agodoc: use correct signature for assert()
Andrei Sedoi [Fri, 9 Jan 2015 17:55:32 +0000 (19:55 +0200)]
doc: use correct signature for assert()

The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agonet: throw on invalid socket timeouts
cjihrig [Tue, 16 Dec 2014 22:17:28 +0000 (17:17 -0500)]
net: throw on invalid socket timeouts

This commit restricts socket timeouts non-negative, finite
numbers. Any other value throws a TypeError or RangeError.
This prevents subtle bugs that can happen due to type
coercion.

Fixes: https://github.com/joyent/node/issues/8618
PR-URL: https://github.com/joyent/node/pull/8884
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Conflicts:
lib/timers.js
test/simple/test-net-settimeout.js
test/simple/test-net-socket-timeout.js

9 years agodoc: fix sentence grammar timers.markdown
Omer Wazir [Thu, 12 Feb 2015 06:13:54 +0000 (23:13 -0700)]
doc: fix sentence grammar timers.markdown

Just added ', it' because the phrasing did not seem correct.

PR-URL: https://github.com/iojs/io.js/pull/815
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotest: distribute crypto tests into separate files
Brendan Ashworth [Thu, 12 Feb 2015 08:19:25 +0000 (00:19 -0800)]
test: distribute crypto tests into separate files

This commit distributes many of the various tests that were previously
strewn about `test-crypto.js` into their own files, such as for Ciphers
and Deciphers, Hashing, and HMACs. Copy pasta, and no style changes
besides removing a few now-unnecessary closures.

Helps eliminate file bloat and allows for easier test prognosis.

PR-URL: https://github.com/iojs/io.js/pull/827
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: increase mark class contrast ratio
Omer Wazir [Thu, 12 Feb 2015 17:30:18 +0000 (10:30 -0700)]
doc: increase mark class contrast ratio

PR-URL: https://github.com/iojs/io.js/pull/824
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: better font-smoothing for firefox
Jeremiah Senkpiel [Thu, 12 Feb 2015 15:55:55 +0000 (10:55 -0500)]
doc: better font-smoothing for firefox

does the same thing for firefox as 'antialiased' does for webkit.

PR-URL: https://github.com/iojs/io.js/pull/820
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: disable font ligatures
Roman Reiss [Thu, 12 Feb 2015 09:48:31 +0000 (10:48 +0100)]
doc: disable font ligatures

PR-URL: https://github.com/iojs/io.js/pull/816
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
9 years agodoc: Close code span correctly
Omer Wazir [Thu, 12 Feb 2015 05:51:57 +0000 (22:51 -0700)]
doc: Close code span correctly

The code span is closed with a straight quote instead of the correct
back tick being used.

PR-URL: https://github.com/iojs/io.js/pull/814
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agosrc: reduce AsyncWrap memory footprint
Ben Noordhuis [Fri, 30 Jan 2015 14:15:56 +0000 (15:15 +0100)]
src: reduce AsyncWrap memory footprint

Fold two integral fields into one and use bitops to access/manipulate
them.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: remove obsoleted queue.h header
Ben Noordhuis [Fri, 30 Jan 2015 11:55:25 +0000 (12:55 +0100)]
src: remove obsoleted queue.h header

It has been obsoleted by the previous commit.  Now it's time to say
goodbye.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: switch from QUEUE to intrusive list
Ben Noordhuis [Fri, 30 Jan 2015 11:54:53 +0000 (12:54 +0100)]
src: switch from QUEUE to intrusive list

This commit also breaks up req_wrap.h into req-wrap.h and req-wrap-inl.h
to work around a circular dependency issue in env.h.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agosrc: add typesafe intrusive list
Ben Noordhuis [Fri, 30 Jan 2015 11:54:28 +0000 (12:54 +0100)]
src: add typesafe intrusive list

This is a replacement for the QUEUE macros.  It implements the same
functionality but in a way that lets the compiler typecheck it.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agoevents: optimize adding and removing of listeners
Brian White [Wed, 11 Feb 2015 22:00:12 +0000 (17:00 -0500)]
events: optimize adding and removing of listeners

These optimizations result in >2x speedup in the ee-add-remove
benchmark:

* Don't mutate array.length when removing the last listener for
an event
* Don't bother checking max listeners if listeners isn't an array
* Don't call delete when removing the last event in _events, just
re-assign a new object instead

PR-URL: https://github.com/iojs/io.js/pull/785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agoevents: move slow path to separate function too
Brian White [Tue, 10 Feb 2015 18:12:09 +0000 (13:12 -0500)]
events: move slow path to separate function too

This keeps in line with how things are done for the fast path
and *might* even provide a *slight* performance increase.

PR-URL: https://github.com/iojs/io.js/pull/785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agobuffer: expose internals on binding
Vladimir Kurchatkin [Mon, 9 Feb 2015 14:19:56 +0000 (17:19 +0300)]
buffer: expose internals on binding

Remove internal object and expose functions directly on binding.  This
makes possible to simply use internal functions in other builtin
modules.

PR-URL: https://github.com/iojs/io.js/pull/770
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: cleanup `Isolate::GetCurrent()`
Vladimir Kurchatkin [Fri, 6 Feb 2015 17:48:14 +0000 (20:48 +0300)]
src: cleanup `Isolate::GetCurrent()`

PR-URL: https://github.com/iojs/io.js/pull/807
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: change effect to affect in errors.md
Ryan Seys [Wed, 11 Feb 2015 13:56:31 +0000 (08:56 -0500)]
doc: change effect to affect in errors.md

PR-URL: https://github.com/iojs/io.js/pull/799
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add sam-github as collaborator
Sam Roberts [Wed, 11 Feb 2015 01:14:02 +0000 (17:14 -0800)]
doc: add sam-github as collaborator

Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: https://github.com/iojs/io.js/pull/791

9 years agodoc: remove Caine section from contributing guide
Michaël Zasso [Wed, 11 Feb 2015 15:57:31 +0000 (16:57 +0100)]
doc: remove Caine section from contributing guide

Caine bot is not active on the repository anymore.
This section is just confusing for new contributors.

Fixes: https://github.com/iojs/io.js/issues/802
PR-URL: https://github.com/iojs/io.js/pull/804
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix libuv link
Yosuke Furukawa [Wed, 11 Feb 2015 15:56:18 +0000 (00:56 +0900)]
doc: fix libuv link

PR-URL: https://github.com/iojs/io.js/pull/803
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agocrypto: fix to check ext method for shared lib
Shigeki Ohtsu [Wed, 11 Feb 2015 14:35:47 +0000 (23:35 +0900)]
crypto: fix to check ext method for shared lib

In the case of using openssl with shared library,
reinterpret_cast<X509V3_EXT_I2V>(i2v_GENERAL_NAMES)) refers plt
pointer so that SafeX509ExtPrint returns false.
Fix it to check it with method of NID_subject_alt_name

This patch originally was created by Fedor Indutny
and Ben Noordhuis

Fixes: https://github.com/iojs/io.js/issues/617
PR-URL: https://github.com/iojs/io.js/pull/800

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodoc: fix wording in fs.appendFile
Rudolf Meijering [Wed, 11 Feb 2015 15:37:23 +0000 (17:37 +0200)]
doc: fix wording in fs.appendFile

PR-URL: https://github.com/iojs/io.js/pull/801
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agosrc: remove trailing whitespace
Vladimir Kurchatkin [Wed, 11 Feb 2015 13:17:04 +0000 (16:17 +0300)]
src: remove trailing whitespace

PR-URL: https://github.com/iojs/io.js/pull/798
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: update error links
Chris Dickinson [Wed, 11 Feb 2015 03:33:58 +0000 (19:33 -0800)]
doc: update error links

PR-URL: https://github.com/iojs/io.js/pull/793
Reviewed-by: Rod Vagg <rod@vagg.org>
9 years agoWorking on v1.2.1
Rod Vagg [Wed, 11 Feb 2015 02:50:19 +0000 (13:50 +1100)]
Working on v1.2.1

9 years ago2015-02-10 io.js v1.2.0 Release v1.2.0
Rod Vagg [Wed, 11 Feb 2015 01:41:07 +0000 (12:41 +1100)]
2015-02-10 io.js v1.2.0 Release

Notable changes:

* stream:
  - Simpler stream construction, see
    https://github.com/iojs/readable-stream/issues/102 for details.
    This extends the streams base objects to make their constructors
    accept default implementation methods, reducing the boilerplate
    required to implement custom streams. An updated version of
    readable-stream will eventually be released to match this change
    in core. (@sonewman)
* dns:
  - `lookup()` now supports an `'all'` boolean option, default to
    `false` but when turned on will cause the method to return an
    array of *all* resolved names for an address, see,
    https://github.com/iojs/io.js/pull/744 (@silverwind)
* assert:
  - Remove `prototype` property comparison in `deepEqual()`,
    considered a bugfix, see https://github.com/iojs/io.js/pull/636
    (@vkurchatkin)
  - Introduce a `deepStrictEqual()` method to mirror `deepEqual()`
    but performs strict equality checks on primitives, see
    https://github.com/iojs/io.js/pull/639 (@vkurchatkin)
* **tracing**:
  - Add LTTng (Linux Trace Toolkit Next Generation) when compiled
    with the  `--with-lttng` option. Trace points match those
    available for DTrace and ETW.
    https://github.com/iojs/io.js/pull/702 (@thekemkid)
* npm upgrade to 2.5.1
* **libuv** upgrade to 1.4.0
* Add new collaborators:
  - Aleksey Smolenchuk (@lxe)
  - Shigeki Ohtsu (@shigeki)

9 years agodoc: add error documentation
Chris Dickinson [Tue, 10 Feb 2015 20:48:55 +0000 (12:48 -0800)]
doc: add error documentation

PR-URL: https://github.com/iojs/io.js/pull/789
Reviewed-by: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: update AUTHORS list
Rod Vagg [Wed, 4 Feb 2015 07:42:42 +0000 (18:42 +1100)]
doc: update AUTHORS list

Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/713
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agodoc: add shigeki as collaborator
Shigeki Ohtsu [Tue, 10 Feb 2015 15:27:47 +0000 (00:27 +0900)]
doc: add shigeki as collaborator

Fixes: https://github.com/iojs/io.js/issues/778
PR-URL: https://github.com/iojs/io.js/pull/782

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agofs: improve `readFile` performance
Vladimir Kurchatkin [Tue, 3 Feb 2015 19:07:02 +0000 (22:07 +0300)]
fs: improve `readFile` performance

This commit improves `readFile` performance by
reducing number of closure allocations and using
`FSReqWrap` directly.

PR-URL: https://github.com/iojs/io.js/pull/718

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodeps: update libuv to 1.4.0
Saúl Ibarra Corretgé [Mon, 9 Feb 2015 20:16:26 +0000 (21:16 +0100)]
deps: update libuv to 1.4.0

PR-URL: https://github.com/iojs/io.js/pull/773
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotracing: add lttng support for tracing on linux
Glen Keane [Thu, 22 Jan 2015 12:35:16 +0000 (12:35 +0000)]
tracing: add lttng support for tracing on linux

This commit adds the ability to enable userspace tracing with lttng
in io.js. It adds tracepoints for all the equivalent dtrace and ETW
tracepoints. To use these tracepoints enable --with-lttng on linux.

PR-URL: https://github.com/iojs/io.js/pull/702
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
9 years agoevents: optimize various functions
Brian White [Thu, 5 Feb 2015 20:35:33 +0000 (15:35 -0500)]
events: optimize various functions

Cache events and listeners objects where possible and loop over
Object.keys() instead of using for..in. These changes alone give
~60-65% improvement in the ee-add-remove benchmark.

The changes to EventEmitter.listenerCount() gives ~14%
improvement and changes to emitter.listeners() gives
significant improvements for <50 listeners
(~195% improvement for 10 listeners).

The changes to emitter.emit() gives 3x speedup for the fast
cases with multiple handlers and a minor speedup for the slow
case with multiple handlers.

The swapping out of the util.is* type checking functions with inline
checks gives another ~5-10% improvement.

PR-URL: https://github.com/iojs/io.js/pull/601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agotest: fix test failure with shared openssl
Shigeki Ohtsu [Mon, 9 Feb 2015 04:56:38 +0000 (13:56 +0900)]
test: fix test failure with shared openssl

When configured with share openssl, use external openssl command and
check if it can be executed.

Fixes: https://github.com/iojs/io.js/issues/618
PR-URL: https://github.com/iojs/io.js/pull/762
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix typo in crypto
Haoliang Gao [Mon, 9 Feb 2015 08:21:15 +0000 (16:21 +0800)]
doc: fix typo in crypto

PR-URL: https://github.com/iojs/io.js/pull/765
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: change the order of crypto.publicDecrypt
Haoliang Gao [Mon, 9 Feb 2015 09:13:28 +0000 (17:13 +0800)]
doc: change the order of crypto.publicDecrypt

PR-URL: https://github.com/iojs/io.js/pull/767
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoassert: introduce `deepStrictEqual`
Vladimir Kurchatkin [Wed, 28 Jan 2015 16:48:56 +0000 (19:48 +0300)]
assert: introduce `deepStrictEqual`

`deepStrictEqual` works the same way as `strictEqual`, but
uses `===` to compare primitives and requires prototypes of
equal objects to be the same object.

Fixes: https://github.com/joyent/node/issues/7161
Fixes: https://github.com/iojs/io.js/issues/620
PR-URL: https://github.com/iojs/io.js/pull/639
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
9 years agodoc: fix dns.lookup options example
Roman Reiss [Sun, 8 Feb 2015 10:17:32 +0000 (11:17 +0100)]
doc: fix dns.lookup options example

PR-URL: https://github.com/iojs/io.js/pull/757
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodoc: update antiquated process.versions output
Ben Noordhuis [Sat, 7 Feb 2015 11:08:39 +0000 (12:08 +0100)]
doc: update antiquated process.versions output

PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: update node.js references in api docs
Ben Noordhuis [Sat, 7 Feb 2015 10:25:13 +0000 (11:25 +0100)]
doc: update node.js references in api docs

Fixes: https://github.com/iojs/io.js/issues/740
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agohttps: simpler argument check
Michaël Zasso [Sat, 7 Feb 2015 11:40:05 +0000 (12:40 +0100)]
https: simpler argument check

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agoutil: simplify `isPrimitive`
Vladimir Kurchatkin [Fri, 6 Feb 2015 13:06:07 +0000 (16:06 +0300)]
util: simplify `isPrimitive`

Everything that is not an object should be a primitive.

PR-URL: https://github.com/iojs/io.js/pull/739

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: bump eventemitter number of iterations
Ben Noordhuis [Fri, 6 Feb 2015 20:40:53 +0000 (21:40 +0100)]
benchmark: bump eventemitter number of iterations

Some of the benchmarks that were added in commit 847b9d2 complete too
quickly to draw meaningful conclusions from.  Increase the number of
iterations to make them run longer.

PR-URL: https://github.com/iojs/io.js/pull/746
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodns: allow dns.lookup() to return all addresses
Roman Reiss [Fri, 6 Feb 2015 20:43:50 +0000 (21:43 +0100)]
dns: allow dns.lookup() to return all addresses

This commit adds the 'all' option to dns.lookup(), allowing
all lookup results to be returned.

Semver: Minor
Fixes: https://github.com/iojs/io.js/issues/736
PR-URL: https://github.com/iojs/io.js/pull/744
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuffer: don't compare same buffers
Vladimir Kurchatkin [Fri, 6 Feb 2015 15:54:29 +0000 (18:54 +0300)]
buffer: don't compare same buffers

PR-URL: https://github.com/iojs/io.js/pull/742

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agobenchmark: add more EventEmitter benchmarks
Brian White [Thu, 5 Feb 2015 20:26:28 +0000 (15:26 -0500)]
benchmark: add more EventEmitter benchmarks

PR-URL: https://github.com/iojs/io.js/pull/730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agodoc: add lxe as collaborator
Aleksey Smolenchuk [Fri, 6 Feb 2015 18:13:55 +0000 (10:13 -0800)]
doc: add lxe as collaborator

PR-URL: https://github.com/iojs/io.js/pull/745
Reviewed-By: Colin Ihrig <cjihrig@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.5.1
Forrest L Norvell [Fri, 6 Feb 2015 09:14:25 +0000 (01:14 -0800)]
deps: upgrade npm to 2.5.1

PR-URL: https://github.com/iojs/io.js/pull/738
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agolib: make debug client connect to 127.0.0.1
Ben Noordhuis [Fri, 6 Feb 2015 15:32:35 +0000 (16:32 +0100)]
lib: make debug client connect to 127.0.0.1

On machines without network connectivity, a DNS lookup for 'localhost'
may fail.  Connect to 127.0.0.1 to skip the host resolve step.

Fixes: https://github.com/iojs/io.js/issues/726
PR-URL: https://github.com/iojs/io.js/pull/741
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agoassert: don't compare object `prototype` property
Vladimir Kurchatkin [Wed, 28 Jan 2015 15:27:20 +0000 (18:27 +0300)]
assert: don't compare object `prototype` property

All own enumerable properties are compared already. Comparing
`prototype` property specifically can cause weird behaviour.

PR-URL: https://github.com/iojs/io.js/pull/636
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoasyncwrap: fix nullptr parent check
Trevor Norris [Thu, 5 Feb 2015 23:52:09 +0000 (16:52 -0700)]
asyncwrap: fix nullptr parent check

The nullptr check for parent on entry to the constructor should be ==
not !=. This allows reqs that have a parent to run their own init hook
callbacks even if kCallInitHook has been disabled.

9 years agotest: accept EPROTONOSUPPORT ipv6 error
Ben Noordhuis [Thu, 5 Feb 2015 22:52:33 +0000 (23:52 +0100)]
test: accept EPROTONOSUPPORT ipv6 error

The IPv6 test in parallel/test-dgram-error-message-address may fail
when the host system has disabled IPv6, as is the case on our FreeBSD
machines.  The test already accepted EAFNOSUPPORT as of commit 5ba307a,
now make it accept EPROTONOSUPPORT as well.

I'm not exactly thrilled by the profusion of error codes but they are
all legitimate.

PR-URL: https://github.com/iojs/io.js/pull/733
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoasyncwrap: fix constructor condition for early ret
Trevor Norris [Thu, 5 Feb 2015 22:54:12 +0000 (15:54 -0700)]
asyncwrap: fix constructor condition for early ret

AsyncWrap should always properly propagate asynchronous calls to any
child that is created. Regardless whether kCallInitHook is currently
active. The previous logic would always return early if kCallInitHook
wasn't set.

PR-URL: https://github.com/iojs/io.js/pull/732
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodocs: include mention of new crypto methods
Calvin Metcalf [Thu, 5 Feb 2015 12:52:42 +0000 (07:52 -0500)]
docs: include mention of new crypto methods

Include mention of privateEncrypt and publicDecrypt in changelog.

PR-URL: https://github.com/iojs/io.js/pull/722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
9 years agochild_process: add debug and error details
Zach Bruggeman [Thu, 5 Feb 2015 03:03:18 +0000 (19:03 -0800)]
child_process: add debug and error details

This commit adds debug() calls to spawn() and spawnSync(), and
attaches additional information to Error objects.

Fixes: https://github.com/iojs/io.js/issues/720
PR-URL: https://github.com/iojs/io.js/pull/721
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agocrypto: clear error on return in TLS methods
Fedor Indutny [Wed, 4 Feb 2015 21:01:11 +0000 (00:01 +0300)]
crypto: clear error on return in TLS methods

Methods like `X509_STORE_add_cert` may push errors onto OpenSSL's error
stack. Ensure that they won't pop up in a different places like
`tls_wrap.cc`.

Fix: https://github.com/iojs/io.js/issues/712
PR-URL: https://github.com/iojs/io.js/pull/719
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agostream: simpler stream constructon
Sam Newman [Tue, 3 Feb 2015 01:12:41 +0000 (01:12 +0000)]
stream: simpler stream constructon

Adds simplified constructor pattern, allowing users
to provide "read", "write", "transform", "flush", and
"writev" functions as stream options in lieu of subclassing.

Semver: minor
PR-URL: https://github.com/iojs/io.js/pull/697
Fixes: https://github.com/iojs/readable-stream/issues/102
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agobenchmark: allow compare via fine-grained filters
Brian White [Wed, 4 Feb 2015 16:11:48 +0000 (11:11 -0500)]
benchmark: allow compare via fine-grained filters

Before this commit, only benchmark targets defined in Makefile could
be used. This commit allows execution of common.js directly and
passing of filter arguments directly, allowing you to run either a
subset of benchmarks or a single specific benchmark for comparison.

PR-URL: https://github.com/iojs/io.js/pull/711
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
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.