platform/upstream/nodejs.git
11 years agoprocess: invoke EventEmitter on `process`
Nathan Rajlich [Tue, 5 Mar 2013 20:17:48 +0000 (12:17 -0800)]
process: invoke EventEmitter on `process`

This properly sets the `_maxListeners` property, which
fixes the max listener warning. Closes #4924.

11 years agocluster: propagate bind errors
Ben Noordhuis [Thu, 9 Feb 2012 05:22:50 +0000 (06:22 +0100)]
cluster: propagate bind errors

This commit fixes a bug where the cluster module fails to propagate
EADDRINUSE errors.

When a worker starts a (net, http) server, it requests the listen socket
from its master who then creates and binds the socket.

Now, OS X and Windows don't always signal EADDRINUSE from bind() but
instead defer the error until a later syscall. libuv mimics this
behaviour to provide consistent behaviour across platforms but that
means the worker could end up with a socket that is not actually bound
to the requested addresss.

That's why the worker now checks if the socket is bound, raising
EADDRINUSE if that's not the case.

Fixes #2721.

11 years agodoc: add url.resolve() usage examples
Ben Noordhuis [Mon, 4 Mar 2013 19:54:34 +0000 (20:54 +0100)]
doc: add url.resolve() usage examples

Fixes #4913.

11 years agolink to LevelUP modules wiki page, not level-hooks
Rod Vagg [Mon, 4 Mar 2013 02:03:40 +0000 (13:03 +1100)]
link to LevelUP modules wiki page, not level-hooks

11 years agotest: make simple/test-dgram-pingpong respect PORT
Ben Noordhuis [Sat, 2 Mar 2013 22:04:05 +0000 (23:04 +0100)]
test: make simple/test-dgram-pingpong respect PORT

Don't use hard-coded port numbers, use common.PORT instead.

Should fix the occasional Jenkins failure; the builds run in parallel.

11 years agotest: optionally set common.PORT via env variable
Timothy J Fontaine [Tue, 26 Feb 2013 06:19:16 +0000 (22:19 -0800)]
test: optionally set common.PORT via env variable

This is a back-port of commit 17a8126 from the master branch.

11 years agocrypto: don't assert when calling Cipher#final() twice
Ben Noordhuis [Sat, 2 Mar 2013 01:09:14 +0000 (02:09 +0100)]
crypto: don't assert when calling Cipher#final() twice

Remove the assert() that triggered when Cipher#final() or
Decipher#final() was called twice.

Fixes #4886.

11 years agoblog: Post about v0.9.11
isaacs [Fri, 1 Mar 2013 19:22:07 +0000 (11:22 -0800)]
blog: Post about v0.9.11

11 years agohttp: use socket.once, not socket.on
Ben Noordhuis [Fri, 1 Mar 2013 12:01:53 +0000 (13:01 +0100)]
http: use socket.once, not socket.on

Register the 'close' event listener with .once(), not .on().

It doesn't matter in the grand scheme of things because the listener
doesn't keep references to any heavy-weight objects but using .once()
for a oneshot listener is something of a best practice.

11 years agodoc: remove note about close event
Eugene Girshov [Sat, 23 Feb 2013 16:59:05 +0000 (18:59 +0200)]
doc: remove note about close event

11 years agotest: fix tap output on windows
Timothy J Fontaine [Thu, 28 Feb 2013 19:46:59 +0000 (11:46 -0800)]
test: fix tap output on windows

Test output is always \n and not platform dependent

11 years agobuild, windows: disable SEH
Ben Noordhuis [Thu, 28 Feb 2013 15:35:17 +0000 (16:35 +0100)]
build, windows: disable SEH

Turn off safe exception handlers, they're incompatible with how
openssl is compiled / linked under MSVS 2012.

