platform/upstream/nodejs.git
10 years agonpm: Upgrade to v1.3.24
isaacs [Mon, 20 Jan 2014 05:13:20 +0000 (21:13 -0800)]
npm: Upgrade to v1.3.24

10 years agoblog: nodejs v0.12 roadmap update
Timothy J Fontaine [Thu, 16 Jan 2014 22:43:29 +0000 (14:43 -0800)]
blog: nodejs v0.12 roadmap update

10 years agogyp: fix `ninja` build on linux
Fedor Indutny [Thu, 16 Jan 2014 16:39:12 +0000 (16:39 +0000)]
gyp: fix `ninja` build on linux

fix #6679

10 years agodoc: clarify Windows signal sending emulation
Sam Roberts [Wed, 15 Jan 2014 22:40:58 +0000 (14:40 -0800)]
doc: clarify Windows signal sending emulation

10 years agochild_process: fix spawn() optional arguments
Sam Roberts [Thu, 16 Jan 2014 01:16:22 +0000 (17:16 -0800)]
child_process: fix spawn() optional arguments

Spawn's arguments were documented to be optional, as they are for the
other similar child_process APIs, but the code was missing. Result was
`child_process.spawn('node', {})` errored when calling slice() on an
Object, now it behaves as the documentation said it would.

10 years agodoc: describe child_process.fork() silent option
Sam Roberts [Thu, 16 Jan 2014 01:13:32 +0000 (17:13 -0800)]
doc: describe child_process.fork() silent option

10 years agodoc: child_process.execFile arguments are optional
Sam Roberts [Thu, 16 Jan 2014 01:12:20 +0000 (17:12 -0800)]
doc: child_process.execFile arguments are optional

10 years agodomains: exit() only affects active domains
Ryan Graham [Thu, 9 Jan 2014 05:19:31 +0000 (21:19 -0800)]
domains: exit() only affects active domains

domain.create().exit() should not clear the domain stack if the domain
instance does not exist within the stack.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
10 years agoblog: TJ is the new node core project lead
isaacs [Wed, 15 Jan 2014 17:03:45 +0000 (09:03 -0800)]
blog: TJ is the new node core project lead

10 years agogyp: fix build with python 2.6
Fedor Indutny [Mon, 13 Jan 2014 16:51:57 +0000 (16:51 +0000)]
gyp: fix build with python 2.6

fix #6859

10 years agodeps: update gyp to 1eae492b
Fedor Indutny [Mon, 13 Jan 2014 16:50:37 +0000 (16:50 +0000)]
deps: update gyp to 1eae492b

10 years agodoc: streams must be open to be passed to child
Sam Roberts [Thu, 9 Jan 2014 01:16:17 +0000 (17:16 -0800)]
doc: streams must be open to be passed to child

spawn stdio options can be a 'stream', but the following code
fails with "Incorrect value for stdio stream: [object Object]",
despite being a stream. The problem is the test isn't really
for a stream, its for an object with a numeric `.fd` property,
and streams do not have an fd until their async 'open' event
has occurred. This is reasonable, but was not documented.

    child_process.spawn('date', [], {stdio: [
      'ignore',
      fs.createWriteStream('out.txt',{flags:'a'}),
      'ignore']})

10 years agotest: close debug client in test-debugger-client
Alexis Campailla [Mon, 13 Jan 2014 21:16:25 +0000 (13:16 -0800)]
test: close debug client in test-debugger-client

Killing the debuggee without first closing the socket can result
in an ECONNRESET error.

10 years agosrc: return empty set on ENOSYS for interfaces
Timothy J Fontaine [Sun, 12 Jan 2014 18:04:21 +0000 (10:04 -0800)]
src: return empty set on ENOSYS for interfaces

If node was compiled with --no-ifaddrs to support older operating
systems, don't throw instead simply return an empty object

Fixes #6846

10 years agov8: backport codereview.chromium.org/11362182
svenpanne@chromium.org [Fri, 9 Nov 2012 11:30:05 +0000 (11:30 +0000)]
v8: backport codereview.chromium.org/11362182

Keep the number of descriptors below
DescriptorArray::kMaxNumberOfDescriptors even for accessors

