0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

15366 Commits

Author SHA1 Message Date
Ben Noordhuis
a804627837 tools: make run-valgrind.py useful
Node.js does not clean up on exit so don't complain about memory leaks
but do complain about invalid memory access.  In the future we may want
to add a cleanup-on-exit flag or put together a suppression list.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:01:24 +01:00
Ben Noordhuis
e762ca0060 tools: fix run-valgrind.py script
The script had a dependency on the copy of valgrind that is bundled
with V8 but that only gets checked out when doing a full depot_tools
checkout.  Use the system-provided valgrind.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:01:22 +01:00
Ben Noordhuis
043a98c494 tools: copy run-valgrind.py to tools/
It was a symbolic link to deps/v8/tools/run-valgrind.py before.  We are
going to make changes to it and we don't want to carry the patch forward
so make a copy.

PR-URL: https://github.com/nodejs/node/pull/9520
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-15 17:00:00 +01:00
Jeremiah Senkpiel
f65a48fc8f test: ensure nextTick is not scheduled in exit
Previously our tests did not check this codepath as seen at
coverage.nodejs.org

PR-URL: https://github.com/nodejs/node/pull/9555
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-11-15 09:22:47 -05:00
Jeremiah Senkpiel
9e698bd6db test: increase coverage of process.emitWarning
Previously our tests did not check these codepaths as seen at
coverage.nodejs.org

PR-URL: https://github.com/nodejs/node/pull/9556
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-15 09:20:33 -05:00
Rich Trott
fc44bd4d0b test: refactor test-zlib.js
* minor layout changes for clarity
* assert.equal() and assert.ok() swapped out for assert.strictEqual()
* var -> const for modules included via require()

PR-URL: https://github.com/nodejs/node/pull/9544
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-13 13:25:19 -08:00
Fedor Indutny
5a61b99d98 process: add process.memoryUsage.external
PR-URL: https://github.com/nodejs/node/pull/9587
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-13 15:47:15 -05:00
Daijiro Yamada
195989d3a3 doc: fix typo e.g., => e.g.
Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9563
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-14 00:57:13 +09:00
Roman Reiss
8eb19c48fa
doc: consistent 'Returns:'
For consistency, changed all `Return:` to `Returns:` in the API docs.

PR-URL: https://github.com/nodejs/node/pull/9554
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-13 08:58:13 +01:00
Thomas Watson Steen
4b35f25bfa
doc: simplify process.memoryUsage() example code
Using util.inspect doesn't change the output in this case

PR-URL: https://github.com/nodejs/node/pull/9560
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-13 08:50:36 +01:00
MURAKAMI Masahiko
8a78fcb345 test: change from setTimeout to setImmediate
This is a part of Code And Learn at NodeFest 2016 Challenge

Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9578
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-13 15:00:03 +09:00
YutamaKotaro
a3dd9430c7 doc: fix typo about cluster doc, (eg. -> e.g.)
Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9568
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-13 14:11:54 +09:00
Syuhei Kobayashi
9428854b96 doc: fix typo in doc/tls.md
fix doc/tls.md: line 762 836 1026 e.g., => e.g.

Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9566
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-13 10:47:04 +09:00
Yoshiya Hinosawa
8ca322d613 test: improve test-stream2-objects.js
This commit improves the test cases in
test-stream2-objects.js by using assert.strictEqual
instead of assert.equal.

This is a part of Code And Learn at NodeFest 2016

Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9565
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-13 10:40:25 +09:00
ikasumi_wt
7030f094cd doc: fix e.g., to e.g. in doc/http.md
fix e.g., to e.g. in doc/http.md

Fixes: https://github.com/nodejs/code-and-learn/issues/58
PR-URL: https://github.com/nodejs/node/pull/9564
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-13 10:27:31 +09:00
Rich Trott
c7976b537a test: refactor test-next-tick-error-spin
* use common.mustCall()
* setTimeout() -> setImmediate()
* assert() -> assert.strictEqual()
* var -> const
* remove unneeded console.log()
* remove commented-out code

PR-URL: https://github.com/nodejs/node/pull/9537
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-12 10:37:54 -08:00
Rich Trott
9004bfe550 test: refactor test-tls-inception
* buffer-to-string comparison replaced with string-to-string comparison
* equal -> strictEqual
* var -> const
* rename identifiers to avoid masking

