Fedor Indutny [Tue, 19 Nov 2013 06:58:23 +0000 (10:58 +0400)]
events: do not accept NaN in setMaxListeners
Fedor Indutny [Tue, 19 Nov 2013 07:02:26 +0000 (11:02 +0400)]
net: fix `new net.Socket` documentation
`Socket` no longer accepts `type` option, and also accepts `readable`,
`writable` options.
fix #6541
Fedor Indutny [Tue, 19 Nov 2013 07:38:48 +0000 (11:38 +0400)]
dgram: fix abort when getting `fd` of closed dgram
v8's `messages.js` file's `CallSiteGetMethodName` is running through all
object properties and getter to figure out method name of function that
appears in stack trace. This run-through will also read `fd` property of
`UDPWrap` instance's javascript object, making `UNWRAP()` fail.
As a simple alternative to the test case above, one could just keep
reference to the dgram handle and try accessing `handle.fd` after it has
been fully closed.
fix #6536
Ben Noordhuis [Fri, 15 Nov 2013 15:27:22 +0000 (16:27 +0100)]
doc: add nodejs.vn to community page
Node.js. It's not just for SF hipsters anymore.
Ben Noordhuis [Fri, 15 Nov 2013 15:24:46 +0000 (16:24 +0100)]
doc: sort community page links alphabetically
This commit introduces some long lines but it's HTML so it's okay.
Fedor Indutny [Wed, 13 Nov 2013 12:58:46 +0000 (16:58 +0400)]
tls: handle `ssl.start()` errors
Tim Wood [Tue, 12 Nov 2013 20:19:13 +0000 (12:19 -0800)]
events: don't call once twice
Emitting an event within a `EventEmitter#once` callback of the same
event name will cause subsequent `EventEmitter#once` listeners of the
same name to be called multiple times.
var emitter = new EventEmitter();
emitter.once('e', function() {
emitter.emit('e');
console.log(1);
});
emitter.once('e', function() {
console.log(2);
});
emitter.emit('e');
// Output
// 2
// 1
// 2
Fix the issue, by calling the listener method only if it was not
already called.
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:45 +0000 (12:53 -0800)]
blog: Post for v0.10.22
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:45 +0000 (12:53 -0800)]
Now working on 0.10.23
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:28 +0000 (12:53 -0800)]
Merge branch 'v0.10.22-release' into v0.10
Timothy J Fontaine [Tue, 12 Nov 2013 20:22:12 +0000 (12:22 -0800)]
2013.11.12, Version 0.10.22 (Stable)
* npm: Upgrade to 1.3.14
* uv: Upgrade to v0.10.19
* child_process: don't assert on stale file descriptor events (Fedor Indutny)
* darwin: Fix "Not Responding" in Mavericks activity monitor (Fedor Indutny)
* debugger: Fix bug in sb() with unnamed script (Maxim Bogushevich)
* repl: do not insert duplicates into completions (Maciej Małecki)
* src: Fix memory leak on closed handles (Timothy J Fontaine)
* tls: prevent stalls by using read(0) (Fedor Indutny)
* v8: use correct timezone information on Solaris (Maciej Małecki)
Timothy J Fontaine [Tue, 12 Nov 2013 19:23:19 +0000 (11:23 -0800)]
src: add HandleScope in HandleWrap::OnClose
Fixes a 4 byte leak on handles closing. AKA The Walmart leak.
MakeCallback doesn't have a HandleScope. That means the callers scope
will retain ownership of created handles from MakeCallback and related.
There is by default a wrapping HandleScope before uv_run, if the caller
doesn't have a HandleScope on the stack the global will take ownership
which won't be reaped until the uv loop exits.
If a uv callback is fired, and there is no enclosing HandleScope in the
cb, you will appear to leak 4-bytes for every invocation. Take heed.
cc @hueniverse
Timothy J Fontaine [Tue, 12 Nov 2013 18:57:57 +0000 (10:57 -0800)]
uv: Upgrade to v0.10.19
yangguo@chromium.org [Tue, 23 Oct 2012 13:04:05 +0000 (13:04 +0000)]
v8: use correct timezone information on Solaris
`timezone` variable contains the difference, in seconds, between UTC and
local standard time (see `man 3 localtime` on Solaris).
Call to `tzset` is required to apply contents of `TZ` variable to
`timezone` variable.
BUG=v8:2064
Review URL: https://chromiumcodereview.appspot.com/
10967066
Patch from Maciej Małecki <me@mmalecki.com>.
This is a back-port of upstream commit r12802 and a forward port of
commit 9fa953d from the v0.8 branch. V8 3.22 in the master branch
contains the patch so no further forward-porting is necessary.
Maciej Małecki [Mon, 11 Nov 2013 23:03:29 +0000 (00:03 +0100)]
repl: do not insert duplicates into completions
Fix invalid `hasOwnProperty` function usage.
For example, before in the REPL:
```
> Ar<Tab>
Array
Array ArrayBuffer
```
Now:
```
> Ar<Tab>
Array
ArrayBuffer
```
Fixes #6255.
Closes #6498.
Timothy J Fontaine [Sun, 10 Nov 2013 23:15:34 +0000 (15:15 -0800)]
gyp: update to bebdcea
Ben Noordhuis [Sat, 9 Nov 2013 21:24:22 +0000 (22:24 +0100)]
v8: unbreak `make native` build
The security fix from commit
6b92a713 also back-ported the test case.
Said test case relies on API that is only available in newer versions
of V8 and, as a result, broke the `make native` and `make <arch.mode>`
builds. This commit reverts that part of the back-port. Fixes the
following build error:
../test/cctest/test-api.cc: In function ‘void TestRegress260106()’:
../test/cctest/test-api.cc:17712:34: error: ‘class v8::Context’ has
no member named ‘GetIsolate’
Fedor Indutny [Thu, 7 Nov 2013 21:22:02 +0000 (01:22 +0400)]
tls: prevent stalls by using read(0)
Do not `.push()` the same data as just passed to `.ondata()`, it
may be read by 'data' event listeners.
fix #6277
isaacs [Fri, 8 Nov 2013 21:41:21 +0000 (13:41 -0800)]
npm: Upgrade to 1.3.14
Fedor Indutny [Mon, 21 Oct 2013 12:26:29 +0000 (16:26 +0400)]
doc: encoding is ignored if input is a Buffer
NOTE: it wasn't in 0.8
fixes #6386
isaacs [Thu, 31 Oct 2013 20:35:54 +0000 (13:35 -0700)]
doc: Correct and add several items
Several names/urls were out of date, and some really
awesome stuff was missing.
Sam Roberts [Wed, 30 Oct 2013 23:19:17 +0000 (16:19 -0700)]
doc: document node signal handling
Partly lifted from uv.h, partly from observation of node.cc.
Timothy J Fontaine [Wed, 30 Oct 2013 16:09:04 +0000 (09:09 -0700)]
blog: Post for v0.11.8
Ben Noordhuis [Tue, 29 Oct 2013 09:31:14 +0000 (10:31 +0100)]
doc: dgram: reword dgram.Socket#send() docs
Make it clear that the address argument is not really optional and fix
some Engrish and long lines while we're here.
Fixes #6433.
isaacs [Mon, 28 Oct 2013 21:10:47 +0000 (14:10 -0700)]
npm@1.3.13
Phillip Alexander [Sat, 26 Oct 2013 20:13:56 +0000 (13:13 -0700)]
doc: fs: clarify fs.symlink Windows specific args
Ryan Graham [Sat, 26 Oct 2013 05:03:02 +0000 (22:03 -0700)]
doc: improve module documentation
Expands on when to use module.exports vs. exports. This is a recurring
question on mailing list and continues to confuse new devs.
Sam Roberts [Fri, 25 Oct 2013 20:16:50 +0000 (13:16 -0700)]
doc: fix missing backtick in 2e16037
Brian White [Thu, 24 Oct 2013 02:43:23 +0000 (22:43 -0400)]
doc: streams: document default objectMode setting
Maxim Bogushevich [Tue, 22 Oct 2013 07:27:02 +0000 (17:27 +1000)]
debugger: Fix bug in sb() with unnamed script
setBreakpoint() cause error when unnamed script is loaded
isaacs [Thu, 24 Oct 2013 16:21:59 +0000 (09:21 -0700)]
npm@1.3.12
Ben Noordhuis [Wed, 23 Oct 2013 11:42:53 +0000 (13:42 +0200)]
build: fix test-gc weakref build rule
Make the build rule depend on the build artifact (weakref.node) itself
rather than the directory it's built in. Depending on the directory
means that a build failure won't trigger a rebuild on the next
invocation because the directory's timestamp has been updated.
This is a back-port of commit 1189571 from the master branch that
hopefully fixes the following CI error:
executing: make test/gc/node_modules/weak/build/
make: *** No rule to make target `test/gc/node_modules/weak/build/'.
Command exited with non-zero: make test/gc/node_modules/weak/build/
Build step 'Execute NodeJS script' marked build as failure
Zarko Stankovic [Thu, 12 Sep 2013 18:13:32 +0000 (20:13 +0200)]
doc: add nodejs.rs to the community page
Ben Noordhuis [Wed, 23 Oct 2013 11:25:35 +0000 (13:25 +0200)]
src: IsInt64() should return bool, not int
isaacs [Tue, 22 Oct 2013 17:56:03 +0000 (10:56 -0700)]
blog: HTTP server DoS vulnerability details
CVE-2013-4450
Timothy J Fontaine [Fri, 18 Oct 2013 22:46:02 +0000 (15:46 -0700)]
blog: Post for v0.10.21
Timothy J Fontaine [Fri, 18 Oct 2013 22:43:55 +0000 (15:43 -0700)]
blog: Post for v0.8.26
Timothy J Fontaine [Fri, 18 Oct 2013 22:40:32 +0000 (15:40 -0700)]
Now working on 0.10.22
Timothy J Fontaine [Fri, 18 Oct 2013 22:39:56 +0000 (15:39 -0700)]
Merge branch 'v0.10.21-release' into v0.10
Timothy J Fontaine [Fri, 18 Oct 2013 21:26:27 +0000 (14:26 -0700)]
2013.10.18, Version 0.10.21 (Stable)
* uv: Upgrade to v0.10.18
* crypto: clear errors from verify failure (Timothy J Fontaine)
* dtrace: interpret two byte strings (Dave Pacheco)
* fs: fix fs.truncate() file content zeroing bug (Ben Noordhuis)
* http: provide backpressure for pipeline flood (isaacs)
* tls: fix premature connection termination (Ben Noordhuis)
Timothy J Fontaine [Fri, 18 Oct 2013 21:14:21 +0000 (14:14 -0700)]
crypto: clear errors from verify failure
OpenSSL will push errors onto the stack when a verify fails, which can
disrupt TLS and other routines if we don't clear the error stack
Fixes #6304
Timothy J Fontaine [Fri, 18 Oct 2013 20:52:15 +0000 (13:52 -0700)]
uv: Upgrade to v0.10.18
isaacs [Wed, 16 Oct 2013 19:57:46 +0000 (12:57 -0700)]
http: provide backpressure for pipeline flood
If a client sends a lot more pipelined requests than we can handle, then
we need to provide backpressure so that the client knows to back off.
Do this by pausing both the stream and the parser itself when the
responses are not being read by the downstream client.
Backport of 085dd30
Timothy J Fontaine [Mon, 14 Oct 2013 18:57:45 +0000 (11:57 -0700)]
http_parser: expose pause/resume method for parser
Sam Roberts [Fri, 26 Jul 2013 01:17:38 +0000 (18:17 -0700)]
doc: cluster documentation cleanup and corrections
- fixed some incomprehensible wording ("event assigned to..."?)
- removed undocumented and unnecessary process properties from example
- corrected the docs on the default for the exec setting
- described when workers are removed from cluster.workers
- described addressType, which was documented as existing, but not what
values it might have
- spell out more clearly the limitations of setupMaster
- describe disconnect in sufficient detail that why a child does or does
not exit can be understood
- clarify which cluster functions and events are available on process or
just on the worker, as well as which are not available in children,
- don't describe events as the same, when they have receive different
arguments
- fix misleading disconnect example: since disconnect already calls
close on all servers, doing it again in the example is a no-op, not
the "force close" it was claimed to be
- document the error event, not catching it will kill your node
- describe suicide better, it is important, and a bit unintuitive
(process.exit() is not suicide?)
- use worker consistently throughout, instead of child.
Sam Roberts [Fri, 26 Jul 2013 00:35:21 +0000 (17:35 -0700)]
doc: child_process corrections and cleanups
- Make explicit that .disconnected is set before the disconnect event,
and it is not allowed to send messages after calling .disconnect(),
even while waiting for a delayed disconect event.
- Remove obsolete claim that explicit exit is required
- Describe silent: in the options for fork()
- Describe .connected as the property it is, not just as an aside in
the disconnect() method
Ben Noordhuis [Wed, 16 Oct 2013 10:32:47 +0000 (12:32 +0200)]
doc: http: reword IncomingMessage 'close' event
The bit that says "before response.end() was called or able to flush"
doesn't apply to incoming streams.
Fixes #6359.
Ben Noordhuis [Wed, 16 Oct 2013 10:20:25 +0000 (12:20 +0200)]
doc: http: add cross-links for easier clicking
Make it a little easier to navigate the http module documentation by
turning class names and methods into links to the appropriate section.
Ben Noordhuis [Tue, 15 Oct 2013 08:01:50 +0000 (10:01 +0200)]
doc: expand os.loadavg() section
Add a short explanation of what the load average is and why it's
unavailable on Windows.
Also sneak in a fix for a typo that I introduced in commit 56c5806.
Ben Noordhuis [Mon, 14 Oct 2013 11:15:00 +0000 (12:15 +0100)]
doc: document os.loadavg() behavior on windows
The load average is a very UNIX-y concept. That's why os.loadavg()
always returns zeros on Windows. Mention that in the documentation.
Dave Pacheco [Thu, 10 Oct 2013 16:41:59 +0000 (09:41 -0700)]
test: use proper findjsobjects output format
Closes #6329
Ben Noordhuis [Thu, 10 Oct 2013 12:34:15 +0000 (14:34 +0200)]
doc: net: remove bad net.Server description
net.Server is not an instance of net.Socket so don't say it is.
Ben Noordhuis [Thu, 10 Oct 2013 12:09:38 +0000 (14:09 +0200)]
doc: addon: fix object instantiation examples
* Extend examples to show how to handle non-constructor invocation in
constructor callback functions.
* Fix up examples to initialize member variables at object construction.
* Fix up a few naming inconsistencies.
Fixes #5701.
isaacs [Mon, 9 Sep 2013 11:31:05 +0000 (12:31 +0100)]
blog: Remove wp-to-markdown script
Ben Noordhuis [Wed, 9 Oct 2013 15:46:17 +0000 (17:46 +0200)]
tls: fix premature connection termination
Destroying the TLS session implies destroying the underlying socket but
before this commit, that was done with net.Socket#destroy() rather than
net.Socket#destroySoon(). The former closes the connection right away,
even when there is still data to write. In other words, sometimes the
final TLS record got truncated.
Fixes #6107.
Dave Pacheco [Fri, 4 Oct 2013 22:02:42 +0000 (15:02 -0700)]
dtrace: backport two byte string fix
This is a partial backport of 5921158
Re #6309
Closes #6319
Ben Noordhuis [Tue, 8 Oct 2013 09:25:22 +0000 (11:25 +0200)]
fs: fix fs.truncate() file content zeroing bug
fs.truncate() and its synchronous sibling are implemented in terms of
open() + ftruncate(). Unfortunately, it opened the target file with
mode 'w' a.k.a. 'write-only and create or truncate at open'.
The subsequent call to ftruncate() then moved the end-of-file pointer
from zero to the requested offset with the net result of a file that's
neatly truncated at the right offset and filled with zero bytes only.
This bug was introduced in commit
168a5557 but in fairness, before that
commit fs.truncate() worked like fs.ftruncate() so it seems we've never
had a working fs.truncate() until now.
Fixes #6233.
Ben Noordhuis [Sat, 5 Oct 2013 12:45:10 +0000 (14:45 +0200)]
doc: add warning to fs.exists() documentation
Warn against the open-if-exists anti-pattern, it's susceptible to
race conditions.
Ben Noordhuis [Tue, 1 Oct 2013 06:35:24 +0000 (08:35 +0200)]
doc: link to pre-built binaries, add install note
lLnk to http://nodejs.org/download/ and add a short primer on how to
extract the tarballs.
Fixes #6292.
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:14 +0000 (15:06 -0700)]
blog: Post for v0.10.20
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:14 +0000 (15:06 -0700)]
Now working on 0.10.21
Timothy J Fontaine [Mon, 30 Sep 2013 22:06:02 +0000 (15:06 -0700)]
Merge branch 'v0.10.20-release' into v0.10
Timothy J Fontaine [Mon, 30 Sep 2013 20:52:48 +0000 (13:52 -0700)]
2013.09.30, Version 0.10.20 (Stable)
* tls: fix sporadic hang and partial reads (Fedor Indutny)
- fixes "npm ERR! cb() never called!"
Ben Noordhuis [Sat, 28 Sep 2013 08:27:11 +0000 (10:27 +0200)]
src: turn uv_pipe_open() failures into exceptions
uv_pipe_open() is unlikely to fail but when it does, the failure should
not be quietly ignored. Raise the error as an exception.
See joyent/libuv#941.
Fedor Indutny [Fri, 27 Sep 2013 19:47:13 +0000 (23:47 +0400)]
tls: fix sporadic hang and partial reads
Do not decrement size in read loop, its used later, when comparing to
`bytesRead`.
fix #6270
NOTE: Original patch contributed by @roadrunner2
Timothy J Fontaine [Tue, 24 Sep 2013 22:16:44 +0000 (15:16 -0700)]
blog: add missing shasums for v0.10.19 release
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:22 +0000 (15:10 -0700)]
blog: Post for v0.10.19
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:22 +0000 (15:10 -0700)]
Now working on 0.10.20
Timothy J Fontaine [Tue, 24 Sep 2013 22:10:10 +0000 (15:10 -0700)]
Merge branch 'v0.10.19-release' into v0.10
Timothy J Fontaine [Tue, 24 Sep 2013 21:10:33 +0000 (14:10 -0700)]
2013.09.24, Version 0.10.19 (Stable)
* uv: Upgrade to v0.10.17
* npm: upgrade to 1.3.11
* readline: handle input starting with control chars (Eric Schrock)
* configure: add mips-float-abi (soft, hard) option (Andrei Sedoi)
* stream: objectMode transforms allow falsey values (isaacs)
* tls: prevent duplicate values returned from read (Nathan Rajlich)
* tls: NPN protocols are now local to connections (Fedor Indutny)
Timothy J Fontaine [Tue, 24 Sep 2013 20:45:57 +0000 (13:45 -0700)]
uv: Upgrade to v0.10.17
Eric Schrock [Mon, 20 May 2013 18:44:26 +0000 (14:44 -0400)]
readline: handle input starting with control chars
Handle control characters only when there is a single byte in the
stream, otherwise fall through to the standard multibyte handling.
Ben Noordhuis [Thu, 19 Sep 2013 10:27:06 +0000 (12:27 +0200)]
doc: document reserved status of SIGUSR1
Fixes #1212.
Nathan Rajlich [Mon, 16 Sep 2013 20:57:34 +0000 (13:57 -0700)]
doc: fix typos in the tls `NPNProtocols` option
Nathan Rajlich [Mon, 16 Sep 2013 20:57:00 +0000 (13:57 -0700)]
doc: specify the format of the `ca` tls option
Nathan Rajlich [Thu, 12 Sep 2013 01:18:10 +0000 (18:18 -0700)]
tls: don't push() incoming data when ondata is set
Otherwise the data ends up "on the wire" twice, and
switching between consuming the stream using `ondata`
vs. `read()` would yield duplicate data, which was bad.
Ben Noordhuis [Fri, 13 Sep 2013 12:46:06 +0000 (14:46 +0200)]
doc: fix blog link in blog posts and README
Apparently Joyent decommissioned joyeur.com but at least they saved the
contents of the blog. Update the links in the README and the nodejs.org
blog posts.
Hat tip to Eugen Pirogoff (@eugenpirogoff) for pointing it out.
Fixes #6224.
Fedor Indutny [Mon, 9 Sep 2013 14:18:05 +0000 (18:18 +0400)]
tls: fix setting NPN protocols
The NPN protocols was set on `require('tls')` or `global` object instead
of being a local property. This fact lead to strange persistence of NPN
protocols, and sometimes incorrect protocol selection (when no NPN
protocols were passed in client options).
fix #6168
Andrei Sedoi [Wed, 19 Jun 2013 11:48:36 +0000 (14:48 +0300)]
configure: add mips-float-abi (soft, hard) option
isaacs [Sat, 7 Sep 2013 19:31:04 +0000 (14:31 -0500)]
npm: upgrade to 1.3.11
isaacs [Fri, 6 Sep 2013 00:13:50 +0000 (17:13 -0700)]
npm: upgrade to v1.3.10
isaacs [Thu, 5 Sep 2013 20:11:51 +0000 (13:11 -0700)]
stream: objectMode transforms allow falsey values
Closes #6183
Bert Belder [Thu, 5 Sep 2013 14:49:47 +0000 (16:49 +0200)]
uv: upgrade to v0.10.16
Timothy J Fontaine [Wed, 4 Sep 2013 22:27:06 +0000 (15:27 -0700)]
blog: Post for v0.11.7
Timothy J Fontaine [Wed, 4 Sep 2013 18:25:19 +0000 (11:25 -0700)]
blog: Post for v0.10.18
Timothy J Fontaine [Wed, 4 Sep 2013 18:25:19 +0000 (11:25 -0700)]
Now working on 0.10.19
Timothy J Fontaine [Wed, 4 Sep 2013 18:25:04 +0000 (11:25 -0700)]
Merge branch 'v0.10.18-release' into v0.10
Timothy J Fontaine [Wed, 4 Sep 2013 17:51:53 +0000 (10:51 -0700)]
2013.09.04, Version 0.10.18 (Stable)
* uv: Upgrade to v0.10.15
* stream: Don't crash on unset _events property (isaacs)
* stream: Pass 'buffer' encoding with decoded writable chunks (isaacs)
Kyle Robinson Young [Tue, 3 Sep 2013 22:00:45 +0000 (15:00 -0700)]
doc: fix writable.write link
isaacs [Sun, 1 Sep 2013 00:58:17 +0000 (17:58 -0700)]
benchmark: Fix execArgv handling
Bug in 01f3b46 causes the same benchmark to be run repeatedly.
Not so useful for the compare scripts.
isaacs [Sat, 31 Aug 2013 05:39:06 +0000 (22:39 -0700)]
benchmark: Support passing v8 flags to benchmarks
The better to test --use-strict effects on performance.
(Spoiler: it has no measurable effect on performance.)
isaacs [Wed, 28 Aug 2013 16:35:36 +0000 (09:35 -0700)]
stream: check _events before _events.error
This fixes the regression introduced by 5458079, which breaks the
net/net-pipe benchmark script.
Closes #6145
isaacs [Wed, 28 Aug 2013 02:52:09 +0000 (19:52 -0700)]
doc: Adjust util stability index to 'API Frozen'
Closes #6087
isaacs [Tue, 27 Aug 2013 21:53:06 +0000 (14:53 -0700)]
stream: Pass 'buffer' encoding to decoded writables
Since the encoding is no longer relevant once it is decoded to a Buffer,
it is confusing and incorrect to pass the encoding as 'utf8' or whatever
in those cases.
Closes #6119
Bert Belder [Fri, 23 Aug 2013 17:02:14 +0000 (19:02 +0200)]
uv: update to v0.10.15
Timothy J Fontaine [Wed, 21 Aug 2013 23:59:15 +0000 (16:59 -0700)]
tools: script release steps after jenkins build
Timothy J Fontaine [Wed, 21 Aug 2013 23:55:27 +0000 (16:55 -0700)]
tools: script to report [un]stable build
Timothy J Fontaine [Wed, 21 Aug 2013 23:38:30 +0000 (16:38 -0700)]
blog: Post for v0.10.17
Timothy J Fontaine [Wed, 21 Aug 2013 23:37:43 +0000 (16:37 -0700)]
Now working on 0.10.18
Timothy J Fontaine [Wed, 21 Aug 2013 23:37:31 +0000 (16:37 -0700)]
Merge branch 'v0.10.17-release' into v0.10