Commit Graph

3487 Commits (329f364ea23b1a081442790102823dd20ce325da)

Author SHA1 Message Date
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
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
Ben Noordhuis 4bb3184d8d src: reduce AsyncWrap memory footprint
Fold two integral fields into one and use bitops to access/manipulate
them.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-11 23:06:29 +01:00
Ben Noordhuis 7e779b4593 src: remove obsoleted queue.h header
It has been obsoleted by the previous commit.  Now it's time to say
goodbye.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-11 23:06:29 +01:00
Ben Noordhuis 38dc0cd8f4 src: switch from QUEUE to intrusive list
This commit also breaks up req_wrap.h into req-wrap.h and req-wrap-inl.h
to work around a circular dependency issue in env.h.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-11 23:06:29 +01:00
Ben Noordhuis 58eb00c693 src: add typesafe intrusive list
This is a replacement for the QUEUE macros.  It implements the same
functionality but in a way that lets the compiler typecheck it.

PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-11 23:06:29 +01:00
Vladimir Kurchatkin 36a779560a buffer: expose internals on binding
Remove internal object and expose functions directly on binding.  This
makes possible to simply use internal functions in other builtin
modules.

PR-URL: https://github.com/iojs/io.js/pull/770
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-11 14:36:48 -07:00
Vladimir Kurchatkin 8aed9d6610 src: cleanup `Isolate::GetCurrent()`
PR-URL: https://github.com/iojs/io.js/pull/807
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-11 13:45:59 -07:00
Shigeki Ohtsu e63b51793b crypto: fix to check ext method for shared lib
In the case of using openssl with shared library,
reinterpret_cast<X509V3_EXT_I2V>(i2v_GENERAL_NAMES)) refers plt
pointer so that SafeX509ExtPrint returns false.
Fix it to check it with method of NID_subject_alt_name

This patch originally was created by Fedor Indutny
and Ben Noordhuis

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

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-02-12 00:58:27 +09:00
Vladimir Kurchatkin 7c22372303 src: remove trailing whitespace
PR-URL: https://github.com/iojs/io.js/pull/798
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-11 18:05:06 +03:00
Rod Vagg fe744ecc4b Working on v1.2.1 2015-02-11 13:50:19 +11:00
Rod Vagg 69b5922b31 2015-02-10 io.js v1.2.0 Release
Notable changes:

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

PR-URL: https://github.com/iojs/io.js/pull/702
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-02-09 18:06:57 +01:00
Trevor Norris 8d1179952a asyncwrap: fix nullptr parent check
The nullptr check for parent on entry to the constructor should be ==
not !=. This allows reqs that have a parent to run their own init hook
callbacks even if kCallInitHook has been disabled.
2015-02-05 16:55:07 -07:00
Trevor Norris 05f4dff975 asyncwrap: fix constructor condition for early ret
AsyncWrap should always properly propagate asynchronous calls to any
child that is created. Regardless whether kCallInitHook is currently
active. The previous logic would always return early if kCallInitHook
wasn't set.

PR-URL: https://github.com/iojs/io.js/pull/732
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-05 16:10:13 -07:00
Fedor Indutny 6f7a9784ea crypto: clear error on return in TLS methods
Methods like `X509_STORE_add_cert` may push errors onto OpenSSL's error
stack. Ensure that they won't pop up in a different places like
`tls_wrap.cc`.

Fix: https://github.com/iojs/io.js/issues/712
PR-URL: https://github.com/iojs/io.js/pull/719
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-05 12:33:15 +03:00
Ben Noordhuis 96ffcb9a21 src: reduce cpu profiler overhead
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active.

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

PR: https://github.com/iojs/io.js/pull/466
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2015-02-04 22:19:33 +01:00
Chris Dickinson c4b1019019 Working on v1.1.1 2015-02-03 14:19:29 -08:00
Chris Dickinson 6629751596 2015-02-03 io.js v1.1.0 Release
Notable changes:

* debug: fix v8 post-mortem debugging.
* crypto: publicEncrypt now supports password-protected private keys.
* crypto: ~30% speedup on hashing functions.
* errors
  - better formatting via util.inspect
  - more descriptive errors from fs. This necessitated a
    NODE_MODULE_VERSION bump.
  - more descriptive errors from http.setHeader
* dep updates:
  - npm: upgrade to 2.4.1
  - http-parser: rollback to 2.3.0
  - libuv: update to 1.3.0
  - v8: update to 4.1.0.14
