0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

11259 Commits

Author SHA1 Message Date
Ben Noordhuis
78f4837926 deps: upgrade v8 to 4.1.0.21
PR-URL: https://github.com/iojs/io.js/pull/952
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-25 19:33:52 +01:00
Ben Noordhuis
739fda16a9 deps: update libuv to 1.4.1
PR-URL: https://github.com/iojs/io.js/pull/940
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-25 11:52:11 -06:00
Benjamin Gruenbaum
06ee782f24 doc: document 'unhandledRejection' and 'rejectionHandled'
Documents the new unhandled rejection detection API.

Documents the new unhandledRejection/rejectionHandled events in the process
docuemntation. As agreed on in this issue:

https://github.com/iojs/io.js/issues/256#event-241385784

PR-URL: https://github.com/iojs/io.js/pull/946
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-25 11:44:53 -06:00
Ryan Scheel
b65dade102 doc: update documentation.markdown for io.js.
PR-URL: https://github.com/iojs/io.js/pull/950
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-25 10:06:51 -05:00
Ben Noordhuis
506c7fd40b test: fix infinite spawn cycle in stdio test
Fix parallel/test-stdio-closed introduced in commit b5f25a9 ("src:
ensure that file descriptors 0-2 are valid") to not keep spawning
child processes ad infinitum.

The test spawns itself as a child process but a missing return statement
made the child process spawn itself again, and again, and again.

It went unnoticed for some time because the child process exits almost
immediately afterwards, i.e. it didn't fill up the process table.  The
observable effect was an iojs process that was quietly consuming CPU
cyles in the background with a PID that was constantly changing.

Refs: https://github.com/iojs/io.js/pull/938
PR-URL: https://github.com/iojs/io.js/pull/948
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-02-25 11:13:03 +01:00
Sam Roberts
87e4bfd582 doc: link cluster worker.send() to child.send()
PR-URL: https://github.com/iojs/io.js/pull/839
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-25 00:48:26 -08:00
Petka Antonov
872702d9b7 node: implement unhandled rejection tracking
Implement unhandled rejection tracking for promises as
specified in https://gist.github.com/benjamingr/0237932cee84712951a2

Fixes #256
PR-URL: https://github.com/iojs/io.js/pull/758
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
2015-02-24 18:27:14 -06:00
Petka Antonov
8a1e22af3a benchmark: pass execArgv to the benchmarking process
Benchmarker should pass exec flags (e.g. --no-crankshaft,
--turbofan-filter, --trace-opt etc) to the benchmarking process

Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
PR-URL: https://github.com/iojs/io.js/pull/928
2015-02-24 15:55:12 -08:00
Johan Bergström
234e6916b8 build: Fix incorrect reference
PR-URL: https://github.com/iojs/io.js/pull/924
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-24 16:29:30 -06:00
Fedor Indutny
1738c77835 streams: introduce StreamWrap and JSStream
Introduce a way to wrap plain-js `stream.Duplex` streams into C++
StreamBase's child class. With such method at hand it is now possible to
pass `stream.Duplex` instance as a `socket` parameter to
`tls.connect()`.

PR-URL: https://github.com/iojs/io.js/pull/926
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-24 22:38:21 +03:00
Rod Vagg
e00c938d24 build: make test-ci output TAP to stdout and log
Closes: #810
PR-URL: https://github.com/iojs/io.js/pull/938
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-24 13:28:58 -06:00
Johan Bergström
a7bdce249c test: support writing test output to file
This is a minimal effort to support test output written both to
stdout and file in order to get our buildbots understanding
test output.

PR-URL: https://github.com/iojs/io.js/pull/934
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-24 12:02:42 -06:00
cjihrig
ed3b057e9f util: handle symbols properly in format()
Currently, if util.format() is called with a string as its first
argument, and a Symbol as one of the subsequent arguments, an
exception is thrown due to an attempted implicit string conversion.
This commit causes Symbols to be explicitly converted.

Fixes: https://github.com/iojs/io.js/issues/927
PR-URL: https://github.com/iojs/io.js/pull/931
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
2015-02-24 10:14:24 -05:00
Ben Noordhuis
da730c76e9 deps: enable node-gyp iojs.lib download checksum
Originally disabled in commit 5de334c ("deps: make node-gyp work again
on windows") due to the then-website lacking the requisite SHASUMS.txt
or SHASUMS256.txt files.  The website has a SHASUMS256.txt now so start
checksumming the download again.

PR-URL: https://github.com/iojs/io.js/pull/918
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-23 11:46:32 -05:00
Vladimir Kurchatkin
b41dbc2737 readline: use native codePointAt
Semver: patch
PR-URL: https://github.com/iojs/io.js/pull/825
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-22 20:07:25 -08:00
Jeremiah Senkpiel
cb22bc9b8a doc: fix footer sizing
reduced to the minimal amount, any less shows a white bar.

Semver: patch
PR-URL: https://github.com/iojs/io.js/pull/860
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-22 19:36:24 -08:00
Brendan Ashworth
0df54303c1 test: common.js -> common
This commit changes many test styles to change all references
from require('./common.js'); to require('./common');.

The latter is much more common, with the former only being used in 50
tests. It is just a stylistic change, and it seems that `common.js` was
introduced by a rogue test and copied and pasted into the rest.

Semver: patch
PR-URL: https://github.com/iojs/io.js/pull/917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-22 19:34:17 -08:00
Fedor Indutny
b9686233fc stream_base: introduce StreamBase
StreamBase is an improved way to write C++ streams. The class itself is
for separting `StreamWrap` (with the methods like `.writeAsciiString`,
`.writeBuffer`, `.writev`, etc) from the `HandleWrap` class, making
possible to write abstract C++ streams that are not bound to any uv
socket.

The following methods are important part of the abstraction (which
mimics libuv's stream API):

* Events:
  * `OnAlloc(size_t size, uv_buf_t*)`
  * `OnRead(ssize_t nread, const uv_buf_t*, uv_handle_type pending)`
  * `OnAfterWrite(WriteWrap*)`
* Wrappers:
  * `DoShutdown(ShutdownWrap*)`
  * `DoTryWrite(uv_buf_t** bufs, size_t* count)`
  * `DoWrite(WriteWrap*, uv_buf_t*, size_t count, uv_stream_t* handle)`
  * `Error()`
  * `ClearError()`

The implementation should provide all of these methods, thus providing
the access to the underlying resource (be it uv handle, TLS socket, or
anything else).

A C++ stream may consume the input of another stream by replacing the
event callbacks and proxying the writes. This kind of API is actually
used now for the TLSWrap implementation, making it possible to wrap TLS
stream into another TLS stream. Thus legacy API calls are no longer
required in `_tls_wrap.js`.

PR-URL: https://github.com/iojs/io.js/pull/840
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-22 22:31:57 +03:00
Bert Belder
97b424365a deps: make node-gyp work again on windows
* Fetch from the correct url.
* Link compiled addons with iojs.lib instead of node.lib.
* Disable checksum checks for iojs.lib until our website supports
  them.

PR: https://github.com/iojs/io.js/pull/422
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-02-22 07:43:06 +01:00
Ben Noordhuis
19e3d5e10a deps: make node-gyp fetch tarballs from iojs.org
Apply a small patch that makes node-gyp fetch the tarballs from
https://iojs.org/ instead of http://nodejs.org/

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

PR-URL: https://github.com/iojs/io.js/pull/343
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-22 07:43:06 +01:00
Forrest L Norvell
1e2fa1537f deps: upgrade npm to 2.6.0
PR-URL: https://github.com/iojs/io.js/pull/904
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-22 07:42:24 +01:00
René Kooi
3ab9b92e90 doc: fix stream _writev header size
PR-URL: https://github.com/iojs/io.js/pull/916
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-21 21:36:44 +01:00
cjihrig
1f40b2a636 fs: add type checking to makeCallback()
This commit adds proper type checking to makeCallback(). Anything
other than undefined or a function will throw.

PR-URL: https://github.com/iojs/io.js/pull/866
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-21 12:13:43 -05:00
Bruno Jouhier
c82e580a50 fs: properly handle fd passed to truncate()
Currently, fs.truncate() silently fails when a file descriptor
is passed as the first argument. This commit changes this
behavior to properly call fs.ftruncate().

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

Conflicts:
	lib/fs.js
2015-02-21 12:13:21 -05:00
Shinnosuke Watanabe
4fcbb8aaaf doc: use HTTPS URL for the API documentation page
PR-URL: https://github.com/iojs/io.js/pull/913
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-21 09:30:46 -05:00
cjihrig
d8eb974a98 net: make Server.prototype.unref() persistent
Currently, the unref() method does not remember any state
if called before the server's handle has been created. This
commit adds state to track calls to ref() and unref().

PR-URL: https://github.com/iojs/io.js/pull/897
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-20 17:37:10 -08:00
Trevor Norris
26ebe9805e smalloc: extend user API
node::Environment isn't accessible to user APIs, so extend smalloc to
also accept v8::Isolate.

Fixes: 75adde07 "src: remove `node_isolate` from source"
PR-URL: https://github.com/iojs/io.js/pull/905
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2015-02-20 11:02:33 -07:00
Brian White
329f364ea2 doc: fix PR reference in CHANGELOG
The CHANGELOG referenced PR 847, but should really be 846.

PR-URL: https://github.com/iojs/io.js/pull/903
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-20 10:38:05 -05:00
Rod Vagg
0ac57317aa doc: fix typo, rephrase cipher change in CHANGELOG
PR-URL: https://github.com/iojs/io.js/pull/902
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-02-20 20:44:07 +11:00
Rod Vagg
3e984c38b5 Working on v1.3.0 2015-02-20 20:29:54 +11:00
Rod Vagg
1d7a47f29c 2015-02-20 io.js v1.3.0 Release
Notable changes:

* url: `url.resolve('/path/to/file', '.')` now returns `/path/to/`
  with the trailing slash, `url.resolve('/', '.')` returns `/`.
  https://github.com/iojs/io.js/issues/278 (Amir Saboury)
* tls: tls (and in turn https) now rely on a stronger default
  cipher suite which excludes the RC4 cipher. If you still want to
  use RC4, you have to specify your own ciphers suite.
  https://github.com/iojs/io.js/issues/826 (Roman Reiss)
2015-02-20 20:27:42 +11:00
Rod Vagg
afdef70fcc doc: update AUTHORS list
Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/900
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-20 20:13:23 +11:00
Rod Vagg
1bf91878e7 doc: add TC meeting 2015-02-04 minutes
Closes #701
PR-URL: https://github.com/iojs/io.js/pull/876
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-20 12:39:07 +11:00
Emily Rose
9e05c8d2fc doc: remove outdated language on consensus
PR: https://github.com/iojs/io.js/pull/898
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
2015-02-20 12:15:02 +11:00
Fedor Indutny
9b6b05556f net: unref timer in parent sockets
`TLSSocket` wraps the original `net.Socket`, but writes/reads to/from
`TLSSocket` do not touch the timers of original `net.Socket`.

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

Fix: https://github.com/joyent/node/issues/9242
PR-URL: https://github.com/iojs/io.js/pull/891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-19 18:44:10 +01:00
cjihrig
ecef87177a fs: ensure nullCheck() callback is a function
Currently, nullCheck() will attempt to invoke any truthy value
as a function if the path argument contains a null character.
This commit validates that the callback is actually a function
before trying to invoke it. fs.access() was vulnerable to this
bug, as nullCheck() was called prior to type checking its
callback.

PR-URL: https://github.com/iojs/io.js/pull/887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-19 11:26:18 -05:00
Roman Reiss
ed240f44f7 doc: document 'ciphers' option of tls.connect
This option has been there for a long time, but has never been
documented. It's functionally identical to the server counterpart.

PR-URL: https://github.com/iojs/io.js/pull/845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-18 15:15:18 +01:00
Ben Noordhuis
b5f25a963c src: ensure that file descriptors 0-2 are valid
Check that stdin, stdout and stderr map to open file descriptors and
remap them to /dev/null if that isn't the case.  Protects against
information leaks or worse when io.js is started with closed stdio
file descriptors.

PR-URL: https://github.com/iojs/io.js/pull/875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-18 15:15:14 +01:00
Ben Noordhuis
a956791f69 src: fix typo in error message
PR-URL: https://github.com/iojs/io.js/pull/875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-18 15:15:14 +01:00
Ben Noordhuis
fb28c91074 src: fix add-on builds, partially revert 8aed9d66
Commit 8aed9d66 ("src: cleanup `Isolate::GetCurrent()`") breaks building
add-ons because of the following:

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

Mea culpa, I was one of the reviewers.

PR-URL: https://github.com/iojs/io.js/pull/868
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-18 00:07:49 +03:00
jigsaw
0555b3c785 doc: fix typo miliseconds -> milliseconds
PR-URL: https://github.com/iojs/io.js/pull/865
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-17 10:55:13 -05:00
Trevor Norris
c6fd2c5e95 buffer: fix pool offset adjustment
If the Buffer allocation isn't a slice then there's no need to adjust
the pool offset after realloc'ing the space available.

Fixes: 6462519 "buffer, doc: misc. fix and cleanup"
2015-02-16 14:09:50 -07:00
Roman Reiss
77f35861d0 tls: more secure defaults
This updates the default cipher suite to an more secure list, which
prefers strong ciphers with Forward Secrecy. Additionally, it enables
`honorCipherOrder` by default.

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

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/826
2015-02-16 12:33:12 +01:00
Rod Vagg
20f8e7f17a test: remove flaky test functionality
Reverts https://github.com/joyent/node/pull/8689

PR-URL: https://github.com/iojs/io.js/pull/812
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-16 15:27:33 +11:00
Jimmy Hsu
fc6507dd4e doc: add comma in README to increase clarity
Minor change to increase clarity of what is being referenced to.
2015-02-16 11:27:17 +11:00
Roman Reiss
30e340ad9d test: fix parallel/test-tls-getcipher
The test blindly assumes that the default cipher suite supports RC4
ciphers. This corrects the case where RC4 might not be available in the
default ciphers by setting the client to use the same suite as the
server.

PR-URL: https://github.com/iojs/io.js/pull/853
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-15 18:43:06 +01:00
Brian White
35ed79932c benchmark: add a few querystring benchmarks
PR-URL: https://github.com/iojs/io.js/pull/847
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-14 23:41:52 -08:00
cjihrig
d53b636d94 test: verify fields in spawn{Sync} errors
This commit validates the properties of ENOENT error objects
returned by spawn() and spawnSync().

PR-URL: https://github.com/iojs/io.js/pull/838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-13 19:06:36 -05:00
Charmander
f0296933f8 doc: correct it's to its in process
"This event is emitted when io.js empties its event loop..."

PR-URL: https://github.com/iojs/io.js/pull/837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-13 16:36:40 -05:00
Wyatt Preul
e81731ad18 doc: add geek as collaborator
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: #835
2015-02-13 13:19:21 -06:00