Trevor Norris [Tue, 23 Jul 2013 17:43:48 +0000 (10:43 -0700)]
buffer: revert length and parent check
In a rush to implement the fix 35e0d60 I overlooked the logic that
causes 0-length buffer instantiation to automatically not assign the
parent regardless.
David Björklund [Thu, 4 Jul 2013 14:22:31 +0000 (16:22 +0200)]
crypto: Add test for sha.write(''); sha.end()
Trevor Norris [Tue, 23 Jul 2013 00:04:17 +0000 (17:04 -0700)]
buffer: slice on zero length buffer
SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone
attempted to SlowBuffer(0).slice(0, 1) an assert would fail in
smalloc::SliceOnto.
It's important that the check go where it is because the resulting
Buffer needs to have external array data allocated. In the case a user
tries to slice a zero length Buffer it will also have NULL passed as the
data argument.
Also fixed where the .parent attribute was set for zero length Buffers.
There is no need to track the source of slice if the slice isn't
actually occurring.
isaacs [Thu, 18 Jul 2013 01:24:02 +0000 (18:24 -0700)]
stream: Simplify flowing, passive data listening
Closes #5860
In streams2, there is an "old mode" for compatibility. Once switched
into this mode, there is no going back.
With this change, there is a "flowing mode" and a "paused mode". If you
add a data listener, then this will start the flow of data. However,
hitting the `pause()` method will switch *back* into a non-flowing mode,
where the `read()` method will pull data out.
Every time `read()` returns a data chunk, it also emits a `data` event.
In this way, a passive data listener can be added, and the stream passed
off to some other reader, for use with progress bars and the like.
There is no API change beyond this added flexibility.
Wyatt Preul [Sat, 20 Jul 2013 05:56:31 +0000 (00:56 -0500)]
util: removed duplicated isArray check
Ben Noordhuis [Wed, 3 Jul 2013 02:23:36 +0000 (04:23 +0200)]
v8: reapply floating patches
Trevor Norris [Mon, 22 Jul 2013 22:53:43 +0000 (15:53 -0700)]
src: update v8 build requirements
In v8 3.20.4 build/common.gypi was moved to build/toolchain.gypi and
build/features.gypi.
Trevor Norris [Mon, 22 Jul 2013 22:26:27 +0000 (15:26 -0700)]
v8: upgrade to v8 3.20.7
Ben Noordhuis [Sat, 20 Jul 2013 19:42:20 +0000 (21:42 +0200)]
src: fix windows build error from
221c689e
Just forward declare struct sockaddr, the struct is never actually
dereferenced in src/node_internals.h.
Before this commit, it included sys/socket.h but that header doesn't
exist on Windows.
Ben Noordhuis [Fri, 19 Jul 2013 21:59:41 +0000 (23:59 +0200)]
bench: fix up benchmarks after internal api change
Ben Noordhuis [Fri, 19 Jul 2013 21:33:06 +0000 (23:33 +0200)]
test: fix up tests after internal api change
Ben Noordhuis [Thu, 18 Jul 2013 21:18:50 +0000 (23:18 +0200)]
src, lib: update after internal api change
Libuv now returns errors directly. Make everything in src/ and lib/
follow suit.
The changes to lib/ are not strictly necessary but they remove the need
for the abominations that are process._errno and node::SetErrno().
Ben Noordhuis [Tue, 16 Jul 2013 21:28:38 +0000 (23:28 +0200)]
src, lib: deduplicate errnoException
Ben Noordhuis [Tue, 16 Jul 2013 21:08:25 +0000 (23:08 +0200)]
src: add libuv bindings module
Exports:
* all UV_E* error codes
* a uv_err_name() binding
Ben Noordhuis [Tue, 16 Jul 2013 19:04:31 +0000 (21:04 +0200)]
deps: upgrade libuv to 3ee4d3f
Ben Noordhuis [Thu, 6 Jun 2013 02:31:12 +0000 (04:31 +0200)]
udp_wrap, tcp_wrap: add out arg to AddressToJS
Prep work for removing process._errno. The handle.getsockname() function
will return a status code in the future and set the address and port
properties on the object that's passed in from JS land.
Ben Noordhuis [Tue, 4 Jun 2013 10:45:12 +0000 (12:45 +0200)]
src: ReqWrap now optionally accepts a wrap object
Trevor Norris [Fri, 12 Jul 2013 23:29:54 +0000 (16:29 -0700)]
buffer: return offset for end of last write
Ben Noordhuis [Fri, 19 Jul 2013 20:35:23 +0000 (22:35 +0200)]
src: fix persistent handle lifecycle issue
Commit 636ca7c adds an optimization that casts strong Persistent<T>
handles directly to Local<T> handles to avoid the overhead of creating
new HandleScope-rooted Local<T> handles all the time.
One gotcha that I missed is that it's no longer legal to reference the
Local<T> after calling Persistent<T>::Dispose(). This commit addresses
that.
Ben Noordhuis [Sun, 2 Jun 2013 13:11:46 +0000 (15:11 +0200)]
src: add IsFunction() assert to MakeCallback
Helps catch bugs early on. Without it, V8 throws the fairly
unhelpful exception "TypeError: undefined is not a function" -
unhelpful because there is no stack trace.
Ben Noordhuis [Fri, 19 Jul 2013 10:46:11 +0000 (12:46 +0200)]
tools: make check-imports.sh work on bsd-likes
Trevor Norris [Fri, 12 Jul 2013 22:18:21 +0000 (15:18 -0700)]
smalloc: create separate module
It will be confusing if later on we add Buffer#dispose(), and smalloc is
its own cpp api anyways. So instead create a new require('smalloc') to
expose the previous Buffer.alloc/dispose methods, and expose copyOnto
and kMaxLength as well.
Other changes:
* Added documentation and additional tests.
* smalloc::CopyOnto has changed from using assert() to throwing errors
on bad argument values because it is not exposed to the user.
* Minor style fixes.
Trevor Norris [Fri, 19 Jul 2013 19:47:06 +0000 (12:47 -0700)]
node: always set function name
For easier debugging it's helpful to always have the function name.
These were not set for methods coming from cc.
isaacs [Thu, 18 Jul 2013 01:32:23 +0000 (18:32 -0700)]
Merge remote-tracking branch 'ry/v0.10'
Conflicts:
doc/api/stream.markdown
lib/tls.js
Shuan Wang [Wed, 17 Jul 2013 20:10:09 +0000 (13:10 -0700)]
url: Fix edge-case when protocol is non-lowercase
When using url.parse(), path and pathname usually return '/' when there
is no path available. However when you have a protocol that contains
non-lowercase letters and the input string does not have a trailing
slash, both path and pathname will be undefined.
isaacs [Sat, 13 Jul 2013 22:20:27 +0000 (15:20 -0700)]
doc: Explain process.nextTick timing
Provide more detailed explanation of the timing of `process.nextTick`
relative to I/O.
isaacs [Tue, 16 Jul 2013 00:48:12 +0000 (17:48 -0700)]
doc: style the 'type' fields in API docs
isaacs [Mon, 15 Jul 2013 23:56:02 +0000 (16:56 -0700)]
doc: Streams API Doc Rewrite
The Streams API doc is now broken up into 3 sections:
1. API for Consumers
2. API for Implementors
3. Details and Extras
This addresses one of the biggest points of confusion for new users who
start to consume streams, and get the impression that they have to do
lots of extra work and implement classes and such, just to get some data
out of a file.
Trevor Norris [Mon, 15 Jul 2013 18:08:23 +0000 (11:08 -0700)]
smalloc: remove NULL assert check
In fa10b75 the assert to check if data == NULL was remove for
smalloc::Alloc with no callback. It should have also been removed where
a callback is accepted.
No sense in making sure that length == 0 if data == NULL because devs
already have to be responsible for checking that length is the same as
the char* they're passing in.
isaacs [Mon, 15 Jul 2013 03:08:07 +0000 (20:08 -0700)]
tls: Trivial use_strict fix
Ben Noordhuis [Sat, 13 Jul 2013 12:07:26 +0000 (14:07 +0200)]
src: remove Buffer::Data(Persistent<T>&)
It hits a compiler bug in gcc <= 4.4 similar to the issue that was
recently addressed in commit 157d2bc:
../deps/v8/include/v8.h: In function ‘char*
node::Buffer::Data(v8::Persistent&) [with TypeName = v8::Object]’:
../src/node_crypto.cc:1123: instantiated from here
../deps/v8/include/v8.h:876: error: ‘class v8::Data’ is not a
function,
../src/node_internals.h:356: error: conflict with ‘template char*
node::Buffer::Data(v8::Persistent&)’
../src/node_internals.h:357: error: in call to ‘Data’
Remove the helper function, it was only used in a couple of places.
Should fix the build on Ubuntu 10.04.
Fixes #5844.
Timothy J Fontaine [Sat, 13 Jul 2013 00:04:29 +0000 (17:04 -0700)]
blog: v0.11.4 is unstable not stable
Timothy J Fontaine [Fri, 12 Jul 2013 22:18:53 +0000 (15:18 -0700)]
lint: fix _http_client.js after v0.10 merge
Timothy J Fontaine [Fri, 12 Jul 2013 22:17:16 +0000 (15:17 -0700)]
Now working on 0.11.5
Timothy J Fontaine [Fri, 12 Jul 2013 22:16:33 +0000 (15:16 -0700)]
Merge branch 'v0.11.4-release'
Timothy J Fontaine [Fri, 12 Jul 2013 22:12:49 +0000 (15:12 -0700)]
blog: v0.11.4 release
Timothy J Fontaine [Fri, 12 Jul 2013 20:51:04 +0000 (13:51 -0700)]
2013.07.12, Version 0.11.4 (Unstable)
* npm: Upgrade to 1.3.4
* v8: Upgrade to v3.20.2
* c-ares: Upgrade to piscisaureus/cares@805d153
* timers: setImmediate process full queue each turn (Ben Noordhuis)
* http: Add agent.get/request methods (isaacs)
* http: Proper KeepAlive behavior (isaacs)
* configure: fix the --without-ssl option (Nathan Rajlich)
* buffer: propagate originating parent (Trevor Norris)
* tls_wrap: return Error not throw for missing cert (Timothy J Fontaine)
* src: enable native v8 typed arrays (Ben Noordhuis)
* stream: objectMode transform should allow falsey values (Jeff Barczewski)
* slab_allocator: remove SlabAllocator (Trevor Norris)
* crypto: fix memory leak in LoadPKCS12 (Fedor Indutny)
* tls: export TLSSocket (Fedor Indutny)
* zlib: allow changing of level and strategy (Brian White)
* zlib: allow custom flush type for flush() (Brian White)
Timothy J Fontaine [Fri, 12 Jul 2013 20:26:56 +0000 (13:26 -0700)]
Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
AUTHORS
ChangeLog
deps/npm/Makefile
deps/npm/doc/api/npm-commands.md
deps/npm/doc/api/npm-deprecate.md
deps/npm/doc/api/npm-init.md
deps/npm/doc/api/npm-owner.md
deps/npm/doc/api/npm-publish.md
deps/npm/doc/api/npm-run-script.md
deps/npm/doc/cli/npm-adduser.md
deps/npm/doc/cli/npm-bin.md
deps/npm/doc/cli/npm-bugs.md
deps/npm/doc/cli/npm-build.md
deps/npm/doc/cli/npm-cache.md
deps/npm/doc/cli/npm-completion.md
deps/npm/doc/cli/npm-deprecate.md
deps/npm/doc/cli/npm-docs.md
deps/npm/doc/cli/npm-edit.md
deps/npm/doc/cli/npm-explore.md
deps/npm/doc/cli/npm-help-search.md
deps/npm/doc/cli/npm-help.md
deps/npm/doc/cli/npm-init.md
deps/npm/doc/cli/npm-install.md
deps/npm/doc/cli/npm-link.md
deps/npm/doc/cli/npm-ls.md
deps/npm/doc/cli/npm-outdated.md
deps/npm/doc/cli/npm-owner.md
deps/npm/doc/cli/npm-pack.md
deps/npm/doc/cli/npm-prefix.md
deps/npm/doc/cli/npm-prune.md
deps/npm/doc/cli/npm-publish.md
deps/npm/doc/cli/npm-restart.md
deps/npm/doc/cli/npm-rm.md
deps/npm/doc/cli/npm-root.md
deps/npm/doc/cli/npm-run-script.md
deps/npm/doc/cli/npm-search.md
deps/npm/doc/cli/npm-shrinkwrap.md
deps/npm/doc/cli/npm-start.md
deps/npm/doc/cli/npm-stop.md
deps/npm/doc/cli/npm-submodule.md
deps/npm/doc/cli/npm-tag.md
deps/npm/doc/cli/npm-test.md
deps/npm/doc/cli/npm-uninstall.md
deps/npm/doc/cli/npm-unpublish.md
deps/npm/doc/cli/npm-update.md
deps/npm/doc/cli/npm-version.md
deps/npm/doc/cli/npm-view.md
deps/npm/doc/cli/npm-whoami.md
deps/npm/doc/files/npm-folders.md
deps/npm/doc/files/package.json.md
deps/npm/doc/misc/npm-coding-style.md
deps/npm/doc/misc/npm-config.md
deps/npm/doc/misc/npm-developers.md
deps/npm/doc/misc/npm-disputes.md
deps/npm/doc/misc/npm-faq.md
deps/npm/doc/misc/npm-registry.md
deps/npm/doc/misc/npm-scripts.md
deps/npm/doc/misc/semver.md
deps/npm/html/doc/README.html
deps/npm/html/doc/api/npm-bin.html
deps/npm/html/doc/api/npm-bugs.html
deps/npm/html/doc/api/npm-commands.html
deps/npm/html/doc/api/npm-config.html
deps/npm/html/doc/api/npm-deprecate.html
deps/npm/html/doc/api/npm-docs.html
deps/npm/html/doc/api/npm-edit.html
deps/npm/html/doc/api/npm-explore.html
deps/npm/html/doc/api/npm-help-search.html
deps/npm/html/doc/api/npm-init.html
deps/npm/html/doc/api/npm-install.html
deps/npm/html/doc/api/npm-link.html
deps/npm/html/doc/api/npm-load.html
deps/npm/html/doc/api/npm-ls.html
deps/npm/html/doc/api/npm-outdated.html
deps/npm/html/doc/api/npm-owner.html
deps/npm/html/doc/api/npm-pack.html
deps/npm/html/doc/api/npm-prefix.html
deps/npm/html/doc/api/npm-prune.html
deps/npm/html/doc/api/npm-publish.html
deps/npm/html/doc/api/npm-rebuild.html
deps/npm/html/doc/api/npm-restart.html
deps/npm/html/doc/api/npm-root.html
deps/npm/html/doc/api/npm-run-script.html
deps/npm/html/doc/api/npm-search.html
deps/npm/html/doc/api/npm-shrinkwrap.html
deps/npm/html/doc/api/npm-start.html
deps/npm/html/doc/api/npm-stop.html
deps/npm/html/doc/api/npm-submodule.html
deps/npm/html/doc/api/npm-tag.html
deps/npm/html/doc/api/npm-test.html
deps/npm/html/doc/api/npm-uninstall.html
deps/npm/html/doc/api/npm-unpublish.html
deps/npm/html/doc/api/npm-update.html
deps/npm/html/doc/api/npm-version.html
deps/npm/html/doc/api/npm-view.html
deps/npm/html/doc/api/npm-whoami.html
deps/npm/html/doc/api/npm.html
deps/npm/html/doc/cli/npm-adduser.html
deps/npm/html/doc/cli/npm-bin.html
deps/npm/html/doc/cli/npm-bugs.html
deps/npm/html/doc/cli/npm-build.html
deps/npm/html/doc/cli/npm-bundle.html
deps/npm/html/doc/cli/npm-cache.html
deps/npm/html/doc/cli/npm-completion.html
deps/npm/html/doc/cli/npm-config.html
deps/npm/html/doc/cli/npm-dedupe.html
deps/npm/html/doc/cli/npm-deprecate.html
deps/npm/html/doc/cli/npm-docs.html
deps/npm/html/doc/cli/npm-edit.html
deps/npm/html/doc/cli/npm-explore.html
deps/npm/html/doc/cli/npm-help-search.html
deps/npm/html/doc/cli/npm-help.html
deps/npm/html/doc/cli/npm-init.html
deps/npm/html/doc/cli/npm-install.html
deps/npm/html/doc/cli/npm-link.html
deps/npm/html/doc/cli/npm-ls.html
deps/npm/html/doc/cli/npm-outdated.html
deps/npm/html/doc/cli/npm-owner.html
deps/npm/html/doc/cli/npm-pack.html
deps/npm/html/doc/cli/npm-prefix.html
deps/npm/html/doc/cli/npm-prune.html
deps/npm/html/doc/cli/npm-publish.html
deps/npm/html/doc/cli/npm-rebuild.html
deps/npm/html/doc/cli/npm-restart.html
deps/npm/html/doc/cli/npm-rm.html
deps/npm/html/doc/cli/npm-root.html
deps/npm/html/doc/cli/npm-run-script.html
deps/npm/html/doc/cli/npm-search.html
deps/npm/html/doc/cli/npm-shrinkwrap.html
deps/npm/html/doc/cli/npm-star.html
deps/npm/html/doc/cli/npm-stars.html
deps/npm/html/doc/cli/npm-start.html
deps/npm/html/doc/cli/npm-stop.html
deps/npm/html/doc/cli/npm-submodule.html
deps/npm/html/doc/cli/npm-tag.html
deps/npm/html/doc/cli/npm-test.html
deps/npm/html/doc/cli/npm-uninstall.html
deps/npm/html/doc/cli/npm-unpublish.html
deps/npm/html/doc/cli/npm-update.html
deps/npm/html/doc/cli/npm-version.html
deps/npm/html/doc/cli/npm-view.html
deps/npm/html/doc/cli/npm-whoami.html
deps/npm/html/doc/cli/npm.html
deps/npm/html/doc/files/npm-folders.html
deps/npm/html/doc/files/npm-global.html
deps/npm/html/doc/files/npm-json.html
deps/npm/html/doc/files/npmrc.html
deps/npm/html/doc/files/package.json.html
deps/npm/html/doc/index.html
deps/npm/html/doc/misc/npm-coding-style.html
deps/npm/html/doc/misc/npm-config.html
deps/npm/html/doc/misc/npm-developers.html
deps/npm/html/doc/misc/npm-disputes.html
deps/npm/html/doc/misc/npm-faq.html
deps/npm/html/doc/misc/npm-index.html
deps/npm/html/doc/misc/npm-registry.html
deps/npm/html/doc/misc/npm-scripts.html
deps/npm/html/doc/misc/removing-npm.html
deps/npm/html/doc/misc/semver.html
deps/npm/man/man1/npm-README.1
deps/npm/man/man1/npm-adduser.1
deps/npm/man/man1/npm-bin.1
deps/npm/man/man1/npm-bugs.1
deps/npm/man/man1/npm-build.1
deps/npm/man/man1/npm-bundle.1
deps/npm/man/man1/npm-cache.1
deps/npm/man/man1/npm-completion.1
deps/npm/man/man1/npm-dedupe.1
deps/npm/man/man1/npm-deprecate.1
deps/npm/man/man1/npm-docs.1
deps/npm/man/man1/npm-edit.1
deps/npm/man/man1/npm-explore.1
deps/npm/man/man1/npm-help-search.1
deps/npm/man/man1/npm-help.1
deps/npm/man/man1/npm-init.1
deps/npm/man/man1/npm-install.1
deps/npm/man/man1/npm-link.1
deps/npm/man/man1/npm-ls.1
deps/npm/man/man1/npm-outdated.1
deps/npm/man/man1/npm-owner.1
deps/npm/man/man1/npm-pack.1
deps/npm/man/man1/npm-prefix.1
deps/npm/man/man1/npm-prune.1
deps/npm/man/man1/npm-publish.1
deps/npm/man/man1/npm-rebuild.1
deps/npm/man/man1/npm-restart.1
deps/npm/man/man1/npm-rm.1
deps/npm/man/man1/npm-root.1
deps/npm/man/man1/npm-run-script.1
deps/npm/man/man1/npm-search.1
deps/npm/man/man1/npm-shrinkwrap.1
deps/npm/man/man1/npm-star.1
deps/npm/man/man1/npm-stars.1
deps/npm/man/man1/npm-start.1
deps/npm/man/man1/npm-stop.1
deps/npm/man/man1/npm-submodule.1
deps/npm/man/man1/npm-tag.1
deps/npm/man/man1/npm-test.1
deps/npm/man/man1/npm-uninstall.1
deps/npm/man/man1/npm-unpublish.1
deps/npm/man/man1/npm-update.1
deps/npm/man/man1/npm-version.1
deps/npm/man/man1/npm-view.1
deps/npm/man/man1/npm-whoami.1
deps/npm/man/man1/npm.1
deps/npm/man/man3/npm-bin.3
deps/npm/man/man3/npm-bugs.3
deps/npm/man/man3/npm-commands.3
deps/npm/man/man3/npm-config.3
deps/npm/man/man3/npm-deprecate.3
deps/npm/man/man3/npm-docs.3
deps/npm/man/man3/npm-edit.3
deps/npm/man/man3/npm-explore.3
deps/npm/man/man3/npm-help-search.3
deps/npm/man/man3/npm-init.3
deps/npm/man/man3/npm-install.3
deps/npm/man/man3/npm-link.3
deps/npm/man/man3/npm-load.3
deps/npm/man/man3/npm-ls.3
deps/npm/man/man3/npm-outdated.3
deps/npm/man/man3/npm-owner.3
deps/npm/man/man3/npm-pack.3
deps/npm/man/man3/npm-prefix.3
deps/npm/man/man3/npm-prune.3
deps/npm/man/man3/npm-publish.3
deps/npm/man/man3/npm-rebuild.3
deps/npm/man/man3/npm-restart.3
deps/npm/man/man3/npm-root.3
deps/npm/man/man3/npm-run-script.3
deps/npm/man/man3/npm-search.3
deps/npm/man/man3/npm-shrinkwrap.3
deps/npm/man/man3/npm-start.3
deps/npm/man/man3/npm-stop.3
deps/npm/man/man3/npm-submodule.3
deps/npm/man/man3/npm-tag.3
deps/npm/man/man3/npm-test.3
deps/npm/man/man3/npm-uninstall.3
deps/npm/man/man3/npm-unpublish.3
deps/npm/man/man3/npm-update.3
deps/npm/man/man3/npm-version.3
deps/npm/man/man3/npm-view.3
deps/npm/man/man3/npm-whoami.3
deps/npm/man/man3/npm.3
deps/npm/man/man5/npm-folders.5
deps/npm/man/man5/npm-global.5
deps/npm/man/man5/npm-json.5
deps/npm/man/man7/npm-coding-style.7
deps/npm/man/man7/npm-config.7
deps/npm/man/man7/npm-developers.7
deps/npm/man/man7/npm-disputes.7
deps/npm/man/man7/npm-faq.7
deps/npm/man/man7/npm-registry.7
deps/npm/man/man7/npm-scripts.7
deps/npm/man/man7/removing-npm.7
deps/npm/man/man7/semver.7
deps/npm/package.json
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/src/version.c
deps/uv/test/test-fs.c
deps/uv/test/test-list.h
lib/http.js
lib/tls.js
src/node_version.h
isaacs [Fri, 12 Jul 2013 20:14:50 +0000 (13:14 -0700)]
npm: Upgrade to 1.3.4
isaacs [Fri, 12 Jul 2013 15:56:59 +0000 (08:56 -0700)]
npm: Upgrade to 1.3.3
isaacs [Fri, 12 Jul 2013 15:55:57 +0000 (08:55 -0700)]
npm: Upgrade to 1.3.3
Timothy J Fontaine [Thu, 11 Jul 2013 23:04:49 +0000 (16:04 -0700)]
test: regression test for #5798 setImmediate
Ben Noordhuis [Thu, 11 Jul 2013 22:58:11 +0000 (15:58 -0700)]
timers: setImmediate process full queue each turn
Previously only one cb per turn of the event loop was processed at a
time, which is not exactly what is meant by immediate
fixes #5798
Ben Noordhuis [Thu, 11 Jul 2013 13:37:00 +0000 (15:37 +0200)]
build: fix windows build
Be very careful with forward declarations, MSVC is quite picky and
rather stupid about it.
Fixes #5810.
Trevor Norris [Wed, 10 Jul 2013 17:35:57 +0000 (10:35 -0700)]
node: call MakeDomainCallback in all domain cases
Previously there was no way to pass a Function callback directly to
MakeCallback and support domains. The check has been added so that users
never have to worry about supporting domains while using MakeCallback.
Fedor Indutny [Thu, 27 Jun 2013 17:53:29 +0000 (19:53 +0200)]
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.
This is a back-port of commit c1db1ec from the master branch.
Ben Noordhuis [Wed, 10 Jul 2013 07:48:55 +0000 (09:48 +0200)]
test: fix up indentation, replace tabs with spaces
isaacs [Tue, 9 Jul 2013 22:58:15 +0000 (15:58 -0700)]
tools: Add next/prev version scripts
Timothy J Fontaine [Tue, 9 Jul 2013 21:29:16 +0000 (14:29 -0700)]
blog: Post for v0.10.13
Timothy J Fontaine [Tue, 9 Jul 2013 21:28:37 +0000 (14:28 -0700)]
Now working v0.10.14
Timothy J Fontaine [Tue, 9 Jul 2013 21:28:05 +0000 (14:28 -0700)]
Merge branch 'v0.10.13-release' into v0.10
Timothy J Fontaine [Tue, 9 Jul 2013 20:32:22 +0000 (13:32 -0700)]
2013.07.09, Version 0.10.13 (Stable)
* uv: Upgrade to v0.10.12
* npm: Upgrade to 1.3.2
* windows: get proper errno (Ben Noordhuis)
* tls: only wait for finish if we haven't seen it (Timothy J Fontaine)
* http: Dump response when request is aborted (isaacs)
* http: use an unref'd timer to fix delay in exit (Peter Rust)
* zlib: level can be negative (Brian White)
* zlib: allow zero values for level and strategy (Brian White)
* buffer: add comment explaining buffer alignment (Ben Noordhuis)
* string_bytes: properly detect 64bit (Timothy J Fontaine)
* src: fix memory leak in UsingDomains() (Ben Noordhuis)
Timothy J Fontaine [Tue, 9 Jul 2013 20:48:24 +0000 (13:48 -0700)]
build: use separate env vars for signing
isaacs [Tue, 9 Jul 2013 20:20:38 +0000 (13:20 -0700)]
uv: Upgrade to v0.10.12
isaacs [Tue, 9 Jul 2013 20:09:02 +0000 (13:09 -0700)]
npm: Upgrade to 1.3.2
Timothy J Fontaine [Sun, 23 Jun 2013 22:33:13 +0000 (22:33 +0000)]
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
Nathan Rajlich [Mon, 8 Jul 2013 18:25:40 +0000 (11:25 -0700)]
doc: fix bad markdown parsing in list
isaacs [Wed, 26 Jun 2013 16:13:48 +0000 (09:13 -0700)]
http: Dump response when request is aborted
Fixes #5695
Ben Noordhuis [Sun, 7 Jul 2013 12:34:49 +0000 (14:34 +0200)]
src: remove unnecessary calls to Local<T>::New()
Ben Noordhuis [Sun, 7 Jul 2013 12:24:18 +0000 (14:24 +0200)]
src: cast strong persistent handles to locals
Avoids the overhead of creating a new Local every time we unwrap a
Persistent handle.
Ben Noordhuis [Tue, 9 Jul 2013 16:54:10 +0000 (18:54 +0200)]
smalloc: don't take address of stack var
isaacs [Thu, 30 May 2013 23:08:03 +0000 (16:08 -0700)]
http: Use OOP for OutgoingMessage._finish
Sniffing instanceof a child class in the parent class's method
is Doing It Wrong.
isaacs [Thu, 23 May 2013 01:44:24 +0000 (18:44 -0700)]
http: Reuse more http/https Agent code
isaacs [Tue, 21 May 2013 21:02:18 +0000 (14:02 -0700)]
http: Add agent.get/request methods
isaacs [Wed, 15 May 2013 22:10:53 +0000 (15:10 -0700)]
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.
isaacs [Wed, 15 May 2013 21:24:08 +0000 (14:24 -0700)]
http: style
Nathan Rajlich [Mon, 8 Jul 2013 02:11:07 +0000 (19:11 -0700)]
crypto: throw a helpful error message for "tls" and "crypto"
When node is compiled with the --without-ssl flag.
Nathan Rajlich [Sat, 6 Jul 2013 03:53:23 +0000 (20:53 -0700)]
configure: fix the --without-ssl option
Closes #5807.
Trevor Norris [Tue, 9 Jul 2013 03:58:39 +0000 (20:58 -0700)]
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)
Timothy J Fontaine [Mon, 8 Jul 2013 05:03:57 +0000 (05:03 +0000)]
tls_wrap: return Error not throw for missing cert
Trevor Norris [Mon, 8 Jul 2013 23:53:41 +0000 (16:53 -0700)]
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.
Trevor Norris [Fri, 5 Jul 2013 23:21:09 +0000 (16:21 -0700)]
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.
Trevor Norris [Fri, 5 Jul 2013 23:31:27 +0000 (16:31 -0700)]
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.
Ben Noordhuis [Sat, 6 Jul 2013 20:18:39 +0000 (22:18 +0200)]
deps: upgrade c-ares to piscisaureus/cares@805d153
This should fix the Android build.
Peter Rust [Mon, 8 Jul 2013 04:11:22 +0000 (21:11 -0700)]
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.
Timothy J Fontaine [Mon, 8 Jul 2013 01:20:07 +0000 (18:20 -0700)]
timers: internal unref timers should use Timer.now
Ben Noordhuis [Sat, 6 Jul 2013 16:48:52 +0000 (18:48 +0200)]
build: don't enable --gc-sections on sunos
The SunOS linker doesn't support it. Fixes build breakage introduced
in commit 9b3de60.
Ben Noordhuis [Sat, 6 Jul 2013 02:31:02 +0000 (04:31 +0200)]
test: fix up weakref.cc after v8 api change
Ben Noordhuis [Fri, 5 Jul 2013 20:42:06 +0000 (22:42 +0200)]
tools: add check-imports.sh script
Checks that `using` statements in src/*.cc are properly sorted and
actually used.
Ben Noordhuis [Sat, 29 Jun 2013 06:16:25 +0000 (08:16 +0200)]
src: enable native v8 typed arrays
This commit removes our homegrown typed arrays implementation and
enables V8's built-in typed arrays implementation.
Ben Noordhuis [Sat, 29 Jun 2013 05:30:11 +0000 (07:30 +0200)]
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.
Ben Noordhuis [Sat, 29 Jun 2013 05:16:46 +0000 (07:16 +0200)]
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.)
Ben Noordhuis [Wed, 3 Jul 2013 02:23:44 +0000 (04:23 +0200)]
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.)
Ben Noordhuis [Sat, 6 Jul 2013 12:59:15 +0000 (14:59 +0200)]
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.
Ben Noordhuis [Wed, 3 Jul 2013 02:23:36 +0000 (04:23 +0200)]
v8: reapply floating patches
Ben Noordhuis [Tue, 2 Jul 2013 15:11:31 +0000 (17:11 +0200)]
v8: upgrade to v3.20.2
Trevor Norris [Sat, 6 Jul 2013 22:05:04 +0000 (15:05 -0700)]
smalloc: revert change to use pointer indirection
Better to compare fixed addresses than to use pointer indirection.
Fedor Indutny [Fri, 5 Jul 2013 23:59:45 +0000 (03:59 +0400)]
buffer: use macro
Fedor Indutny [Fri, 5 Jul 2013 23:49:11 +0000 (03:49 +0400)]
smalloc: fix style, use macro
Trevor Norris [Fri, 5 Jul 2013 22:03:04 +0000 (15:03 -0700)]
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.
Tim Oxley [Fri, 5 Jul 2013 03:57:13 +0000 (11:57 +0800)]
doc: remove obsolete spawn() stdio options
Ben Noordhuis [Fri, 5 Jul 2013 00:40:39 +0000 (02:40 +0200)]
Merge remote-tracking branch 'origin/v0.10'
Conflicts:
lib/buffer.js
lib/http.js
src/node.cc
Ben Noordhuis [Fri, 5 Jul 2013 00:20:37 +0000 (02:20 +0200)]
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.
Jeff Barczewski [Sun, 31 Mar 2013 03:32:06 +0000 (22:32 -0500)]
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.
Trevor Norris [Fri, 21 Jun 2013 18:35:29 +0000 (11:35 -0700)]
{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.
Trevor Norris [Thu, 20 Jun 2013 23:44:02 +0000 (16:44 -0700)]
smalloc: use malloc instead of new
To use realloc the implementation had to be changed to use malloc/free.
Trevor Norris [Wed, 19 Jun 2013 18:20:45 +0000 (11:20 -0700)]
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.
Fedor Indutny [Thu, 27 Jun 2013 17:53:29 +0000 (19:53 +0200)]
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.
Fedor Indutny [Wed, 3 Jul 2013 07:46:01 +0000 (11:46 +0400)]
tls: export TLSSocket
Timothy J Fontaine [Mon, 1 Jul 2013 21:29:15 +0000 (21:29 +0000)]
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.