PR-URL: https://github.com/nodejs/node/pull/9536
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-12 10:30:35 -08:00
kohta ito
f673c97548 doc: fix the index order in pseudocode of modules
fix the index order in pseudocode of modules.

PR-URL: https://github.com/nodejs/node/pull/9562
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-12 21:52:14 +09:00
William Kapke
fde607eb8f
doc: remove Roadmap Working Group
Refs: https://github.com/nodejs/CTC/issues/16
PR-URL: https://github.com/nodejs/node/pull/9545
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-12 09:19:04 +01:00
imatvieiev
c184f22997
doc: add process api data types to documentation
PR-URL: https://github.com/nodejs/node/pull/9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:26:08 +01:00
imatvieiev
6cc321e2ec
doc: added types to path docs
PR-URL: https://github.com/nodejs/node/pull/9514
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:24:06 +01:00
Timothy
452b4dc8a8
doc: fix fs constants link
https://nodejs.org/api/fs.html#fs_fs_constants links to itself rather
than to https://nodejs.org/api/fs.html#fs_fs_constants_1

PR-URL: https://github.com/nodejs/node/pull/9508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:16:55 +01:00
Daniel Bevenius
bd83422a71
doc: fix minor style issue in code examples
I've noticed that a few of the code examples have an minor
indentation issue with the first line, for example:

https://nodejs.org/api/child_process.html#child_process_child_process
This commit attempt to fix this issue by using the solution provided
provided by silverwind and hiendv.

Fixes: https://github.com/nodejs/node/issues/9381
PR-URL: https://github.com/nodejs/node/pull/9482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:09:20 +01:00
Ryan Lewis
bf3e4bb324
doc: grammar and structure revisions of wg doc
PR-URL: https://github.com/nodejs/node/pull/9495
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:04:17 +01:00
Jeremiah Senkpiel
4affb8929f doc: clarify the exit code part of writing_tests
PR-URL: https://github.com/nodejs/node/pull/9502
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-11 10:23:00 -05:00
timathon
843770406b
doc: fix link to Event Loop page
PR-URL: https://github.com/nodejs/node/pull/9527
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-11 16:10:38 +01:00
Evan Lucas
e12b9bedec doc: add missing link in changelog
The link to v7.1.0 was missing.

PR-URL: https://github.com/nodejs/node/pull/9540
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 06:06:54 -06:00
Michaël Zasso
0fa09b4887 deps: update V8 to 5.4.500.41
PR-URL: https://github.com/nodejs/node/pull/9412
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2016-11-11 10:34:31 +01:00
Johan Bergström
fb05e31466 gitignore: ignore all tap files
We now have multiple tap producers; just ignore all
files with the `.tap` extension.

PR-URL: https://github.com/nodejs/node/pull/9262
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-11-10 15:25:12 -03:00
Johan Bergström
6831ebe3bb gtest: output tap comments as yamlish
This makes yaml-ish parsers happy.
Note: gtest still seems to output the expected/result slightly
different making the full traceback less informational.

PR-URL: https://github.com/nodejs/node/pull/9262
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-11-10 15:25:02 -03:00
Johan Bergström
b634ef70da test: output tap13 instead of almost-tap
Produce a tap13-compatible output which makes it
simpler to parse. Output is still readable by
the jenkins tap plugin.

PR-URL: https://github.com/nodejs/node/pull/9262
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-11-10 15:22:54 -03:00
Andreas Lind
ca57912e05 doc: Fix inaccuracy in https.request docs
PR-URL: https://github.com/nodejs/node/pull/9453
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sam Roberts <sam@strongloop.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-10 09:27:12 -05:00
Rich Trott
eed8b0525c test: move tick-processor tests to own directory
The tick-processor tests are inherently non-deterministic. They
therefore have false negatives from time to time. They also
sometimes leave extra processes running.

Move them to their own directory until these issues are sorted. Note
that this means that the tests will not be run in CI. Like the inspector
tests and other tests, they will have to be run manually when they are
wanted.

PR-URL: https://github.com/nodejs/node/pull/9506
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matthew Loring <mattloring@google.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-09 19:34:56 -08:00
Rich Trott
103858e95f test: refactor inspector-helper.js
There are two instances of `setTimeout()` called without a duration in
`inspector-helper.js`. Change to `setImmediate()` for clarity that it
isn't a mistake.