Review URL: https://codereview.chromium.org/11362182

10 years agodoc: Fix argument typo in SimpleProtocol example
gluxon [Wed, 1 Jan 2014 21:26:14 +0000 (16:26 -0500)]
doc: Fix argument typo in SimpleProtocol example

10 years agosrc: OnFatalError handler must abort()
Timothy J Fontaine [Thu, 9 Jan 2014 21:33:51 +0000 (13:33 -0800)]
src: OnFatalError handler must abort()

We are in an unrecoverable state if v8 throws a FatalError, actually
ask the operating system to dump core in this case.

Fixes #6836

10 years agodoc: fix typo in cluster page
Lorenz Leutgeb [Mon, 6 Jan 2014 14:29:24 +0000 (15:29 +0100)]
doc: fix typo in cluster page

10 years agouv: Upgrade to v0.10.22
Timothy J Fontaine [Tue, 7 Jan 2014 22:05:24 +0000 (14:05 -0800)]
uv: Upgrade to v0.10.22

10 years agonpm: Upgrade to 1.3.23
isaacs [Tue, 7 Jan 2014 01:02:07 +0000 (17:02 -0800)]
npm: Upgrade to 1.3.23

10 years agostream: writes may return false but forget to emit drain
ayanamist [Fri, 3 Jan 2014 11:37:16 +0000 (19:37 +0800)]
stream: writes may return false but forget to emit drain

If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.

If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.

So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.

10 years agoblog: Post for v0.11.10
Timothy J Fontaine [Wed, 1 Jan 2014 00:24:58 +0000 (16:24 -0800)]
blog: Post for v0.11.10

10 years agodoc: document that `process.send` is synchronous
Maciej Małecki [Tue, 12 Nov 2013 10:28:44 +0000 (11:28 +0100)]
doc: document that `process.send` is synchronous

Ref #2598

10 years agodoc: clarify process on exit safe usage
Timothy J Fontaine [Tue, 31 Dec 2013 22:48:20 +0000 (14:48 -0800)]
doc: clarify process on exit safe usage

10 years agodocs: process.on('exit') receives exit code
Ron Korving [Wed, 6 Nov 2013 03:23:35 +0000 (12:23 +0900)]
docs: process.on('exit') receives exit code

The fact that the "exit" event passes the exit code as an argument
as omitted from the documentation. This adds the explanation and
augments the example code to show that.

10 years agotest: fix test-cluster-eaccess to work on windows
Timothy J Fontaine [Tue, 31 Dec 2013 19:57:13 +0000 (11:57 -0800)]
test: fix test-cluster-eaccess to work on windows

10 years agocluster: report more errors to workers
Fedor Indutny [Fri, 27 Dec 2013 17:20:52 +0000 (21:20 +0400)]
cluster: report more errors to workers

Some errors for listening and binding to a socket were not properly
delivered to workers.

fix #6767

10 years agodeps: update gyp to 828ce09
Fedor Indutny [Wed, 18 Dec 2013 14:58:47 +0000 (18:58 +0400)]
deps: update gyp to 828ce09

10 years agodoc: Fix missing backtick in debugger doc
Dav Glass [Wed, 24 Jul 2013 18:17:28 +0000 (13:17 -0500)]
doc: Fix missing backtick in debugger doc

10 years agobuild: add settings for VS 2013 to vcbuild.bat
Lev Gimelfarb [Fri, 27 Dec 2013 19:39:55 +0000 (14:39 -0500)]
build: add settings for VS 2013 to vcbuild.bat

Search for VS2013 compiler 1st, before falling back to older ones. This
allows compiling using the latest VS2013.

10 years agonpm: Upgrade to v1.3.22
isaacs [Thu, 26 Dec 2013 03:15:23 +0000 (19:15 -0800)]
npm: Upgrade to v1.3.22

10 years agobuild: install common.gypi along with headers
T.C. Hollingsworth [Fri, 20 Dec 2013 08:29:06 +0000 (01:29 -0700)]
build: install common.gypi along with headers

node-gyp requires this file

10 years agoblog: Post for v0.10.24
Timothy J Fontaine [Thu, 19 Dec 2013 17:05:14 +0000 (09:05 -0800)]
blog: Post for v0.10.24

