platform/upstream/nodejs.git
9 years agodoc: improve dns module's documentation
Julien Gilli [Tue, 18 Nov 2014 20:56:28 +0000 (12:56 -0800)]
doc: improve dns module's documentation

Make the difference between dns.lookup and other functions even clearer.

PR-URL: https://github.com/joyent/node/pull/8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/542234ad984fd1fd90958f07f7f122530e7fb9c6

9 years agodoc: clarify dns.lookup vs dns.resolve
Julien Gilli [Fri, 14 Nov 2014 18:58:54 +0000 (10:58 -0800)]
doc: clarify dns.lookup vs dns.resolve

Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

PR-URL: https://github.com/joyent/node/pull/8726
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/5ff59453a483a43f1563504989f8e2d0ec253de1

9 years agodoc: clarify url.format documentation
Julien Gilli [Sat, 10 Jan 2015 20:41:12 +0000 (21:41 +0100)]
doc: clarify url.format documentation

The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/0603c8345b7c40f9723277d5ae1f44041627dbab

9 years agodoc: clarify buffer api documentation
James M Snell [Sat, 10 Jan 2015 20:20:13 +0000 (21:20 +0100)]
doc: clarify buffer api documentation

Better wording for start and end parameters, also document .length
should be considered read-only.

PR-URL: https://github.com/joyent/node/pull/8910
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/102a861ec2e79ee78d8b8526fa410aac5db18753

9 years agodoc: clarify add/removeListener semantics
James M Snell [Fri, 19 Dec 2014 17:53:20 +0000 (09:53 -0800)]
doc: clarify add/removeListener semantics

Clarify that adding or removing a listener is not idempotent.

PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/48536394c954b2e3e41dcaee3778373ea79e2c25

9 years agodoc: clearer log messages in net code samples
pkcs [Sun, 23 Nov 2014 23:54:21 +0000 (00:54 +0100)]
doc: clearer log messages in net code samples

Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
Cherry-picked-from: https://github.com/joyent/node/commit/8120015f4078e05ad350bb71b2839f1ce7bbc7f9

9 years agodoc: cover stdio option in child_process
Sam Roberts [Sat, 10 Jan 2015 20:40:02 +0000 (21:40 +0100)]
doc: cover stdio option in child_process

- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/3a08b7c3e0bc6757e70889196

9 years agodoc: document the fds behind stdin/out/err
Sam Roberts [Mon, 27 Oct 2014 18:03:13 +0000 (11:03 -0700)]
doc: document the fds behind stdin/out/err

Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.

Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Cherry-picked-from: https://github.com/joyent/node/commit/13a992b1c2e1d0e69567fb94bc35f978c4c37ce5

9 years agodoc: update openssl commands to use best practices
Eric Mill [Fri, 7 Nov 2014 15:05:00 +0000 (10:05 -0500)]
doc: update openssl commands to use best practices

This updates key size to 2048 and default hash function to sha256.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690

Cherry-picked-from: https://github.com/joyent/node/commit/88bd95cfef5973de0027b8eb5210e5e97252c7e2

9 years agodoc: add note about key derivation
Calvin Metcalf [Sun, 19 Oct 2014 14:31:22 +0000 (10:31 -0400)]
doc: add note about key derivation

adds a note to the crypto docs passing along
the advice that openssl gives about what
key derivation function they recommend.

PR-URL: https://github.com/joyent/node/pull/8580
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Cherry-picked-from: https://github.com/joyent/node/commit/7dbc024c8573670170d4f561c01ae892d06399db

9 years agodoc: document _transform callback takes 2 args
Calvin Metcalf [Wed, 3 Sep 2014 13:01:15 +0000 (09:01 -0400)]
doc: document _transform callback takes 2 args

Expands the paragraph in the transform stream
implementation docs about the callback that is passed
to the _transform method to include details about how
two arguments may be passed, error and data.  A code
example is also included.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
Cherry-picked-from: https://github.com/joyent/node/commit/c8e0bdd7cf628ee2f3f79e5538132467bbc50b4a

9 years agodoc: add changelog notes for some node v0.10 releases
Bert Belder [Sat, 10 Jan 2015 20:37:51 +0000 (21:37 +0100)]
doc: add changelog notes for some node v0.10 releases

9 years agoRevert "dgram: implicit binds should be exclusive"
Ben Noordhuis [Sat, 10 Jan 2015 03:10:03 +0000 (04:10 +0100)]
Revert "dgram: implicit binds should be exclusive"

This reverts commit a32b92dbcfc8a3a8b2409bb2ace2233ebe327888.

Reverted for breaking the parallel/test-cluster-dgram-2 test on all
platforms.