Addresses the following build error:

  openssl.lib(x86cpuid.obj) : error LNK2026: module unsafe for SAFESEH
  image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
  openssl.lib(x86.obj) : error LNK2026: module unsafe for SAFESEH
  image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
  # etc. etc.
  g:\jenkins\workspace\nodejs-oneoff\Release\node.exe : fatal error
  LNK1281: Unable to generate SAFESEH image.
  [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]

Fixes #4242.

11 years agodoc: update instructions on home page
Ben Noordhuis [Thu, 28 Feb 2013 15:30:45 +0000 (16:30 +0100)]
doc: update instructions on home page

Document how to run the example on the home page in more detail.

Apparently our Windows brethren are prone to double-clicking on the
binary instead of running it from the command line.

Fixes #4854.

11 years agoblog: Update with EINPROGRESS changelog item
isaacs [Mon, 25 Feb 2013 22:17:11 +0000 (14:17 -0800)]
blog: Update with EINPROGRESS changelog item

11 years agoChangeLog: Missed item about EINPROGRESS
isaacs [Mon, 25 Feb 2013 21:57:02 +0000 (13:57 -0800)]
ChangeLog: Missed item about EINPROGRESS

11 years agoblog: Post for v0.8.21
isaacs [Mon, 25 Feb 2013 21:56:46 +0000 (13:56 -0800)]
blog: Post for v0.8.21

11 years agoNow working on 0.8.22
isaacs [Mon, 25 Feb 2013 21:52:13 +0000 (13:52 -0800)]
Now working on 0.8.22

11 years agoMerge branch 'v0.8.21-release' into v0.8
isaacs [Mon, 25 Feb 2013 21:51:15 +0000 (13:51 -0800)]
Merge branch 'v0.8.21-release' into v0.8

11 years ago2013.02.25, Version 0.8.21 (Stable) v0.8.21
isaacs [Mon, 25 Feb 2013 18:58:10 +0000 (10:58 -0800)]
2013.02.25, Version 0.8.21 (Stable)

* http: Do not free the wrong parser on socket close (isaacs)

* http: Handle hangup writes more gently (isaacs)

* zlib: fix assert on bad input (Ben Noordhuis)

* test: add TAP output to the test runner (Timothy J Fontaine)

* unix: Handle EINPROGRESS from domain sockets (Ben Noordhuis)

11 years agouv: Upgrade to 86ae8b3c
isaacs [Mon, 25 Feb 2013 21:07:08 +0000 (13:07 -0800)]
uv: Upgrade to 86ae8b3c

11 years agohttp: Do not free the wrong parser on socket close
isaacs [Mon, 25 Feb 2013 17:06:44 +0000 (09:06 -0800)]
http: Do not free the wrong parser on socket close

This appears to fix #4673.  That bug is very hard to reproduce, so it's
hard to tell for certain, but this approach is more correct anyway.

Hat-tip: @dougwilson

11 years agohttp: Handle hangup writes more gently
isaacs [Fri, 22 Feb 2013 18:35:07 +0000 (10:35 -0800)]
http: Handle hangup writes more gently

11 years agodoc: add note about child process line buffering
Ben Noordhuis [Fri, 22 Feb 2013 00:19:39 +0000 (01:19 +0100)]
doc: add note about child process line buffering

Fixes #4808.

11 years agozlib: fix assert on bad input
Ben Noordhuis [Thu, 21 Feb 2013 22:58:55 +0000 (23:58 +0100)]
zlib: fix assert on bad input

The following test case occasionally triggered an assert because
write_in_progress_ didn't get cleared on error:

  $ cat test.js
  require('zlib').gunzip('BAM', console.log);
  setTimeout(gc, 10);

  $ while true; do node --expose-gc test.js || break; done
  { [Error: incorrect header check] errno: -3, code: 'Z_DATA_ERROR' }
  Assertion failed: (!write_in_progress_ && "write in progress"),
  function Clear, file ../src/node_zlib.cc, line 71.
  Abort trap: 6

Steps to avoid that:

* Initialize all primitive member fields in the constructor.
* Clear the write_in_progress_ member field in ZCtx::Error().
* Ref the ZCtx object as soon as write_in_progress_ is set to true.
  Before this commit, it could get GC'ed in the time between setting
  the field and the call to ctx->Ref().

Fixes #4783.

11 years agotest: add TAP output to the test runner
Timothy J Fontaine [Wed, 19 Dec 2012 04:10:17 +0000 (23:10 -0500)]
test: add TAP output to the test runner

This is a back-port of commit 14ed173 from the master branch.

11 years agoblog: v0.9.10
isaacs [Tue, 19 Feb 2013 22:01:23 +0000 (14:01 -0800)]
blog: v0.9.10

11 years agoblog: Release v0.8.20
isaacs [Fri, 15 Feb 2013 19:24:20 +0000 (11:24 -0800)]
blog: Release v0.8.20

11 years agoNow working on v0.8.21
isaacs [Fri, 15 Feb 2013 19:24:08 +0000 (11:24 -0800)]
Now working on v0.8.21

11 years agoMerge branch 'v0.8.20-release' into v0.8
isaacs [Fri, 15 Feb 2013 19:23:55 +0000 (11:23 -0800)]
Merge branch 'v0.8.20-release' into v0.8

11 years ago2013.02.15, Version 0.8.20 (Stable) v0.8.20
isaacs [Fri, 15 Feb 2013 17:57:32 +0000 (09:57 -0800)]
2013.02.15, Version 0.8.20 (Stable)

* npm: Upgrade to v1.2.11

* http: Do not let Agent hand out destroyed sockets (isaacs)

* http: Raise hangup error on destroyed socket write (isaacs)

* http: protect against response splitting attacks (Bert Belder)

11 years agonpm: Upgrade to v1.2.11
isaacs [Fri, 15 Feb 2013 18:49:16 +0000 (10:49 -0800)]
npm: Upgrade to v1.2.11

11 years agohttp: Do not let Agent hand out destroyed sockets
isaacs [Thu, 14 Feb 2013 23:37:12 +0000 (15:37 -0800)]
http: Do not let Agent hand out destroyed sockets

Fix #4373

11 years agohttp: Raise hangup error on destroyed socket write
isaacs [Thu, 14 Feb 2013 16:57:32 +0000 (08:57 -0800)]
http: Raise hangup error on destroyed socket write

Prior to v0.10, Node ignored ECONNRESET errors in many situations.
There *are* valid cases in which ECONNRESET should be ignored as a
normal part of the TCP dance, but in many others, it's a very relevant
signal that must be heeded with care.

Exacerbating this problem, if the OutgoingMessage does not have a
req.connection._handle, it assumes that it is in the process of
connecting, and thus buffers writes up in an array.

The problem happens when you reuse a socket between two requests, and it
is destroyed abruptly in between them.  The writes will be buffered,
because the socket has no handle, but it's not ever going to GET a
handle, because it's not connecting, it's destroyed.

The proper fix is to treat ECONNRESET correctly.  However, this is a
behavior/semantics change, and cannot land in a stable branch.

Fix #4775

11 years agodoc: clarify child_process.exec() stdio option
Ben Noordhuis [Thu, 14 Feb 2013 18:41:33 +0000 (19:41 +0100)]
doc: clarify child_process.exec() stdio option

It only works for stdin, not stdout/stderr, for obvious reasons.

11 years agodoc: add tools/ dir to CONTRIBUTING.md verboten list
Ben Noordhuis [Thu, 14 Feb 2013 11:42:54 +0000 (12:42 +0100)]
doc: add tools/ dir to CONTRIBUTING.md verboten list

11 years agodoc: add prompt to fix repl_test.js example
Dan Kohn [Tue, 12 Feb 2013 20:04:23 +0000 (15:04 -0500)]
doc: add prompt to fix repl_test.js example

Running repl.start without the prompt set produces this error:

repl.js:95
    throw new Error('An options Object, or a prompt String are required');
          ^