10 years agoNow working on 0.10.25
Timothy J Fontaine [Thu, 19 Dec 2013 17:05:14 +0000 (09:05 -0800)]
Now working on 0.10.25

10 years agoMerge branch 'v0.10.24-release' into v0.10
Timothy J Fontaine [Thu, 19 Dec 2013 17:03:45 +0000 (09:03 -0800)]
Merge branch 'v0.10.24-release' into v0.10

10 years ago2013.12.18, Version 0.10.24 (Stable) v0.10.24
Timothy J Fontaine [Wed, 18 Dec 2013 23:49:45 +0000 (15:49 -0800)]
2013.12.18, Version 0.10.24 (Stable)

* uv: Upgrade to v0.10.21

* npm: upgrade to 1.3.21

* v8: backport fix for CVE-2013-{6639|6640}

* build: unix install node and dep library headers (Timothy J Fontaine)

* cluster, v8: fix --logfile=%p.log (Ben Noordhuis)

* module: only cache package main (Wyatt Preul)

10 years agouv: Upgrade to v0.10.21
Timothy J Fontaine [Wed, 18 Dec 2013 23:42:46 +0000 (15:42 -0800)]
uv: Upgrade to v0.10.21

10 years agocluster, v8: fix --logfile=%p.log
Ben Noordhuis [Tue, 17 Dec 2013 22:35:18 +0000 (23:35 +0100)]
cluster, v8: fix --logfile=%p.log

The %p is replaced with the current PID.  This used to work in node.js
v0.9.7 but it seems to have been lost somewhere along the way.

This commit makes the fix from 6b713b52 ("cluster: make --prof work for
workers") work again.  Without it, all log data ends up in a single
file and is unusable because the addresses are all wrong.

10 years agobuild: unix install node and dep library headers
Timothy J Fontaine [Thu, 10 Oct 2013 21:42:41 +0000 (14:42 -0700)]
build: unix install node and dep library headers

Restores functionality from v0.8 where module authors may not be
relying on gyp for building their modules.

10 years agonpm: upgrade to 1.3.21
isaacs [Tue, 17 Dec 2013 22:33:52 +0000 (14:33 -0800)]
npm: upgrade to 1.3.21

10 years agonpm: upgrade to 1.3.20
isaacs [Tue, 17 Dec 2013 17:04:19 +0000 (09:04 -0800)]
npm: upgrade to 1.3.20

The 1.3.19 release had a critical bug: any packages published with it
could not be installed, because the shasum would be incorrect.

Thankfully, 1.3.19 was published using 1.3.19, so could not be installed
by any users!  However, if it goes out as part of a Node.js release,
then obviously that would be a problem.

10 years agonpm: Upgrade to 1.3.19
isaacs [Tue, 17 Dec 2013 00:23:13 +0000 (16:23 -0800)]
npm: Upgrade to 1.3.19

10 years agov8: backport fix for CVE-2013-{6639|6640}
jkummerow@chromium.org [Fri, 13 Dec 2013 21:21:10 +0000 (14:21 -0700)]
v8: backport fix for CVE-2013-{6639|6640}

Quoting CVE-2013-6639:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    write) or possibly have unspecified other impact via JavaScript code
    that sets the value of an array element with a crafted index.

Quoting CVE-2013-6640:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    read) via JavaScript code that sets a variable to the value of an
    array element with a crafted index.

Like 6b92a7, this is unlikely to affect node.js because it only runs
local, trusted code.  However, if there exists some module somewhere
that populates an array index with remotely provided data this could
very well be used to crash a remote server running node.  Defense in
depth and all.

This is a backport of upstream commit r17801. Original commit log:

    Limit size of dehoistable array indices

    LOG=Y
    BUG=chromium:319835,chromium:319860
    R=dslomov@chromium.org

    Review URL: https://codereview.chromium.org/74113002

10 years agomodule: only cache package main
Wyatt Preul [Thu, 12 Dec 2013 16:16:48 +0000 (10:16 -0600)]
module: only cache package main

10 years agoblog: Post for v0.10.23
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:19 +0000 (22:11 -0800)]
blog: Post for v0.10.23