PR-URL: https://github.com/iojs/io.js/pull/279
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
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-URL: https://github.com/joyent/node/pull/8643
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agocluster: cluster.disconnect() should check status
Sam Roberts [Sat, 10 Jan 2015 02:23:06 +0000 (03:23 +0100)]
cluster: cluster.disconnect() should check status

Workers that are already disconnected but not yet exited should not be
disconnected, trying to do so raises exceptions.

PR-URL: https://github.com/joyent/node/pull/8642
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agocluster: don't assume all workers bind same ports
Sam Roberts [Sat, 10 Jan 2015 03:40:40 +0000 (04:40 +0100)]
cluster: don't assume all workers bind same ports

For shared handles that do not get connection close messages (UDP/dgram
is the only example of this), cluster must not assume that a port
listened on by one worker is listened on by all workers.

PR-URL: https://github.com/joyent/node/pull/8642
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agodeps: don't build minizip into zlib
Bert Belder [Sat, 10 Jan 2015 01:37:22 +0000 (02:37 +0100)]
deps: don't build minizip into zlib

It's an optional extension that node/iojs doesn't use.

PR-URL: https://github.com/iojs/io.js/pull/276
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: don't set zlib's product_name
Bert Belder [Sat, 10 Jan 2015 01:36:17 +0000 (02:36 +0100)]
deps: don't set zlib's product_name

PR-URL: https://github.com/iojs/io.js/pull/276
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodeps: fix zlib -Wimplicit-function-declaration
Ben Noordhuis [Fri, 9 Jan 2015 16:14:57 +0000 (17:14 +0100)]
deps: fix zlib -Wimplicit-function-declaration

Build the bundled zlib with -DZ_HAVE_UNISTD_H to make the definition of
close(), read() and other unistd.h functions available to gzread.c and
gzwrite.c. It's kind of silly that we have to jump through hoops here
because we never call any of the functions that do I/O directly, but at
least it squelches the -Wimplicit-function-declaration warnings.

PR-URL: https://github.com/iojs/io.js/pull/273
Reviewed-by: Bert Belder <bertbelder@gmail.com>
9 years agotools: enable ctrl-c for parallel tests
Chris Dickinson [Fri, 9 Jan 2015 22:15:29 +0000 (14:15 -0800)]
tools: enable ctrl-c for parallel tests

use a threading.Event instead of a boolean attribute.

PR-URL: https://github.com/iojs/io.js/pull/277
Fixes: https://github.com/iojs/io.js/issues/260
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: disable harmony object literals
Ben Noordhuis [Fri, 9 Jan 2015 16:03:21 +0000 (17:03 +0100)]
src: disable harmony object literals

Per the discussion in https://github.com/iojs/io.js/pull/272, upstream
V8 has disabled Harmony object literals for the time being.  Do the
same for feature parity.

PR-URL: https://github.com/iojs/io.js/pull/272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
9 years agosrc: disable harmony classes
Ben Noordhuis [Fri, 9 Jan 2015 01:39:46 +0000 (02:39 +0100)]
src: disable harmony classes

The V8 development branch has unshipped ES6 classes pending resolution
of a number of inheritance edge cases.  Disable classes in io.js for
the sake of feature parity.

See https://github.com/iojs/io.js/issues/251 for background and
discussion.

PR-URL: https://github.com/iojs/io.js/pull/272
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
9 years agosrc: zlib: revert concatenated-stream changes
Chris Dickinson [Tue, 6 Jan 2015 21:15:09 +0000 (13:15 -0800)]
src: zlib: revert concatenated-stream changes

Revert "src: fix windows build error" and "zlib: support
concatenated gzip files".

This reverts commits be413ac732f59ffe621f264239e5e22b77d32025
and 1183ba47dfc2bc8b39f0c10d8dc9e9299a4470bf.

Treating subsequent bytes as a concatenated zlib stream
breaks npm install.

Conflicts:
test/parallel/test-zlib-from-multiple-gzip-with-garbage.js
test/parallel/test-zlib-from-multiple-gzip.js
test/parallel/test-zlib-from-multiple-huge-gzip.js

Fixes: https://github.com/joyent/node/issues/8962
PR-URL: https://github.com/iojs/io.js/pull/240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agobuild: fix `process.platform`
Vladimir Kurchatkin [Fri, 9 Jan 2015 12:38:09 +0000 (15:38 +0300)]
build: fix `process.platform`

e1fe270 introduces the NODE_PLATFORM macro which had to be redefined in
node.gyp for `process.platform` to return expected values.

PR-URL: https://github.com/iojs/io.js/pull/271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agocore: throw TypeError if chdir() args are wrong
Caitlin Potter [Fri, 9 Jan 2015 16:38:28 +0000 (11:38 -0500)]
core: throw TypeError if chdir() args are wrong

