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

10956 Commits

Author SHA1 Message Date
Jan Schär
3b1b4de903 test: Timeout#unref() does not return instance
Timeout#unref() call returns undefined, not this. The test already
worked before, because the interval was still unref'd, and the test also
succeeds without clearing the interval.

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

Conflicts:
	test/simple/test-timers-unref.js
2015-02-13 13:37:25 -05:00
Dan Dascalescu
30dca66958 doc: fix code syntax
Add a ';' to the end of a function call in documentation.

PR-URL: https://github.com/joyent/node/pull/9198
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-13 13:37:25 -05:00
Herbert Vojčík
6a2b204bbc module: replace NativeModule.require
The NativeModule system passes NativeModule.require transparently and so
is unnecessary to call explicitly.

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

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

Conflicts:
	lib/module.js
2015-02-13 13:37:25 -05:00
Andrei Sedoi
8c1df7a8a8 doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-13 13:37:24 -05:00
cjihrig
0cff0521c3 net: throw on invalid socket timeouts
This commit restricts socket timeouts non-negative, finite
numbers. Any other value throws a TypeError or RangeError.
This prevents subtle bugs that can happen due to type
coercion.

Fixes: https://github.com/joyent/node/issues/8618
PR-URL: https://github.com/joyent/node/pull/8884
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>

Conflicts:
	lib/timers.js
	test/simple/test-net-settimeout.js
	test/simple/test-net-socket-timeout.js
2015-02-13 13:37:24 -05:00
Omer Wazir
ba40942ad2 doc: fix sentence grammar timers.markdown
Just added ', it' because the phrasing did not seem correct.

PR-URL: https://github.com/iojs/io.js/pull/815
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-13 13:18:31 -05:00
Brendan Ashworth
becb4e980e test: distribute crypto tests into separate files
This commit distributes many of the various tests that were previously
strewn about `test-crypto.js` into their own files, such as for Ciphers
and Deciphers, Hashing, and HMACs. Copy pasta, and no style changes
besides removing a few now-unnecessary closures.

Helps eliminate file bloat and allows for easier test prognosis.

PR-URL: https://github.com/iojs/io.js/pull/827
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-13 12:00:12 -05:00
Omer Wazir
789ff959be doc: increase mark class contrast ratio
PR-URL: https://github.com/iojs/io.js/pull/824
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-12 12:12:37 -08:00
Jeremiah Senkpiel
122a1758d1 doc: better font-smoothing for firefox
does the same thing for firefox as 'antialiased' does for webkit.

PR-URL: https://github.com/iojs/io.js/pull/820
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-12 12:11:36 -08:00
Roman Reiss
982b143ab3 doc: disable font ligatures
PR-URL: https://github.com/iojs/io.js/pull/816
Reviewed-By:  Nicu Micleușanu <micnic90@gmail.com>
2015-02-12 12:48:32 +02:00
Omer Wazir
cb5560bd62 doc: Close code span correctly
The code span is closed with a straight quote instead of the correct
back tick being used.

PR-URL: https://github.com/iojs/io.js/pull/814
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-11 22:20:12 -08: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
Brian White
7061669dba events: optimize adding and removing of listeners
These optimizations result in >2x speedup in the ee-add-remove
benchmark:

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

PR-URL: https://github.com/iojs/io.js/pull/785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-02-11 23:06:26 +01:00
Brian White
630f636334 events: move slow path to separate function too
This keeps in line with how things are done for the fast path
and *might* even provide a *slight* performance increase.

PR-URL: https://github.com/iojs/io.js/pull/785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-02-11 23:05:39 +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
Ryan Seys
c3c2fbdf83 doc: change effect to affect in errors.md
PR-URL: https://github.com/iojs/io.js/pull/799
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-11 14:24:43 -05:00
Sam Roberts
b620129715 doc: add sam-github as collaborator
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: https://github.com/iojs/io.js/pull/791
2015-02-11 10:05:19 -08:00
Michaël Zasso
e80f803298 doc: remove Caine section from contributing guide
Caine bot is not active on the repository anymore.
This section is just confusing for new contributors.

Fixes: https://github.com/iojs/io.js/issues/802
PR-URL: https://github.com/iojs/io.js/pull/804
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-11 17:02:10 +01:00
Yosuke Furukawa
400d6e56f9 doc: fix libuv link
PR-URL: https://github.com/iojs/io.js/pull/803
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-11 17:01:22 +01: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
Rudolf Meijering
15d156e3ec doc: fix wording in fs.appendFile
PR-URL: https://github.com/iojs/io.js/pull/801
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-11 10:42:25 -05: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
Chris Dickinson
dbf75924f1 doc: update error links
PR-URL: https://github.com/iojs/io.js/pull/793
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-02-10 19:39:41 -08: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
Chris Dickinson
7e2235aebb doc: add error documentation
PR-URL: https://github.com/iojs/io.js/pull/789
Reviewed-by: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-10 17:58:10 -08:00
Rod Vagg
d832be4aa3 doc: update AUTHORS list
Update AUTHORS file using tools/update-authors.sh

