platform/upstream/nodejs.git
8 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodeps: upgrade to npm 2.13.2
Kat Marchán [Fri, 24 Jul 2015 22:09:52 +0000 (15:09 -0700)]
deps: upgrade to npm 2.13.2

PR-URL: https://github.com/nodejs/io.js/pull/2241
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotools: use local or specified $NODE for test-npm
Jeremiah Senkpiel [Mon, 15 Jun 2015 16:10:44 +0000 (09:10 -0700)]
tools: use local or specified $NODE for test-npm

PR-URL: https://github.com/nodejs/io.js/pull/1984
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agorepl: better empty line handling
Sakthipriyan Vairamani [Sun, 12 Jul 2015 21:48:50 +0000 (21:48 +0000)]
repl: better empty line handling

In REPL, if we try to evaluate an empty line, we get `undefined`.

    > process.version
    'v2.3.4'
    >
    undefined
    >
    undefined
    >

This patch prevents `undefined` from printing if the string is empty.

    > process.version
    'v2.3.5-pre'
    >
    >
    >

PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agorepl: improving line continuation handling
Sakthipriyan Vairamani [Sun, 12 Jul 2015 01:22:33 +0000 (01:22 +0000)]
repl: improving line continuation handling

As it is, REPL doesn't honour the line continuation feature very well.
This patch

 1. keeps track of the beginning of the string literals and if they
    don't end or current line doesn't end with line continuation, then
    error out.

 2. monitors if the line continuation character is used without the
    string literal and errors out if that happens.

PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agorepl: preventing REPL crash with inherited properties
Sakthipriyan Vairamani [Sun, 12 Jul 2015 00:58:20 +0000 (00:58 +0000)]
repl: preventing REPL crash with inherited properties

When an inherited property is used as a REPL keyword, the REPL crashes.

    ➜  Desktop  iojs
    > process.version
    'v2.3.4'
    > .toString
    readline.js:913
            stream[ESCAPE_DECODER].next(r[i]);
                                    ^
    TypeError: Cannot read property 'call' of undefined
        at REPLServer.parseREPLKeyword (repl.js:746:15)
        at REPLServer.<anonymous> (repl.js:284:16)
        at emitOne (events.js:77:13)
        at REPLServer.emit (events.js:169:7)
        at REPLServer.Interface._onLine (readline.js:210:10)
        at REPLServer.Interface._line (readline.js:549:8)
        at REPLServer.Interface._ttyWrite (readline.js:826:14)
        at ReadStream.onkeypress (readline.js:105:10)
        at emitTwo (events.js:87:13)
        at ReadStream.emit (events.js:172:7)
    ➜  Desktop

This patch makes the internal `commands` object inherit from `null` so
that there will be no inherited properties.

    > process.version
    'v2.3.5-pre'
    > .toString
    Invalid REPL keyword
    >

PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agorepl: fixing `undefined` in invalid REPL keyword error
Sakthipriyan Vairamani [Sun, 12 Jul 2015 00:53:39 +0000 (00:53 +0000)]
repl: fixing `undefined` in invalid REPL keyword error

When an invalid REPL keyword is used, we actually print `undefined` as
well in the console.

    > process.version
    'v2.3.4'
    > .invalid_repl_command
    Invalid REPL keyword
    undefined
    >

This patch prevents printing `undefined` in this case.

    > process.version
    'v2.3.5-pre'
    > .invalid_repl_command
    Invalid REPL keyword
    >

PR-URL: https://github.com/nodejs/io.js/pull/2163
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: add GPG fingerprint for cjihrig
cjihrig [Tue, 21 Jul 2015 18:37:36 +0000 (14:37 -0400)]
doc: add GPG fingerprint for cjihrig

PR-URL: https://github.com/nodejs/io.js/pull/2217
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: note about custom inspect functions
Sakthipriyan Vairamani [Thu, 9 Jul 2015 18:54:21 +0000 (18:54 +0000)]
doc: note about custom inspect functions

See: https://github.com/nodejs/io.js/issues/1798

When an Object is printed in REPL, the actual representation can be
overriden by defining `inspect` method on the objects. This patch
includes a note about the same in the REPL documentation.

PR-URL: https://github.com/nodejs/io.js/pull/2142
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agodeps: update V8 to 4.2.77.21
Ali Ijaz Sheikh [Fri, 24 Jul 2015 14:49:12 +0000 (07:49 -0700)]
deps: update V8 to 4.2.77.21

Picks up the latest patch-release on the V8 4.2 branch.
https://codereview.chromium.org/1156323004

PR-URL: https://github.com/nodejs/io.js/issues/2238
Fixes: https://github.com/nodejs/io.js/issues/2235
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agoprocess: resize stderr on SIGWINCH
Jeremiah Senkpiel [Thu, 23 Jul 2015 16:15:19 +0000 (09:15 -0700)]
process: resize stderr on SIGWINCH

Fixes: https://github.com/nodejs/io.js/issues/2219
PR-URL: https://github.com/nodejs/io.js/pull/2231
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agocluster: emit 'message' event on cluster master
Sam Roberts [Sun, 15 Feb 2015 02:50:56 +0000 (18:50 -0800)]
cluster: emit 'message' event on cluster master

For consistency with the worker 'exit', 'online', 'disconnect', and
'listening' events which are emitted on worker and cluster, also emit
'message' on cluster.