* http.request: inherited properties on options are now respected
* add iterable interface to buffers.
* fs: fix fd leak on `fs.createReadStream`. See 497fd72 for details.
* installer: on Windows, emit WM_SETTINGCHANGE after install to make
  other running processes aware of the PATH changes.
* Added new collaborators:
  - Vladimir Kurchatkin (@vkurchatkin)
  - Micleușanu Nicu (@micnic)
2015-02-03 14:13:21 -08:00
Fedor Indutny 14684d3d67 v8abbr: ASCIISTRINGTAG => ONEBYTESTRINGTAG
Fix: iojs/io.js#461
PR-URL: https://github.com/iojs/io.js/pull/706
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-03 19:25:31 +03:00
Glen Keane d0b0bb4ae0 dtrace: fix removal of unused probes
Fixes Windows compile failures introduced in d75fecf6f

PR-URL: https://github.com/iojs/io.js/pull/703
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-02-03 22:37:42 +11:00
Sam Roberts e9eb2ec1c4 process: fix regression in unlistening signals
When the last signal listener is removed, the signal wrap should be
closed, restoring the default signal handling behaviour. This is done in
a (patched) process.removeListener(). However, events.removeAllListeners
has an optimization to avoid calling removeListener() if there are no
listeners for the 'removeListener' event, introduced in 56668f54d1. That
caused the following code to fail to terminate:

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

while the following will terminate:

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

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

PR-URL: https://github.com/iojs/io.js/pull/687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-02 21:59:57 +01:00
Glen Keane d75fecf6fd src: remove unused dtrace probes
Removed DTRACE_NET_SOCKET_READ and DTRACE_NET_SOCKET_WRITE
as they were never called from within the source code.

PR-URL: https://github.com/iojs/io.js/pull/694
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-02 21:55:56 +01:00
Bert Belder bc2c85ceef fs: improve error messages
* Include a description for the error message
* For rename, link, and symlink, include both the source and destination
  path in the error message.
* Expose the destination path as the `dest` property on the error object.
* Fix a bug where `ThrowUVException()` would incorrectly delegate to
  `Environment::TrowErrnoException()`.

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

PR: https://github.com/iojs/io.js/pull/675
Fixes: https://github.com/iojs/io.js/issues/207
Closes: https://github.com/iojs/io.js/pull/293
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-31 11:54:56 +01:00
Fedor Indutny e17e6fb2fa util: use on-stack buffer for Utf8Value
Improves `crypto.createHash().update().digest()` performance by 10%.

PR-URL: https://github.com/iojs/io.js/pull/670
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-30 22:08:17 +03:00
Fedor Indutny 3d4e96f3ce crypto: use on-stack storage in HashUpdate
Boosts speed up to 10% on primitive `createHash().update().digest()`
benchmark.

PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-30 17:41:59 +03:00
Fedor Indutny aca2011251 string_bytes: introduce InlineDecoder
PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-30 17:41:54 +03:00
Fedor Indutny c6367e7f2a node: speed up ParseEncoding
Handle most popular cases in a trie-style, branching on a first
character.

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

PR-URL: https://github.com/iojs/io.js/pull/664
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-30 17:41:34 +03:00
Ben Noordhuis dd47a8c785 src: set default signal dispositions at start-up
Signal dispositions are inherited by child processes.  Restore ours to
sane defaults in case our parent process changed it, to prevent quirky
behavior when the parent does something silly like ignoring SIGSEGV.

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
2015-01-28 17:44:07 +01:00
Ben Noordhuis 63ae1d203a src: rework early debug signal handling
Instead of installing an early debug signal handler, simply block the
SIGUSR1 signal at start-up and unblock it when the debugger is ready.

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

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
2015-01-28 17:44:04 +01:00
Ben Noordhuis 5756f92f46 src: do platform-specific initialization earlier
Execute the per-platform initialization logic as early as possible,
for two reasons:

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

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

PR-URL: https://github.com/iojs/io.js/pull/615
Reviewed-By: Sam Roberts <sam@strongloop.com>
2015-01-28 17:43:36 +01:00
Fedor Indutny 87e62bd4c8 crypto: implement privateEncrypt/publicDecrypt
PR-URL: https://github.com/iojs/io.js/pull/625
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fix iojs/io.js#477
2015-01-28 02:02:52 +03:00
Saúl Ibarra Corretgé b50fea4d49 watchdog: fix timeout for early polling return
Switch from running the loop with UV_RUN_ONCE to UV_RUN_DEFAULT, because
it's possible that the poll returns earlier than expected and thus the
timer is not run on a single interation.

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

