0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
Commit Graph

10993 Commits

Author SHA1 Message Date
Calvin Metcalf
d481bb68c4 doc: more explicit crypto.pseudoRandomBytes docs
Updates the docs for the crypto.pseudoRandomBytes function
to more explicitly detail how it's the same as crypto.randomBytes
just without a safety net (e.g. it doesn't throw an error when
there is low entropy).

PR-URL: https://github.com/iojs/io.js/pull/545
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-22 15:47:41 +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
Ben Noordhuis
069c0dfb1c deps: upgrade v8 to 4.1.0.12
No out-of-tree patches, yay!

PR-URL: https://github.com/iojs/io.js/pull/555
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-22 13:21:34 +01:00
Rod Vagg
ada2a4308c doc: add TC meeting 2015-01-13 minutes
PR-URL: https://github.com/iojs/io.js/pull/508
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-22 21:57:42 +11:00
Bert Belder
60402b924b docs: remove incorrect entry from changelog
`url.format()` doesn't take a `path` option; the change that
introduced it was reverted in 913addbff5.

PR: https://github.com/iojs/io.js/pull/546
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-22 02:19:34 +01:00
Jackson Tian
8b98096c92 fs: make fs.access() flags read only
These flags were defined as constants, but could be
overwritten when exported from fs. This commit exports
the flags as read only properties of fs.

PR-URL: https://github.com/iojs/io.js/pull/507
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-21 16:29:58 -05:00
cjihrig
804e7aa9ab lib: use const to define constants
This commit replaces a number of var statements throughout
the lib code with const statements.

PR-URL: https://github.com/iojs/io.js/pull/541
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-21 16:21:31 -05:00
Ben Noordhuis
803883bb1a v8: fix template literal NULL pointer deref
Fixes a NULL pointer dereference with unterminated template literals.

This is a back-port of commit v8/v8-git-mirror@02218ad from the V8
master branch, see https://code.google.com/p/v8/issues/detail?id=3820.

PR-URL: https://github.com/iojs/io.js/pull/534
Reviewed-By: Caitlin Potter <caitpotter88@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-21 13:35:01 +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
Yosuke Furukawa
5d014637b6 benchmark: print score to five decimal places
PR-URL: https://github.com/iojs/io.js/pull/516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-21 01:21:44 +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
Ben Noordhuis
ee9cd004d8 lib: fix TypeError with EventEmitter#on() abuse
Commit 2931348 added EventEmitter#getMaxListeners() but introduced a
regression when people abuse EventEmitter.prototype.on.call() to call
EventEmitter#on() on a non-EE object.  Add a workaround for that.

Fixes: https://github.com/iojs/io.js/issues/523
PR-URL: https://github.com/iojs/io.js/pull/527
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-20 23:25:57 +01:00
Ben Noordhuis
77d68070da test: fix event-emitter-get-max-listeners style
Add missing commas in parallel/test-event-emitter-get-max-listeners.

Comma-less style is fine and dandy but it throws off vim's autoindent.

PR-URL: https://github.com/iojs/io.js/pull/527
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-20 23:25:45 +01:00
Ben Noordhuis
767ee73486 test: strip copyright boilerplate
Commit 3e1b1dd missed a few files in test/parallel, this commit
rectifies that.

Only test/parallel/test-url.js still has a copyright header.  I left
it in because the original author is neither an io.js contributor nor
a StrongLoop employee.

PR-URL: https://github.com/iojs/io.js/pull/527
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-20 23:25:19 +01:00
cjihrig
86eda173b1 fs: define constants with const
Define fs constants using const, as the newer version of
v8 supports it, and appears to be capable of optimizing.

PR-URL: https://github.com/iojs/io.js/pull/522
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-20 12:17:37 -05: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
cjihrig
03ee4d8547 fs: add error code on null byte paths
This commit adds a code field to the error returned by
nullCheck().

Fixes: https://github.com/iojs/io.js/issues/517
PR-URL: https://github.com/iojs/io.js/pull/519
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 18:07:46 -05:00
cjihrig
e2558f02df net: fix error details in connect()
3ac4941953 introduced a
bug as it attempted to access properties of an
undefined variable. This commit cleans up the offending
code.