PR-URL: https://github.com/iojs/io.js/pull/274
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: update the zlib license after upgrading
Shigeki Ohtsu [Wed, 3 Dec 2014 05:07:14 +0000 (14:07 +0900)]
doc: update the zlib license after upgrading

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodeps: update zlib.gyp for zlib 1.2.8
Shigeki Ohtsu [Mon, 1 Dec 2014 05:18:53 +0000 (14:18 +0900)]
deps: update zlib.gyp for zlib 1.2.8

This adds the new gzip source files to the zlib.gyp The changes are
derived from third_party/zlib/zlib.gyp in the Chromium repository.

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodeps: upgrade zlib to 1.2.8
Shigeki Ohtsu [Tue, 2 Dec 2014 23:28:24 +0000 (15:28 -0800)]
deps: upgrade zlib to 1.2.8

Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agonpm: upgrade to v2.1.18
Forrest L Norvell [Thu, 8 Jan 2015 22:37:26 +0000 (14:37 -0800)]
npm: upgrade to v2.1.18

PR-URL: https://github.com/iojs/io.js/pull/266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,nodevars: run iojs.exe to get node version
Bert Belder [Thu, 8 Jan 2015 15:18:23 +0000 (16:18 +0100)]
win,nodevars: run iojs.exe to get node version

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,msi: rename node.exe to iojs.exe
Bert Belder [Thu, 8 Jan 2015 15:17:52 +0000 (16:17 +0100)]
win,msi: rename node.exe to iojs.exe

This change is strictly limited to the name of the binary. The shortcut
name, install folder, docs website links etc. are all unchanged.

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,build: rename node.exe to iojs.exe
Bert Belder [Thu, 8 Jan 2015 15:10:36 +0000 (16:10 +0100)]
win,build: rename node.exe to iojs.exe

  * Sign iojs.exe
  * Run license2rtf.js through iojs

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: regenerate perfctr provider files
Bert Belder [Thu, 8 Jan 2015 15:06:11 +0000 (16:06 +0100)]
win: regenerate perfctr provider files

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,tracing: node -> iojs in perfctr/etw manifests
Bert Belder [Thu, 8 Jan 2015 15:20:50 +0000 (16:20 +0100)]
win,tracing: node -> iojs in perfctr/etw manifests

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,src: node -> iojs in executable manifest
Bert Belder [Thu, 8 Jan 2015 15:19:20 +0000 (16:19 +0100)]
win,src: node -> iojs in executable manifest

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,build: remove upload target from vcbuild.bat
Bert Belder [Thu, 8 Jan 2015 15:22:37 +0000 (16:22 +0100)]
win,build: remove upload target from vcbuild.bat

PR-URL: https://github.com/iojs/io.js/pull/263
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoinstall: install iojs -> node compat symlink
Ben Noordhuis [Thu, 8 Jan 2015 13:21:26 +0000 (14:21 +0100)]
install: install iojs -> node compat symlink

Install a symlink for compatibility with scripts that expect a binary
called `node` or have a /path/to/node shebang.  Only done on UNIX
platforms because symlinks on Windows require elevated privileges.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: rename binary from node to iojs
Ben Noordhuis [Thu, 8 Jan 2015 13:00:43 +0000 (14:00 +0100)]
build: rename binary from node to iojs

* rename the build targets

* update the test runner to use `out/{Debug,Release}/iojs`

* update the installer to install the iojs binary

* update one test that explicitly checks for the binary name

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agotest: remove --use-http1 test runner flag
Ben Noordhuis [Thu, 8 Jan 2015 12:37:32 +0000 (13:37 +0100)]
test: remove --use-http1 test runner flag

The flag was used for a short while during the v0.5 development cycle,
four years ago.  Remove it, it's long overdue.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: update v8 options in man page
Ben Noordhuis [Thu, 8 Jan 2015 12:54:45 +0000 (13:54 +0100)]
doc: update v8 options in man page

Update the outdated list of V8 options in the man page.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: s/node/iojs/ in iojs.1
Ben Noordhuis [Fri, 2 Jan 2015 16:09:45 +0000 (17:09 +0100)]
doc: s/node/iojs/ in iojs.1

The binary is about to be renamed from `node` to `iojs`; preemptively
update the man page.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: rename node.1 -> iojs.1
Ben Noordhuis [Fri, 2 Jan 2015 16:07:43 +0000 (17:07 +0100)]
doc: rename node.1 -> iojs.1

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: remove upload targets from makefile
Ben Noordhuis [Fri, 2 Jan 2015 16:03:03 +0000 (17:03 +0100)]
build: remove upload targets from makefile

The targets upload to nodejs.org but that is the joyent/node website.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agobuild: don't run make recursively
Ben Noordhuis [Fri, 2 Jan 2015 16:00:27 +0000 (17:00 +0100)]
build: don't run make recursively