10 years agoNow working on 0.10.24
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:19 +0000 (22:11 -0800)]
Now working on 0.10.24

10 years agoMerge branch 'v0.10.23-release' into v0.10
Timothy J Fontaine [Thu, 12 Dec 2013 06:11:06 +0000 (22:11 -0800)]
Merge branch 'v0.10.23-release' into v0.10

10 years ago2013.12.12, Version 0.10.23 (Stable) v0.10.23
Timothy J Fontaine [Thu, 12 Dec 2013 05:20:06 +0000 (21:20 -0800)]
2013.12.12, Version 0.10.23 (Stable)

* uv: Upgrade to v0.10.20 (Timothy J Fontaine)

* npm: Upgrade to 1.3.17 (isaacs)

* gyp: update to 78b26f7 (Timothy J Fontaine)

* build: include postmortem symbols on linux (Timothy J Fontaine)

* crypto: Make Decipher._flush() emit errors. (Kai Groner)

* dgram: fix abort when getting `fd` of closed dgram (Fedor Indutny)

* events: do not accept NaN in setMaxListeners (Fedor Indutny)

* events: avoid calling `once` functions twice (Tim Wood)

* events: fix TypeError in removeAllListeners (Jeremy Martin)

* fs: report correct path when EEXIST (Fedor Indutny)

* process: enforce allowed signals for kill (Sam Roberts)

* tls: emit 'end' on .receivedShutdown (Fedor Indutny)

* tls: fix potential data corruption (Fedor Indutny)

* tls: handle `ssl.start()` errors appropriately (Fedor Indutny)

* tls: reset NPN callbacks after SNI (Fedor Indutny)

10 years agodoc: fix typos in node.1
Nicolas Kaiser [Sat, 7 Dec 2013 21:33:26 +0000 (22:33 +0100)]
doc: fix typos in node.1

10 years agodoc: mention `binary` as deafult for Hash strings
Mathias Bynens [Thu, 12 Dec 2013 04:39:22 +0000 (20:39 -0800)]
doc: mention `binary` as deafult for Hash strings

10 years agodoc: "finish" event is on the writable stream
Gabriel Farrell [Wed, 11 Dec 2013 15:14:10 +0000 (10:14 -0500)]
doc: "finish" event is on the writable stream

10 years agouv: Upgrade v0.10.20
Timothy J Fontaine [Thu, 12 Dec 2013 04:24:36 +0000 (20:24 -0800)]
uv: Upgrade v0.10.20

10 years agogyp: update to 78b26f7
Timothy J Fontaine [Thu, 12 Dec 2013 04:06:11 +0000 (20:06 -0800)]
gyp: update to 78b26f7

10 years agonpm: Upgrade to 1.3.17
isaacs [Wed, 11 Dec 2013 18:20:26 +0000 (10:20 -0800)]
npm: Upgrade to 1.3.17

10 years agofs: report correct path when EEXIST
Fedor Indutny [Sat, 16 Nov 2013 16:46:54 +0000 (20:46 +0400)]
fs: report correct path when EEXIST

When `symlink`, `link` or `rename` report EEXIST, ENOTEMPTY or EPERM -
the destination file name should be included in the error message,
instead of source file name.

fix #6510

10 years agotls: emit 'end' on .receivedShutdown
Fedor Indutny [Mon, 9 Dec 2013 15:47:55 +0000 (19:47 +0400)]
tls: emit 'end' on .receivedShutdown

NOTE: Also removed `.receivedShutdown` method of `Connection` it wasn't
documented anywhere, and was rewritten with `true` after receiving
`close_notify`.

fix #6638

10 years agobuild: only whole archive on static v8 builds
Timothy J Fontaine [Tue, 10 Dec 2013 18:10:34 +0000 (10:10 -0800)]
build: only whole archive on static v8 builds

Closes #6629

10 years agobuild: pass --no-parallel by default to gyp
Timothy J Fontaine [Sat, 7 Dec 2013 05:00:32 +0000 (21:00 -0800)]
build: pass --no-parallel by default to gyp

gyp by default now tries to process gyp files in parallel by using
python's multiprocessing module, but it has problems on oddball
platforms. We don't have many files or complex dependency chains that
would benefit from parallel processing so disable by deafult