Reviewed-by: Sam Roberts <vieuxtech@gmail.com>
Reviewed-by: Christian Tellnes <christian@tellnes.no>
Reviewed-by: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/io.js/pull/861

8 years agotls: add `getTicketKeys()`/`setTicketKeys()`
Fedor Indutny [Wed, 22 Jul 2015 20:52:23 +0000 (13:52 -0700)]
tls: add `getTicketKeys()`/`setTicketKeys()`

Introduce two new APIs for getting/settings the TLS Server Ticket Keys.

Fix: #1465
PR-URL: https://github.com/nodejs/io.js/pull/2227
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: Replace util.debug with console.error
Yosuke Furukawa [Tue, 21 Jul 2015 17:30:20 +0000 (02:30 +0900)]
doc: Replace util.debug with console.error

PR-URL: https://github.com/nodejs/io.js/pull/2214
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agocrypto: fix legacy SNICallback
Fedor Indutny [Sun, 17 May 2015 13:10:24 +0000 (15:10 +0200)]
crypto: fix legacy SNICallback

`onselect` is set on the `sniObject_` not on the `Connection` instance.

See: https://github.com/joyent/node/pull/25109
PR-URL: https://github.com/nodejs/io.js/pull/1720
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agohttp: Check this.connection before using it
Sakthipriyan Vairamani [Mon, 13 Jul 2015 19:38:25 +0000 (01:08 +0530)]
http: Check this.connection before using it

Refer: https://github.com/joyent/node/pull/25670

PR-URL: https://github.com/nodejs/io.js/pull/2172
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
8 years agotest: add -no_rand_screen to s_client opts on Win
Shigeki Ohtsu [Sat, 18 Jul 2015 02:59:55 +0000 (11:59 +0900)]
test: add -no_rand_screen to s_client opts on Win

RAND_screen() causes stability issues in invoking openssl-cli s_client
on win2008r2 in CI. Disable to use it by adding -no_rand_screen
options to all tls tests that use common.opensslCli.

Fixes: https://github.com/nodejs/io.js/issues/2150
PR-URL: https://github.com/nodejs/io.js/pull/2209
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Joao Reis <reis@janeasystems.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agowin,node-gyp: enable delay-load hook by default
Bert Belder [Wed, 15 Apr 2015 20:58:50 +0000 (13:58 -0700)]
win,node-gyp: enable delay-load hook by default

The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.

PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodeps: upgrade to npm 2.13.1
Kat Marchán [Tue, 21 Jul 2015 03:07:07 +0000 (20:07 -0700)]
deps: upgrade to npm 2.13.1

PR-URL: https://github.com/nodejs/io.js/pull/2210
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agoutil: removing redundant checks in is* functions
Sakthipriyan Vairamani [Tue, 14 Jul 2015 20:26:54 +0000 (01:56 +0530)]
util: removing redundant checks in is* functions

When Object.prototype.toString is used to determine the type, we don't
have to explicitly check for other types. This patch removes the
redundant checks like that.

PR-URL: https://github.com/nodejs/io.js/pull/2179

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: add joaocgreis as a collaborator
João Reis [Mon, 20 Jul 2015 08:54:20 +0000 (09:54 +0100)]
doc: add joaocgreis as a collaborator

Refer: https://github.com/nodejs/io.js/issues/2102

PR-URL: https://github.com/nodejs/io.js/pull/2208

Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotest: changing process.exit to return while skipping tests
Sakthipriyan Vairamani [Tue, 7 Jul 2015 15:25:55 +0000 (20:55 +0530)]
test: changing process.exit to return while skipping tests

This patch uses `return` statement to skip the test instead of using
`process.exit` call.

PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agotest: formatting skip messages for TAP parsing
Sakthipriyan Vairamani [Mon, 6 Jul 2015 03:24:12 +0000 (03:24 +0000)]
test: formatting skip messages for TAP parsing

This patch makes the skip messages consistent so that the TAP plugin
in CI can parse the messages properly. The format will be

    1..0 # Skipped: [Actual reason why the test is skipped]

PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agodoc: add TSC meeting minutes 2015-07-15
Rod Vagg [Thu, 16 Jul 2015 11:09:35 +0000 (21:09 +1000)]
doc: add TSC meeting minutes 2015-07-15

PR-URL: https://github.com/nodejs/io.js/pull/2191
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
9 years agodoc: recompile before testing core module changes
Phillip Johnsen [Wed, 24 Jun 2015 18:35:43 +0000 (20:35 +0200)]
doc: recompile before testing core module changes

Changes to core modules do not take effect unless recompiled. Tip new
contributors about this when describing how to run tests in
contribution guide.

Removed `jslint` from first test command example, as jslint is included
when running `make test`.

Fixed wrong path of example stream2-transform test.

PR-URL: https://github.com/nodejs/io.js/pull/2051
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
9 years agolib,test: add freelist deprecation and test
Sakthipriyan Vairamani [Tue, 14 Jul 2015 17:23:54 +0000 (22:53 +0530)]
lib,test: add freelist deprecation and test

As per the dicussion in https://github.com/nodejs/io.js/issues/569,
this patch issues a deprecation warning when freelist module is
required. A test file for freelist is also added.

