tls_wrap: ignore ZERO_RETURN after close_notify

Do not call SSL_read() and ignore ZERO_RETURN if the connection was
shutdown and there could not be any reads.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/joyent/node/pull/8519
deps: update v8 to 3.28.73

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8476
deps: apply floating irhydra patch to v8

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8476
deps: fix postmortem-metadata generator in v8

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8476
deps: re-implement debugger-agent

Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
cluster: do not signal children in debug mode

Do not send signal to children if they are already in debug mode.
Node.js on Windows does not register signal handler, and thus calling
`process._debugProcess()` will throw an error.

Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
src, test: fixup after v8 update

Because of behavior change of some V8 APIs (they mostly became more
    strict), following modules needed to be fixed:

* crypto: duplicate prototype methods are not allowed anymore
* contextify: some TryCatch trickery, the binding was using it
incorrectly
* util: maximum call stack error is now crashing in a different place

Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
test: fix debug-signal-cluster after da update

The cluster children are hitting breakpoint at `cluster.onread` and
hanging on a Semaphore wait now. This prevents them from disconnecting
gracefully. Considering that the test is checking different thing, the
cluster children needs to be force killed from the grand parent process.

Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
crypto: createDiffieHellman throw for bad args

Previously crypto.createDiffieHellman() would fail silently when a bad
argument was passed for prime/prime_length. Now throws TypeError.

Fixes: https://github.com/joyent/node/issues/8480
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
doc: fix wording and punctuation in modules

[trev.norris@gmail.com: break lines at 80 characters]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
test: fix test-child-process-spawn-typeerror

You cannot spawn 'dir' on Windows because it's not an executable.  Also,
some people might have 'ls' on their path on Windows, so I changed
invalidCmd to something that's highly unlikely to exist.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
doc: correct createSecureContext

Remove incorrect stablity indication of tls.createSecureContext, and
format stablity indication of crypto.createCredentials.

Fixes: e50749 "doc: document `tls.createSecureContext`"
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
streams: make setDefaultEncoding() throw

PR-URL: https://github.com/joyent/node/pull/8529
Fixes: f04f3a0 "streams: set default encoding for writable streams"
[trev.norris@gmail.com: update tests to check if throws]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
deps: update v8 to 3.29.93.1
build: vcbuild fix "The input line is too long."

vcbuild.bat is calling vcvars.bat, which doesn't detect if the environment
has already been set. This causes repeated entries to be added to the PATH,
which after a few invocations will lead to an error:
The input line is too long.
v8_platform: provide default v8::Platform impl

Provide default Platform implementation for v8's purposes.
gyp: build with gnu++0x for the sake of new v8

The new v8 doesn't build on non gnu++0x, set it to a proper value for
all systems.
test: fix error messages after v8 upgrade
deps: fix postmortem-metadata generator in v8

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8476
src: remove unnecessary HandleScopes

API callback functions don't need to create a v8::HandleScope instance
because V8 already creates one in the JS->C++ adapter frame.

PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>