Ben Noordhuis [Sun, 21 Dec 2014 01:06:19 +0000 (02:06 +0100)]
doc: util: document --trace-deprecation
Document the --trace-deprecation flag and the `process` properties that
affect util.deprecate().
Fixes: https://github.com/iojs/io.js/issues/190
PR-URL: https://github.com/iojs/io.js/pull/191
Reviewed-By: Jonathan Ong <me@jongleberry.com>
Aleksey Smolenchuk [Tue, 30 Dec 2014 22:25:52 +0000 (14:25 -0800)]
lib: introduce process module
This makes require('process') always return a reference to the global
process object.
PR-URL: https://github.com/iojs/io.js/pull/206
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sam Roberts [Tue, 30 Dec 2014 06:10:36 +0000 (22:10 -0800)]
doc: add tls server.close() callback docs
Also, tests to confirm its existence.
PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sam Roberts [Tue, 30 Dec 2014 05:30:03 +0000 (21:30 -0800)]
dgram: close() should accept a callback
Like net, http, and https server.close, and socket.end(), etc.
PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sam Roberts [Tue, 30 Dec 2014 05:20:54 +0000 (21:20 -0800)]
dgram: make 'close' event async
Emit the close event asynchronously, after the close, as it is with the
net/http close events.
PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Tim Ruffles [Fri, 26 Dec 2014 10:41:30 +0000 (10:41 +0000)]
doc: be specific about the unit of `maxBuffer`
The maxBuffer option was not self-documenting, so document the unit and
its effect.
PR-URL: https://github.com/iojs/io.js/pull/209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Brendan Ashworth [Mon, 29 Dec 2014 20:12:30 +0000 (12:12 -0800)]
dgram: changes Socket.close() to return itself
This commit adds a return statement to the dgram.Socket.close()
function that returns itself after it finishes. This follows along
the functionality of the more popular and, dare I say, father-library
`lib/net.js`.
PR-URL: https://github.com/iojs/io.js/pull/214
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Brendan Ashworth [Mon, 29 Dec 2014 20:03:24 +0000 (12:03 -0800)]
dgram: change Socket.bind() to return itself
This commit changes `lib/dgram.js` Sockets to, when
they are bound to a port / IP, return themselves. This
is done in order to allow chaining of methods and be
in accordance with the `lib/net.js` library.
PR-URL: https://github.com/iojs/io.js/pull/214
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Nikolai Vavilov [Tue, 23 Dec 2014 19:15:46 +0000 (20:15 +0100)]
configure: remove compiler detection
The GCC version is no longer relevant since only 4.8 and newer are
supported. It's probably safe to assume clang on mac since V8 does
so too.
PR-URL: https://github.com/iojs/io.js/pull/205
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Rudi Cilibrasi [Tue, 23 Dec 2014 16:08:06 +0000 (08:08 -0800)]
src: remove cpplint error using NOLINT directive
PR-URL: https://github.com/iojs/io.js/pull/202
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Mark Stosberg [Mon, 22 Dec 2014 20:40:27 +0000 (15:40 -0500)]
doc: document time() and timeEnd() relationship
`console.time()` and `console.timeEnd()` are very closely related. It's
useful to reference them both from each other.
Previously, console.time() did not mention that it needed to be paired
with a call to console.timeEnd() to be useful, and timeEnd() also failed
to mention that console.time() needed to be called first.
References in both directions have been added.
PR-URL: https://github.com/iojs/io.js/pull/198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Mark Stosberg [Tue, 23 Dec 2014 16:07:31 +0000 (11:07 -0500)]
doc: fix v8 doc headings so 'make doc' passes
Previously the code that builds the Table of Contents threw
an exception because of jump from an H1 heading directly to an H3
heading.
By changing the H3 heading to an H2, 'make doc' works again. This is
also consistent with other docs like console.markdown which use
H2 for method call documentation.
PR-URL: https://github.com/iojs/io.js/pull/203
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
teppeis [Sun, 21 Dec 2014 15:56:33 +0000 (00:56 +0900)]
assert: fix deepEqual regression
Change of Object.keys in ES6 breaks assert.deepEqual about primitive
values.
V8: https://code.google.com/p/v8/issues/detail?id=3443
Previously deepEqual depends on Object.key that throws an error for
a primitive value, but now Object.key does not throw.
PR-URL: https://github.com/iojs/io.js/pull/193
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Nikolai Vavilov [Sat, 20 Dec 2014 14:39:10 +0000 (16:39 +0200)]
configure: remove workarounds for GCC < 4.8
They can't compile io.js anyway.
PR-URL: https://github.com/iojs/io.js/pull/187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Fri, 19 Dec 2014 22:46:37 +0000 (23:46 +0100)]
lib: micro-optimize url.resolve()
Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.
Add a new benchmark to prove it. With the change applied, it scores
about 5% higher and that is nothing to sneeze at.
PR-URL: https://github.com/iojs/io.js/pull/184
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Fri, 19 Dec 2014 22:44:19 +0000 (23:44 +0100)]
benchmark: rename url.parse() benchmark
Rename the url.parse() benchmark from url.js to url-parse.js.
A follow-up commit is going to add another one for url.resolve().
PR-URL: https://github.com/iojs/io.js/pull/184
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Fri, 19 Dec 2014 23:04:35 +0000 (00:04 +0100)]
lib: micro-optimize EventEmitter#removeListener()
Replace the call to Array#splice() with a faster open-coded version
that creates less garbage.
Add a new benchmark to prove it. With the change applied, it scores
a whopping 40% higher.
PR-URL: https://github.com/iojs/io.js/pull/185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Fri, 19 Dec 2014 23:03:10 +0000 (00:03 +0100)]
benchmark: fix printing of large numbers
Don't use Number#toPrecision(), it switches to scientific notation for
numbers with more digits than the precision; use Number#toFixed().
PR-URL: https://github.com/iojs/io.js/pull/185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Tue, 9 Dec 2014 22:26:24 +0000 (23:26 +0100)]
benchmark: pre-optimize url.parse() before start
Force V8 to optimize url.parse() before starting the actual benchmark.
Tries to minimize variance between successive runs caused by the
optimizer kicking in at different points.
It does not seem to have much impact, CPU times are roughly the same
before and afterwards; url.parse() quickly plateaus at a local optimum
where most time is spent in V8 builtins, notably Runtime_StringSplit()
and Object::GetElementWithReceiver() calls originating from
deps/v8/src/uri.js, with no recurring optimize/deoptimize cycles that
I could spot.
Still, I don't see any downsides to pre-optimizing the function being
benchmarked so in it goes.
PR-URL: https://github.com/iojs/io.js/pull/132
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Julian Duque [Tue, 16 Dec 2014 16:27:31 +0000 (11:27 -0500)]
debugger: improve clearBreakpoint error and docs
Currently clearBreakpoint error is confusing, it says "Script not found"
when there is no breakpoint, also documentation doesn't include
signature for clearBreakpoint.
PR-URL: https://github.com/iojs/io.js/pull/175
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
cjihrig [Mon, 15 Dec 2014 18:58:37 +0000 (13:58 -0500)]
fs: deprecate exists() and existsSync()
These methods don't follow standard conventions, and shouldn't
be used anyway.
Fixes: https://github.com/iojs/io.js/issues/103
PR-URL: https://github.com/iojs/io.js/pull/166
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Jackson Tian [Thu, 18 Dec 2014 07:52:42 +0000 (15:52 +0800)]
doc: document callback of http res/req end method
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.
PR-URL: https://github.com/iojs/io.js/pull/181
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
Ben Noordhuis [Tue, 16 Dec 2014 12:21:41 +0000 (13:21 +0100)]
lib,src: remove post-gc event infrastructure
Remove the 'gc' event from the v8 module and remove the supporting
infrastructure from src/. It gets the axe because:
1. There are currently no users. It was originally conceived as
an upstreamed subset of StrongLoop's strong-agent GC metrics,
but the strong-agent code base has evolved considerably since
that time and has no use anymore for what is in core.
2. The implementation is not quite sound. It calls into JS land
from inside the GC epilog and that is unsafe. We could fix
that by delaying the callback until a safe time but because
there are no users anyway, removing it is all around easier.
PR-URL: https://github.com/iojs/io.js/pull/174
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Ben Noordhuis [Mon, 15 Dec 2014 16:25:31 +0000 (17:25 +0100)]
lib: fix guard expression in timer.unref()
Fixes the following assertion on slow systems, like our ARM buildbot:
$ out/Debug/node test/simple/test-timers-unref.js
node: ../src/async-wrap-inl.h:101: v8::Handle<v8::Value>
node::AsyncWrap::MakeCallback(uint32_t, int,
v8::Handle<v8::Value>*): Assertion `cb_v->IsFunction()' failed.
Aborted
The reason it only manifests on slow systems is that the test starts
a 1 ms interval timer, then defers timer.unref.bind({}) to the next
tick. On fast systems, the test completes in under a millisecond,
before the callback is called.
This commit makes timer.unref() check that the receiver actually has
a timeout callback property.
Fixes #13.
PR-URL: https://github.com/iojs/io.js/pull/165
Reviewed-By: Rod Vagg <rod@vagg.org>
Fedor Indutny [Wed, 17 Dec 2014 13:34:21 +0000 (20:34 +0700)]
test: run tests in parallel, common improvements
* Allow running tests in mixed parallel/sequential modes
* Add -J flag for running tests on all available CPUs
* Support TEST_THREAD_ID in test/common.js and use it for tmpDir and PORT
* make: use -J flag
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/172
Fix: iojs/io.js#139
Fedor Indutny [Wed, 17 Dec 2014 13:30:04 +0000 (20:30 +0700)]
test: split test in parallel/sequential
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/172
Fix: iojs/io.js#139
cjihrig [Mon, 15 Dec 2014 15:44:46 +0000 (10:44 -0500)]
fs: add access() and accessSync()
fs.exists() and fs.existsSync() do not follow the typical
error first callback convention. access() and accessSync()
are added as alternatives in this commit.
Fixes: https://github.com/joyent/node/pull/8714
PR-URL: https://github.com/iojs/io.js/pull/114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Alejandro Oviedo [Fri, 12 Dec 2014 16:03:13 +0000 (13:03 -0300)]
doc: change write() after end() streams example
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.
Fixes https://github.com/joyent/node/issues/8814.
PR-URL: https://github.com/iojs/io.js/pull/155
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
Ben Noordhuis [Tue, 9 Dec 2014 21:57:48 +0000 (22:57 +0100)]
lib: reintroduce v8 module
I introduced this module over a year ago in a pull request as the v8
module but it was quickly subsumed by the tracing module.
The tracing module was recently removed again and that is why this
commit introduces the v8 module again, including the new features it
picked up commits
d23ac0e and
f8076c4.
PR-URL: https://github.com/iojs/io.js/pull/131
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Thorsten Lorenz <thlorenz@gmx.de>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Ben Noordhuis [Wed, 10 Dec 2014 16:45:50 +0000 (17:45 +0100)]
src: move BE/LE buffer conversion to StringSlice()
Move the big endian to little endian conversion logic for UCS2 input
from src/string_bytes.cc to src/node_buffer.cc; StringSlice() is the
only function that actually needs it and with this commit, a second
copy is avoided on big endian architectures.
Ben Noordhuis [Wed, 10 Dec 2014 16:33:56 +0000 (17:33 +0100)]
src: redo unaligned access workaround
Introduce two-byte overloads of node::Encode() and StringBytes::Encode()
that ensure that the input is suitably aligned.
Revisits commit
535fec8 from yesterday.
Ben Noordhuis [Thu, 11 Dec 2014 14:29:52 +0000 (15:29 +0100)]
src: fix addon loader regression
Fix a regression that was introduced in commit
a38b9178 by removing the
bad check. Also rearrange the addon loading logic to ensure that the
list of pending addons remains in a consistent state when the shared
object fails to load; in particular, when an addon self-registers first,
then hits a dynamic linker error in a later constructor.
Fixes the following asserting when loading a .node shared object:
node: ../src/node.cc:1944: void node::node_module_register(void*):
Assertion `(modpending) != (nullptr)' failed.
Fixes strongloop/strongops#233.
PR-URL: https://github.com/iojs/io.js/pull/154
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Nikolai Vavilov [Fri, 12 Dec 2014 17:28:20 +0000 (19:28 +0200)]
build: remove support for VS 2010 and 2012
They can't compile io.js anyway.
PR-URL: https://github.com/iojs/io.js/pull/156
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Chris Dickinson [Wed, 10 Dec 2014 22:03:27 +0000 (14:03 -0800)]
domain: add soft deprecation notice
Per the TC meeting on 2014-12-10, domains will be "soft deprecated"
until a suitable replacement API is available; at which time they
will be fully deprecated. Full deprecation will include references
to replacement API and the application of util.deprecate to the domain
api.
PR-URL: https://github.com/iojs/io.js/pull/141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Mathias Bynens [Thu, 11 Dec 2014 20:50:35 +0000 (21:50 +0100)]
docs: clarify that 'io.js' is the correct name
Refs #118.
PR-URL: https://github.com/iojs/io.js/pull/151
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Rod Vagg [Thu, 11 Dec 2014 09:54:42 +0000 (20:54 +1100)]
doc: added node-forward TC meeting 2014-10-15
PR-URL: https://github.com/iojs/io.js/pull/148
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
micnic [Sat, 29 Nov 2014 12:50:29 +0000 (14:50 +0200)]
domain: forward args to .run(fn)
Adds the feature to define arguments for the function called in
domain.run(), this is supposed to be useful when a function is called from
another context and some values from the current context are needed as
arguments, it's similar to the callback from setTimeout or setInterval.
PR-URL: https://github.com/iojs/io.js/pull/15
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Rod Vagg [Thu, 11 Dec 2014 07:07:40 +0000 (18:07 +1100)]
doc: added TC meeting minutes for 2014-12-10
closes #112
PR-URL: https://github.com/iojs/io.js/pull/144/
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Mikeal Rogers <mikeal.rogers@gmail.com>
Evan Lucas [Thu, 11 Dec 2014 07:37:03 +0000 (01:37 -0600)]
module: fix regression in require ../
Fixes regression in require system that prevented loading relative
packages via main property in package.json where the file is not
index.{ext}. The regression was introduced in commit
36777d2.
PR-URL: https://github.com/iojs/io.js/pull/145
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Thu, 11 Dec 2014 17:04:31 +0000 (18:04 +0100)]
build: fix dtrace-enabled build on os x
Commit
691d55f introduces a regression on OS X when dtrace is enabled
(the default.) This commit rectifies that by removing the erroneous
platform check.
Fixes the following build error:
CXX(target) /Users/bnoordhuis/src/iojs/out/Release/obj.target/node/src/node_dtrace.o
../src/node_dtrace.cc:27:10: fatal error: 'node_provider.h' file not found
PR-URL: https://github.com/iojs/io.js/pull/150
Reviewed-By: Miroslav Bajtoš <miro.bajtos@gmail.com>
Mikeal Rogers [Wed, 29 Oct 2014 22:17:56 +0000 (15:17 -0700)]
doc: add TC notes from october 29th
PR-URL: https://github.com/node-forward/node/pull/41
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@rvagg: cherry-picked
2c7847b and
e7dec60 from master to v0.12
Mikeal Rogers [Thu, 9 Oct 2014 23:16:49 +0000 (16:16 -0700)]
doc: meeting notes from oct 9th TC meeting
Fixes https://github.com/node-forward/node/issues/4
PR-URL: https://github.com/node-forward/node/pull/9
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@rvagg: cherry-picked
3cb5f3d from master to v0.12
Kevin O'Hara [Wed, 3 Dec 2014 03:17:17 +0000 (22:17 -0500)]
docs: reword project messaging
Rewords project messaging in README to make the overall project
messaging a bit clearer. More discussion to be found in iojs/io.js#24.
PR-URL: https://github.com/iojs/io.js/pull/36
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Steven R. Loomis [Wed, 10 Dec 2014 17:04:33 +0000 (09:04 -0800)]
build: configure return exit status from gyp
Previously, 'configure' would not return an exit status
if gyp blows up. This can be tested via:
date >> node.gyp ; ./configure && echo A-OK
You will get "A-OK" even though gyp had failed.
PR-URL: https://github.com/joyent/node/pull/8856
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fedor Indutny [Mon, 8 Dec 2014 13:45:12 +0000 (16:45 +0300)]
crypto: separate altname extensions with ", "
In newly introduced `SafeX509ExtPrint` I forgot to insert separators
between extensions, which lead to the "DNS:...DNS:..." thing for npm.
Fix: iojs/io.js#105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/113.patch
brian m. carlson [Sat, 6 Dec 2014 18:52:25 +0000 (18:52 +0000)]
crypto: disable SSLv3 if shared OpenSSL lacks it
Some distributions disable SSLv3 due to POODLE. In such a case, disable
the specific SSLv3 methods and throw an exception, much like the code
already does for SSLv2. The SSLv23* code is retained because this is
OpenSSL's terminology for "no version in particular".
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/101
Ben Noordhuis [Sat, 6 Dec 2014 19:38:58 +0000 (20:38 +0100)]
benchmark: add url benchmarks
Based on the ad-hoc benchmark from joyent/node#8638 plus an additional
benchmark for user:pass auth URLs.
PR-URL: https://github.com/iojs/io.js/pull/102
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Tue, 9 Dec 2014 17:57:43 +0000 (18:57 +0100)]
lib: optimize require() path walking
Remove a speed bump from commit
36777d2 by reusing the result of the
previous stat() system call. It's a code path that gets called many
thousands of times at startup in most applications so shaving off an
extra system call can have an appreciable impact on startup times.
PR-URL: https://github.com/iojs/io.js/pull/130
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Ben Noordhuis [Tue, 9 Dec 2014 14:41:35 +0000 (15:41 +0100)]
src: fix unaligned access in ucs2 string encoder
Seen with g++ 4.9.2 on x86_64 Linux: a SIGSEGV is generated when the
input to v8::String::NewFromTwoByte() is not suitably aligned.
g++ 4.9.2 emits SSE instructions for copy loops. That requires aligned
input but that was something StringBytes::Encode() did not enforce until
now. Make a properly aligned copy before handing off the input to V8.
We could, as an optimization, check that the pointer is aligned on a
two-byte boundary but that is technically still UB; pointers-to-char
are allowed to alias other pointers but the reverse is not true:
a pointer-to-uint16_t that aliases a pointer-to-char is in violation
of the pointer aliasing rules.
See https://code.google.com/p/v8/issues/detail?id=3694
Fixes segfaulting test simple/test-stream2-writable.
PR-URL: https://github.com/iojs/io.js/pull/127
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Bert Belder [Tue, 9 Dec 2014 20:15:32 +0000 (21:15 +0100)]
test: fix test-fs-symlink-dir-junction-relative
* The test no longer relies on being invoked from a particular
working directory to function properly.
* fs.symlink() and fs.symlinkSync() are both tested.
* The test now cleans up after itself.
This commit fixes https://github.com/iojs/io.js/issues/126
PR-URL: https://github.com/iojs/io.js/pull/129
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
cjihrig [Tue, 9 Dec 2014 18:47:49 +0000 (13:47 -0500)]
test: add test for spawnSync() env option
PR-URL: https://github.com/joyent/node/pull/8845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Juanjo [Tue, 14 Oct 2014 10:07:19 +0000 (12:07 +0200)]
lib,src: fix spawnSync ignoring its 'env' option
PR-URL: https://github.com/joyent/node/pull/8546
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Evan Torrie [Tue, 9 Dec 2014 19:02:39 +0000 (11:02 -0800)]
build: fix build with systemtap providers enabled
The "dtrace" script version include in systemtap-sdt-devel-2.6-3
(part of Fedora 21) no longer ignores unknown command line
arguments, but will instead error out and refuse to run.
This patch adds a separate condition to node's gyp input so
that on Linux it will run dtrace without the -xnolibs
argument that trips it up on systemtap-std-devel-2.6-3.
PR-URL: https://github.com/joyent/node/pull/8846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Bert Belder [Tue, 9 Dec 2014 17:06:35 +0000 (18:06 +0100)]
Merge 'node/v0.12'
This merge is effectively a no-op because io.js has already
cherry-picked all the patches from node it needs.
The merge commit serves to establish a new merge base for future merges.
Bert Belder [Tue, 9 Dec 2014 15:03:24 +0000 (16:03 +0100)]
src: remove the tracing module entirely
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Jackson Tian [Tue, 2 Dec 2014 03:14:57 +0000 (11:14 +0800)]
doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
Trevor Norris [Tue, 9 Dec 2014 04:10:44 +0000 (05:10 +0100)]
async-wrap: add event hooks
Call a user-defined callback at specific points in the lifetime of an
asynchronous event. Which are on instantiation, just before/after the
callback has been run.
**If any of these callbacks throws an exception, there is no forgiveness
or recovery. A message will be displayed and a core file dumped.**
Currently these only tie into AsyncWrap, meaning no call to a hook
callback will be made for timers or process.nextTick() events. Though
those will be added in a future commit.
Here are a few notes on how to make the hooks work:
- The "this" of all event hook callbacks is the request object.
- The zero field (kCallInitHook) of the flags object passed to
setupHooks() must be set != 0 before the init callback will be called.
- kCallInitHook only affects the calling of the init callback. If the
request object has been run through the create callback it will always
run the before/after callbacks. Regardless of kCallInitHook.
- In the init callback the property "_asyncQueue" must be attached to
the request object. e.g.
function initHook() {
this._asyncQueue = {};
}
- DO NOT inspect the properties of the object in the init callback.
Since the object is in the middle of being instantiated there are some
cases when a getter is not complete, and doing so will cause Node to
crash.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Tue, 9 Dec 2014 04:02:09 +0000 (05:02 +0100)]
async-wrap: explicitly pass parent
When instantiating a new AsyncWrap allow the parent AsyncWrap to be
passed. This is useful for cases like TCP incoming connections, so the
connection can be tied to the server receiving the connection.
Because the current architecture instantiates the *Wrap inside a
v8::FunctionCallback, the parent pointer is currently wrapped inside a
new v8::External every time and passed as an argument. This adds ~80ns
to instantiation time.
A future optimization would be to add the v8::External as the data field
when creating the v8::FunctionTemplate, change the pointer just before
making the call then NULL'ing it out afterwards. This adds enough code
complexity that it will not be attempted until the current approach
demonstrates it is a bottle neck.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Sat, 15 Nov 2014 00:15:06 +0000 (16:15 -0800)]
async-wrap: expose async-wrap as binding
Expose basic hooks for AsyncWrap via the async_wrap binding. Right now
only the PROVIDER types are exposed. This is a preliminary step before
more functionality is added.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Fri, 14 Nov 2014 23:47:34 +0000 (15:47 -0800)]
src: remove unnecessary template parameter
The template class information is received via the type of the first
argument. So there is no need to use Wrap<T>(handle).
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Tue, 9 Dec 2014 04:29:47 +0000 (05:29 +0100)]
src: all wraps now use actual FunctionTemplate
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.
Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Thu, 13 Nov 2014 00:35:48 +0000 (16:35 -0800)]
node: fix throws before timer module is loaded
An edge case could occur when the setImmediate() in _fatalException()
would fire before the timers module had been loaded globally, causing
Node to crash.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Tue, 9 Dec 2014 04:24:59 +0000 (05:24 +0100)]
node, async-wrap: remove MakeDomainCallback
C++ won't deoptimize like JS if specific conditional branches are
sporadically met in the future. Combined with the amount of code
duplication removal and simplified maintenance complexity, it makes more
sense to merge MakeCallback and MakeDomainCallback.
Additionally, type casting in V8 before verifying what that type is will
cause V8 to abort in debug mode if that type isn't what was expected.
Fix this by first checking the v8::Value before casting.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Tue, 9 Dec 2014 03:55:48 +0000 (04:55 +0100)]
async-wrap: move MakeCallback to .cc
MakeCallback is too large a function to be inlined. Likewise, only
having header files will not allow for any part of AsyncWrap to be
exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Trevor Norris [Tue, 9 Dec 2014 15:01:05 +0000 (16:01 +0100)]
src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
Bert Belder [Tue, 9 Dec 2014 15:08:48 +0000 (16:08 +0100)]
test: mark test-net-GH-5504 as flaky on linux
That test can trigger a bug on some older Linux kernels.
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Alexis Campailla [Fri, 7 Nov 2014 13:15:24 +0000 (14:15 +0100)]
test: runner support for flaky tests
Adding --flaky-tests option, to allow regarding flaky tests failures
as non-fatal.
Currently only observed by the TapProgressIndicator, which will
add a # TODO directive to tests classified as flaky. According to the
TAP specification, the test harness is supposed to treat failures
that have a # TODO directive as non-fatal.
Carlos Campderrós [Thu, 31 Jul 2014 08:34:51 +0000 (10:34 +0200)]
doc: set logical umask in process.umask example
0644 seems to be the desired mode for new files (as it is a very weird
umask), and to achieve that the correct umask would be 0022.
PR-URL: https://github.com/joyent/node/pull/8039
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Jonathan Johnson [Thu, 27 Nov 2014 02:02:25 +0000 (20:02 -0600)]
url: change hostname regex to negate invalid chars
Regarding joyent/node#8520
This changes hostname validation from a whitelist regex approach
to a blacklist regex approach as described in https://url.spec.whatwg.org/#host-parsing.
url.parse misinterpreted `https://good.com+.evil.org/`
as `https://good.com/+.evil.org/`. If we use url.parse to check the
validity of the hostname, the test passes, but in the browser the
user is redirected to the evil.org website.
Vladimir Kurchatkin [Tue, 18 Nov 2014 09:30:27 +0000 (12:30 +0300)]
smalloc: don't allow to dispose typed arrays
PR-URL: https://github.com/joyent/node/pull/8743
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Nathan Woltman [Fri, 21 Nov 2014 08:22:07 +0000 (03:22 -0500)]
path: refactor normalizeArray()
The normalizeArray() function now avoids using the slow Array#splice()
method to improve performance and now also filters out empty path parts.
Code that pre-filtered empty parts has been removed.
PR-URL: https://github.com/joyent/node/pull/8724
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Bert Belder [Tue, 9 Dec 2014 04:57:17 +0000 (05:57 +0100)]
node.cc: use nullptr instead of NULL
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Trevor Norris [Tue, 9 Dec 2014 04:22:49 +0000 (05:22 +0100)]
node.cc: fix bad assert
It was my mistake to change an assert check. This changes it back to how
the assert was originally done.
Fixes: c131c1f "modules: adding load linked modules feature"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Trevor Norris [Fri, 5 Dec 2014 13:34:03 +0000 (05:34 -0800)]
uv: float patch to revert tty breakage
Float https://github.com/libuv/libuv/commit/
484a3a9 to fix incorrect
indentation in REPL.
Bert Belder [Tue, 9 Dec 2014 16:44:37 +0000 (17:44 +0100)]
crypto: store thread id as pointer-sized value
uv_thread_t is a HANDLE (void pointer) on Windows, which means that
on 64-bit windows it cannot be stored with CRYPTO_THREADID_set_numeric
without potential data loss.
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Saúl Ibarra Corretgé [Fri, 21 Nov 2014 14:43:12 +0000 (15:43 +0100)]
deps: update libuv to 1.0.1
PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Bert Belder [Tue, 9 Dec 2014 16:49:42 +0000 (17:49 +0100)]
openssl: don't define SIXTY_FOUR_BIT_LONG on Windows
On Windows a long integer is always 32-bits, even when the target
architecture uses 64-bit pointers.
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Tyler Kellen [Wed, 3 Dec 2014 16:45:44 +0000 (11:45 -0500)]
docs: fix project name
Renamed node.js to io.js and updated links to external resources.
PR-URL: https://github.com/iojs/io.js/pull/42
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Tue, 9 Dec 2014 14:16:55 +0000 (15:16 +0100)]
Revert "openssl: don't define SIXTY_FOUR_BIT_LONG on Windows"
This reverts commit
878cc3e532ec5feb7145ba0523db2c6383df748b.
Reverted for breaking the x86_64 Linux build:
In file included from ../deps/openssl/openssl/include/openssl/bn.h:1:0,
from ../deps/openssl/openssl/crypto/bn/asm/../bn_lcl.h:115,
from ../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c:1:
../deps/openssl/openssl/include/openssl/../../crypto/bn/bn.h:813:20: note: previous declaration of 'bn_add_words' was here
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num);
^
../deps/openssl/openssl/crypto/bn/asm/x86_64-gcc.c:210:15: error: conflicting types for 'bn_sub_words'
BN_ULONG bn_sub_words (BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int n)
Bert Belder [Tue, 9 Dec 2014 14:46:59 +0000 (15:46 +0100)]
openssl: don't define SIXTY_FOUR_BIT_LONG on Windows
On Windows (and potentially other LP64 platforms), a long integer is
always 32-bits, even when the target architecture uses 64-bit pointers.
Signed-off-by: Bert Belder <bertbelder@gmail.com>
Bert Belder [Mon, 8 Dec 2014 16:49:24 +0000 (17:49 +0100)]
test-require-resolve: use case insensitive compare
The test fixtures directory is derived from the path to the currently
running script, which is itself specified on the command line. That
means that the case of the fixtures dir may not match what the test
expects (when executed on a case-insensitive file system).
PR-URL: https://github.com/iojs/io.js/pull/116
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Bert Belder [Tue, 9 Dec 2014 07:08:51 +0000 (08:08 +0100)]
test: make fs-symlink-dir-junction-relative pass on unix
Vincent Weevers [Wed, 3 Dec 2014 14:38:53 +0000 (15:38 +0100)]
fs: resolve junction targets relative to their parent
PR-URL: https://github.com/joyent/node/pull/8813
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Bert Belder [Mon, 8 Dec 2014 20:12:12 +0000 (21:12 +0100)]
path: path.normalize no longer lower-cases drive letters
Fixes an omission in
e24fa83.
Nikolai Vavilov [Sat, 6 Dec 2014 14:42:24 +0000 (16:42 +0200)]
Revert "path: resolve normalize drive letter to lower case"
This reverts commit
f6e574018090ed4d63596b8a3bb614f8f48b6267.
Changing drive letters to lowercase violates the principle of
least surprise. Other functions that do this should get fixed too.
Conflicts:
lib/path.js
PR-URL: https://github.com/iojs/io.js/pull/100
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Fedor Indutny [Mon, 8 Dec 2014 15:02:30 +0000 (18:02 +0300)]
contributing: add all core modules to Caine's spec
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Fedor Indutny [Mon, 8 Dec 2014 02:36:03 +0000 (05:36 +0300)]
contributing: add information for caine bot
Reviewed-By: Rod Vagg <r@va.gg>
PR-URL: https://github.com/iojs/io.js/pull/107
Brendan Ashworth [Fri, 5 Dec 2014 07:01:55 +0000 (23:01 -0800)]
doc: fixes grammar in timers/tls
This commit fixes a few grammar issues located
within the doc files for timers and tls.
They primarily include incorrect use of a / an
and a single insertion of a comma.
same as [this PR](https://github.com/joyent/node/pull/8581)
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/76
Robert Kowalski [Mon, 10 Feb 2014 20:14:53 +0000 (21:14 +0100)]
module: test for directories, fix require with ..
Given my home-directory is `/Users/rocko` - and I have a file named
`npm.json` in it and also a repository with name `npm`, which is a
folder for the node-module.
When try to require the `/Users/rocko/npm/index.js` two direcotry
levels down in the npm folder (e.g. `/Users/rocko/npm/test/tap`)
with require("../../") node will load `/Users/rocko/npm/index.json`.
When I use require("../..") node will load `/Users/rocko/npm.json`
which is fixed by this commit.
PR-URL: https://github.com/iojs/io.js/pull/58
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Evan Lucas [Wed, 3 Dec 2014 03:16:32 +0000 (21:16 -0600)]
net: give better error messages
Add address and/or port to errors where applicable for better reporting.
In the event the local address and port are accessible, it will also add
those to the error message.
See joyent/node#7005
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/35
cjihrig [Wed, 26 Nov 2014 15:46:59 +0000 (10:46 -0500)]
debugger: use requireRepl() to load debugger repl
Currently, the debugger uses require('repl') to setup the repl.
However, require.extensions is not available yet, causing a
crash on tab completion of require('. This commit uses the
module.requireRepl() method to bootstrap the repl.
Fixes: https://github.com/joyent/node/issues/8359
PR-URL: https://github.com/iojs/io.js/pull/49
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Jose Luis Rivas [Sat, 6 Dec 2014 17:46:53 +0000 (12:46 -0500)]
build: don't run find in non-existent directory
PR-URL: https://github.com/iojs/io.js/pull/97
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Fri, 5 Dec 2014 22:55:17 +0000 (23:55 +0100)]
test: move simple/test-abort-fatal-error to pummel
Move it from simple/ to pummel/ because it can take an awful long to
run to completion:
$ time out/x64.release/node test/simple/test-abort-fatal-error.js
real 0m8.150s
user 0m0.328s
sys 0m0.054s
PR-URL: https://github.com/node-forward/node/pull/91
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Christian Tellnes [Fri, 5 Dec 2014 13:50:05 +0000 (14:50 +0100)]
events: implement EventEmitter#getMaxListeners()
Fixes https://github.com/joyent/node/issues/8237.
PR-URL: https://github.com/iojs/io.js/pull/82
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Thu, 4 Dec 2014 21:02:51 +0000 (22:02 +0100)]
build: rename rpmbuild .spec file
Rename the .spec file from node.spec to iojs.spec and update the build
script. Done as a separate commit to not obscure the changes from the
previous commit.
PR-URL: https://github.com/iojs/io.js/pull/71
Reviewed-By: Rod Vagg <rod@vagg.org>
Ben Noordhuis [Thu, 4 Dec 2014 21:00:55 +0000 (22:00 +0100)]
build: update rpmbuild .spec file
Rename the package to iojs. No Conflicts: header is necessary because
the package was already marked as conflicting with the Fedora nodejs
package.
PR-URL: https://github.com/iojs/io.js/pull/71
Reviewed-By: Rod Vagg <rod@vagg.org>
Brendan Ashworth [Sun, 19 Oct 2014 18:54:48 +0000 (11:54 -0700)]
doc: fix grammar and wording in tls and timers
In `tls.markdown`, there was a misuse of 'a' which has been replaced
with 'an'.
In `timers.markdown`...
line 31: misuse of 'a', replaced with 'an'
line 59: unclear wording, haywire 'a', added new comma
Jackson Tian [Tue, 2 Dec 2014 03:14:57 +0000 (11:14 +0800)]
doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
Trevor Norris [Fri, 5 Dec 2014 13:34:03 +0000 (05:34 -0800)]
uv: float patch to revert tty breakage
Float https://github.com/libuv/libuv/commit/
484a3a9 to fix incorrect
indentation in REPL.
Trevor Norris [Thu, 20 Nov 2014 19:27:06 +0000 (11:27 -0800)]
async-wrap: add event hooks
Call a user-defined callback at specific points in the lifetime of an
asynchronous event. Which are on instantiation, just before/after the
callback has been run.
**If any of these callbacks throws an exception, there is no forgiveness
or recovery. A message will be displayed and a core file dumped.**
Currently these only tie into AsyncWrap, meaning no call to a hook
callback will be made for timers or process.nextTick() events. Though
those will be added in a future commit.
Here are a few notes on how to make the hooks work:
- The "this" of all event hook callbacks is the request object.
- The zero field (kCallInitHook) of the flags object passed to
setupHooks() must be set != 0 before the init callback will be called.
- kCallInitHook only affects the calling of the init callback. If the
request object has been run through the create callback it will always
run the before/after callbacks. Regardless of kCallInitHook.
- In the init callback the property "_asyncQueue" must be attached to
the request object. e.g.
function initHook() {
this._asyncQueue = {};
}
- DO NOT inspect the properties of the object in the init callback.
Since the object is in the middle of being instantiated there are some
cases when a getter is not complete, and doing so will cause Node to
crash.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>