PR-URL: https://github.com/nodejs/io.js/pull/2176
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
9 years agoWorking on v2.4.1
Jeremiah Senkpiel [Fri, 17 Jul 2015 23:21:50 +0000 (16:21 -0700)]
Working on v2.4.1

PR-URL: https://github.com/nodejs/io.js/pull/2189

9 years ago2015-07-17 io.js v2.4.0 Release v2.4.0
Jeremiah Senkpiel [Fri, 17 Jul 2015 23:19:32 +0000 (16:19 -0700)]
2015-07-17 io.js v2.4.0 Release

Notable changes

* src: Added a new `--track-heap-objects` flag to track heap object
allocations for heap snapshots (Bradley Meck)
https://github.com/nodejs/io.js/pull/2135.
* readline: Fixed a freeze that affected the repl if the keypress event
handler threw (Alex Kocharin) https://github.com/nodejs/io.js/pull/2107.
* npm: Upgraded to v2.13.0, release notes can be found in
https://github.com/npm/npm/releases/tag/v2.13.0 (Forrest L Norvell)
https://github.com/nodejs/io.js/pull/2152.

PR-URL: https://github.com/nodejs/io.js/pull/2189

9 years agodoc: add targos as a collaborator
Michaël Zasso [Fri, 17 Jul 2015 22:48:43 +0000 (00:48 +0200)]
doc: add targos as a collaborator
Ref: https://github.com/nodejs/io.js/issues/2102

PR-URL: https://github.com/nodejs/io.js/pull/2200
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add thefourtheye as a collaborator
Sakthipriyan Vairamani [Sat, 18 Jul 2015 04:02:18 +0000 (04:02 +0000)]
doc: add thefourtheye as a collaborator

Refer: https://github.com/nodejs/io.js/issues/2102

PR-URL: https://github.com/nodejs/io.js/pull/2199
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodocs: link to more up-to-date v8 docs
Jeremiah Senkpiel [Thu, 16 Jul 2015 22:09:41 +0000 (15:09 -0700)]
docs: link to more up-to-date v8 docs

PR-URL: https://github.com/nodejs/io.js/pull/2196
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fixes: https://github.com/nodejs/io.js/pull/2155

9 years agodoc: add TSC members from the combined project
Jeremiah Senkpiel [Fri, 15 May 2015 19:51:37 +0000 (12:51 -0700)]
doc: add TSC members from the combined project

These members were collaborators on the old joyent/node repo prior to
convergence of the Node.js and io.js projects under the Node
Foundation. This updates our list to represent that they are now also
part of the TSC (Technical Steering Committee), which was previously
known as the io.js TC.

PR-URL: https://github.com/nodejs/io.js/pull/2085
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Membership changes also previously reviewed by many more TSC & former
TC members in https://github.com/nodejs/io.js/pull/1710

9 years agowin,node-gyp: enable delay-load hook by default
Bert Belder [Wed, 15 Apr 2015 20:58:50 +0000 (13:58 -0700)]
win,node-gyp: enable delay-load hook by default

The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.

PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: upgrade to npm 2.13.0
Forrest L Norvell [Fri, 10 Jul 2015 03:48:26 +0000 (20:48 -0700)]
deps: upgrade to npm 2.13.0

PR-URL: https://github.com/nodejs/io.js/pull/2152
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc: add TSC meeting minutes 2015-07-08
Rod Vagg [Wed, 15 Jul 2015 12:48:24 +0000 (22:48 +1000)]
doc: add TSC meeting minutes 2015-07-08

PR-URL: https://github.com/nodejs/io.js/pull/2184
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix test-debug-port-from-cmdline
João Reis [Wed, 15 Jul 2015 12:19:56 +0000 (13:19 +0100)]
test: fix test-debug-port-from-cmdline

This test was failing because the spawned process was terminated before
anything could be done, by calling child.stdin.end. With this change,
the child's stdin is no longer closed. When the stdin is not a tty,
io.js waits for the whole input before starting, so the child must be
run with --interactive to process the command sent by the parent. The
child is killed explicitly by the parent before it exits.

This test was failing silently because the asserts were not called if
nothing was received from the child. This fix moves assertOutputLines to
always run on exit.

Fixes: https://github.com/nodejs/io.js/issues/2177
Refs: https://github.com/nodejs/io.js/issues/2094
PR-URL: https://github.com/nodejs/io.js/pull/2186
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
9 years agobuild: always use prefix=/ for tar-headers
Rod Vagg [Tue, 30 Jun 2015 06:57:47 +0000 (16:57 +1000)]
build: always use prefix=/ for tar-headers

Defaults to /usr/local otherwise, which isn't helpful for node-gyp,
nor standard assumptions about how header directories should be
structured.

PR-URL: https://github.com/nodejs/io.js/pull/2082
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agodoc: add TSC meeting minutes 2015-07-01
Rod Vagg [Wed, 8 Jul 2015 11:39:23 +0000 (21:39 +1000)]
doc: add TSC meeting minutes 2015-07-01

PR-URL: https://github.com/nodejs/io.js/pull/2132
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agodoc,test: empty strings in path module
Sakthipriyan Vairamani [Sun, 5 Jul 2015 15:08:16 +0000 (15:08 +0000)]
doc,test: empty strings in path module