Fixes: https://github.com/iojs/io.js/issues/510
PR-URL: https://github.com/iojs/io.js/pull/514
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 15:25:52 -05:00
Bert Belder
4af5746993 win,build: remove duplicate definition
The duplicate warning was fixed by e1fe270, but returned as of 9f45799.
Hopefully this will fix the issue for good.

PR: https://github.com/iojs/io.js/pull/512
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 20:12:12 +01:00
Bert Belder
e8d08503c7 win: bring back xp/2k3 support
Chrome still runs on Windows XP, so there is no reason that iojs
couldn't.

PR: https://github.com/iojs/io.js/pull/512
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 20:12:11 +01:00
Timothy J Fontaine
4dd22b946e cluster: avoid race enabling debugger in worker
Previously if a worker's state machine had already transitioned into the
'listening' state when it received the message enabling the debugger,
the worker would never enable its debugger.

Change the logic to allow the 'listening' as a valid state for enabling
the debugger.

Fixes: https://github.com/joyent/node/issues/6440
Original-PR-URL: https://github.com/joyent/node/pull/9037
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>

Fixes: https://github.com/iojs/io.js/issues/340
PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:31:01 +01:00
Ben Noordhuis
6b91c78e20 test: reland changes from 11c1bae
Reland the changes from commit 11c1bae ("lib: make --debug-port work
with cluster") that were temporarily backed out to cherry-pick commits
from joyent/node.

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:30:31 +01:00
Timothy J Fontaine
992a1e7f5f test: debug-signal-cluster should not be racey
unref one superfluous timer (as the test suite already has a global
timeout), and improve the state machine to iterate the messages more
reliably.

Ultimately make the test complete more quickly.

Original-PR-URL: [unknown]
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:30:17 +01:00
Ben Noordhuis
cdf0df13d8 test: temporarily back out changes from 11c1bae
Temporarily revert the changes to test/ from commit 11c1bae ("lib: make
--debug-port work with cluster") to ease cherry-picks from joyent/node.

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:30:11 +01:00
Ben Noordhuis
1ea607cb29 test: move sequential/test-debug-port-from-cmdline
Move sequential/test-debug-port-from-cmdline to test/parallel.  Per the
previous commit, it should now be possible to run the test in parallel
with other debugger tests.

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:30:04 +01:00
Julien Gilli
2f33e00d71 test: fix test-debug-port-from-cmdline.js
Make this test less prone to race conditions by using synchronous
interprocess communication instead of a timer to determine when the
child process is ready to receive messages from its parent.

Also, remove a superfluous timer since the tests suite already makes
tests time out after a while.

Original-PR-URL: https://github.com/joyent/node/pull/9049
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>

PR-URL: https://github.com/iojs/io.js/pull/501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 19:29:18 +01:00
Xiaowei Li
b7365c1559 repl: make REPL support multiline template literals
Let REPL enter multiline mode if user's input contains unterminated
template literals.

PR-URL: https://github.com/iojs/io.js/pull/333
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 13:06:37 +01:00
Johan Bergström
2253d30d9c build: remove unused variable
PR-URL: https://github.com/iojs/io.js/pull/505
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 15:55:37 +11:00
Glen Keane
ab04a43476 doc: add optional sudo to make install in README
PR-URL: https://github.com/iojs/io.js/pull/444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-19 01:50:03 +01:00
Roman Reiss
1b1cd1c3f8 build: shorten configurate script print on stdout
Reduces the previously pretty-printed configuration dictionary to a
single line wrapped at 78 characters. This makes warning messages which
appear before this print more visible to the user.

PR-URL: https://github.com/iojs/io.js/pull/483
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-18 22:54:27 +01:00
Jay Jaeho Lee
d566ded26b deps: fix V8 debugger bugs
This is following-up fix for https://codereview.chromium.org/813873007/.
This bug currently breaks node-inspector client to work.

PR-URL: https://github.com/iojs/io.js/pull/494
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18 22:51:31 +01:00
Thomas Jensen
6f36630f55 doc: fix util.isBuffer examples
util.isPrimitive was used in place of util.isBuffer.

PR-URL: https://github.com/iojs/io.js/pull/496
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18 22:48:37 +01:00
Yosuke Furukawa
3abfb56f9b benchmark: fix tcp bench after internal api change
Fix up the tcp raw benchmarks after an internal API change.

PR-URL: https://github.com/iojs/io.js/pull/495
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18 18:09:10 +01:00
Ben Noordhuis
50177fb13c benchmark: stop v8 benchmark clobbering RegExp
deps/v8/benchmarks/regexp.js clobbers the RegExp global, breaking
util.format() and console.log().  Unclobber it to keep the other
benchmarks working.

Fixes the following error when running benchmark/misc/v8-bench.js:

    $ out/Release/iojs benchmark/misc/v8-bench.js
    util.js:84
        if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
            ^
    TypeError: object is not a function
        at Object.exports.debuglog (util.js:84:9)
        at timers.js:12:29
        at NativeModule.compile (node.js:800:5)
        at NativeModule.require (node.js:769:18)
        at net.js:5:14
        at NativeModule.compile (node.js:800:5)
        at NativeModule.require (node.js:769:18)
        at tty.js:4:11
        at NativeModule.compile (node.js:800:5)
        at Function.NativeModule.require (node.js:769:18)

This could alternatively be addressed by caching the RegExp global
in lib/util.js.  That's not a bad approach and I considered it but
doing it for just RegExp and not other globals would be half-baked.

Maybe the more thorough approach where we cache all globals at
start-up is something for a follow-up pull request.

Fixes: https://github.com/iojs/io.js/pull/475
PR-URL: https://github.com/iojs/io.js/pull/489
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
2015-01-18 14:08:29 +01:00
Bert Belder
19522197ef 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-01-18 13:52:28 +01:00
Ben Noordhuis
a28de9bd36 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-01-18 13:52:27 +01:00
Forrest L Norvell
9dc8f59fea deps: upgrade npm to 2.2.0
PR-URL: https://github.com/iojs/io.js/pull/479
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-18 13:51:49 +01:00
Ben Noordhuis
e8ad773b56 src: remove --noharmony_classes again
Now that V8 has been upgraded, remove the --noharmony_classes and
--noharmony_object_literals workarounds from commits a2751e3e and
4e58211b.

PR-URL: https://github.com/iojs/io.js/pull/490
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Kenan Sulayman <kenan@sly.mn>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-18 13:09:23 +01:00
Fedor Indutny
334020e016 deps: fix v8 build on FreeBSD
clang++ on FreeBSD was blaming v8 for using invalid casts from nullptr:

    reinterpret_cast from 'nullptr_t' to '...' is not allowed

Replace casts with NULL, or NULL with 0 where applicable.

Fixes: https://github.com/iojs/io.js/issues/324
PR-URL: https://github.com/iojs/io.js/pull/332
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18 13:07:46 +01:00
Ben Noordhuis
5e7ebc7af6 deps: upgrade v8 to 4.1.0.7
This commit upgrades V8 from 3.31.74.1 to 4.1.0.7.  Despite the major
version bump, there are no API or ABI changes, it's a bug fix release
only.

PR-URL: https://github.com/iojs/io.js/pull/490
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Kenan Sulayman <kenan@sly.mn>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-18 13:05:00 +01:00
Yosuke Furukawa
ea7750bddd benchmark: add filter option for benchmark
Before:

    # common.js executes all tests in net directory.
    $ ./iojs common.js net

After:

    # common.js executes only "dgram" tests in net directory.
    $ ./iojs common.js net dgram

PR-URL: https://github.com/iojs/io.js/pull/488
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-17 17:13:07 +01:00
Brenard Cubacub
4764eef9b2 doc: fixed punctuation
Period ending a sentence should be outside parens

PR-URL: https://github.com/iojs/io.js/pull/476
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-17 22:30:55 +11:00
Ben Noordhuis
de224d6e6c configure: remove --ninja switch
It is unknown if there are any users of the ninja build and keeping it
around makes refactoring the build system more difficult.  It's partly
broken (or at least, deeply inefficient) because it touches out/Makefile
every time.

PR-URL: https://github.com/iojs/io.js/pull/467
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-17 01:06:17 +01:00
Ben Noordhuis
48774ec027 configure: print warning for old compilers
Try to autodetect the C and C++ compiler and issue a warning when it's
too old to plausibly build io.js.  Emit warnings only because there is
much that can go wrong when trying to invoke a compiler.

PR-URL: https://github.com/iojs/io.js/pull/455
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-16 19:02:05 +01:00