PR-URL: https://github.com/nodejs/node/pull/9499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-09 19:26:25 -08:00
Rich Trott
837e822992 test: refactor make-callback-recurse test
Move copy/pasted callback into its own function.

PR-URL: https://github.com/nodejs/node/pull/9498
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-09 19:21:30 -08:00
Rich Trott
ef6a5cf40a benchmark: split timers benchmark and refactor
The depth benchmark for timers sets a timer that sets a timer that sets
a timer that... 500K of them.

Since each timer has to wait for the next tick of the event loop this
benchmark takes a very long time to run compared to the breadth
test that is already in the file. This may be more of an event loop
benchmark than a timer benchmark.

Reduce the number of iterations for the depth test as it's really just
running the iterations in sequence, not in parallel. And even on an
infinitely fast machine, it would take over 8 minutes to run because
each tick of the event loop would have to wait 1ms before firing the
timer.

Split the depth and breadth benchmarks so that their `N` values can be
set independently.

Do some minor refactoring to the benchmarks (but no ES6 additions so
that the benchmarks can still be run with old versions of Node.js).

Refs: https://github.com/nodejs/node/issues/9493
PR-URL: https://github.com/nodejs/node/pull/9497
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-09 19:19:04 -08:00
Rich Trott
1ce05ad540 test: move timer-dependent test to sequential
`test-regress-GH-897` is dependent on a timer firing within a period of
time. Especially on some of the FreeBSD hosts on CI, we have seen tests
like that fail when run in parallel. (This may have nothing to do with
FreeBSD and may just mean that the hosts are resource-constrained.) Move
this test to sequential as we have done with several other
timer-dependent tests recently.

The test has also been refactored and documented via comments.

PR-URL: https://github.com/nodejs/node/pull/9487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-11-09 16:46:16 -08:00
Rich Trott
1323db0eb8 test: fix helper-debugger-repl.js
The test `debugger/test-debugger-repl-break-in-module` (and probably
others) was failing because the handshake message for debugging is no
longer `listening on port <port>` but is instead `listening on
<address>:<port>`.

This change makes the check less strict so as to hopefully future-proof
it at least a little bit against subsequent changes.

This test failure is not caught in CI because currently debugger tests
are not run in CI.

PR-URL: https://github.com/nodejs/node/pull/9486
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
2016-11-09 16:43:41 -08:00
Rich Trott
7ef16eee2f lib,test: remove unneeded escaping of /
The `/` character does not need to be escaped when occurring inside a
character class in a regular expression. Remove such instances of
escaping in the code base.

PR-URL: https://github.com/nodejs/node/pull/9485
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-09 16:40:38 -08:00
Jaideep Bajwa
4aca347527 v8: update make-v8.sh to use git
google build tool gclient doesn't support
svn anymore. Updating v8 build script to use
git instead.

PR-URL: https://github.com/nodejs/node/pull/9393
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-09 17:34:22 -05:00
Oscar Morrison
d548d28f51
doc: add npm link to README
PR-URL: https://github.com/nodejs/node/pull/7894
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-09 18:51:17 +01:00
Adam Langley
305f75a17a crypto: use SSL_get_servername.
(Patch by David Benjamin.)

Rather than reach into the SSL_SESSION, use the intended API,
SSL_get_servername. This will also help the transition to OpenSSL 1.1.0.

Also don't fill in the tlsTicket field here. This is never read by
oncertcb and was always false anyway; that field is maintained by
clients and tracks whether the server issued a ticket or a session ID.

(Note this is distinct from the copy passed to onclienthello which is
used and is not a no-op.)

PR-URL: https://github.com/nodejs/node/pull/9347
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-11-09 18:35:43 +09:00
Adam Langley
34febfbf4d crypto: fix handling of root_cert_store.
SecureContext::AddRootCerts only parses the root certificates once and
keeps the result in root_cert_store, a global X509_STORE. This change
addresses the following issues:

1. SecureContext::AddCACert would add certificates to whatever
X509_STORE was being used, even if that happened to be root_cert_store.
Thus adding a CA certificate to a SecureContext would also cause it to
be included in unrelated SecureContexts.

2. AddCRL would crash if neither AddRootCerts nor AddCACert had been
called first.

3. Calling AddCACert without calling AddRootCerts first, and with an
input that didn't contain any certificates, would leak an X509_STORE.

