Commit Graph

9733 Commits (67dfcd55be6fb8750bc9c9d2c858ced85fe23cec)

Author SHA1 Message Date
Alexis Campailla 0f10dd4cb2 test: increase timeout in readable stream test
A slightly higher timeout is needed for the test to pass on
Windows debug builds.
2014-02-13 16:49:08 -08:00
Alexis Campailla 8f94ef46b7 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.
2014-02-13 16:46:04 -08:00
Alexis Campailla 527cabefcb 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.
2014-02-13 16:46:04 -08:00
Alexis Campailla 3da36fe00e 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.
2014-02-13 16:41:59 -08:00
orangemocha@github.com e7a03f1c62 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.
2014-02-13 16:41:31 -08:00
Timothy J Fontaine 6b4f72b7ac Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	doc/blog/feature/streams2.md
2014-02-13 16:40:38 -08:00
isaacs 55543d3c45 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
2014-02-13 16:35:41 -08:00
Timothy J Fontaine 37376debe5 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
2014-02-13 15:54:07 -08:00
Christian b222374b07 doc: changed timer id to object
fix #7074
2014-02-13 02:18:10 +04:00
Timothy J Fontaine e8df267674 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.
2014-02-10 13:35:37 -08:00
Bert Belder fa4eb47caa 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.
2014-02-10 21:22:06 +01:00
Timothy J Fontaine d58c206862 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/_stream_writable.js
2014-02-10 11:21:09 -08:00
Fedor Indutny e2a1d9a9ac stream: use `errorEmitted` from `_writableState` 2014-02-10 11:06:03 -08:00
Fedor Indutny dee5270a6c net: do not re-emit stream errors
fix #7015
2014-02-10 10:59:52 -08:00
Fedor Indutny c0d81f9099 process: allow changing `exitCode` in `on('exit')`
fix #7081
2014-02-09 15:10:38 +04:00
Kenan Sulayman 28dbc96a6c dns: validate arguments in resolver
Mitigate C++-land assertion error, add test accordingly.

Fix #7070
2014-02-09 13:38:23 +04:00
Kenan Sulayman abe4c34c86 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)").
2014-02-09 13:37:50 +04:00
Alexis Campailla e3ec2f7dab 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.
2014-02-09 13:33:47 +04:00
Timothy J Fontaine eadb4f5606 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
2014-02-08 16:45:27 -08:00
Timothy J Fontaine 5c832e44c3 src: refactor buffer bounds checking
Consolidate buffer bounds checking logic into Buffer namespace and use
it consistently throughout the source.
2014-02-08 15:31:27 -08:00
isaacs 2e8bb57fe3 npm: upgrade to 1.3.26 2014-02-08 15:10:43 -08:00
Brian White 3595139b51 doc: fix diffieHellman.getGenerator() description 2014-02-09 02:42:41 +04:00
Fedor Indutny d10a68736d Revert "dns: validate arguments in resolve"
This reverts commit 56e80a37e0.
2014-02-08 02:15:33 +04:00
Fedor Indutny 96379f83e0 Revert "dns: verify argument is valid function in resolve"
This reverts commit 2ee86c624e.
2014-02-08 02:15:29 +04:00
Kenan Sulayman 2ee86c624e 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)").
2014-02-08 02:10:01 +04:00
Kenan Sulayman 56e80a37e0 dns: validate arguments in resolve
Mitigat  C++-land assertion error, add test accordingly.

fix #7070
2014-02-08 02:08:28 +04:00
Austin Moran 4b77bd39a4 headers: fix spelling error 2014-02-08 00:19:50 +04:00
Timothy J Fontaine e3d8359021 website: update cla email address 2014-02-07 11:17:23 -08:00
Ben Noordhuis bbd56d881d 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.
2014-02-06 15:30:38 +04:00
Ben Noordhuis 2b6e078833 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'.
2014-02-06 15:30:38 +04:00
Nathan Rajlich 8874a31748 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
2014-02-06 14:19:47 +04:00
Fedor Indutny f1de13b8ab 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
2014-02-06 13:26:57 +04:00
iamdoron 1317032c97 fs: make unwatchFile() insensitive to path 2014-02-06 13:04:35 +04:00
Trevor Norris 6cbfcdad46 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>
2014-02-05 17:16:36 -08:00
Trevor Norris d9e1e4c661 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>
2014-02-05 13:31:00 -08:00
Trevor Norris 4a9af3fecb 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>
2014-02-05 13:30:56 -08:00
Trevor Norris c9abb59638 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>
2014-02-05 13:30:24 -08:00
Timothy J Fontaine 1d2fab37e6 doc: document the tracing api 2014-02-05 11:49:02 -08:00
Ben Noordhuis d23ac0ea9c 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.
2014-02-05 11:49:01 -08:00
Ben Noordhuis 010222d39f 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.
2014-02-05 11:49:01 -08:00
Ben Noordhuis 4dc6f4adf4 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.
2014-02-05 11:49:01 -08:00
Ben Noordhuis 1f2f3fa83a 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.
2014-02-05 11:49:00 -08:00
Fedor Indutny 528a3ce3ed tls: more session configuration options, methods
Introduce `ticketKeys` server option, `session` client option,
`getSession()` and `getTLSTicket()` methods.

fix #7032
2014-02-05 23:28:34 +04:00
Fedor Indutny 5ce458032f 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
2014-02-05 14:20:02 +04:00
Alexis Campailla bae545dab7 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 9836a4eeda
2014-02-04 22:51:11 +04:00
Benjamin Waters d2147c55c2 doc: fix references to error keyword
References for err.signal and err.code should be error.signal and
error.code.

Fixes joyent/node#6862
2014-02-04 12:50:24 +04:00
Alexis Campailla 15de8c2b60 openssl: fix keypress requirement in apps on win32
Re-applying commit 153784b348, 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
2014-02-04 12:48:07 +04:00
Yuriy Nemtsov f65ce02ddd doc: fix after message in addAsyncListener example 2014-02-04 12:44:15 +04:00
Ben Noordhuis 09c51d5e40 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.
2014-02-04 01:42:52 +04:00
Fedor Indutny 2315703035 zlib: separate sync/async methods 2014-02-04 01:41:02 +04:00