Error: An options Object, or a prompt String are required
    at new REPLServer (repl.js:95:11)
    at Object.exports.start (repl.js:321:14)
    at Object.<anonymous> (/Users/dan/Dropbox/Documents/dev/nextgen/repl_test.js:5:6)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

11 years agoblog: Forgot slug on peer-dependencies article
isaacs [Wed, 13 Feb 2013 00:30:25 +0000 (16:30 -0800)]
blog: Forgot slug on peer-dependencies article

11 years agoblog: Peer Dependencies article
isaacs [Tue, 12 Feb 2013 20:03:52 +0000 (12:03 -0800)]
blog: Peer Dependencies article

Thanks, @domenic

11 years agotest: disable simple/test-dgram-send-error
Ben Noordhuis [Fri, 8 Feb 2013 00:33:29 +0000 (01:33 +0100)]
test: disable simple/test-dgram-send-error

It's not a good citizen, it spams random IP addresses with UDP packets.

Fixes #4730.

11 years agoblog: v0.9.9 is unstable, not stable
isaacs [Thu, 7 Feb 2013 18:35:35 +0000 (10:35 -0800)]
blog: v0.9.9 is unstable, not stable

11 years agoblog: v0.9.9
isaacs [Thu, 7 Feb 2013 18:34:45 +0000 (10:34 -0800)]
blog: v0.9.9

11 years agohttp: protect against response splitting attacks
Bert Belder [Thu, 7 Feb 2013 13:39:47 +0000 (14:39 +0100)]
http: protect against response splitting attacks

This patch is a back-port of 3c293ba.
Closes #4696

11 years agoblog: v0.8.19 release
isaacs [Wed, 6 Feb 2013 17:48:11 +0000 (09:48 -0800)]
blog: v0.8.19 release

11 years agoNow working on 0.8.20
isaacs [Wed, 6 Feb 2013 17:46:47 +0000 (09:46 -0800)]
Now working on 0.8.20

11 years agoMerge branch 'v0.8.19-release' into v0.8
isaacs [Wed, 6 Feb 2013 17:44:38 +0000 (09:44 -0800)]
Merge branch 'v0.8.19-release' into v0.8

11 years ago2013.02.06, Version 0.8.19 (Stable) v0.8.19
isaacs [Wed, 6 Feb 2013 16:46:14 +0000 (08:46 -0800)]
2013.02.06, Version 0.8.19 (Stable)

* npm: Upgrade to v1.2.10

* zlib: pass object size hint to V8 (Ben Noordhuis)

* zlib: reduce memory consumption, release early (Ben Noordhuis)

* buffer: slow buffer copy compatibility fix (Trevor Norris)

* zlib: don't assert on malformed dictionary (Ben Noordhuis)

* zlib: don't assert on missing dictionary (Ben Noordhuis)

* windows: better ipv6 support (Bert Belder)

* windows: add error mappings related to unsupported protocols (Bert Belder)

* windows: map ERROR_DIRECTORY to UV_ENOENT (Bert Belder)

11 years agonpm: Upgrade to v1.2.10
isaacs [Wed, 6 Feb 2013 16:39:27 +0000 (08:39 -0800)]
npm: Upgrade to v1.2.10

11 years agoblog: remove dangling symlink
Ben Noordhuis [Tue, 5 Feb 2013 21:34:49 +0000 (22:34 +0100)]
blog: remove dangling symlink

Fixes #4716.

11 years agozlib: pass object size hint to V8
Ben Noordhuis [Tue, 30 Oct 2012 13:40:50 +0000 (14:40 +0100)]
zlib: pass object size hint to V8

Inform V8 that the zlib context object is tied to a large off-heap buffer.

This makes the GC run more often (in theory) and improves the accuracy of
--trace_external_memory.

11 years agozlib: reduce memory consumption, release early
Ben Noordhuis [Tue, 30 Oct 2012 00:19:01 +0000 (01:19 +0100)]
zlib: reduce memory consumption, release early