The path module's `join, normalize, isAbsolute, relative and resolve`
functions return/use the current directory if they are passed zero
length strings.

    > process.version
    'v2.3.4-pre'
    > path.win32.join('')
    '.'
    > path.posix.join('')
    '.'
    > path.win32.normalize('')
    '.'
    > path.posix.normalize('')
    '.'
    > path.win32.isAbsolute('')
    false
    > path.posix.isAbsolute('')
    false
    > path.win32.relative('', '')
    ''
    > path.posix.relative('', '')
    ''
    > path.win32relative('.', '')
    ''
    > path.posix.relative('.', '')
    ''
    > path.posix.resolve('')
    '/home/thefourtheye/Desktop'
    > path.win32.resolve('')
    '\\home\\thefourtheye\\Desktop'

Since empty paths are not valid in any of the operating systems people
normally use, this behaviour might be a surprise to the users. This
commit introduces "Notes" about this, wherever applicable in `path`'s
documentation.

The tests makes sure that the behaviour is intact between
commits.

PR-URL: https://github.com/nodejs/io.js/pull/2106
Reviewed-By: Rich Trott <rtrott@gmail.com>
9 years agochild_process: fix arguments comments
Roman Reiss [Fri, 10 Jul 2015 23:57:51 +0000 (01:57 +0200)]
child_process: fix arguments comments

Fixes the arguments comments for execFileSync and other related minor
inconsistencies in commented arguments in the same file.

PR-URL: https://github.com/nodejs/io.js/pull/2161
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agotest: properly clean up temp directory
Roman Reiss [Sat, 11 Jul 2015 22:20:48 +0000 (00:20 +0200)]
test: properly clean up temp directory

A persistent failure on OS X 10.11 uncovered a inproperly cleaned up
temp directory in this test. This changes the mkdirSync call to clean up
properly in case it throws.

PR-URL: https://github.com/nodejs/io.js/pull/2164
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agopath: assert path.join() arguments equally
Phillip Johnsen [Fri, 10 Jul 2015 22:13:59 +0000 (00:13 +0200)]
path: assert path.join() arguments equally

Re-use `assertPath()` when asserting path argument types in `join()`
as throughout the rest of the `path` module.

This also ensures the same error message generated for posix as for
win32.

PR-URL: https://github.com/nodejs/io.js/pull/2159
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agoreadline: fix freeze if `keypress` event throws
Alex Kocharin [Sun, 5 Jul 2015 16:16:47 +0000 (19:16 +0300)]
readline: fix freeze if `keypress` event throws

`emitKeys` is a generator which emits `keypress` events in an infinite
loop. But if `keypress` event handler throws, the error stops the loop,
leaving generator in a broken state. So this patch restarts the generator
when an error occures.

PR-URL: https://github.com/nodejs/io.js/pull/2107
Reviewed-By: Christopher Monsanto <chris@monsan.to>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agosrc: add --track-heap-objects
Bradley Meck [Thu, 9 Jul 2015 16:15:26 +0000 (11:15 -0500)]
src: add --track-heap-objects

- This makes v8 add .trace_function_info to the serialized form of
  snapshots from v8::HeapSnapshot::Serialize
- .trace_funciton_info combined with .trace_node in snapshots tells the
  JS location that allocated a specific object

PR-URL: https://github.com/nodejs/io.js/pull/2135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: document fs.watchFile behaviour on ENOENT
Brendan Ashworth [Wed, 1 Jul 2015 15:13:54 +0000 (08:13 -0700)]
doc: document fs.watchFile behaviour on ENOENT

When fs.watchFile encounters an ENOENT error, it invokes the given
callback with some error data. This caused an issue as it was different
behaviour than Node v0.10. Instead of changing this behaviour, document
it and add a test.

Ref: https://github.com/nodejs/io.js/issues/1745
Ref: https://github.com/nodejs/io.js/pull/2028
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/2093

9 years agofs: fix error on bad listener type
Brendan Ashworth [Wed, 1 Jul 2015 15:14:52 +0000 (08:14 -0700)]
fs: fix error on bad listener type

When the listener was truthy but NOT a function, fs.watchFile would
throw an error through the EventEmitter. This caused a problem because
it would only be thrown after the listener was started, which left the
listener on.

There should be no backwards compatability issues because the error was
always thrown, just in a different manner.

Also adds tests for this and other basic functionality.

PR-URL: https://github.com/nodejs/io.js/pull/2093
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild: run-ci makefile rule
Alexis Campailla [Wed, 8 Jul 2015 14:11:24 +0000 (16:11 +0200)]
build: run-ci makefile rule

Adding a single rule to be called from Jenkins.

Jenkins jobs typically call:
python ./configure
make -j $(getconf _NPROCESSORS_ONLN)
make test-ci

After this change, we can have Jenkins call:
make run-ci -j $(getconf _NPROCESSORS_ONLN)

This allows us to customize how we call configure
for different repos or branches (e.g. joyent\node).

PR-URL: https://github.com/nodejs/io.js/pull/2134
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
9 years agobuild: fix vcbuild merge issues
Alexis Campailla [Wed, 8 Jul 2015 10:31:30 +0000 (12:31 +0200)]
build: fix vcbuild merge issues

configure was getting called twice.
We also erroneously introduced support for VS2010,
and were picking 2010 before other versions.