For targets that need the binary: don't invoke `make all` as part of the
recipe, just depend on the $(NODE_EXE) target.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agowin,test: fix test-process-active-wraps.js
Colin Ihrig [Thu, 8 Jan 2015 19:42:41 +0000 (20:42 +0100)]
win,test: fix test-process-active-wraps.js

b636ba8 broke this test, because it now takes a loop iteration or two
to resolve the loopback address. That consequence is that the TCPWrap
handle that we *don't* want to see is created a bit later, and also
destroyed later, so when we assert that the active handle list is empty
the TCPWrap object is still "busy" being closed.

Wait one extra loop iteration before checking there are no more active
handles. This allows name resolution and clean-up to finish before the
assertion.

BUG: https://github.com/iojs/io.js/issues/246
PR-URL: https://github.com/joyent/node/pull/8998
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodgram: make error messages more informative
Evan Lucas [Thu, 8 Jan 2015 19:14:44 +0000 (20:14 +0100)]
dgram: make error messages more informative

PR-URL: https://github.com/iojs/io.js/pull/250
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agoutil: _detailedException to _exceptionWithHostPort
Evan Lucas [Thu, 8 Jan 2015 19:13:56 +0000 (20:13 +0100)]
util: _detailedException to _exceptionWithHostPort

The _detailedException() helper function used to be local to the 'net'
module, but now that it has been moved to 'util' a more descriptive name
is desirable.

PR-URL: https://github.com/iojs/io.js/pull/250
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agoutil,net: move _detailedException into util
Evan Lucas [Thu, 8 Jan 2015 00:03:24 +0000 (18:03 -0600)]
util,net: move _detailedException into util

This allows _detailedException() to be used by both the 'net' and
'dgram' modules to provide more informative error messages.

PR-URL: https://github.com/iojs/io.js/pull/250
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agoversion: working on 1.0.0
Rod Vagg [Thu, 8 Jan 2015 04:22:09 +0000 (15:22 +1100)]
version: working on 1.0.0

PR-URL: https://github.com/iojs/io.js/pull/253
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: prefix ARCH and PLATFORM with NODE_
Bert Belder [Thu, 8 Jan 2015 12:05:51 +0000 (13:05 +0100)]
src: prefix ARCH and PLATFORM with NODE_

The PLATFORM preprocessor symbol is defined in node.gyp, and on Windows
it's set to "win". This conflicts with a built-in preprocessor symbol
with a different value ("win32"), which makes the linker(!) complain.
Resolve this by renaming these symbols to NODE_ARCH and NODE_PLATFORM.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: fix NODE_NET_SOCKET_READ/WRITE signature
Bert Belder [Thu, 8 Jan 2015 11:58:42 +0000 (12:58 +0100)]
win: fix NODE_NET_SOCKET_READ/WRITE signature

The NODE_NET_SOCKET_READ and NODE_NET_SOCKET_WRITE macros are just
no-ops on Windows, but they used to be defined as taking four parameters
while being called with five arguments. Turn them into variadic macros
to squelch a compiler warning.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: suppress GetVersionEx deprecation warning
Bert Belder [Thu, 8 Jan 2015 11:47:00 +0000 (12:47 +0100)]
win: suppress GetVersionEx deprecation warning

There is no other way to retrieve the Windows version. The stated reason
this API is deprecated is that applications are not supposed to check
whether the Windows it's running on is recent enough. But that's not
what we use it for.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: use GetVersionExW instead of GetVersionExA
Bert Belder [Thu, 8 Jan 2015 11:43:51 +0000 (12:43 +0100)]
win: use GetVersionExW instead of GetVersionExA

For consistency with the rest of the source code, use the wide-char
version of this API.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin,openssl: disable some warnings
Bert Belder [Thu, 8 Jan 2015 12:43:22 +0000 (13:43 +0100)]
win,openssl: disable some warnings

This patch disables two (categories of) warnings:

  * deprecation of GetVersionExA
  * possible loss of data in implicit conversion of scalar types

These warnings don't seem to point out serious problems, and avoiding
them in openssl is somebody else's business.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: move broadcast/multicast test to internet/
Ben Noordhuis [Thu, 8 Jan 2015 10:46:21 +0000 (11:46 +0100)]
test: move broadcast/multicast test to internet/

Move parallel/test-dgram-broadcast-multi-process to test/internet.

The test does not play nice with firewalls that restrict broadcast
or multicast traffic, nor can it be rewritten to use only loopback
traffic without running into platform-specific limitations, see also
commits 52e600a and 236533c (TODO: update second one before landing.)