4. AddCRL would add the CRL to whatever X509_STORE was being used. Thus,
like AddCACert, unrelated SecureContext objects could be affected.

The following, non-obvious behaviour remains: calling AddRootCerts
doesn't /add/ them, rather it sets the CA certs to be the root set and
overrides any previous CA certificates.

Points 1–3 are probably unimportant because the SecureContext is
typically configured by `createSecureContext` in `lib/_tls_common.js`.
This function either calls AddCACert or AddRootCerts and only calls
AddCRL after setting up CA certificates. Point four could still apply in
the unlikely case that someone configures a CRL without explicitly
configuring the CAs.

PR-URL: https://github.com/nodejs/node/pull/9409
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-09 11:26:59 +09:00
Adam Majer
9259bf3306 crypto: Use reference count to manage cert_store
Setting reference count at the time of setting cert_store instead of
trying to manage it by modifying internal states in destructor.

PR-URL: https://github.com/nodejs/node/pull/9409
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2016-11-09 11:24:33 +09:00
Rich Trott
5025d7bfb0 zlib: fix linting recently-introduced lint error
Remove unnecessary named function. V8 will do a better job inferring the
name from the assignment to a property. The current formulation does not
pass linting.

PR-URL: https://github.com/nodejs/node/pull/9524
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-08 16:40:56 -08:00
solebox
77ec310d0c zlib: name every function Ref: #8913
PR-URL: https://github.com/nodejs/node/pull/9389
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-08 18:26:04 -05:00
Evan Lucas
9314886053 2016-11-08, Version 7.1.0 (Current)
Notable changes:

* buffer: add buffer.transcode to transcode a buffer's content from one
  encoding to another primarily using ICU (James M Snell)
* child_process: add public API for IPC channel (cjihrig)
* icu
  * Upgraded to ICU 58 - small icu (Steven R. Loomis)
  * Add `cldr`, `tz`, and `unicode` to `process.versions` (Steven R. Loomis)
* lib: make `String(global) === '[object global]'` (Anna Henningsen)
* libuv: Upgraded to 1.10.0 (cjihrig)
* readline: use icu based string width calculation (James M Snell)
* src:
  * add NODE_PRESERVE_SYMLINKS environment variable that has the same
    effect as the `--preserve-symlinks` flag (Marc Udoff)
  * Fix `String#toLocaleUpperCase()` and `String#toLocaleLowerCase()`
    (Steven R. Loomis)

PR-URL: https://github.com/nodejs/node/pull/9438
2016-11-08 15:14:16 -06:00
Myles Borins
65e7f62400 doc: fix heading type for v4.6.2 changelog
Originally was h2 should be h3

PR-URL: https://github.com/nodejs/node/pull/9515
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-11-08 14:49:42 -05:00
Myles Borins
3562658bed 2016-11-08, Version 4.6.2 'Argon' (LTS)
This LTS release comes with 219 commits. This includes 80 commits that
are docs related, 58 commits that are test related, 20 commits that
are build / tool related, and 9 commits that are updates to
dependencies.

Notable Changes

* build:
  - It is now possible to build the documentation from the release
    tarball (Anna Henningsen)
    https://github.com/nodejs/node/pull/8413
* buffer:
  - Buffer.alloc() will no longer incorrectly return a zero filled
    buffer when an encoding is passed (Teddy Katz)
    https://github.com/nodejs/node/pull/9238
* deps:
  - upgrade npm in LTS to 2.15.11 (Kat Marchán)
    https://github.com/nodejs/node/pull/8928
* repl:
  - Enable tab completion for global properties (Lance Ball)
    https://github.com/nodejs/node/pull/7369
* url:
  - `url.format()` will now encode all `#` in `search` (Ilkka Myller)
    https://github.com/nodejs/node/pull/8072

PR-URL: https://github.com/nodejs/node/pull/9298
2016-11-08 14:42:44 -05:00
Daniel Bevenius
5734361d45 doc: fix link to cli.md in vm.md
Looks like the link to cli.md is missing in vm.md:
https://nodejs.org/api/vm.html#vm_vm_runindebugcontext_code

Added the link which can be verified by using the following commands:
$ make doc
$ open out/doc/api/vm.html

PR-URL: https://github.com/nodejs/node/pull/9481
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-08 20:30:28 +01:00