Commit Graph

8980 Commits (cd6dff972823cc1ad2dd4f1f393d40bb66cfa4d6)

Author SHA1 Message Date
Timothy J Fontaine cd6dff9728 Merge branch 'v0.10.35-release' into v0.10 2014-12-23 17:30:32 -08:00
Timothy J Fontaine a363f61ca8 2014.12.22, Version 0.10.35 (Stable)
* tls: re-add 1024-bit SSL certs removed by f9456a2 (Chris Dickinson)

* timers: don't close interval timers when unrefd (Julien Gilli)

* timers: don't mutate unref list while iterating it (Julien Gilli)
2014-12-22 13:22:32 -08:00
James M Snell 102a861ec2 doc: clarify buffer api documentation
Better wording for start and end parameters, also document .length
should be considered readonly.

RE: #8857, #8859, #8913
PR: #8910
PR-URL: https://github.com/joyent/node/pull/8910

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:24:28 -08:00
James M Snell 48536394c9 doc: clarify add/removeListener semantics
Clarify that adding or removing a listener is not idempotent.

RE: #8853
PR: #8911
PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-22 12:12:48 -08:00
Julien Gilli fd2cb7c611 timers: don't mutate unref list while iterating it
Commit 934bfe23a1 had introduced a
regression where node would crash trying to access a null unref timer if
a given unref timer's callback would remove other unref timers set to
fire in the future.

More generally, it makes the unrefTimeout function more solid by not
mutating the unrefList while traversing it.

Fixes #8897.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-22 11:45:31 -08:00
Chris Dickinson 1425ccd1b2 src: re-add 1024-bit SSL certs removed by f9456a2
this fixes a problem where connecting to AWS services
would report an untrusted cert error.

Fixes: https://github.com/joyent/node/issues/8894
PR-URL: https://github.com/joyent/node/pull/8904
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 17:11:40 -08:00
Julien Gilli 78db74dd88 timers: don't close interval timers when unrefd
This change fixes a regression introduced by commit
0d051238be, which contained a typo that
would cause every unrefd interval to fire only once.

Fixes #8900.

Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-19 15:41:55 -08:00
Timothy J Fontaine 1b81ea8276 Now working on 0.10.35 2014-12-17 14:39:51 -08:00
Timothy J Fontaine a6757fb9d0 Merge branch 'v0.10.34-release' into v0.10 2014-12-17 14:39:24 -08:00
Timothy J Fontaine 52795f8fcc 2014.12.17, Version 0.10.34 (Stable)
* uv: update to v0.10.30

* zlib: upgrade to v1.2.8

* child_process: check execFile args is an array (Sam Roberts)

* child_process: check fork args is an array (Sam Roberts)

* crypto: update root certificates (Ben Noordhuis)

* domains: fix issues with abort on uncaught (Julien Gilli)

* timers: Avoid linear scan in _unrefActive. (Julien Gilli)

* timers: fix unref() memory leak (Trevor Norris)

* v8: add api for aborting on uncaught exception (Julien Gilli)

* debugger: fix when using "use strict" (Julien Gilli)
2014-12-17 13:21:23 -08:00
Trevor Norris afb488db86 Revert "src: reduce cpu profiler overhead"
This reverts commit 1eb1e0a9af.
2014-12-17 12:45:23 -08:00
Ben Noordhuis 1eb1e0a9af src: reduce cpu profiler overhead
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals
when sleeping / polling for events. Avoids unnecessary wakeups when the
CPU profiler is active. Depends on https://github.com/libuv/libuv#15.

Ref: https://github.com/strongloop/strong-agent/issues/3
PR-URL: https://github.com/joyent/node/pull/8791
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-17 12:37:30 -08:00
cjihrig f75a8ad723 test: remove redundant code in test
A block of asserts were duplicated in
test/simple/test-child-process-spawn-typeerror.js. This commit
removes the duplicated asserts.

Fixes: https://github.com/joyent/node/pull/8454
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-17 15:08:22 -05:00
Julien Gilli 542234ad98 doc: improve dns module's documentation
Make the difference between dns.lookup and other functions even clearer.

PR: #8747
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-17 11:54:31 -08:00
Julien Gilli 45f1330425 deps: backport b593aa8 from v8 upstream
Original commit message:

Enable "strict mode"; for debugger scripts

BUG=v8:3708

Review URL: https://codereview.chromium.org/736583007