PR-URL: https://github.com/iojs/io.js/pull/259
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agoRevert "test: don't assume broadcast traffic is unfiltered"
Ben Noordhuis [Thu, 8 Jan 2015 10:42:34 +0000 (11:42 +0100)]
Revert "test: don't assume broadcast traffic is unfiltered"

This reverts commit 52e600a9c8655f578fae55d85e778b58d731201a.

Reverted for:

* making the test fail with ENETUNREACH on OS X 10.8, and

* making the test fail with EHOSTDOWN on OS X 10.9 and 10.10 when there
  is no network connectivity, and

* leaving behind orphan processes that make subsequent tests fail with
  EADDRINUSE errors

PR-URL: https://github.com/iojs/io.js/pull/259
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agowin: disable stl exception usage
Bert Belder [Thu, 8 Jan 2015 10:23:59 +0000 (11:23 +0100)]
win: disable stl exception usage

Tell the stl that exception handling is unavailable. This avoids warnings
like:

  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\
  xlocale(337): warning C4530: C++ exception handler used, but unwind
  semantics are not enabled. Specify /EHsc

PR-URL: https://github.com/iojs/io.js/pull/258
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agowin: disable exception handling for all builds
Bert Belder [Thu, 8 Jan 2015 10:19:16 +0000 (11:19 +0100)]
win: disable exception handling for all builds

Previously exception handling was disabled in release builds, but
enabled in debug builds. That makes no sense.

PR-URL: https://github.com/iojs/io.js/pull/258
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoutil: show symbol properties
Vladimir Kurchatkin [Wed, 7 Jan 2015 21:54:25 +0000 (00:54 +0300)]
util: show symbol properties

Properties with symbol names are shown if option `showHidden` of `util.inspect`
or `console.dir` is `true`.

PR-URL: https://github.com/iojs/io.js/pull/247
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
9 years agosrc,deps: replace LoadLibrary by LoadLibraryW
Cheng Zhao [Wed, 31 Dec 2014 20:38:08 +0000 (12:38 -0800)]
src,deps: replace LoadLibrary by LoadLibraryW

On Windows, when compiling with `UNICODE` defined, `LoadLibrary` becomes
`LoadLibraryW`. When an ASCII string is passed to that function it
crashes.

PR-URL: https://github.com/iojs/io.js/pull/226
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agosrc: pass Isolate to node::Utf8Value constructor
Trevor Norris [Wed, 7 Jan 2015 22:13:35 +0000 (14:13 -0800)]
src: pass Isolate to node::Utf8Value constructor

Initial attempt to remove all uses of Isolate::GetCurrent(). Still
exists a few locations, but this works out a heavy usage.

PR-URL: https://github.com/iojs/io.js/pull/244
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: pass Isolate to additional locations
Trevor Norris [Wed, 7 Jan 2015 21:29:58 +0000 (13:29 -0800)]
src: pass Isolate to additional locations

Due to a recent V8 upgrade, more methods require Isolate as an argument.

PR-URL: https://github.com/iojs/io.js/pull/244
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: fix parallel/test-repl with new v8
Ben Noordhuis [Wed, 7 Jan 2015 18:16:21 +0000 (19:16 +0100)]
test: fix parallel/test-repl with new v8

Per the ES6 spec, V8 3.31 no longer throws a SyntaxError for scoped
function declarations.

PR-URL: https://github.com/iojs/io.js/pull/243
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agotest: fix parallel/test-repl-harmony with new v8
Ben Noordhuis [Wed, 7 Jan 2015 18:07:18 +0000 (19:07 +0100)]
test: fix parallel/test-repl-harmony with new v8

Assignment to a const var in strict mode is a lazy TypeError now.
Update the test accordingly.

PR-URL: https://github.com/iojs/io.js/pull/243
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agobuild: fix up build after v8 upgrade
Ben Noordhuis [Wed, 7 Jan 2015 18:05:33 +0000 (19:05 +0100)]
build: fix up build after v8 upgrade

* Define and disable new flag `v8_use_external_startup_data`.

* Disable v8_postmortem_support, it's broken again.  Fedor (@indutny)
  has volunteered to fix it up in the near future.

PR-URL: https://github.com/iojs/io.js/pull/243
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodeps: upgrade v8 to 3.31.74.1
Ben Noordhuis [Wed, 7 Jan 2015 17:38:38 +0000 (18:38 +0100)]
deps: upgrade v8 to 3.31.74.1

PR-URL: https://github.com/iojs/io.js/pull/243
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: update AUTHORS, .mailmap, add authors tool
Rod Vagg [Fri, 2 Jan 2015 05:16:21 +0000 (16:16 +1100)]
doc: update AUTHORS, .mailmap, add authors tool

PR-URL: https://github.com/iojs/io.js/pull/232
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agotest: don't assume broadcast traffic is unfiltered
Ben Noordhuis [Mon, 29 Dec 2014 16:35:51 +0000 (17:35 +0100)]
test: don't assume broadcast traffic is unfiltered