fixes #6640

10 years agobuild: ./configure pass positional args to gyp
Timothy J Fontaine [Sat, 7 Dec 2013 04:58:00 +0000 (20:58 -0800)]
build: ./configure pass positional args to gyp

use `--` to specify the arguments you want to pass directly to gyp.

for example: `./configure -- --no-parallel -Dsome_define=foo`

fixes #6370

10 years agodoc: mention execArgv in setupMaster
Yazhong Liu [Fri, 6 Dec 2013 18:28:39 +0000 (02:28 +0800)]
doc: mention execArgv in setupMaster

10 years agodoc: document 'error' event for stream.Writable
Fedor Indutny [Fri, 6 Dec 2013 15:36:43 +0000 (19:36 +0400)]
doc: document 'error' event for stream.Writable

fix #5255

10 years agocrypto: Make Decipher._flush() emit errors.
Kai Groner [Thu, 18 Apr 2013 23:01:14 +0000 (19:01 -0400)]
crypto: Make Decipher._flush() emit errors.

When Decipher processes a stream using an incorrect key, the
DecipherFinal() method throws an unhandled exception at the end of the
stream.

10 years agoblog: bnoordhuis departure
isaacs [Wed, 4 Dec 2013 09:00:07 +0000 (01:00 -0800)]
blog: bnoordhuis departure

10 years agotls: fix pool usage race
Fedor Indutny [Fri, 29 Nov 2013 16:09:59 +0000 (20:09 +0400)]
tls: fix pool usage race

When calling `encOut` in loop, `maybeInitFinished()` may invoke
`clearOut`'s loop, leading to the writing of interleaved data
(encrypted and cleartext) into the one shared pool.

Move `maybeInitFinished()` out of the loop and add assertion for
future.

10 years agodoc: list execArgv option for child_process.fork()
Yazhong Liu [Mon, 2 Dec 2013 05:31:06 +0000 (13:31 +0800)]
doc: list execArgv option for child_process.fork()

10 years agodoc: change constant to consistent
Gabriel Falkenberg [Mon, 2 Dec 2013 10:18:37 +0000 (11:18 +0100)]
doc: change constant to consistent

10 years agoprocess: document kill(0), disallow kill(O_RDWR)
Sam Roberts [Fri, 11 Oct 2013 05:28:01 +0000 (22:28 -0700)]
process: document kill(0), disallow kill(O_RDWR)

The null signal test existed, but only tested the case where the target
process existed, not when it did not exist.

Also clarified that SIGUSR1 is reserved by Node.js only for receiveing,
its not at all reserved when sending a signal with kill().

kill(pid, 'O_RDWR'), or any other node constant, "worked". I fixed this
by also checking for 'SIG'. The same as done in the isSignal() function.
Now the signal names supported by process.kill() are the same as those
supported by process.on().

10 years agotls: reset NPN callbacks after SNI
Fedor Indutny [Fri, 22 Nov 2013 14:33:50 +0000 (18:33 +0400)]
tls: reset NPN callbacks after SNI

SNI callback selects a new SSL_CTX for the connection, which doesn't
have NPN callbacks set up.

10 years agobuild: include postmortem symbols on linux
Timothy J Fontaine [Mon, 2 Dec 2013 02:57:43 +0000 (18:57 -0800)]
build: include postmortem symbols on linux

Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.

10 years agodoc: net: fix typo in example code
Yazhong Liu [Fri, 29 Nov 2013 16:44:13 +0000 (00:44 +0800)]
doc: net: fix typo in example code

10 years agodoc: http: document ServerResponse 'finish' event
Michael Ridgway [Tue, 26 Nov 2013 20:49:28 +0000 (12:49 -0800)]
doc: http: document ServerResponse 'finish' event

10 years agodoc: http: properly document callback argument
Nikolai Vavilov [Thu, 28 Nov 2013 20:25:30 +0000 (22:25 +0200)]
doc: http: properly document callback argument

10 years agostream_wrap: don't call Number::New()
Ben Noordhuis [Wed, 27 Nov 2013 02:48:44 +0000 (03:48 +0100)]
stream_wrap: don't call Number::New()

Replace call to Number::New() with a call to Integer::NewFromUnsigned().