PR-URL: https://github.com/nodejs/io.js/pull/2131
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agorepl: Prevent crash when tab-completed with Proxy
Sakthipriyan Vairamani [Tue, 7 Jul 2015 17:01:21 +0000 (22:31 +0530)]
repl: Prevent crash when tab-completed with Proxy

If the proxy objects don't have a valid `hasOwnPropertyNames` trap,
REPL crashes with a `TypeError`, as per the bug report
https://github.com/nodejs/io.js/issues/2119

    > var proxy = Proxy.create({ fix: function() { return {}; } });
    undefined
    > proxy.<tab>
    TypeError: Proxy handler #<Object> has no 'getOwnPropertyNames' trap
        at Function.getOwnPropertyNames (native)
        at repl.js:644:40
        at REPLServer.defaultEval (repl.js:169:5)
        at bound (domain.js:254:14)
        at REPLServer.runBound [as eval] (domain.js:267:12)
        at REPLServer.complete (repl.js:639:14)
        at REPLServer.complete [as completer] (repl.js:207:10)
        at REPLServer.Interface._tabComplete (readline.js:377:8)
        at REPLServer.Interface._ttyWrite (readline.js:845:14)
        at ReadStream.onkeypress (readline.js:105:10)

This patch traps the error thrown and suppresses it.

PR-URL: https://github.com/nodejs/io.js/pull/2120
Fixes: https://github.com/nodejs/io.js/issues/2119
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agobuild: bail early if clean is invoked
Johan Bergström [Tue, 7 Jul 2015 22:06:13 +0000 (08:06 +1000)]
build: bail early if clean is invoked

On windows, there's no need to continue with the msbuild process
(signing, whatnot) when we only want to clean the project.

PR-URL: https://github.com/nodejs/io.js/pull/2127
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
9 years agotest: add test for dgram.setTTL
Evan Lucas [Tue, 7 Jul 2015 12:44:57 +0000 (07:44 -0500)]
test: add test for dgram.setTTL

Verify that passing a non-number will throw and that the argument is
returned on success.

PR-URL: https://github.com/nodejs/io.js/pull/2121
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agoWorking on v2.3.5
Jeremiah Senkpiel [Thu, 9 Jul 2015 16:46:24 +0000 (09:46 -0700)]
Working on v2.3.5

9 years ago2015-07-09 io.js v2.3.4 Release v2.3.4
Jeremiah Senkpiel [Thu, 9 Jul 2015 16:46:02 +0000 (09:46 -0700)]
2015-07-09 io.js v2.3.4 Release

Notable changes

* openssl: Upgrade to 1.0.2d, fixes CVE-2015-1793 (Alternate Chains
Certificate Forgery).
* npm: Upgraded to v2.12.1, release notes can be found in
https://github.com/npm/npm/releases/tag/v2.12.0 and
https://github.com/npm/npm/releases/tag/v2.12.1 (Kat Marchán)
https://github.com/nodejs/io.js/pull/2112.

9 years agodeps: update deps/openssl/conf/arch/*/opensslconf.h
Shigeki Ohtsu [Thu, 9 Jul 2015 13:00:23 +0000 (22:00 +0900)]
deps: update deps/openssl/conf/arch/*/opensslconf.h

They should be updated according to the fix at
https://github.com/openssl/openssl/commit/b4f0d1a4a89b964dba80036a6348ca0a1913c526

PR-URL: https://github.com/nodejs/io.js/pull/2141
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: upgrade openssl sources to 1.0.2d
Shigeki Ohtsu [Thu, 9 Jul 2015 12:57:23 +0000 (21:57 +0900)]
deps: upgrade openssl sources to 1.0.2d

This just replaces all sources of openssl-1.0.2d.tar.gz
into deps/openssl/openssl

deps: copy all openssl header files to include dir

All symlink files in `deps/openssl/openssl/include/openssl/`
 are removed and replaced with real header files to avoid
issues on Windows.

deps: fix openssl assembly error on ia32 win32

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

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
deps: fix asm build error of openssl in x86_win32

See
https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html

iojs needs to stop using masm and move to nasm or yasm on Win32.

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
openssl: fix keypress requirement in apps on win32

Reapply b910613792dac946b295855963869933a9089044 .

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
deps: add -no_rand_screen to openssl s_client

In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/2141
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: remove traceSyncIO property from process
Bradley Meck [Thu, 9 Jul 2015 15:05:59 +0000 (10:05 -0500)]
src: remove traceSyncIO property from process

PR-URL: https://github.com/nodejs/io.js/pull/2143
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agotest: add missing crypto checks
Johan Bergström [Wed, 8 Jul 2015 00:00:33 +0000 (10:00 +1000)]
test: add missing crypto checks

Add a check for crypto before using it, similar to how
other tests work.

PR-URL: https://github.com/nodejs/io.js/pull/2129
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotools: install gdbinit from v8 to $PREFIX/share
Ali Ijaz Sheikh [Mon, 6 Jul 2015 16:41:04 +0000 (09:41 -0700)]
tools: install gdbinit from v8 to $PREFIX/share

gdbinit provided by V8 can be very useful for low-level debugging of
crashes in node and in binary addons. Most useful commands at 'jst'
for JS stack traces and 'job' for printing a heap object.

This patch installs the file at $PREFIX/share/doc/node/gdbinit.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/2123