parallel/test-dgram-broadcast-multi-process assumes non-local broadcast
traffic is unfiltered, an assumption that fails with, for example, the
default Fedora firewall rules.  Use a loopback interface instead.

Fixes: https://github.com/iojs/io.js/issues/219
PR-URL: https://github.com/iojs/io.js/pull/220
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodeps: update libuv to 1.2.0
Ben Noordhuis [Mon, 5 Jan 2015 19:44:25 +0000 (20:44 +0100)]
deps: update libuv to 1.2.0

PR-URL: https://github.com/iojs/io.js/pull/237
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
9 years agoMerge remote-tracking branch 'joyent/v0.12' into v1.x
Ben Noordhuis [Mon, 5 Jan 2015 15:43:58 +0000 (16:43 +0100)]
Merge remote-tracking branch 'joyent/v0.12' into v1.x

I was originally going to do this after the v0.11.15 release, but as
that release is three weeks overdue now, I decided not to wait any
longer; we don't want the delta to get too big.

Conflicts:
lib/net.js
test/simple/simple.status

PR-URL: https://github.com/iojs/io.js/pull/236
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agosmalloc: fix bad assert for zero length data
Trevor Norris [Mon, 5 Jan 2015 10:20:31 +0000 (02:20 -0800)]
smalloc: fix bad assert for zero length data

If the data length passed to smalloc.alloc() the array_length will be
zero, causing an overflow check to fail. This prevents that from
happening.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
9 years agonet: make connect() input validation synchronous
cjihrig [Sat, 3 Jan 2015 23:26:26 +0000 (18:26 -0500)]
net: make connect() input validation synchronous

Socket.prototype.connect() sometimes throws on bad inputs
after an asynchronous operation. This commit makes the input
validation synchronous. This commit also removes some hard
coded IP addresses.

PR-URL: https://github.com/joyent/node/pull/8180
Fixes: https://github.com/joyent/node/issues/8140
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
9 years agodocs: update to authors file
Steven R. Loomis [Sat, 3 Jan 2015 01:16:47 +0000 (17:16 -0800)]
docs: update to authors file

PR-URL: https://github.com/joyent/node/pull/8964
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: added TC meeting minutes 2014-12-30
Rod Vagg [Fri, 2 Jan 2015 03:14:51 +0000 (14:14 +1100)]
doc: added TC meeting minutes 2014-12-30

closes #211

PR-URL: https://github.com/iojs/io.js/pull/229
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
9 years agobuild: i18n: add icu config options
Steven R. Loomis [Thu, 13 Nov 2014 01:13:14 +0000 (17:13 -0800)]
build: i18n: add icu config options

Make "--with-intl=none" the default and add "intl-none" option to
vcbuild.bat.

If icu data is missing print a warning unless either --download=all or
--download=icu is set. If set then automatically download, verify (MD5)
and unpack the ICU data if not already available.

There's a "list" of URLs being used, but right now only the first is
picked up. The logic works something like this:

* If there is no directory deps/icu,
  * If no zip file (currently icu4c-54_1-src.zip),
    * Download zip file (icu-project.org -> sf.net)
  * Verify the MD5 sum of the zipfile
    * If bad, print error and exit
  * Unpack the zipfile into deps/icu
* If deps/icu now exists, use it, else fail with help text

Add the configuration option "--with-icu-source=..."

Usage:
  * --with-icu-source=/path/to/my/other/icu
  * --with-icu-source=/path/to/icu54.zip
  * --with-icu-source=/path/to/icu54.tgz
  * --with-icu-source=http://example.com/icu54.tar.bz2

Add the configuration option "--with-icu-locals=...".  Allows choosing
which locales are used in the "small-icu" case.

Example:
    configure --with-intl=small-icu --with-icu-locales=tlh,grc,nl

(Also note that as of this writing, neither Klingon nor Ancient Greek
are in upstream CLDR data. Serving suggestion only.)

Don't use hard coded ../../out paths on windows. This was suggested by
@misterdjules as it causes test failures.  With this fix, "out" is no
longer created on windows and the following can run properly:

    python tools/test.py simple

Reduce space by about 1MB with ICU 54 (over without this patch). Also
trims a few other source files, but only conditional on the exact ICU
version used. This is to future-proof - a file that is unneeded now may
be needed in future ICUs.

Also:
  * Update distclean to remove icu related files
  * Refactor some code into tools/configure.d/nodedownload.py
  * Update docs
  * Add test