PR-URL: https://github.com/iojs/io.js/pull/713
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-11 12:19:28 +11:00
Shigeki Ohtsu
aea9b89b5c doc: add shigeki as collaborator
Fixes: https://github.com/iojs/io.js/issues/778
PR-URL: https://github.com/iojs/io.js/pull/782

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-11 00:39:18 +09:00
Vladimir Kurchatkin
e65308053c fs: improve readFile performance
This commit improves `readFile` performance by
reducing number of closure allocations and using
`FSReqWrap` directly.

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

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-10 15:35:00 +03:00
Saúl Ibarra Corretgé
9681fcacf0 deps: update libuv to 1.4.0
PR-URL: https://github.com/iojs/io.js/pull/773
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-09 22:07:25 +01: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
Brian White
b677b844fc events: optimize various functions
Cache events and listeners objects where possible and loop over
Object.keys() instead of using for..in. These changes alone give
~60-65% improvement in the ee-add-remove benchmark.

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

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

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

PR-URL: https://github.com/iojs/io.js/pull/601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-02-09 17:47:49 +01:00
Shigeki Ohtsu
c86e383c41 test: fix test failure with shared openssl
When configured with share openssl, use external openssl command and
check if it can be executed.

Fixes: https://github.com/iojs/io.js/issues/618
PR-URL: https://github.com/iojs/io.js/pull/762
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-10 01:24:02 +09:00
Haoliang Gao
1151016d0a doc: fix typo in crypto
PR-URL: https://github.com/iojs/io.js/pull/765
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-09 13:34:56 +01:00
Haoliang Gao
7c568684b8 doc: change the order of crypto.publicDecrypt
PR-URL: https://github.com/iojs/io.js/pull/767
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-09 13:33:26 +01:00
Vladimir Kurchatkin
3f473ef141 assert: introduce deepStrictEqual
`deepStrictEqual` works the same way as `strictEqual`, but
uses `===` to compare primitives and requires prototypes of
equal objects to be the same object.

Fixes: https://github.com/joyent/node/issues/7161
Fixes: https://github.com/iojs/io.js/issues/620
PR-URL: https://github.com/iojs/io.js/pull/639
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-02-09 14:14:20 +03:00
Roman Reiss
828d19a1f6 doc: fix dns.lookup options example
PR-URL: https://github.com/iojs/io.js/pull/757
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-08 11:03:37 -08:00
Ben Noordhuis
90d2b35281 doc: update antiquated process.versions output
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-07 17:08:10 -05:00
Ben Noordhuis
789bbb91d3 doc: update node.js references in api docs
Fixes: https://github.com/iojs/io.js/issues/740
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-07 17:07:15 -05:00
Michaël Zasso
c22e5ace84 https: simpler argument check
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-07 12:00:16 -08:00
Vladimir Kurchatkin
b9d3928f80 util: simplify isPrimitive
Everything that is not an object should be a primitive.

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

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-07 17:41:44 +03:00
Ben Noordhuis
2c3121c606 benchmark: bump eventemitter number of iterations
Some of the benchmarks that were added in commit 847b9d2 complete too
quickly to draw meaningful conclusions from.  Increase the number of
iterations to make them run longer.

PR-URL: https://github.com/iojs/io.js/pull/746
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-02-07 00:54:38 +02:00
Roman Reiss
633a990848 dns: allow dns.lookup() to return all addresses
This commit adds the 'all' option to dns.lookup(), allowing
all lookup results to be returned.

Semver: Minor
Fixes: https://github.com/iojs/io.js/issues/736
PR-URL: https://github.com/iojs/io.js/pull/744
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-06 17:18:47 -05:00
Vladimir Kurchatkin
1cd1d7a182 buffer: don't compare same buffers
PR-URL: https://github.com/iojs/io.js/pull/742

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-02-07 00:08:40 +02:00
Brian White
847b9d212a benchmark: add more EventEmitter benchmarks
PR-URL: https://github.com/iojs/io.js/pull/730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-06 21:33:44 +01:00
Aleksey Smolenchuk
96597bc592 doc: add lxe as collaborator
PR-URL: https://github.com/iojs/io.js/pull/745
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-06 10:34:13 -08:00