In zlibBuffer(), don't wait for the garbage collector to reclaim the zlib memory
but release it manually. Reduces memory consumption by a factor of 10 or more
with some workloads.

Test case:

  function f() {
    require('zlib').deflate('xxx', g);
  }
  function g() {
    setTimeout(f, 5);
  }
  f();

Observe RSS memory usage with and without this commit. After 10,000 iterations,
RSS stabilizes at ~35 MB with this commit. Without, RSS is over 300 MB and keeps
growing.

Cause: whenever the JS object heap hits the high-water mark, the V8 GC sweeps
it clean, then tries to grow it in order to avoid more sweeps in the near
future. Rule of thumb: the bigger the JS heap, the lazier the GC can be.

A side effect of a bigger heap is that objects now live longer. This is harmless
in general but it affects zlib context objects because those are tied to large
buffers that live outside the JS heap, on the order of 16K per context object.

Ergo, don't wait for the GC to reclaim the memory - it may take a long time.

Fixes #4172.

11 years agodoc: don't suggest to reuse net.Socket objects
Ben Noordhuis [Tue, 5 Feb 2013 11:47:23 +0000 (12:47 +0100)]
doc: don't suggest to reuse net.Socket objects

Using Socket.prototype.connect() to reconnect an existing Socket object
is not reliable. Users should just create a new Socket object.

See #4698.

11 years agoblog: Correct shasums for v0.9.8 release
isaacs [Sat, 2 Feb 2013 19:14:42 +0000 (11:14 -0800)]
blog: Correct shasums for v0.9.8 release

11 years agodeps: upgrade libuv to 034ea31
Bert Belder [Wed, 30 Jan 2013 19:30:10 +0000 (20:30 +0100)]
deps: upgrade libuv to 034ea31

11 years agodoc: fix typo in cluster module documentation
Rick Yakubowski [Sat, 26 Jan 2013 23:07:09 +0000 (18:07 -0500)]
doc: fix typo in cluster module documentation

Fix a small typo in the cluster.settings documentation.

11 years agobuffer: slow buffer copy compatibility fix
Trevor Norris [Tue, 22 Jan 2013 17:09:12 +0000 (09:09 -0800)]
buffer: slow buffer copy compatibility fix

Fix issue where SlowBuffers couldn't be passed as target to Buffer
copy().

Also included checks to see if Argument parameters are defined before
assigning their values. This offered ~3x's performance gain.

Backport of 16bbecc from master branch. Closes #4633.

11 years agobenchmark: Port http.sh from master
isaacs [Fri, 25 Jan 2013 01:23:11 +0000 (17:23 -0800)]
benchmark: Port http.sh from master

11 years agodoc: fix typo in crypto Hash.digest() note
Jacob Gable [Wed, 23 Jan 2013 22:38:09 +0000 (16:38 -0600)]
doc: fix typo in crypto Hash.digest() note

Added the word 'has' to the sentence.
Closes #4652.

11 years agoblog: Post for v0.9.8
isaacs [Thu, 24 Jan 2013 18:32:35 +0000 (10:32 -0800)]
blog: Post for v0.9.8

11 years agodoc: document PYTHON env var in README
Ben Noordhuis [Tue, 22 Jan 2013 12:53:49 +0000 (13:53 +0100)]
doc: document PYTHON env var in README

11 years agozlib: don't assert on malformed dictionary
Ben Noordhuis [Tue, 22 Jan 2013 12:23:46 +0000 (13:23 +0100)]
zlib: don't assert on malformed dictionary