Cr-Commit-Position: refs/heads/master@{#25420}
2014-12-17 11:47:26 -08:00
Julien Gilli 0ff51c6e06 deps: backport 2ad2237 from v8 upstream
Original commit message:

Fix Unhandled ReferenceError in debug-debugger.js

This fixes following exception in Sky on attempt to set a breakpoint
"Unhandled: Uncaught ReferenceError: break_point is not defined"
I think this happens in Sky but not in Chrome because Sky scripts are executed in strict mode.

BUG=None
LOG=N
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/741683002

Cr-Commit-Position: refs/heads/master@{#25415}
2014-12-17 11:47:26 -08:00
Shigeki Ohtsu bddea12026 doc: Update LICENSE for zlib 1.2.8 2014-12-16 15:35:09 -08:00
Shigeki Ohtsu 710845cfd3 deps: fix zlib.gyp for zlib upgrade to 1.2.8
This adds new sources for gzip files and defines a new flag for mac and freebsd.
They are taken from third_party/zlib/zlib.gyp in Chromium repository.
2014-12-16 15:35:09 -08:00
Shigeki Ohtsu 33f74bbd90 deps: upgrade zlib to 1.2.8 2014-12-16 15:35:09 -08:00
Julien Gilli 934bfe23a1 timers: Avoid linear scan in _unrefActive.
Before this change, _unrefActive would keep the unrefList sorted when
adding a new timer.

Because _unrefActive is called extremely frequently, this linear scan
(O(n) at worse) would make _unrefActive show high in the list of
contributors when profiling CPU usage.

This commit changes _unrefActive so that it doesn't try to keep the
unrefList sorted. The insertion thus happens in constant time.

However, when a timer expires, unrefTimeout has to go through the whole
unrefList because it's not ordered anymore.

It is usually not large enough to have a significant impact on
performance because:
- Most of the time, the timers will be removed before unrefTimeout is
  called because their users (sockets mainly) cancel them when an I/O
  operation takes place.
- If they're not, it means that some I/O took a long time to happen, and
  the initiator of subsequents I/O operations that would add more timers
  has to wait for them to complete.

With this change, _unrefActive does not show as a significant
contributor in CPU profiling reports anymore.

Fixes #8160.
PR-URL: #8751

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-12-16 11:44:23 -08:00
Trevor Norris 813114dab0 src: remove icu_config
ICU support in v0.12 generates a new icu_config.gypi. This was
accidentally committed after switching branches. The file has been removed
and added to .gitignore.

Fixes: 0d051238 "timers: fix unref() memory leak"
2014-12-15 15:36:00 -08:00
Steven R. Loomis 69b122a642 build: configure return exit status from gyp
Previously, 'configure' would not return an exit status
if gyp blows up. This can be tested via:

    date >> node.gyp ; ./configure && echo A-OK

You will get "A-OK" even though gyp had failed.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-15 13:55:11 -08:00
Julien Gilli 0603c8345b docs: clarify url.format documentation
The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Fixes #8796.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 12:29:36 -08:00
silverwind d230fa9eb7 doc: fix typo secureOptions in tls
Documentation mentioned 'securityOptions', where it should have read
'secureOptions'.

Fixes #8608.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-11 23:27:49 -08:00
Saúl Ibarra Corretgé 1c031c84d2 deps: update libuv to 0.10.30
PR-URL: https://github.com/joyent/node/pull/8849
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 12:41:46 -08:00
pkcs 8120015f40 doc: clearer log messages in net code samples
Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-08 15:23:22 -08:00
Alejandro Oviedo f5cb330ab1 docs: fix streams example for write() after end()
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.

fix #8814

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-06 19:27:05 -08:00
Brendan Ashworth 5e503f45d2 doc: fix grammar in tls and timers
Replace 'a' with 'an' where appropriate.
2014-12-05 14:12:48 -08:00
Fedor Indutny 8c868989be zlib: do not Unref() if wasn't Ref()ed
In very unlikely case, where `deflateInit2()` may return error (right
now happening only on exhausting all memory), the `ZCtx::Error()` will
be called and will try to `Unref()` the handle. But the problem is that
this handle was never `Ref()`ed, so it will trigger an assertion error
and crash the program.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/joyent/node/pull/8687
2014-12-04 18:10:13 +03:00
Ben Noordhuis f9456a2d36 crypto: update root certificates
Update tools/certdata.txt to [0] (last updated on 2014-11-14) and
rebuild src/node_root_certs.h.

Refs joyent/node#8679 and joyent/node#8709.

[0] https://hg.mozilla.org/mozilla-central/raw-file/64206634959a/security/nss/lib/ckfw/builtins/certdata.txt
2014-12-04 16:57:48 +03:00
Ben Noordhuis 479b0b4e54 tools: customize mk-ca-bundle.pl
Remove unneeded functionality and tweak the generated output so we
can #include it in C++ source code.

This is a back-port of commit e159073 from the master branch.
2014-12-04 16:57:48 +03:00
Ben Noordhuis 3c9c920f57 tools: bundle mk-ca-bundle.pl from upstream curl
This is a back-port of commit 5ab863d from the master branch.
2014-12-04 16:57:48 +03:00
Trevor Norris 0d051238be timers: fix unref() memory leak
The destructor isn't being called for timers that have been unref'd.

Fixes: https://github.com/joyent/node/issues/8364
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-11-26 12:27:57 -08:00
Sam Roberts 3a08b7c3e0 doc: cover stdio option in child_process
- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-18 19:28:46 -08:00
Trevor Norris a1b2875afd lint: fix lint issues
Forgot to fix these before landing the patch.

Fixes: e17c5a72
2014-11-18 16:42:10 -08:00
Julien Gilli caeb67735b domains: fix issues with abort on uncaught
Do not abort the process if an error is thrown from within a domain, an
error handler is setup for the domain and --abort-on-uncaught-exception
was passed on the command line.

However, if an error is thrown from within the top-level domain's error
handler and --abort-on-uncaught-exception was passed on the command
line, make the process abort.

Fixes: https://github.com/joyent/node/issues/8631
Fixes: https://github.com/joyent/node/issues/8630
PR-URL: https://github.com/joyent/node/pull/8666
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:39:39 -08:00
Trevor Norris fbff7054a4 v8: add api for aborting on uncaught exception
Add v8::Isolate::SetAbortOnUncaughtException() so the user can be
notified when an uncaught exception has bubbled.

PR-URL: https://github.com/joyent/node/pull/8666
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:37:54 -08:00
Sam Roberts 8032a21025 test: test all spawn parameter positions
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:31 -08:00
Sam Roberts 70dafa7b62 child_process: check fork args is an array
Optional fork args should be type-checked with same behaviour as the
equivalent argument to spawn.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:21 -08:00
Sam Roberts e17c5a72b2 child_process: check execFile args is an array
execFile and spawn have same API signature with respect to optional arg
array and optional options object, they should have same behaviour with
respect to argument validation.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:20:06 -08:00
Sam Roberts 2ff29cc7e3 test: use assert.throw to test exceptions
The test wasn't checking directly that an assertion was thrown. Instead,
it was checking that spawn did not sucessfully spawn a non-existent
command.

However, the command chosen, dir, exists in GNU coreutils, so it exists
on Linux (though not on BSD derived OS X). The test as written passed on
Linux, even with the TypeError it is supposed to be checking for deleted
from spawn(). It would also pass on Windows if a ls.exe existed.

The approach is unnecessarily obscure, assert.throw() is for asserting
code throws, using it is more clear and works regardless of what
commands do or do not exist.

PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:19:52 -08:00
Sam Roberts 13a992b1c2 doc: document the fds behind stdin/out/err
Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.

Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-18 16:19:21 -08:00
Julien Gilli 5ff59453a4 doc: clarify dns.lookup vs dns.resolve
Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

PR-URL: https://github.com/joyent/node/pull/8726
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-14 12:33:34 -08:00
Eric Mill 88bd95cfef doc: update openssl commands to use best practices
This updates key size to 2048 and default hash function to sha256.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690
2014-11-11 20:39:57 +03:00
Fedor Indutny d435f4b3eb Merge remote-tracking branch 'joyent/v0.10' into v0.10 2014-11-04 00:11:23 -05:00
Emmanuel Odeke 523929c927 repl: Private Buffer object in lib/* files
Fixes usage of global object 'Buffer' in lib/* files by ensuring that
each file does an explicit require('buffer').Buffer.  Previously, when
running a repl, due to usage of global 'Buffer', any redefinition of
Buffer would cause a crash eg var Buffer = {}.

Fixes: https://github.com/joyent/node/issues/8588
PR-URL: https://github.com/joyent/node/pull/8603
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-25 00:36:04 -07:00
Timothy J Fontaine ea69dd7584 Now working on 0.10.34 2014-10-23 12:13:05 -07:00
Timothy J Fontaine e59eca58ad Merge branch 'v0.10.33-release' into v0.10 2014-10-23 12:12:52 -07:00
Julien Gilli 8d045a30e9 tests: add TLS tests matrix
Add a test that goes through the whole matrix of:
- command line options (--enable-ssl*)
- secureOptions
- secureProtocols

and makes sure that compatible test setups actually work as expected.

The test works by spawning two processes for each test case: one client
and one server. The test passes if a SSL/TLS connection from the client
to the server is successful and the test case was supposed to pass, or
if the connection couldn't be established and the test case was supposed
to fail.

The test is currently located in the directory 'test/external' because
it has external dependencies.
2014-10-23 10:45:12 -07:00
Timothy J Fontaine 69080f5474 tls: enforce secureOptions on incoming clients
Reuse the secureProtocol and secureOptions of the server when creating
the secure context for incoming clients.
2014-10-23 10:45:04 -07:00