platform/upstream/nodejs.git
10 years agobenchmark: update to use new wrk
Timothy J Fontaine [Tue, 25 Feb 2014 19:05:54 +0000 (11:05 -0800)]
benchmark: update to use new wrk

10 years agowrk: compile on sunos
Timothy J Fontaine [Tue, 25 Feb 2014 04:59:39 +0000 (20:59 -0800)]
wrk: compile on sunos

10 years agowrk: build against our distributed ssl
Timothy J Fontaine [Tue, 25 Feb 2014 04:20:25 +0000 (20:20 -0800)]
wrk: build against our distributed ssl

10 years agotools: wrk update to 5b2fa06
Timothy J Fontaine [Tue, 25 Feb 2014 03:49:45 +0000 (19:49 -0800)]
tools: wrk update to 5b2fa06

10 years agotest: migrate pummel/keep-alive to wrk
Timothy J Fontaine [Tue, 25 Feb 2014 03:40:47 +0000 (19:40 -0800)]
test: migrate pummel/keep-alive to wrk

10 years agotest: pummel/*ci-reneg* handle EPIPE
Timothy J Fontaine [Tue, 25 Feb 2014 02:38:41 +0000 (18:38 -0800)]
test: pummel/*ci-reneg* handle EPIPE

When calling out to the openssl client handle the child closing and
returning EPIPE on writes

10 years agotest: internet/test-dns handle ESERVFAIL
Timothy J Fontaine [Tue, 25 Feb 2014 01:53:57 +0000 (17:53 -0800)]
test: internet/test-dns handle ESERVFAIL

ESERVFAIL is also an acceptable error code when failing to resolve a
domain.

10 years agotest: move pummel/test-fs-largefile to disabled
Timothy J Fontaine [Tue, 25 Feb 2014 01:03:28 +0000 (17:03 -0800)]
test: move pummel/test-fs-largefile to disabled

This test is particularly pathological, and requires a ton of time to
run, we need to find a better way to manage it but in general this path
is fairly safe these days.

10 years agotest: pummel/test-net-throttle adhere to streams
Timothy J Fontaine [Tue, 25 Feb 2014 00:55:35 +0000 (16:55 -0800)]
test: pummel/test-net-throttle adhere to streams

bufferSize is now a getter that shows all that has not been
acknowledged by the os, as well as in the buffer state. The test is
only looking to verify the js verified state.

10 years agotest: pummel fs-watch-file-slow handle spurious
Timothy J Fontaine [Tue, 25 Feb 2014 00:54:04 +0000 (16:54 -0800)]
test: pummel fs-watch-file-slow handle spurious

watch file will now generate an empty event when the file doesn't exist
initially

10 years agotest: remove next-tick-loops-quick
Timothy J Fontaine [Tue, 25 Feb 2014 00:34:01 +0000 (16:34 -0800)]
test: remove next-tick-loops-quick

Scheduling of next ticks from within the next tick handler will result
in a tight execution loop where a timer cannot break into.

This test was invalid

10 years agosrc: node.cc use isolate->ThrowException
Alexis Campailla [Mon, 24 Feb 2014 18:55:27 +0000 (10:55 -0800)]
src: node.cc use isolate->ThrowException

Environment doesn't have ThrowException, we meant isolate here.

Introduced in commit
75adde07f9a2de7f38a67bec72bd377d450bdb52.

10 years agotest: backoff client connection rates
Timothy J Fontaine [Mon, 24 Feb 2014 18:20:30 +0000 (10:20 -0800)]
test: backoff client connection rates

We were being very aggressive in our connection creations, resulting
in the pipeline flood detection to drop us. Relax how fast we're
creating these connections so the gc can run all its tests.

10 years agonode_internals: add missing env-inl.h include
Fedor Indutny [Fri, 21 Feb 2014 23:35:29 +0000 (03:35 +0400)]
node_internals: add missing env-inl.h include

10 years agosrc: remove `node_isolate` from source
Fedor Indutny [Fri, 21 Feb 2014 13:02:42 +0000 (17:02 +0400)]
src: remove `node_isolate` from source

fix #6899

10 years agodebugger: don't set the `repl.prompt` string
Nathan Rajlich [Fri, 21 Feb 2014 06:13:41 +0000 (22:13 -0800)]
debugger: don't set the `repl.prompt` string

It wasn't doing anything, and actually due to
3ae0b17c76f693dd2e68a46f78c7dc7f595b33c6, it was causing
the readline `prompt()` function to be overwritten
which throws an error in the REPL shortly after.

10 years agohttp: avoid duplicate keys in writeHead
David Björklund [Mon, 10 Feb 2014 18:56:09 +0000 (19:56 +0100)]
http: avoid duplicate keys in writeHead

Use setHeader in writeHead to avoid sending duplicate headers

Fixes #5036

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Wed, 19 Feb 2014 17:12:32 +0000 (09:12 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
AUTHORS
ChangeLog
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/build.mk
deps/uv/src/unix/linux-core.c
deps/uv/src/unix/stream.c
deps/uv/src/unix/sunos.c
deps/uv/src/version.c
src/node_version.h

10 years agotools: update to support separate website repo
Timothy J Fontaine [Wed, 19 Feb 2014 02:57:45 +0000 (18:57 -0800)]
tools: update to support separate website repo

10 years agoNow working on v0.10.27
Timothy J Fontaine [Wed, 19 Feb 2014 00:43:12 +0000 (16:43 -0800)]
Now working on v0.10.27

10 years agoMerge branch 'v0.10.26-release' into v0.10
Timothy J Fontaine [Wed, 19 Feb 2014 00:40:23 +0000 (16:40 -0800)]
Merge branch 'v0.10.26-release' into v0.10

10 years agobuild: readd missing installer resources v0.10.26
Timothy J Fontaine [Tue, 18 Feb 2014 23:34:29 +0000 (15:34 -0800)]
build: readd missing installer resources

This were accidentally moved during the website refactor

10 years ago2014.02.18, Version 0.10.26 (Stable)
Timothy J Fontaine [Tue, 18 Feb 2014 22:55:58 +0000 (14:55 -0800)]
2014.02.18, Version 0.10.26 (Stable)

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

* npm: upgrade to 1.4.3 (isaacs)

* v8: support compiling with VS2013 (Fedor Indutny)

* cares: backport TXT parsing fix (Fedor Indutny)

* crypto: throw on SignFinal failure (Fedor Indutny)

* crypto: update root certificates (Ben Noordhuis)

* debugger: Fix breakpoint not showing after restart (Farid Neshat)

* fs: make unwatchFile() insensitive to path (iamdoron)

* net: do not re-emit stream errors (Fedor Indutny)

* net: make Socket destroy() re-entrance safe (Jun Ma)

* net: reset `endEmitted` on reconnect (Fedor Indutny)

* node: do not close stdio implicitly (Fedor Indutny)

* zlib: avoid assertion in close (Fedor Indutny)

10 years agodocs: clarify process.stdin and old mode
Anton Khlynovskiy [Mon, 8 Jul 2013 17:09:44 +0000 (21:09 +0400)]
docs: clarify process.stdin and old mode

10 years agodoc: stdout blocking or non-blocking behaviour
Pedro Ballesteros [Mon, 17 Feb 2014 15:22:05 +0000 (16:22 +0100)]
doc: stdout blocking or non-blocking behaviour

Makes clear that the behaviour of stdout is blocking
in Linux/Unix even when they refer to pipes.

10 years agotest: make test-net-error-twice less racey
Timothy J Fontaine [Tue, 18 Feb 2014 21:09:41 +0000 (13:09 -0800)]
test: make test-net-error-twice less racey

10 years agouv: Upgrade to v0.10.25
Timothy J Fontaine [Tue, 18 Feb 2014 21:04:29 +0000 (13:04 -0800)]
uv: Upgrade to v0.10.25

10 years agodoc: mention objectMode for Writable streams
Raynos [Tue, 21 May 2013 21:10:34 +0000 (15:10 -0600)]
doc: mention objectMode for Writable streams

10 years agoos: networkInterfaces include scopeid for ipv6
Xidorn Quan [Tue, 18 Feb 2014 18:10:30 +0000 (10:10 -0800)]
os: networkInterfaces include scopeid for ipv6

10 years agochild_process: execFileSync stderr should inherit
Timothy J Fontaine [Tue, 18 Feb 2014 00:29:23 +0000 (16:29 -0800)]
child_process: execFileSync stderr should inherit

If you don't set your options.stdio for execSync and execFileSync
capture and write to stderr of the parent process by default.

Fixes #7110

10 years agonet: add localPort to connect options
Timothy J Fontaine [Tue, 18 Feb 2014 01:30:12 +0000 (17:30 -0800)]
net: add localPort to connect options

Expose localPort for binding to a specific port for outbound
connections.

If localAddress is not specified '0.0.0.0' is used for ip4 and '::'
for ip6 connections.

Fixes #7092

10 years agocrypto: allow custom generator for DiffieHellman
Brian White [Tue, 18 Feb 2014 01:57:08 +0000 (20:57 -0500)]
crypto: allow custom generator for DiffieHellman

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Tue, 18 Feb 2014 04:57:53 +0000 (20:57 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
src/node_zlib.cc

10 years agodebugger: Fix breakpoint not showing after restart
Farid Neshat [Sat, 15 Feb 2014 03:30:30 +0000 (11:30 +0800)]
debugger: Fix breakpoint not showing after restart

The reason this wasn't working was because after restart, when restoring
breakpoints the scripts wasn't loaded, so the breakpoint.script was
undefined. As a fix I added another check to use breakpoint.scriptReq
instead of breakpoint.script, which is the same except when the
breakpoint is a function.

fixes #7027

10 years agobuild: don't enable gc-sections
Timothy J Fontaine [Tue, 18 Feb 2014 04:29:30 +0000 (20:29 -0800)]
build: don't enable gc-sections

In some scenarios this will strip the DOF sections for DTrace, and in a
future world where we re-export all static libraries it would defeat
that purpose.

10 years agonpm: upgrade to 1.4.3
isaacs [Mon, 17 Feb 2014 04:43:16 +0000 (20:43 -0800)]
npm: upgrade to 1.4.3

10 years agolint: fix missing semi colon in repl
Timothy J Fontaine [Tue, 18 Feb 2014 00:17:20 +0000 (16:17 -0800)]
lint: fix missing semi colon in repl

10 years agoreadline: fix `line` event, if input emit 'end'
Yazhong Liu [Wed, 22 Jan 2014 01:53:23 +0000 (09:53 +0800)]
readline: fix `line` event, if input emit 'end'

If an input stream would emit `end` event, like
`fs.createReadStream`, then readline need to get the last line
correctly even though that line isnt ended with `\n`.

10 years agorepl: remove a unnecessary concatenation
Yazhong Liu [Mon, 17 Feb 2014 22:59:28 +0000 (14:59 -0800)]
repl: remove a unnecessary concatenation

10 years agorepl: REPLServer inherits from readline.Interface
Yazhong Liu [Sat, 15 Feb 2014 14:21:26 +0000 (22:21 +0800)]
repl: REPLServer inherits from readline.Interface

This exposes a setPrompt for and other readline features

10 years agocrypto: make NewSessionDoneCb public
Fedor Indutny [Mon, 17 Feb 2014 22:47:33 +0000 (02:47 +0400)]
crypto: make NewSessionDoneCb public

Generic friend classes do not work well with old compiler versions (and
MSVC).

10 years agozlib: introduce pending close state
Fedor Indutny [Thu, 13 Feb 2014 13:17:59 +0000 (17:17 +0400)]
zlib: introduce pending close state

zlib should not crash in `close()` if the write is still in progress.

fix #7101

10 years agotls: introduce asynchronous `newSession`
Fedor Indutny [Fri, 14 Feb 2014 13:01:34 +0000 (17:01 +0400)]
tls: introduce asynchronous `newSession`

fix #7105

10 years agodgram: pass the bytes sent to the send callback
Timothy J Fontaine [Sun, 16 Feb 2014 03:24:42 +0000 (19:24 -0800)]
dgram: pass the bytes sent to the send callback

Fixes #6953

10 years agov8: unbreak freebsd build
Ben Noordhuis [Sat, 23 Nov 2013 22:05:34 +0000 (23:05 +0100)]
v8: unbreak freebsd build

reland de8c0a5

Fixes #7020 and #7021

10 years agotest: fix tls-honorcipherorder slowness
Fedor Indutny [Sat, 15 Feb 2014 11:56:37 +0000 (15:56 +0400)]
test: fix tls-honorcipherorder slowness

End accepted stream to prevent client fd from hanging in FIN_WAIT_1
state. The 30 second delay was caused by default non-zero SO_LINGER.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Fri, 14 Feb 2014 19:05:27 +0000 (11:05 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

10 years agodoc: re-add node.1 man page
Timothy J Fontaine [Fri, 14 Feb 2014 19:01:49 +0000 (11:01 -0800)]
doc: re-add node.1 man page

The man page was accidentally removed in 37376de for the website
refactor, bring it back.

Fixes #7117

10 years agotest: give repl-timeout-throw more time to run
Alexis Campailla [Tue, 14 Jan 2014 09:32:07 +0000 (01:32 -0800)]
test: give repl-timeout-throw more time to run

Short timeout was causing the test to fail on Windows debug builds.

10 years agotest: increase timeout in readable stream test
Alexis Campailla [Tue, 14 Jan 2014 10:00:33 +0000 (02:00 -0800)]
test: increase timeout in readable stream test

A slightly higher timeout is needed for the test to pass on
Windows debug builds.

10 years agotest: fix assert in test-http-outgoing-finish
Alexis Campailla [Fri, 24 Jan 2014 15:15:15 +0000 (07:15 -0800)]
test: fix assert in test-http-outgoing-finish

Given the assert message, and the fact that endCb is always true
in the assert, I am pretty sure the test author was intending
to test for finishEvent, not endCb.

10 years agotest: fix connection reset in http test
Alexis Campailla [Fri, 24 Jan 2014 15:03:10 +0000 (07:03 -0800)]
test: fix connection reset in http test

In this test, an HTTP server was ending the response before
consuming all the data sent in the PUT request.

Ending the response would cause the socket to be destroyed,
and since there is some data still to be read, an ECONNRESET is
surfaced on the client side, event though the client has already
ended its side and even seen a 'finish' event.

See:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.2

While it is certainly admissible for the server to send a response
before consuming the entire request, it seems reasonable to
expect that the server would close the connection afterwards
and that the ECONNRESET would be raised on the client.

So I have changed the test to wait until the entire request has been
consumed before sending the response.

10 years agocluster: handle bind errors on Windows
Alexis Campailla [Thu, 16 Jan 2014 11:18:55 +0000 (03:18 -0800)]
cluster: handle bind errors on Windows

Before sending a socket from a cluster master to a worker,
we would call listen in UV but not handle the error.

I made createServerHandle call listen on Windows so we get a chance
the handle any bind/listen errors early.

This fix is 100% windows specific.
It fixes test-cluster-bind-twice and
test-cluster-shared-handle-bind-error on Windows.

10 years agotest: fix test-child-process-double-pipe
orangemocha@github.com [Mon, 10 Feb 2014 21:41:03 +0000 (22:41 +0100)]
test: fix test-child-process-double-pipe

On Windows, grep and sed were stripping the CR character out of CRLF.
Passing --binary will force them to preserve the CR.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Fri, 14 Feb 2014 00:40:38 +0000 (16:40 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
doc/blog/feature/streams2.md

10 years agonpm: Upgrade to v1.4.0
isaacs [Thu, 13 Feb 2014 02:16:32 +0000 (18:16 -0800)]
npm: Upgrade to v1.4.0

- Removes 'npm publish -f'
- Documentation
- Bug-fixes
- Update license etc to refer to npm, Inc. rather than @isaacs personally

10 years agowebsite: move website to joyent/node-website
Timothy J Fontaine [Thu, 13 Feb 2014 23:52:01 +0000 (15:52 -0800)]
website: move website to joyent/node-website

The website will no longer be living in the source repository instead
it can be found at http://github.com/joyent/node-website

10 years agodoc: changed timer id to object
Christian [Sun, 9 Feb 2014 09:37:55 +0000 (10:37 +0100)]
doc: changed timer id to object

fix #7074

10 years agochild_process: js bits for spawnSync/execSync
Timothy J Fontaine [Mon, 10 Feb 2014 20:40:48 +0000 (21:40 +0100)]
child_process: js bits for spawnSync/execSync

This implements the user-facing APIs that lets one run a child process
and block until it exits.

Logic shared with the async counterpart of each function was refactored
to enable code reuse.

Docs and tests are included.

10 years agobindings: add spawn_sync bindings
Bert Belder [Mon, 10 Feb 2014 20:22:06 +0000 (21:22 +0100)]
bindings: add spawn_sync bindings

This implements a nested event loop that makes it possible to control
a child process, while blocking the main loop until the process exits.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Mon, 10 Feb 2014 19:21:09 +0000 (11:21 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
lib/_stream_writable.js

10 years agostream: use `errorEmitted` from `_writableState`
Fedor Indutny [Sun, 9 Feb 2014 11:09:34 +0000 (15:09 +0400)]
stream: use `errorEmitted` from `_writableState`

10 years agonet: do not re-emit stream errors
Fedor Indutny [Sun, 9 Feb 2014 10:59:31 +0000 (14:59 +0400)]
net: do not re-emit stream errors

fix #7015

10 years agoprocess: allow changing `exitCode` in `on('exit')`
Fedor Indutny [Sun, 9 Feb 2014 10:40:57 +0000 (14:40 +0400)]
process: allow changing `exitCode` in `on('exit')`

fix #7081

10 years agodns: validate arguments in resolver
Kenan Sulayman [Fri, 7 Feb 2014 17:50:29 +0000 (18:50 +0100)]
dns: validate arguments in resolver

Mitigate C++-land assertion error, add test accordingly.

Fix #7070

10 years agodns: verify argument is valid function in resolve
Kenan Sulayman [Fri, 7 Feb 2014 17:18:27 +0000 (18:18 +0100)]
dns: verify argument is valid function in resolve

Don't use argument as callback if it's not a valid callback function.
Throw a valid exception instead explaining the issue.

Adds to #7070 ("DNS — Throw meaningful error(s)").

10 years agotest: fix test-http-pipeline-flood
Alexis Campailla [Thu, 6 Feb 2014 13:43:55 +0000 (05:43 -0800)]
test: fix test-http-pipeline-flood

The number of connections achieved by the test can vary by platform
and by machine. Lowering the acceptance threshold so that the
test passes on Windows.

10 years agoMerge remote-tracking branch 'upstream/v0.10'
Timothy J Fontaine [Sun, 9 Feb 2014 00:45:27 +0000 (16:45 -0800)]
Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
deps/v8/src/preparser.cc
deps/v8/src/win32-math.h
doc/api/http.markdown
src/node_buffer.h
src/node_crypto.cc
src/node_file.cc
src/node_http_parser.cc

10 years agosrc: refactor buffer bounds checking
Timothy J Fontaine [Wed, 5 Feb 2014 16:50:40 +0000 (08:50 -0800)]
src: refactor buffer bounds checking

Consolidate buffer bounds checking logic into Buffer namespace and use
it consistently throughout the source.

10 years agonpm: upgrade to 1.3.26
isaacs [Mon, 3 Feb 2014 04:24:09 +0000 (20:24 -0800)]
npm: upgrade to 1.3.26

10 years agodoc: fix diffieHellman.getGenerator() description
Brian White [Sat, 8 Feb 2014 18:19:04 +0000 (13:19 -0500)]
doc: fix diffieHellman.getGenerator() description

10 years agoRevert "dns: validate arguments in resolve"
Fedor Indutny [Fri, 7 Feb 2014 22:15:33 +0000 (02:15 +0400)]
Revert "dns: validate arguments in resolve"

This reverts commit 56e80a37e0df0d131d3a3ad6426d52f887ef8e94.

10 years agoRevert "dns: verify argument is valid function in resolve"
Fedor Indutny [Fri, 7 Feb 2014 22:15:29 +0000 (02:15 +0400)]
Revert "dns: verify argument is valid function in resolve"

This reverts commit 2ee86c624ecd6b9dbaad10989143325fc64778cd.

10 years agodns: verify argument is valid function in resolve
Kenan Sulayman [Fri, 7 Feb 2014 17:18:27 +0000 (18:18 +0100)]
dns: verify argument is valid function in resolve

Don't use argument as callback if it's not a valid callback function.
Throw a valid exception instead explaining the issue. Adds to #7070
("DNS — Throw meaningful error(s)").

10 years agodns: validate arguments in resolve
Kenan Sulayman [Fri, 7 Feb 2014 17:50:29 +0000 (18:50 +0100)]
dns: validate arguments in resolve

Mitigat  C++-land assertion error, add test accordingly.

fix #7070

10 years agoheaders: fix spelling error
Austin Moran [Sun, 2 Feb 2014 23:39:43 +0000 (18:39 -0500)]
headers: fix spelling error

10 years agowebsite: update cla email address
Timothy J Fontaine [Fri, 7 Feb 2014 19:17:23 +0000 (11:17 -0800)]
website: update cla email address

10 years agovm: don't copy Proxy object from parent context
Ben Noordhuis [Thu, 30 Jan 2014 12:21:07 +0000 (13:21 +0100)]
vm: don't copy Proxy object from parent context

Make vm.runInContext() and vm.runInNewContext() stop copying the Proxy
object from the parent context into the new context when --harmony or
--harmony_proxies is in effect because it overwrites the new context's
native Proxy object.

This commit also adds a regression test for Harmony symbols.  They work
okay in the current implementation and the test should ensure it stays
that way.

10 years agotest: don't compute knownGlobals lazily
Ben Noordhuis [Thu, 30 Jan 2014 12:02:58 +0000 (13:02 +0100)]
test: don't compute knownGlobals lazily

Conditional globals like 'gc' should only be recognized when --expose_gc
is set.  The global.gc feature check works only when done eagerly, else
it lets through a leaked variable called 'gc'.

10 years agoutil: show meaningful values for boxed primitives
Nathan Rajlich [Thu, 6 Feb 2014 02:09:23 +0000 (18:09 -0800)]
util: show meaningful values for boxed primitives

Before, `new String('foo')` would be inspected as `"{}"` which
is simply not very helpful. Now, a more meaningful
`"[String: 'foo']"` result will be returned from `util.inspect()`.

Boxed String, Boolean, and Number types are all supported.

Closes #7047

10 years agonode: do not print SyntaxError hints to stderr
Fedor Indutny [Wed, 5 Feb 2014 16:38:33 +0000 (20:38 +0400)]
node: do not print SyntaxError hints to stderr

Try embedding the ` ... ^` lines inside the `SyntaxError` (or any other
native error) object before giving up and printing them to the stderr.

fix #6920
fix #1310

10 years agofs: make unwatchFile() insensitive to path
iamdoron [Thu, 6 Feb 2014 06:29:58 +0000 (08:29 +0200)]
fs: make unwatchFile() insensitive to path

10 years agosrc: move AsyncListener from process to tracing
Trevor Norris [Wed, 5 Feb 2014 23:37:12 +0000 (15:37 -0800)]
src: move AsyncListener from process to tracing

The AsyncListener API has been moved into the "tracing" module in order
to keep the process object free from unnecessary clutter.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agoenv: add watched_providers for AsyncListener
Trevor Norris [Tue, 21 Jan 2014 19:32:55 +0000 (11:32 -0800)]
env: add watched_providers for AsyncListener

Now the second field in asyncFlags will tell if the provider is
currently being watched, or listened for.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agoasync_wrap: add provider types/pass to constructor
Trevor Norris [Mon, 20 Jan 2014 21:33:16 +0000 (13:33 -0800)]
async_wrap: add provider types/pass to constructor

These will be used to allow users to filter for which types of calls
they wish their callbacks to run.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agonode: make AsyncListenerInst field more explicit
Trevor Norris [Tue, 21 Jan 2014 20:36:28 +0000 (12:36 -0800)]
node: make AsyncListenerInst field more explicit

"flags" could mean one of many things, and multiple flag types could be
checked. So make the field more explicit on what type of flags are being
stored.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
10 years agodoc: document the tracing api
Timothy J Fontaine [Sun, 2 Feb 2014 21:59:11 +0000 (13:59 -0800)]
doc: document the tracing api

10 years agosrc: add v8.getHeapStatistics() function
Ben Noordhuis [Fri, 15 Nov 2013 21:19:31 +0000 (22:19 +0100)]
src: add v8.getHeapStatistics() function

Add a one-to-one binding to v8::GetHeapStatistics().  Returns info on
the current state of the JS heap, like total size and amount used.

10 years agosrc: add tracing.v8.on('gc') statistics hooks
Ben Noordhuis [Mon, 28 Oct 2013 13:57:47 +0000 (14:57 +0100)]
src: add tracing.v8.on('gc') statistics hooks

Add a new 'tracing' module with a v8 property that lets the user
register listeners for gc events.  The listeners are invoked after
every garbage collection cycle with 'before' and 'after' statistics.
Useful for monitoring tools that want to keep track of memory usage.

10 years agosrc: fix MakeCallback() handle leak
Ben Noordhuis [Sat, 16 Nov 2013 19:05:42 +0000 (20:05 +0100)]
src: fix MakeCallback() handle leak

Create a new HandleScope before looking up the object context with
v8::Object::CreationContext(), else we leak the Local<Context> into
the current HandleScope.

That's relatively harmless unless the HandleScope is long-lived and
MakeCallback() is called a lot.  In a scenario like that, we may end
up leaking a lot of memory.

What is unfortunate about this change is that we're trying hard to
eradicate the node_isolate global.  Longer term, we will probably have
to change the MakeCallback() prototype to one that requires an explicit
v8::Isolate* argument.

10 years agosrc: update MakeCallback() function prototype
Ben Noordhuis [Mon, 27 Jan 2014 02:58:16 +0000 (18:58 -0800)]
src: update MakeCallback() function prototype

Make it possible to invoke MakeCallback() on a v8::Value but only for
the variant that takes a v8::Function as the thing to call.

The const char* and v8::String variants still require a v8::Object
because the function to call is looked up as a property on the receiver,
but that only works when the receiver is an object, not a primitive.

10 years agotls: more session configuration options, methods
Fedor Indutny [Mon, 3 Feb 2014 21:32:13 +0000 (01:32 +0400)]
tls: more session configuration options, methods

Introduce `ticketKeys` server option, `session` client option,
`getSession()` and `getTLSTicket()` methods.

fix #7032

10 years agocontextify: handle infinite recursion errors
Fedor Indutny [Wed, 5 Feb 2014 09:46:00 +0000 (13:46 +0400)]
contextify: handle infinite recursion errors

Try to be consistent with v0.10 and emit "Maximum call stack size
reached", even if it happens when allocating context or doing other
stuff.

fix #7045

10 years agotest: fix test-tcp-wrap-listen
Alexis Campailla [Tue, 4 Feb 2014 17:16:44 +0000 (09:16 -0800)]
test: fix test-tcp-wrap-listen

If the call to writeBuffer completes asynchronously, we need to have
an oncomplete callback on the request object no matter what. The
writeQueueSize seems irrelvant to that regard.

Note that on Windows writeBuffer always completes asynchronously.

See related commit 9836a4eeda1e2d43aad0923f1f72b364792629bc

10 years agodoc: fix references to error keyword
Benjamin Waters [Tue, 4 Feb 2014 01:56:21 +0000 (20:56 -0500)]
doc: fix references to error keyword

References for err.signal and err.code should be error.signal and
error.code.

Fixes joyent/node#6862

10 years agoopenssl: fix keypress requirement in apps on win32
Alexis Campailla [Tue, 4 Feb 2014 01:23:15 +0000 (17:23 -0800)]
openssl: fix keypress requirement in apps on win32

Re-applying commit 153784b3489e2feb9d93a3a5eee5a4aa34f74e39, which
was overwritten by the update to openssl 1.0.1f.

Original source:

http://openssl.6102.n7.nabble.com/PATCH-s-client-Fix-keypress-requirement-with-redirected-input-on-Windows-td46787.html

10 years agodoc: fix after message in addAsyncListener example
Yuriy Nemtsov [Mon, 3 Feb 2014 20:53:29 +0000 (15:53 -0500)]
doc: fix after message in addAsyncListener example

10 years agocrypto: update root certificates
Ben Noordhuis [Sat, 9 Nov 2013 22:46:05 +0000 (23:46 +0100)]
crypto: update root certificates

Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl and update src/node_crypto.cc to make use of
the new format.

Fixes #6013.

10 years agozlib: separate sync/async methods
Fedor Indutny [Mon, 3 Feb 2014 07:55:47 +0000 (11:55 +0400)]
zlib: separate sync/async methods

10 years agotls: fix crash in SNICallback
Fedor Indutny [Fri, 31 Jan 2014 12:49:24 +0000 (16:49 +0400)]
tls: fix crash in SNICallback

`tls_wrap.cc` was crashing in an `Unwrap` call, when non
`SecureContext` object was passed to it. Check that the passed object
is a `SecureContext` instance before unwrapping it.

fix #7008