Commit Graph

8861 Commits (b8c04b921b626edd4201f805d0feb384c8e91ea7)

Author SHA1 Message Date
Timothy J Fontaine 5b6464f461 build: use separate env vars for signing 2013-07-09 13:50:45 -07:00
isaacs 8bac8857f5 uv: Upgrade to v0.10.12 2013-07-09 13:20:38 -07:00
isaacs f5602bda18 npm: Upgrade to 1.3.2 2013-07-09 13:09:02 -07:00
Timothy J Fontaine 91698f77e5 tls: only wait for finish if we haven't seen it
A pooled https agent may get a Connection: close, but never finish
destroying the socket as the prior request had already emitted finish
likely from a pipe.

Since the socket is not marked as destroyed it may get reused by the
agent pool and result in an ECONNRESET.

re: #5712 #5739
2013-07-09 10:55:10 -07:00
Nathan Rajlich ed5324687e doc: fix bad markdown parsing in list 2013-07-08 11:25:40 -07:00
isaacs 99a7e78e77 http: Dump response when request is aborted
Fixes #5695
2013-07-08 09:20:40 -07:00
Ben Noordhuis 6acde2152f src: remove unnecessary calls to Local<T>::New() 2013-07-07 14:34:49 +02:00
Ben Noordhuis 636ca7c684 src: cast strong persistent handles to locals
Avoids the overhead of creating a new Local every time we unwrap a
Persistent handle.
2013-07-07 14:24:18 +02:00
Ben Noordhuis 3220bc4254 smalloc: don't take address of stack var 2013-07-07 13:30:20 +02:00
isaacs 831de7cbb9 http: Use OOP for OutgoingMessage._finish
Sniffing instanceof a child class in the parent class's method
is Doing It Wrong.
2013-07-09 22:31:11 -07:00
isaacs 49519f1217 http: Reuse more http/https Agent code 2013-07-09 22:31:11 -07:00
isaacs 40e92650bb http: Add agent.get/request methods 2013-07-09 22:31:11 -07:00
isaacs 9fc9b87472 http: Proper KeepAlive behavior
Instead of destroying sockets when there are no pending requests, put
them in a freeSockets list, and unref() them so that they do not keep
the event loop open.

Also, set the default max sockets to Infinity, to prevent the awful
surprising deadlocks that happen when more connections are made.
2013-07-09 22:31:11 -07:00
isaacs 6176e49181 http: style 2013-07-09 22:31:11 -07:00
Nathan Rajlich 48e159faf2 crypto: throw a helpful error message for "tls" and "crypto"
When node is compiled with the --without-ssl flag.
2013-07-09 11:27:38 -07:00
Nathan Rajlich 567c72b8c5 configure: fix the --without-ssl option
Closes #5807.
2013-07-09 11:27:37 -07:00
Trevor Norris b8ce1da74d buffer: propagate originating parent
When creating a slice, make sure to propagate the originating parent.
This is to prevent a buf.parent.parent.(etc) scenario.