Handle Z_DATA_ERROR errors from inflateSetDictionary() gracefully.
Fixes the following assertion:

  node: ../src/node_zlib.cc:167: static void node::ZCtx::Process
  (uv_work_t*): Assertion `ctx->err_ == 0 && "Failed to set
  dictionary"' failed.
  Aborted (core dumped)

Fixes #4632.

11 years agozlib: don't assert on missing dictionary
Ben Noordhuis [Tue, 22 Jan 2013 11:58:15 +0000 (12:58 +0100)]
zlib: don't assert on missing dictionary

Handle Z_NEED_DICT errors graciously. Fixes the following assertion:

  node: ../src/node_zlib.cc:161: static void node::ZCtx::Process
  (uv_work_t*): Assertion`ctx->dictionary_ != __null && "Stream
  has no dictionary"' failed.
  Aborted (core dumped)

Fixes #4632.

11 years agoblog: Post for v0.8.18 release
isaacs [Fri, 18 Jan 2013 20:54:22 +0000 (12:54 -0800)]
blog: Post for v0.8.18 release

11 years agoNow working on 0.8.19
isaacs [Fri, 18 Jan 2013 20:51:34 +0000 (12:51 -0800)]
Now working on 0.8.19

11 years agoMerge branch 'v0.8.18-release' into v0.8
isaacs [Fri, 18 Jan 2013 20:51:14 +0000 (12:51 -0800)]
Merge branch 'v0.8.18-release' into v0.8

11 years ago2013.01.18, Version 0.8.18 (Stable) v0.8.18
isaacs [Fri, 18 Jan 2013 20:15:41 +0000 (12:15 -0800)]
2013.01.18, Version 0.8.18 (Stable)

* npm: Upgrade to v1.2.2

* dns: make error message match errno (Dan Milon)

* tls: follow RFC6125 more stricly (Fedor Indutny)

* buffer: reject negative SlowBuffer offsets (Ben Noordhuis)

* install: add simplejson fallback (Chris Dent)

* http: fix "Cannot call method 'emit' of null" (Ben Noordhuis)

11 years agonpm: Upgrade to v1.2.2
isaacs [Fri, 18 Jan 2013 20:12:07 +0000 (12:12 -0800)]
npm: Upgrade to v1.2.2

11 years agoblog: Post for v0.9.7 release
isaacs [Fri, 18 Jan 2013 19:48:21 +0000 (11:48 -0800)]
blog: Post for v0.9.7 release

11 years agodns: make error message match errno
Dan Milon [Fri, 18 Jan 2013 00:40:48 +0000 (02:40 +0200)]
dns: make error message match errno

11 years agotls: follow RFC6125 more stricly
Fedor Indutny [Mon, 14 Jan 2013 23:29:46 +0000 (03:29 +0400)]
tls: follow RFC6125 more stricly

* Allow wildcards only in left-most part of hostname identifier.
* Do not match CN if altnames are present

11 years agoRevert "Revert "tls: allow wildcards in common name""
Fedor Indutny [Thu, 17 Jan 2013 23:47:47 +0000 (03:47 +0400)]
Revert "Revert "tls: allow wildcards in common name""

This reverts commit 30e237041d5cd7c39e33a9382c96f109be23337d.

Works properly with b4b750b

11 years agoRevert "tls: allow wildcards in common name"
Ben Noordhuis [Thu, 17 Jan 2013 15:32:00 +0000 (16:32 +0100)]
Revert "tls: allow wildcards in common name"

This reverts commit 45024e7b7551eca7796e16fe453b2cbaee94b916.

It's making test/simple/test-tls-check-server-identity.js fail:

  AssertionError: Test#4 failed: { host: 'b.a.com',
    cert: { subject: { CN: '*.a.com' } },
    result: false }
      at <omitted>/test/simple/test-tls-check-server-identity.js:201:10

11 years agotest: add cluster 'bind twice' test
Ben Noordhuis [Thu, 9 Feb 2012 05:22:50 +0000 (06:22 +0100)]
test: add cluster 'bind twice' test

This test starts two clustered HTTP servers on the same port.
It expects the first cluster to succeed and the second cluster
to fail with EADDRINUSE.

Reapplies commit cacd3ae, accidentally reverted in a2851b6.