Profiling a Real World(TM) application with perf(1) suggests that the
conversion of its argument from integer to double is disproportionally
costly: over 60% of CPU cycles accountable to WriteStringImpl() are
attributable to the conversion.

After changing it to Integer::NewFromUnsigned(), WriteStringImpl()
has dropped from the 'most costly functions' top ten altogether.

10 years agoblog: npm outage postmortem
isaacs [Tue, 26 Nov 2013 15:27:59 +0000 (07:27 -0800)]
blog: npm outage postmortem

10 years agodoc: clarify child_process error behaviour
Linus Unnebäck [Thu, 21 Nov 2013 15:39:23 +0000 (16:39 +0100)]
doc: clarify child_process error behaviour

Clarify that an 'error' event may or may not be followed by an 'exit'
event and that it's not safe to make assumptions either way.

10 years agoevents: fix TypeError in removeAllListeners
Jeremy Martin [Fri, 22 Nov 2013 14:17:16 +0000 (09:17 -0500)]
events: fix TypeError in removeAllListeners

Check that `listeners` is actually an array before trying to manipulate it
because it won't be if no regular event listeners have been registered yet
but there are 'removeListener' event listeners.

10 years agoblog: Post for v0.11.9
Timothy J Fontaine [Thu, 21 Nov 2013 00:45:27 +0000 (16:45 -0800)]
blog: Post for v0.11.9

10 years agonpm: Upgrade to v1.3.15
isaacs [Wed, 20 Nov 2013 19:08:52 +0000 (11:08 -0800)]
npm: Upgrade to v1.3.15

10 years agocrypto: `randomBytes` is non-blocking
Fedor Indutny [Sat, 19 Oct 2013 10:38:58 +0000 (14:38 +0400)]
crypto: `randomBytes` is non-blocking

Add NOTE section in documentation, mentioning that `randomBytes` won't
block when entropy sources are drained.

fix #6372

10 years agoevents: do not accept NaN in setMaxListeners
Fedor Indutny [Tue, 19 Nov 2013 06:58:23 +0000 (10:58 +0400)]
events: do not accept NaN in setMaxListeners

10 years agonet: fix `new net.Socket` documentation
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

10 years agodgram: fix abort when getting `fd` of closed dgram
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

10 years agodoc: add nodejs.vn to community page
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.

10 years agodoc: sort community page links alphabetically
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.

10 years agotls: handle `ssl.start()` errors
Fedor Indutny [Wed, 13 Nov 2013 12:58:46 +0000 (16:58 +0400)]
tls: handle `ssl.start()` errors

10 years agoevents: don't call once twice
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.

10 years agoblog: Post for v0.10.22
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:45 +0000 (12:53 -0800)]
blog: Post for v0.10.22

10 years agoNow working on 0.10.23
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:45 +0000 (12:53 -0800)]
Now working on 0.10.23

10 years agoMerge branch 'v0.10.22-release' into v0.10
Timothy J Fontaine [Tue, 12 Nov 2013 20:53:28 +0000 (12:53 -0800)]
Merge branch 'v0.10.22-release' into v0.10

10 years ago2013.11.12, Version 0.10.22 (Stable) v0.10.22
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)

10 years agosrc: add HandleScope in HandleWrap::OnClose
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

10 years agouv: Upgrade to v0.10.19
Timothy J Fontaine [Tue, 12 Nov 2013 18:57:57 +0000 (10:57 -0800)]
uv: Upgrade to v0.10.19

10 years agov8: use correct timezone information on Solaris
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.

11 years agorepl: do not insert duplicates into completions
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.

11 years agogyp: update to bebdcea
Timothy J Fontaine [Sun, 10 Nov 2013 23:15:34 +0000 (15:15 -0800)]
gyp: update to bebdcea

11 years agov8: unbreak `make native` build
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’

11 years agotls: prevent stalls by using read(0)
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

11 years agonpm: Upgrade to 1.3.14
isaacs [Fri, 8 Nov 2013 21:41:21 +0000 (13:41 -0800)]
npm: Upgrade to 1.3.14

11 years agodoc: encoding is ignored if input is a Buffer
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

11 years agodoc: Correct and add several items
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.