PR-URL: https://github.com/joyent/node/pull/8719
Fixes: https://github.com/joyent/node/issues/7676#issuecomment-64704230
[trev.norris@gmail.com small change to test's whitespace and logic]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: added TC meeting minutes 2014-12-17
Rod Vagg [Wed, 17 Dec 2014 20:48:49 +0000 (06:48 +1000)]
doc: added TC meeting minutes 2014-12-17

Closes #163

PR-URL: https://github.com/iojs/io.js/pull/178
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
9 years agodoc: util: document --trace-deprecation
Ben Noordhuis [Sun, 21 Dec 2014 01:06:19 +0000 (02:06 +0100)]
doc: util: document --trace-deprecation

Document the --trace-deprecation flag and the `process` properties that
affect util.deprecate().

Fixes: https://github.com/iojs/io.js/issues/190
PR-URL: https://github.com/iojs/io.js/pull/191
Reviewed-By: Jonathan Ong <me@jongleberry.com>
9 years agolib: introduce process module
Aleksey Smolenchuk [Tue, 30 Dec 2014 22:25:52 +0000 (14:25 -0800)]
lib: introduce process module

This makes require('process') always return a reference to the global
process object.

PR-URL: https://github.com/iojs/io.js/pull/206
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agourl: improve parsing speed
CGavrila [Tue, 28 Oct 2014 12:08:37 +0000 (12:08 +0000)]
url: improve parsing speed

The url.parse() function now checks whether an escapable character is in
the URL before trying to escape it.

PR-URL: https://github.com/joyent/node/pull/8638
[trev.norris@gmail.com: Switch to use continue instead of if]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
9 years agodoc: add tls server.close() callback docs
Sam Roberts [Tue, 30 Dec 2014 06:10:36 +0000 (22:10 -0800)]
doc: add tls server.close() callback docs

Also, tests to confirm its existence.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodgram: close() should accept a callback
Sam Roberts [Tue, 30 Dec 2014 05:30:03 +0000 (21:30 -0800)]
dgram: close() should accept a callback

Like net, http, and https server.close, and socket.end(), etc.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodgram: make 'close' event async
Sam Roberts [Tue, 30 Dec 2014 05:20:54 +0000 (21:20 -0800)]
dgram: make 'close' event async

Emit the close event asynchronously, after the close, as it is with the
net/http close events.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: be specific about the unit of `maxBuffer`
Tim Ruffles [Fri, 26 Dec 2014 10:41:30 +0000 (10:41 +0000)]
doc: be specific about the unit of `maxBuffer`

The maxBuffer option was not self-documenting, so document the unit and
its effect.

PR-URL: https://github.com/iojs/io.js/pull/209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodgram: changes Socket.close() to return itself
Brendan Ashworth [Mon, 29 Dec 2014 20:12:30 +0000 (12:12 -0800)]
dgram: changes Socket.close() to return itself

This commit adds a return statement to the dgram.Socket.close()
function that returns itself after it finishes. This follows along
the functionality of the more popular and, dare I say, father-library
`lib/net.js`.

PR-URL: https://github.com/iojs/io.js/pull/214
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodgram: change Socket.bind() to return itself
Brendan Ashworth [Mon, 29 Dec 2014 20:03:24 +0000 (12:03 -0800)]
dgram: change Socket.bind() to return itself

This commit changes `lib/dgram.js` Sockets to, when
they are bound to a port / IP, return themselves. This
is done in order to allow chaining of methods and be
in accordance with the `lib/net.js` library.

PR-URL: https://github.com/iojs/io.js/pull/214
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoconfigure: remove compiler detection
Nikolai Vavilov [Tue, 23 Dec 2014 19:15:46 +0000 (20:15 +0100)]
configure: remove compiler detection

The GCC version is no longer relevant since only 4.8 and newer are
supported. It's probably safe to assume clang on mac since V8 does
so too.

PR-URL: https://github.com/iojs/io.js/pull/205
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agosrc: remove cpplint error using NOLINT directive
Rudi Cilibrasi [Tue, 23 Dec 2014 16:08:06 +0000 (08:08 -0800)]
src: remove cpplint error using NOLINT directive

PR-URL: https://github.com/iojs/io.js/pull/202
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: document time() and timeEnd() relationship
Mark Stosberg [Mon, 22 Dec 2014 20:40:27 +0000 (15:40 -0500)]
doc: document time() and timeEnd() relationship

`console.time()` and `console.timeEnd()` are very closely related. It's
useful to reference them both from each other.

Previously, console.time() did not mention that it needed to be paired
with a call to console.timeEnd() to be useful, and timeEnd() also failed
to mention that console.time() needed to be called first.

References in both directions have been added.

PR-URL: https://github.com/iojs/io.js/pull/198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: fix v8 doc headings so 'make doc' passes
Mark Stosberg [Tue, 23 Dec 2014 16:07:31 +0000 (11:07 -0500)]
doc: fix v8 doc headings so 'make doc' passes

Previously the code that builds the Table of Contents threw
an exception because of jump from an H1 heading directly to an H3
heading.

By changing the H3 heading to an H2, 'make doc' works again. This is
also consistent with other docs like console.markdown which use
H2 for method call documentation.

PR-URL: https://github.com/iojs/io.js/pull/203
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoassert: fix deepEqual regression
teppeis [Sun, 21 Dec 2014 15:56:33 +0000 (00:56 +0900)]
assert: fix deepEqual regression

Change of Object.keys in ES6 breaks assert.deepEqual about primitive
values.

V8: https://code.google.com/p/v8/issues/detail?id=3443

Previously deepEqual depends on Object.key that throws an error for
a primitive value, but now Object.key does not throw.

PR-URL: https://github.com/iojs/io.js/pull/193
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agoconfigure: remove workarounds for GCC < 4.8
Nikolai Vavilov [Sat, 20 Dec 2014 14:39:10 +0000 (16:39 +0200)]
configure: remove workarounds for GCC < 4.8

They can't compile io.js anyway.

PR-URL: https://github.com/iojs/io.js/pull/187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agolib: micro-optimize url.resolve()
Ben Noordhuis [Fri, 19 Dec 2014 22:46:37 +0000 (23:46 +0100)]
lib: micro-optimize url.resolve()

Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.

Add a new benchmark to prove it.  With the change applied, it scores
about 5% higher and that is nothing to sneeze at.

PR-URL: https://github.com/iojs/io.js/pull/184
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agobenchmark: rename url.parse() benchmark
Ben Noordhuis [Fri, 19 Dec 2014 22:44:19 +0000 (23:44 +0100)]
benchmark: rename url.parse() benchmark

Rename the url.parse() benchmark from url.js to url-parse.js.
A follow-up commit is going to add another one for url.resolve().

PR-URL: https://github.com/iojs/io.js/pull/184
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agolib: micro-optimize EventEmitter#removeListener()
Ben Noordhuis [Fri, 19 Dec 2014 23:04:35 +0000 (00:04 +0100)]
lib: micro-optimize EventEmitter#removeListener()

Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.

Add a new benchmark to prove it.  With the change applied, it scores
a whopping 40% higher.

PR-URL: https://github.com/iojs/io.js/pull/185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agobenchmark: fix printing of large numbers
Ben Noordhuis [Fri, 19 Dec 2014 23:03:10 +0000 (00:03 +0100)]
benchmark: fix printing of large numbers

Don't use Number#toPrecision(), it switches to scientific notation for
numbers with more digits than the precision; use Number#toFixed().

PR-URL: https://github.com/iojs/io.js/pull/185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
9 years agobenchmark: pre-optimize url.parse() before start
Ben Noordhuis [Tue, 9 Dec 2014 22:26:24 +0000 (23:26 +0100)]
benchmark: pre-optimize url.parse() before start

Force V8 to optimize url.parse() before starting the actual benchmark.
Tries to minimize variance between successive runs caused by the
optimizer kicking in at different points.

It does not seem to have much impact, CPU times are roughly the same
before and afterwards; url.parse() quickly plateaus at a local optimum
where most time is spent in V8 builtins, notably Runtime_StringSplit()
and Object::GetElementWithReceiver() calls originating from
deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that
I could spot.

Still, I don't see any downsides to pre-optimizing the function being
benchmarked so in it goes.

PR-URL: https://github.com/iojs/io.js/pull/132
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
9 years agodoc: add details for http res/req end callback
Jackson Tian [Wed, 10 Dec 2014 03:20:11 +0000 (11:20 +0800)]
doc: add details for http res/req end callback

Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
9 years agodebugger: improve clearBreakpoint error and docs
Julian Duque [Tue, 16 Dec 2014 16:27:31 +0000 (11:27 -0500)]
debugger: improve clearBreakpoint error and docs

Currently clearBreakpoint error is confusing, it says "Script not found"
when there is no breakpoint, also documentation doesn't include
signature for clearBreakpoint.

PR-URL: https://github.com/iojs/io.js/pull/175
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
9 years agofs: deprecate exists() and existsSync()
cjihrig [Mon, 15 Dec 2014 18:58:37 +0000 (13:58 -0500)]
fs: deprecate exists() and existsSync()

These methods don't follow standard conventions, and shouldn't
be used anyway.

Fixes: https://github.com/iojs/io.js/issues/103
PR-URL: https://github.com/iojs/io.js/pull/166
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
9 years agodoc: document callback of http res/req end method
Jackson Tian [Thu, 18 Dec 2014 07:52:42 +0000 (15:52 +0800)]
doc: document callback of http res/req end method

Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

PR-URL: https://github.com/iojs/io.js/pull/181
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>