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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>