9 years agotest: refactor test-repl-tab-complete
Sakthipriyan Vairamani [Tue, 7 Jul 2015 13:31:17 +0000 (19:01 +0530)]
test: refactor test-repl-tab-complete

The original test uses a variable to explicitly count how many
times the callback is invoked. This patch uses common.mustCall()
to track if the callback is called or not. This makes the test
more robust, as we don't explicitly hardcode the number of times
to be called.

PR-URL: https://github.com/nodejs/io.js/pull/2122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agodoc: document current release procedure
Rod Vagg [Fri, 3 Jul 2015 10:28:46 +0000 (20:28 +1000)]
doc: document current release procedure

PR-URL: https://github.com/nodejs/io.js/pull/2099
Author: Jeremiah Senkpiel <fishrock123@rocketmail.com>

9 years agowin,node-gyp: enable delay-load hook by default
Bert Belder [Wed, 15 Apr 2015 20:58:50 +0000 (13:58 -0700)]
win,node-gyp: enable delay-load hook by default

The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.

PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: make node-gyp work with io.js
cjihrig [Fri, 27 Feb 2015 18:40:58 +0000 (13:40 -0500)]
deps: make node-gyp work with io.js

Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e21c1fa08d8df14eeb654c90cc5aa20,
5de334c23096492014a097ff487f07ad8eaee6d2, and
da730c76e98fb9fd18dac445dafbbec74d79f802. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: upgrade to npm 2.12.1
Kat Marchán [Mon, 6 Jul 2015 07:00:48 +0000 (00:00 -0700)]
deps: upgrade to npm 2.12.1

PR-URL: https://github.com/nodejs/io.js/pull/2112
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agoRevert "test: add test for missing `close`/`finish` event"
Fedor Indutny [Sat, 4 Jul 2015 18:19:58 +0000 (11:19 -0700)]
Revert "test: add test for missing `close`/`finish` event"

This reverts commit 9436a860cb599be0e3f64d3bccfa81e389aa9fa8.

9 years agobenchmark: Add some path benchmarks for #1778
Nathan Woltman [Sat, 6 Jun 2015 00:43:48 +0000 (20:43 -0400)]
benchmark: Add some path benchmarks for #1778

Path functions being benchmarked are:
* format
* isAbsolute
* join
* normalize
* relative
* resolve

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agopath: refactor for performance and consistency
Nathan Woltman [Sat, 23 May 2015 04:42:12 +0000 (00:42 -0400)]
path: refactor for performance and consistency

Improve performance by:
+ Not leaking the `arguments` object!
+ Getting the last character of a string by index, instead of
  with `.substr()` or `.slice()`

Improve code consistency by:
+ Using `[]` instead of `.charAt()` where possible
+ Using a function declaration instead of a var declaration
+ Using `.slice()` with clearer arguments
+ Checking if `dir` is truthy in `win32.format`
  (added tests for this)

Improve both by:
+ Making the reusable `trimArray()` function
+ Standardizing getting certain path statistics with
  the new `win32StatPath()` function

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agodoc: update AUTHORS list
Rod Vagg [Fri, 3 Jul 2015 10:32:53 +0000 (20:32 +1000)]
doc: update AUTHORS list

Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/nodejs/io.js/pull/2100
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James Hartig <fastest963@gmail.com>
9 years agotest: add test for missing `close`/`finish` event
Mark Plomer [Mon, 13 Apr 2015 14:28:47 +0000 (16:28 +0200)]
test: add test for missing `close`/`finish` event

See next commit for the actual fix.

PR-URL: https://github.com/iojs/io.js/pull/1373
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agoWorking on v2.3.4
Jeremiah Senkpiel [Fri, 3 Jul 2015 22:47:02 +0000 (15:47 -0700)]
Working on v2.3.4

9 years ago2015-07-04 io.js v2.3.3 Release v2.3.3
Jeremiah Senkpiel [Fri, 3 Jul 2015 22:46:16 +0000 (15:46 -0700)]
2015-07-04 io.js v2.3.3 Release

Notable changes

* deps: Fixed an out-of-band write in utf8 decoder.
This is an important security update as it can be used to cause a
denial of service attack.

9 years agodeps: fix out-of-band write in utf8 decoder
Fedor Indutny [Fri, 3 Jul 2015 21:12:08 +0000 (14:12 -0700)]
deps: fix out-of-band write in utf8 decoder

Originally reported by: Kris Reeves <kris.re@bbhmedia.com>

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: don't recommend domains for error handling
Benjamin Gruenbaum [Thu, 25 Jun 2015 06:17:21 +0000 (09:17 +0300)]
doc: don't recommend domains for error handling

Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".

Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
9 years agoutil: prepend '(node) ' to deprecation messages
Sakthipriyan Vairamani [Sat, 13 Jun 2015 16:44:39 +0000 (16:44 +0000)]
util: prepend '(node) ' to deprecation messages

Changes included in this commit are

   1. Making the deprecation messages consistent. The messages will be in
      the following format

           x is deprecated. Use y instead.

      If there is no alternative for `x`, then the ` Use y instead.` part
      will not be there in the message.

   2. All the internal deprecation messages are printed with the prefix
      `(node) `, except when the `--trace-deprecation` flag is set.