11 years agobuffer: reject negative SlowBuffer offsets
Ben Noordhuis [Thu, 17 Jan 2013 00:10:15 +0000 (01:10 +0100)]
buffer: reject negative SlowBuffer offsets

Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
the creation of buffers that point to arbitrary addresses.

Reported by Trevor Norris.

11 years agoinstall: add simplejson fallback
Chris Dent [Mon, 14 Jan 2013 22:24:30 +0000 (22:24 +0000)]
install: add simplejson fallback

Make tools/install.py work with python 2.5

2.5 is still fairly widespread and does not include a json lib as
standard. Most python folk will have simplejson if they are in that
boat.

In general it seems a bit tricky to solve this perfectly...

11 years agobuffer: zero-length buffers shouldn't be slab-backed
Bert Belder [Sat, 5 Jan 2013 21:14:50 +0000 (22:14 +0100)]
buffer: zero-length buffers shouldn't be slab-backed

11 years agotls: allow wildcards in common name
Fedor Indutny [Mon, 14 Jan 2013 17:09:35 +0000 (21:09 +0400)]
tls: allow wildcards in common name

see #4592

11 years agohttp: fix "Cannot call method 'emit' of null"
Ben Noordhuis [Mon, 14 Jan 2013 15:35:03 +0000 (16:35 +0100)]
http: fix "Cannot call method 'emit' of null"

Fix the following exception:

  http.js:974
    this._httpMessage.emit('close');
                      ^
  TypeError: Cannot call method 'emit' of null
      at Socket.onServerResponseClose (http.js:974:21)
      at Socket.EventEmitter.emit (events.js:124:20)
      at net.js:421:10
      at process._tickCallback (node.js:386:13)
      at process._makeCallback (node.js:304:15)

Fixes #4586.

11 years agoblog: release v0.9.6
isaacs [Fri, 11 Jan 2013 19:24:37 +0000 (11:24 -0800)]
blog: release v0.9.6

11 years agomake binary: allow custom config flags
Nathan Rajlich [Fri, 11 Jan 2013 00:59:09 +0000 (16:59 -0800)]
make binary: allow custom config flags

For example, to cross-compile from my OS X laptop for Raspberry Pi, you would
do something like:

  $ make binary BINARYNAME=node-v`python tools/getnodeversion.py`-linux-arm-pi \
      DESTCPU=arm CONFIG_FLAGS="--dest-os=linux"

11 years agoblog, changelog: 0.8.17 was released in 2013, not 2012
isaacs [Thu, 10 Jan 2013 15:47:09 +0000 (07:47 -0800)]
blog, changelog: 0.8.17 was released in 2013, not 2012

11 years agoblog: Correct shasums for v0.8.17
isaacs [Thu, 10 Jan 2013 03:05:37 +0000 (19:05 -0800)]
blog: Correct shasums for v0.8.17

11 years agoblog: Add security notice to v0.8.17 post
isaacs [Thu, 10 Jan 2013 01:21:16 +0000 (17:21 -0800)]
blog: Add security notice to v0.8.17 post

11 years agoblog: Post about v0.8.17
isaacs [Thu, 10 Jan 2013 01:08:24 +0000 (17:08 -0800)]
blog: Post about v0.8.17

11 years agoNow working on 0.8.18
isaacs [Thu, 10 Jan 2013 01:07:33 +0000 (17:07 -0800)]
Now working on 0.8.18

11 years agoMerge branch 'v0.8.17-release' into v0.8
isaacs [Thu, 10 Jan 2013 01:07:21 +0000 (17:07 -0800)]
Merge branch 'v0.8.17-release' into v0.8

11 years ago2012.01.09, Version 0.8.17 (Stable) v0.8.17
isaacs [Thu, 10 Jan 2013 00:04:21 +0000 (16:04 -0800)]
2012.01.09, Version 0.8.17 (Stable)