PR-URL: https://github.com/iojs/io.js/pull/622
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-28 09:52:45 +11:00
Johan Bergström c0a9d1bc74 versions: add http-parser patchlevel
PR-URL: https://github.com/iojs/io.js/pull/614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 00:30:57 +01:00
Rod Vagg 50ac4b7e2a Working on 1.0.5 2015-01-24 22:40:43 +11:00
Rod Vagg d1fc9c6cae 2015-01-24 io.js v1.0.4 Release
Notable changes:

* npm upgrade to 2.3.0 fixes Windows "uid is undefined" errors
* crypto.pseudoRandomBytes() is now an alias for crypto.randomBytes()
  and will block if there is insufficient entropy to produce secure
  values. See https://github.com/iojs/io.js/commit/e5e5980 for details.
* Patch for V8 to properly detect ARMv6; binaries now work again on
  ARMv6 (Raspberry Pi etc.)
* Minor V8 upgrade from 4.1.0.7 to 4.1.0.12
* 'punycode' core module bumped from stability level 2-Unstable,
  to 3-Stable
* Added new collaborators:
  - Thorsten Lorenz (@thlorenz)
  - Stephen Belanger (@qard)
  - Jeremiah Senkpiel (@fishrock123)
  - Evan Lucas (@evanlucas)
  - Brendan Ashworth (@brendanashworth)
2015-01-24 22:35:32 +11:00
Calvin Metcalf e5e598060e lib,src: make pseudoRandomBytes alias randomBytes
Previously pseudoRandomBytes worked similarly to randomBytes but in the
event of insufficient entropy would silently return non-secure values.

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

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

PR-URL: https://github.com/iojs/io.js/pull/557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-22 23:08:36 +01:00
Ben Noordhuis 7d462479f6 src: s/node/io.js/ in `iojs --help` message
Fix up a node reference that was missed in commit daf9562d.

PR-URL: https://github.com/iojs/io.js/pull/538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-22 15:40:25 +01:00
Vladimir Kurchatkin 5435cf2f16 v8: optimize `getHeapStatistics`
Since setting object properties in C++ can be slow, pass
data to JS using preallocated smalloc buffer and create
object in JS instead.

PR-URL: https://github.com/iojs/io.js/pull/469
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-21 01:25:54 +01:00
Trevor Norris 752585db63 src: silence clang warnings
Mark several methods "override" in order to remove build warnings.

PR-URL: https://github.com/iojs/io.js/pull/531
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-20 15:28:05 -08:00
Cheng Zhao 22e1aea8a0 src: set node_is_initialized in node::Init
This can make node_is_initialized correctly set to true for applications
that use node::Init to embed iojs.

PR-URL: https://github.com/iojs/io.js/pull/225/
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-21 00:13:36 +01:00
Ben Noordhuis 668420d1f7 src: clean up unused macros in node_file.cc
Remove a few unused or barely used macros from src/node_file.cc.

PR-URL: https://github.com/iojs/io.js/pull/529
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-21 00:11:59 +01:00
Ben Noordhuis 52f624e72a src: rename ASSERT macros in node_crypto.cc
Rename the misnomers ASSERT_IS_STRING_OR_BUFFER and ASSERT_IS_BUFFER.
Said macros don't assert, they throw a TypeError and return.

PR-URL: https://github.com/iojs/io.js/pull/529
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-21 00:11:57 +01:00
Ben Noordhuis e95cfe14e3 src: add ASSERT_EQ style macros
Add ASSERT counterparts to the CHECK_EQ/CHECK_NE/etc. family of macros.

PR-URL: https://github.com/iojs/io.js/pull/529
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-21 00:11:36 +01:00
Rod Vagg b33cd4f1df Working on 1.0.4 2015-01-20 12:36:53 +11:00
Rod Vagg b5c69d1d1b 2015-01-20 io.js v1.0.3 Release
Notable changes

* V8 upgrade from 3.31 to 4.1, this is not a major upgrade, the version number "4.1" signifies tracking towards Chrome 41. The 3.31 branch is now not tracking towards a stable release.
* Re-enable Windows XP / 2003 support
* npm upgrade to 2.2.0
* Improved FreeBSD support
2015-01-20 12:35:53 +11:00
toastynerd 9419e1fb69 src: fix inconsistency between a check and error
dlopen takes exactly 2 arguments, check for exactly 2

PR-URL: https://github.com/iojs/io.js/pull/515
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-20 11:17:11 +11:00