Fixes: https://github.com/nodejs/io.js/issues/1883
PR-URL: https://github.com/nodejs/io.js/pull/1892
Reviewed-By: Roman Reiss <me@silverwind.io>
9 years agoWorking on v2.3.3
Rod Vagg [Thu, 2 Jul 2015 09:43:29 +0000 (19:43 +1000)]
Working on v2.3.3

9 years ago2015-07-02 io.js v2.3.2 Release v2.3.2
Rod Vagg [Thu, 2 Jul 2015 04:20:35 +0000 (14:20 +1000)]
2015-07-02 io.js v2.3.2 Release

Notable changes

build:
  - Added support for compiling with Microsoft Visual C++ 2015
  - Started building and distributing headers-only tarballs along with binaries

9 years agorepl: remove obsolete TODO
Rich Trott [Tue, 30 Jun 2015 06:29:36 +0000 (23:29 -0700)]
repl: remove obsolete TODO

It's long past v0.3.0 and .break isn't going anywhere anytime soon.

PR-URL: https://github.com/nodejs/io.js/pull/2081
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
9 years agonet: wrap connect in nextTick
Evan Lucas [Thu, 25 Jun 2015 11:41:10 +0000 (06:41 -0500)]
net: wrap connect in nextTick

Fixes an edge case regression introduced in
1bef71747678c19c7214048de5b9e3848889248d.

With the lookup being skipped, an error could be emitted before an
error listener has been added.

An example of this was presented by changing the server’s IP address
and then immediately making a request to the old address.

Related: https://github.com/nodejs/io.js/pull/1823
PR-URL: https://github.com/nodejs/io.js/pull/2054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years ago_stream_wrap: prevent use after free in TLS
Fedor Indutny [Sat, 6 Jun 2015 22:37:35 +0000 (00:37 +0200)]
_stream_wrap: prevent use after free in TLS

Queued write requests should be invoked on handle close, otherwise the
"consumer" might be already destroyed when the write callbacks of the
"consumed" handle will be invoked. Same applies to the shutdown
requests.

Make sure to "move" away socket from server to not break the
`connections` counter in `net.js`. Otherwise it might not call `close`
callback, or call it too early.

Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1910
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agourl: fix typo in comment
Rich Trott [Sun, 28 Jun 2015 02:05:20 +0000 (19:05 -0700)]
url: fix typo in comment

PR-URL: https://github.com/nodejs/io.js/pull/2071
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotools: fix gyp to work on MacOSX without XCode
Shigeki Ohtsu [Tue, 10 Feb 2015 00:27:52 +0000 (09:27 +0900)]
tools: fix gyp to work on MacOSX without XCode

This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotools: update gyp to 25ed9ac
Ben Noordhuis [Mon, 29 Jun 2015 09:51:02 +0000 (11:51 +0200)]
tools: update gyp to 25ed9ac

Includes improved support for VS 2015[0] and makes it possible to build
with ninja again[1].

[0] https://codereview.chromium.org/1112753003
[1] https://codereview.chromium.org/1209553002

Fixes: https://github.com/nodejs/io.js/pull/2065
PR-URL: https://github.com/nodejs/io.js/pull/2074
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
9 years agobenchmark: make concurrent requests configurable
Rich Trott [Sat, 27 Jun 2015 05:11:30 +0000 (22:11 -0700)]
benchmark: make concurrent requests configurable

In http_bench.js, allow the concurrent requests per client
to be configurable.

This also changes the launch of clients to wait until all
forked servers are online. This eliminates spurious error
messages at the start of the run.

PR-URL: https://github.com/nodejs/io.js/pull/2068
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobenchmark: fix typo in README
Rich Trott [Sat, 27 Jun 2015 04:12:27 +0000 (21:12 -0700)]
benchmark: fix typo in README

PR-URL: https://github.com/nodejs/io.js/pull/2067
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
9 years agotools: re-enable comma-spacing linter rule
Roman Reiss [Sun, 28 Jun 2015 15:42:35 +0000 (17:42 +0200)]
tools: re-enable comma-spacing linter rule

The rule was disabled because of an eslint bug which is now resolved.
All code in lib was already conforming and only test code needed a few
changes to make the linter happy with this rule enabled.

Ref: https://github.com/eslint/eslint/issues/2408

PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
9 years agotools: update eslint to 0.24.0
Roman Reiss [Sun, 28 Jun 2015 15:36:14 +0000 (17:36 +0200)]
tools: update eslint to 0.24.0

PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
9 years agov8: cherry-pick JitCodeEvent patch from upstream
Ben Noordhuis [Mon, 29 Jun 2015 12:12:37 +0000 (14:12 +0200)]
v8: cherry-pick JitCodeEvent patch from upstream

Original commit log follows:

    Meaningful name for builtins in JitCodeEvent API.

    Report builtins by name (e.g. "Builtin:ArgumentsAdaptorTrampoline")
    instead of labeling everything "Builtin:A builtin from the snapshot"

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

PR-URL: https://github.com/nodejs/io.js/pull/2075
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agocrypto: fix VerifyCallback in case of verify error
Shigeki Ohtsu [Fri, 26 Jun 2015 02:44:44 +0000 (11:44 +0900)]
crypto: fix VerifyCallback in case of verify error

3beb880716654dbb2bbb9e333758825172951775 has a bug in VerifyCallback
when preverify is 1 and the cert chain has an verify error. If the
error is UNABLE_TO_GET_ISSUER_CERT_LOCALLY, it leads an assertion
error in finding rootCA.
The whitelist check should be made only when the cert chain has no
verify error with X509_V_OK.