Also speed up the constructor by preventing lookup of non-existant
properties by setting them beforehand in the prototype. (see
https://github.com/joyent/node/commit/7ce5a31#commitcomment-3332779)
2013-07-08 23:12:52 -07:00
Timothy J Fontaine 2fc34d75d9 tls_wrap: return Error not throw for missing cert 2013-07-09 00:13:02 +00:00
Trevor Norris 22668db73d benchmark: update callbacks only receive data
Since the SlabAllocator was removed the buffer length/offset is no
longer sent to the onread callback. The benchmarks have been updated to
reflect that.
2013-07-08 16:53:41 -07:00
Trevor Norris ead8e26b5b smalloc: call callback if set on AllocDispose
Fix bug where if dev passed a callback to Alloc then called AllocDispose
it wouldn't bother to pass the data to the callback and instead would
just free it.
2013-07-08 11:09:09 -07:00
Trevor Norris aa8c4a0766 smalloc: zero size allocs may need to be free'd
Zero size allocations don't necessarily mean that data == NULL. So
instead check each value seperately and perform necessary operations.
2013-07-08 09:17:22 -07:00
Ben Noordhuis 58e4edaf68 deps: upgrade c-ares to piscisaureus/cares@805d153
This should fix the Android build.
2013-07-06 22:20:29 +02:00
Peter Rust 82ff891e22 http: use an unref'd timer to fix delay in exit
There was previously up to a second exit delay when exiting node
right after an http request/response, due to the utcDate() function
doing a setTimeout to update the cached date/time.

Fixing this should increase the performance of our http tests.
2013-07-07 21:12:07 -07:00
Timothy J Fontaine fe176929c2 timers: internal unref timers should use Timer.now 2013-07-07 18:25:48 -07:00
Ben Noordhuis 0181fee411 build: don't enable --gc-sections on sunos
The SunOS linker doesn't support it. Fixes build breakage introduced
in commit 9b3de60.
2013-07-06 18:49:02 +02:00
Ben Noordhuis 7684e0b554 test: fix up weakref.cc after v8 api change 2013-07-06 17:44:45 +02:00
Ben Noordhuis d2d07421ca tools: add check-imports.sh script
Checks that `using` statements in src/*.cc are properly sorted and
actually used.
2013-07-06 17:44:45 +02:00
Ben Noordhuis 0693d22f86 src: enable native v8 typed arrays
This commit removes our homegrown typed arrays implementation and
enables V8's built-in typed arrays implementation.
2013-07-06 17:44:45 +02:00
Ben Noordhuis c56a96c25c src: abort() on fatal error in debug mode
abort() generates a nice core dump and makes it easy to catch fatal
errors in one's debugger of choice.
2013-07-06 17:44:44 +02:00
Ben Noordhuis 8985bb8bfd string_bytes: stop using String::AsciiValue
Debug builds of V8 now actively check that the string only contains
ASCII characters (i.e. doesn't contain bytes with the high bit set.)
2013-07-06 17:44:44 +02:00
Ben Noordhuis 110a9cd8db lib, src: upgrade after v8 api change
This is a big commit that touches just about every file in the src/
directory. The V8 API has changed in significant ways. The most
important changes are:

* Binding functions take a const v8::FunctionCallbackInfo<T>& argument
  rather than a const v8::Arguments& argument.

* Binding functions return void rather than v8::Handle<v8::Value>. The
  return value is returned with the args.GetReturnValue().Set() family
  of functions.

* v8::Persistent<T> no longer derives from v8::Handle<T> and no longer
  allows you to directly dereference the object that the persistent
  handle points to. This means that the common pattern of caching
  oft-used JS values in a persistent handle no longer quite works,
  you first need to reconstruct a v8::Local<T> from the persistent
  handle with the Local<T>::New(isolate, persistent) factory method.

A handful of (internal) convenience classes and functions have been
added to make dealing with the new API a little easier.

The most visible one is node::Cached<T>, which wraps a v8::Persistent<T>
with some template sugar. It can hold arbitrary types but so far it's
exclusively used for v8::Strings (which was by far the most commonly
cached handle type.)
2013-07-06 17:44:44 +02:00
Ben Noordhuis 9b3de60d35 build: remove --unsafe-optimizations flag
The previous commit removes our patch that builds V8 at -O2 rather
than -O3 so there is not much point in keeping the configure switch
around.

The reason it did so was to work around an assortment of compiler and
linker bugs. In particular, certain combinations of g++ and binutils
generate bad or no code when -ffunction-sections or -finline-functions
is enabled (which -O3 implicitly does.)

It was quite the problem back in the day because everyone and his dog
built from source. Now that we have prebuilt binaries and packages
available, there is no longer a pressing need to be so accommodating.

If you experience spurious (or possibly not so spurious) segmentation
faults after this commit, you need to upgrade your compiler/linker
toolchain.
2013-07-06 16:53:07 +02:00
Ben Noordhuis 588040d20d v8: reapply floating patches 2013-07-06 16:53:06 +02:00
Ben Noordhuis 704fd8f374 v8: upgrade to v3.20.2 2013-07-06 16:53:06 +02:00
Trevor Norris eec43351c4 smalloc: revert change to use pointer indirection
Better to compare fixed addresses than to use pointer indirection.
2013-07-06 15:05:04 -07:00
Fedor Indutny f0a05e4bc3 buffer: use macro 2013-07-06 15:55:46 +04:00
Fedor Indutny 28609d1779 smalloc: fix style, use macro 2013-07-06 03:52:30 +04:00
Trevor Norris 71ade1c212 doc: remove mention of maxTickDepth
maxTickDepth has been removed, but mention of it was left in the docs.
Also added explanation that nextTick is allowed to starve I/O.
2013-07-05 15:14:10 -07:00
Tim Oxley 2d6d46172e doc: remove obsolete spawn() stdio options 2013-07-05 11:56:24 +02:00
Ben Noordhuis 30e7d08d93 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	lib/buffer.js
	lib/http.js
	src/node.cc
2013-07-05 02:40:39 +02:00
Ben Noordhuis 806e300878 src: fix memory leak in UsingDomains()
UsingDomains() assigned process_tickCallback when it had already
been set by MakeCallback() a few frames down the call stack.

Dispose the handle first or we'll retain whatever is in the lexical
closure of the old process._tickCallback function.

Fixes #5795.
2013-07-05 02:20:39 +02:00
Jeff Barczewski 26ca7d73ca stream: objectMode transform should allow falsey values
If a transform stream has objectMode = true, it should
allow falsey values other than (null) like 0, false, ''.

null is reserved to indicate stream eof but other falsey
values should flow through properly.
2013-07-03 15:07:01 -07:00
Trevor Norris 278183a902 {stream,udp,tls}_wrap: remove unused offset/length
The function arguments offset and length are now no longer used since
all I/O requests now use discretely allocated memory.
2013-07-03 15:03:41 -07:00
Trevor Norris fa10b757f5 smalloc: use malloc instead of new
To use realloc the implementation had to be changed to use malloc/free.
2013-07-03 15:03:24 -07:00
Trevor Norris ec90e6e80a slab_allocator: remove SlabAllocator
Now that Buffer instantiation has improved, the SlabAllocator is an
unnecessary layer of complexity preventing further performance
optimizations.

Currently there is a small performance loss with very small stream
requests, but this will soon be addressed.
2013-07-03 14:56:27 -07:00
Fedor Indutny c1db1ecd15 crypto: fix memory leak in LoadPKCS12
X509_STORE_add_cert increment reference of passed `x509` cert,
`X509_free` must be called to avoid memory leak.
2013-07-03 16:16:44 +04:00
Fedor Indutny 07fbb43d78 tls: export TLSSocket 2013-07-03 16:15:31 +04:00
Timothy J Fontaine 4c38742dd8 test: fix tls-hello-parser-failure on smartos
Assert that when the client closes it has seen an error, this prevents
the test from timing out.

Also queue a second write in the case that we were able to send the
buffer before the other side closed the connection.
2013-07-01 17:41:38 -07:00
Peter Rust 16b59cbc74 http: use an unref'd timer to fix delay in exit
There was previously up to a second exit delay when exiting node
right after an http request/response, due to the utcDate() function
doing a setTimeout to update the cached date/time.

Fixing this should increase the performance of our http tests.
2013-07-01 16:02:25 -07:00
Timothy J Fontaine 6f8ddf3759 test: fix tls-hello-parser-failure on smartos
Assert that when the client closes it has seen an error, this prevents
the test from timing out.

Also queue a second write in the case that we were able to send the
buffer before the other side closed the connection.
2013-07-01 15:04:56 -07:00