* npm: Upgrade to v1.2.0
  - peerDependencies (Domenic Denicola)
  - node-gyp v0.8.2 (Nathan Rajlich)
  - Faster installs from github user/project shorthands (Nathan Zadoks)

* typed arrays: fix 32 bit size/index overflow (Ben Noordhuis)

* http: Improve performance of single-packet responses (Ben Noordhuis)

* install: fix openbsd man page location (Ben Noordhuis)

* http: bubble up parser errors to ClientRequest (Brian White)

11 years agotyped arrays: fix 32 bit size/index overflow
Ben Noordhuis [Wed, 9 Jan 2013 23:39:44 +0000 (00:39 +0100)]
typed arrays: fix 32 bit size/index overflow

Fix an out-of-bound read/write bug due to integer wrapping. Reported by
Dean McNamee.

11 years agonpm: Upgrade to v1.2.0
isaacs [Wed, 9 Jan 2013 23:21:30 +0000 (15:21 -0800)]
npm: Upgrade to v1.2.0

11 years agoobject_wrap: add missing HandleScope
Fedor Indutny [Fri, 4 Jan 2013 12:37:38 +0000 (16:37 +0400)]
object_wrap: add missing HandleScope

by Sven Panne's suggestion, see [0] for details.

[0]: https://code.google.com/p/v8/issues/detail?id=2468

11 years agodgram: don't assert on send('string')
Ben Noordhuis [Tue, 8 Jan 2013 03:27:34 +0000 (04:27 +0100)]
dgram: don't assert on send('string')

Raise a TypeError when the argument to send() or sendto() is anything
but a Buffer.

Fixes the following assertion:

  $ node -e 'require("dgram").createSocket("udp4").send("BAM")'
  node: ../../src/udp_wrap.cc:220: static v8::Handle<v8::Value>
  node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
  `Buffer::HasInstance(args[0])' failed.
  Aborted (core dumped)

Fixes #4496.

11 years agodoc: improve example of process.hrtime()
Johannes Ewald [Fri, 4 Jan 2013 18:07:40 +0000 (19:07 +0100)]
doc: improve example of process.hrtime()

The example clarifies now that diff[0] * 1000000000 + diff[1] equals
the result in nanoseconds.

11 years agoos: change CPU time from Integer to Number
Tim Bradshaw [Thu, 20 Dec 2012 22:29:45 +0000 (22:29 +0000)]
os: change CPU time from Integer to Number

CPU time values must be Numbers, not Integers, as they can be too large
for Integers on 32 bit platforms.

11 years agodoc: add CONTRIBUTING.md
Ben Noordhuis [Sun, 30 Dec 2012 23:36:47 +0000 (00:36 +0100)]
doc: add CONTRIBUTING.md

11 years agoblog: Post for v0.9.5
isaacs [Sun, 30 Dec 2012 01:26:32 +0000 (17:26 -0800)]
blog: Post for v0.9.5

11 years agodeps: upgrade libuv to 4997738
Ben Noordhuis [Sat, 29 Dec 2012 16:34:41 +0000 (17:34 +0100)]
deps: upgrade libuv to 4997738

11 years agobuild: allow to specify custom tags
Maciej Małecki [Fri, 21 Dec 2012 01:56:47 +0000 (02:56 +0100)]
build: allow to specify custom tags

When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.

Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).

11 years agolint
isaacs [Wed, 26 Dec 2012 23:26:53 +0000 (15:26 -0800)]
lint

11 years agoblog: Post about v0.9.4
isaacs [Fri, 21 Dec 2012 20:37:39 +0000 (12:37 -0800)]
blog: Post about v0.9.4

11 years agonpm: upgrade to 1.1.70
isaacs [Fri, 21 Dec 2012 16:42:29 +0000 (16:42 +0000)]
npm: upgrade to 1.1.70

11 years agoblog: More streams2 wordsmithing
isaacs [Fri, 21 Dec 2012 00:46:40 +0000 (00:46 +0000)]
blog: More streams2 wordsmithing