Fixes: https://github.com/nodejs/io.js/issues/2061
PR-URL: https://github.com/nodejs/io.js/pull/2064
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: nix stdin _readableState.reading manipulation
Chris Dickinson [Thu, 15 Jan 2015 20:33:54 +0000 (12:33 -0800)]
src: nix stdin _readableState.reading manipulation

this opts for stream.push('') which has the same effect
but uses a public API.

PR-URL: https://github.com/nodejs/io.js/pull/454
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
9 years agonet: fix debug for dnsopts
Evan Lucas [Thu, 25 Jun 2015 12:29:01 +0000 (07:29 -0500)]
net: fix debug for dnsopts

Prevent debug call from showing [object Object] for dnsopts in
lookupAndConnect

PR-URL: https://github.com/nodejs/io.js/pull/2059
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
9 years agobuffer: prevent abort on bad proto
Trevor Norris [Thu, 18 Jun 2015 20:07:22 +0000 (14:07 -0600)]
buffer: prevent abort on bad proto

If an object's prototype is munged it's possible to bypass the
instanceof check and cause the application to abort. Instead now use
HasInstance() to verify that the object is a Buffer, and throw if not.

This check will not work for JS only methods. So while the application
won't abort, it also won't throw.

In order to properly throw in all cases with toString() the JS
optimization of checking that length is zero has been removed. In its
place the native methods will now return early if a zero length string
is detected.

Ref: https://github.com/nodejs/io.js/pull/1486
Ref: https://github.com/nodejs/io.js/pull/1922
Fixes: https://github.com/nodejs/io.js/issues/1485
PR-URL: https://github.com/nodejs/io.js/pull/2012
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: purge stale disabled tests
Rich Trott [Tue, 23 Jun 2015 21:29:38 +0000 (14:29 -0700)]
test: purge stale disabled tests

Tests in the disabled directory are not used by Makefile nor by the CI.
Other than a single 2015 commit that puts 'use strict' in each test,
many of them haven't been touched in years.

This removes all the disabled tests that have been unmodified since
2011 (with the exception of the 'use strict' modification mentioned
above).

PR-URL: https://github.com/nodejs/io.js/pull/2045
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
9 years agotest: do not swallow OpenSSL support error
Rich Trott [Tue, 23 Jun 2015 18:26:56 +0000 (11:26 -0700)]
test: do not swallow OpenSSL support error

PR-URL: https://github.com/nodejs/io.js/pull/2042
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9 years agobuffer: optimize Buffer#toString()
Ben Noordhuis [Sun, 21 Jun 2015 20:32:22 +0000 (22:32 +0200)]
buffer: optimize Buffer#toString()

Break up Buffer#toString() into a fast and slow path.  The fast path
optimizes for zero-length buffers and no-arg method invocation.

The speedup for zero-length buffers is a satisfying 700%.  The no-arg
toString() operation gets faster by about 13% for a one-byte buffer.

This change exploits the fact that most Buffer#toString() calls are
plain no-arg method calls.  Rewriting the method to take no arguments
means a call doesn't go through an ArgumentsAdaptorTrampoline stack
frame in the common case.

PR-URL: https://github.com/nodejs/io.js/pull/2027
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Daniel Cousens <email@dcousens.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agotest: fix test-repl-tab-complete.js
cjihrig [Wed, 24 Jun 2015 20:11:43 +0000 (16:11 -0400)]
test: fix test-repl-tab-complete.js

test-repl-tab-complete.js contains numerous assertions that are
never run. Anything that results in a ReferenceError bails out,
and never calls the functions containing the assertions. This
commit adds checking for successful tab completions, as well as
ReferenceErrors.

PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agorepl: make 'Unexpected token' errors recoverable
Julien Gilli [Mon, 15 Dec 2014 20:21:54 +0000 (12:21 -0800)]
repl: make 'Unexpected token' errors recoverable

Fix the regexp used to detect 'Unexpected token' errors so that they can
be considered as recoverable. This fixes the following use case:

> var foo = 'bar \
... baz';
undefined
> foo
'bar baz'
>

Fixes: https://github.com/joyent/node/issues/8874
PR-URL: https://github.com/joyent/node/pull/8875
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agorepl: fix tab completion for a non-global context
Sangmin Yoon [Wed, 27 May 2015 09:10:45 +0000 (18:10 +0900)]
repl: fix tab completion for a non-global context

Use vm.isContext() to properly identify contexts.

PR-URL: https://github.com/joyent/node/pull/25382
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: make the abbreviation 1MM clear
Ivan Yan [Thu, 25 Jun 2015 02:21:13 +0000 (10:21 +0800)]
doc: make the abbreviation 1MM clear

Refs: https://github.com/nodejs/io.js/pull/2050
PR-URL: https://github.com/nodejs/io.js/pull/2053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
9 years agobuild: add tar-headers target for headers-only tar
Rod Vagg [Sun, 14 Jun 2015 10:23:43 +0000 (20:23 +1000)]
build: add tar-headers target for headers-only tar

to replace the full src download by node-gyp, using the proper format
instead of the full source format

PR-URL: https://github.com/nodejs/io.js/pull/1975
Reviewed-By: William Blankenship <william.jblankenship@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>