0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

13504 Commits

Author SHA1 Message Date
Alexis Campailla
4611389294 tty: don't read from console stream upon creation
The tty.ReadStream constructor initializes this as a socket,
which causes a read to be initiated. Even though during stdin
initalization we call readStop shortly after, the read operation
can consume keypress events from the system buffers.

Fixes: https://github.com/nodejs/node/issues/5384

PR-URL: https://github.com/nodejs/node/pull/5776
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2016-03-23 20:55:52 +01:00
James M Snell
f429fe1b88 crypto: fail early when loading crypto without openssl
Fail early in require('crypto'), require('tls'),
require('https'), etc when crypto is not available
(rather than depending on an internal try/catch).

Add documentation for detecting when crypto is not available.

PR-URL: https://github.com/nodejs/node/pull/5611
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-23 10:34:40 -07:00
Anna Henningsen
0b3936b49f zlib: Fix handling of gzip magic bytes mid-file
Only treat the gzip magic bytes, when encountered within the file
after reading a single block, as the start of a new member when
the previous member has ended.

Add test files that reliably reproduce #5852. The gzipped file
in test/fixtures/pseudo-multimember-gzip.gz contains the gzip
magic bytes exactly at the position that node encounters after having
read a single block, leading it to believe that a new data
member is starting.

Fixes: https://github.com/nodejs/node/issues/5852
PR-URL: https://github.com/nodejs/node/pull/5863
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-23 13:04:19 -04:00
James M Snell
7d73e60f60 buffer: add swap16() and swap32() methods
Adds Buffer.prototype.swap16() and Buffer.prototype.swap32()
methods that mutate the Buffer instance in-place by swapping the
16-bit and 32-bit byte-order.

Example:

```js
const buf = Buffer([0x1, 0x2, 0x3, 0x4]);
buf.swap16();
console.log(buf);
  // prints Buffer(0x2, 0x1, 0x4, 0x3);

buf.swap32();
console.log(buf);
  // prints Buffer(0x3, 0x4, 0x1, 0x2);
```

PR-URL: https://github.com/nodejs/node/pull/5724
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-23 08:52:44 -07:00
Gareth Ellis
443c2d5442 buffer: changing let in for loops back to var
Using let in for loops showed a regression in 4.4.0. @ofrobots
suggested that we avoid using let in for loops until TurboFan becomes
the default optimiser.

The regression that was detected was when looking at how long it took
to create a new buffer from an array of data.

When using `for (let i=0; i<length; i++) ` we saw the operation take
almost 40% longer compared to `var i=0`.

PR-URL: https://github.com/nodejs/node/pull/5819
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Ref: http://github.com/nodejs/benchmarking/issues/38
2016-03-23 17:44:26 +02:00
João Reis
387b6b4973 etw: fix descriptors of events 9 and 23
Event 9 must include the string terminator in the last descriptor.
Event 23 must be published with no descriptors, in accordance with
the manifest.

PR-URL: https://github.com/nodejs/node/pull/5742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-23 14:12:25 +00:00
Jackson Tian
91466b855f lib: refactor code with startsWith/endsWith
reduce using RegExp for string test. This pull reuqest replaces
various usages of regular expressions in favor of the ES2015
startsWith and endsWith methods.

PR-URL: https://github.com/nodejs/node/pull/5753
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-03-23 15:58:52 +02:00
Ben Noordhuis
fb51c396ff deps: backport 8d00c2c from v8 upstream
Original commit message:

    Unbreak --gdbjit for embedders.

    Embedders don't use d8.cc.  Move gdbjit initialization to api.cc.

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

Fixes: https://github.com/nodejs/node/issues/2076
PR-URL: https://github.com/nodejs/node/pull/5577
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-03-23 09:48:54 +01:00
Jeremiah Senkpiel
ec6af31eba lib: rename /node.js to /bootstrap_node.js
PR-URL: https://github.com/nodejs/node/pull/5103
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 19:21:20 -04:00
Jeremiah Senkpiel
4bf2acaa1e lib,src: move src/node.js to lib/internal/node.js
PR-URL: https://github.com/nodejs/node/pull/5103
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 19:21:15 -04:00
Jeremiah Senkpiel
015cef25eb lib,src: refactor src/node.js into internal files
PR-URL: https://github.com/nodejs/node/pull/5103
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 19:20:01 -04:00
Myles Borins
2c672891e1 2016-03-22, Version v4.4.1 'Argon' (LTS)
This LTS release comes with 113 commits, 56 of which are doc related,
18 of which are build / tooling related, 16 of which are test related
and 7 which are benchmark related.

Notable Changes:

* build:
  - Updated Logos for the OSX + Windows installers
    - (Rod Vagg) https://github.com/nodejs/node/pull/5401
    - (Robert Jefe Lindstaedt) https://github.com/nodejs/node/pull/5531
  - New option to select your VS Version in the Windows installer
    - (julien.waechter) https://github.com/nodejs/node/pull/4645
  - Support Visual C++ Build Tools 2015
    - (João Reis) https://github.com/nodejs/node/pull/5627
* tools:
  - Gyp now works on OSX without XCode
    - (Shigeki Ohtsu) https://github.com/nodejs/node/pull/1325

PR-URL: https://github.com/nodejs/node/pull/5835
2016-03-22 15:56:16 -07:00
John Eversole
d16d9047ea doc: explain path.format expected properties
Explain the expected properties in path.format

Fixes: https://github.com/nodejs/node/issues/5746
PR-URL: https://github.com/nodejs/node/pull/5801
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-22 23:46:33 +02:00
Corey Kosak
e301f979de doc: typo: interal->internal.
Fixes a copy typo in the events.md docs.

PR-URL: https://github.com/nodejs/node/pull/5849
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 23:26:27 +02:00
Robert Chiras
cd9f54b3b9 build: add script to create Android .mk files
The create_android_makefiles script will create .mk files for node and
all of its dependencies ready to be build using Android build system.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node/pull/5544
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-22 19:17:28 +01:00
Robert Chiras
271201fea9 build: add suport for x86 architecture
Modified android-configure script to support also x86 arch.
Currently added support only for ia32 target arch.
Also, compile openssl without asm, since using the asm sources will make
node fail to run on Android, because it adds text relocations.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: https://github.com/nodejs/node/pull/5544
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-22 19:17:28 +01:00
Benjamin Gruenbaum
c9c387fdac dns: Use object without protoype for map
Currently we use `{}` for the `lookup` function to find the relevant
resolver to the dns.resolve function. It is preferable to use an
object without a Object.prototype, currently for example you can do
something like:

```js
dns.resolve("google.com", "toString", console.log);
```

And get `[Object undefined]` logged and the callback would never be
called. This is unexpected and strange behavior in my opinion.
In addition, if someone adds a property to `Object.prototype` might
also create unexpected results.

This pull request fixes it, with it an appropriate error is thrown.

PR-URL: https://github.com/nodejs/node/pull/5843
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-22 11:13:03 -07:00
Benjamin Gruenbaum
4985c3411f dns: Refactor forEach to map
Refactor a forEach to a `map` in the `setServers` function of the
dns module - simplifying the code. In addition, use more descriptive
variable names and `const` over `var` where possible.

PR-URL: https://github.com/nodejs/node/pull/5803
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-03-22 19:58:44 +02:00
Tom Gallacher
03e07d32ac src: override v8 thread defaults using cli options
Based on the conversation in #4243 this implements a way to increase
and decrease the size of the thread pool used in v8.

Currently v8 restricts the thread pool size to `kMaxThreadPoolSize`
which at this commit is (4). So it is only possible to
decrease the thread pool size at the time of this commit. However with
changes upstream this could change at a later date.
If set to 0 then v8 would choose an appropriate size of the thread pool
based on the number of online processors.

PR-URL: https://github.com/nodejs/node/pull/4344
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-22 07:55:53 -07:00
Benjamin Gruenbaum
8baaa25aec dns: use template literals
Prefer the use of template string literals over string concatenation
in the dns module, makes dns consistent with other modules basically
doing https://github.com/nodejs/node/pull/5778 for it.

PR-URL: https://github.com/nodejs/node/pull/5809
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22 11:30:57 +02:00
Jérémy Lal
c979a2d447 test: smaller chunk size for smaller person.jpg
PR-URL: https://github.com/nodejs/node/pull/5813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-21 23:21:07 -07:00
Jérémy Lal
2b60481942 test: strip non-free icc profile from person.jpg
Fixes: https://github.com/nodejs/node/issues/5749
PR-URL: https://github.com/nodejs/node/pull/5813
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-21 23:20:43 -07:00
Matt Loring
d3c0d1bb8b buffer: throw range error before truncating write
The check to determine whether `noAssert` was set to true and thus
whether RangeErrors should be thrown was happening after the write was
truncated to the available size of the buffer. These checks now occur in
the correct order.

Fixes: https://github.com/nodejs/node/issues/5587
PR-URL: https://github.com/nodejs/node/pull/5605
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 21:51:33 -07:00
Rich Trott
cde81b6b9f benchmark: fix linting errors
4d78121b77 had lint errors that went
undetected. This fixes them.

PR-URL: https://github.com/nodejs/node/pull/5840
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 20:55:33 -07:00
Santiago Gimeno
6a3d38f00f test: remove timer from test-http-1.0
It's possible that the `end` event is emitted after the timeout fires
causing the test to fail. Just remove the timer. If for some reason the
`end` would never fire, the test will fail with a timeout.

PR-URL: https://github.com/nodejs/node/pull/5129
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-03-21 17:08:36 -07:00
Santiago Gimeno
c7b127025a test: repl tab completion test
It checks that `eval` is called with `.scope` as an input string.

PR-URL: https://github.com/nodejs/node/pull/5534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:55:49 -07:00
Bill Automata
e136c179c1 doc: update crypto docs to use good defaults
[Diffie-Hellman](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange#Cryptographic_explanation)
keys are composed of a `generator` a `prime` a `secret_key`
and the `public_key` resulting from the math operation:

```
(generator ^ secret_key) mod prime = public_key
```

Diffie-Hellman keypairs will compute a matching shared secret
if and only if the generator and prime match for both
recipients.  The generator is usually **2** and the prime is
what is called a [Safe Prime](https://en.wikipedia.org/wiki/Safe_prime).

Usually this matching is accomplished by using
[standard published groups](http://tools.ietf.org/html/rfc3526).
We expose access those groups with the `crypto.getDiffieHellman`
function.

`createDiffieHellman` is trickier to use.  The original example
had the user creating 11 bit keys, and creating random groups of
generators and primes. 11 bit keys are very very small, can be
cracked by a single person on a single sheet of paper.  A
byproduct of using such small keys were that it was a high
likelihood that two calls of `createDiffieHellman(11)` would
result in using the same 11 bit safe prime.

The original example code would fail when the safe primes generated
at 11 bit lengths did not match for alice and bob.

If you want to use your own generated safe `prime` then the proper
use of `createDiffieHellman` is to pass the `prime` and `generator`
to the recipient's constructor, so that when they compute the shared
secret their `prime` and `generator` match, which is fundamental to
the algorithm.

PR-URL: https://github.com/nodejs/node/pull/5505
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:49:46 -07:00
Jackson Tian
4d78121b77 lib: simplify code with String.prototype.repeat()
use String.prototype.repeat() to simplify code, less code,
more semantically.

PR-URL: https://github.com/nodejs/node/pull/5359
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 16:42:58 -07:00
Rod Vagg
bac6c85056 doc: add CTC meeting minutes 2016-02-10
PR-URL: https://github.com/nodejs/node/pull/5273
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:54:35 -07:00
Rod Vagg
5aebbaeb49 doc: add CTC meeting minutes 2016-02-03
PR-URL: https://github.com/nodejs/node/pull/5272
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:53:26 -07:00
Jackson Tian
d2b93e55cc lib: reduce usage of self = this
Remove unnecessary `self = this`.

PR-URL: https://github.com/nodejs/node/pull/5231
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 15:48:51 -07:00
Wolfgang Steiner
f70c71f168 doc: explain error message on missing main file
Added a hint saying that node uses the default "Cannot find module"
error when requiring a module for which the "main" file specified in
the package.json is missing.

PR-URL: https://github.com/nodejs/node/pull/5812
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 14:59:13 -07:00
Jeremiah Senkpiel
91cf55ba8e doc: add a cli options doc page
This page is mostly a mirror of the updated manual page.

PR-URL: https://github.com/nodejs/node/pull/5787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
2016-03-21 17:33:42 -04:00
James M Snell
d0edabecbf net: strict checking for internal/net isLegalPort
Add stricter testing for the isLegalPort method in internal/net.
This ensures that odd inputs such as isLegalPort(true) and
isLegalPort([1]) aren't acceptable as valid port inputs.

PR-URL: https://github.com/nodejs/node/pull/5733
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-21 12:08:57 -07:00
Michael Dawson
287bdabe40 test: make test-net-connect-options-ipv6.js better
Improve the robustness of test-net-connect-options-ipv6.js

PPC Suse build team encountered intermittent failures related
to dns.  Improve test to make it more robust in the face
of intermittent dns issues.

PR-URL: https://github.com/nodejs/node/pull/5791
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 12:45:42 -04:00
Jeremiah Senkpiel
d3a75344f5 timers: fix lint from 4fe02e2
Fixes: https://github.com/nodejs/node/issues/5823
Refs: https://github.com/nodejs/node/pull/5793
PR-URL: https://github.com/nodejs/node/pull/5825
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-03-21 12:35:12 -04:00
Mithun Patel
54e6a8d6d7 doc: Add windows example for Path.format
PR-URL: https://github.com/nodejs/node/pull/5700
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-21 09:11:56 -07:00
Santiago Gimeno
8d394810e8 test: fix test-cluster-worker-kill
Don't check that the `disconnect` event is emitted before the `exit`
event as the order is not guaranteed.

PR-URL: https://github.com/nodejs/node/pull/5814
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 08:55:52 -07:00
Claudio Rodriguez
74a703df84 test: fix flaky test-cluster-shared-leak
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: https://github.com/nodejs/node/issues/5604
PR-URL: https://github.com/nodejs/node/pull/5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 08:53:44 -07:00
Benjamin Gruenbaum
b9299884dc dns: use isIp consistently
Currently the DNS module imports isIP from both cares and `net` and
uses both of them both throughout the code base. This PR removes the
direct dependency `dns` has on `net` and uses `isIp` from c-ares all
the time. Note that both functions do the same thing.

PR-URL: https://github.com/nodejs/node/pull/5804
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 08:50:59 -07:00
Rich Trott
ccb7b45ba0 test: minimize test-http-get-pipeline-problem
Reduce resoures required by test.

Clarify comment explaining source of test and what the test is looking
for.

Fixes: https://github.com/nodejs/node/issues/5725
PR-URL: https://github.com/nodejs/node/pull/5728
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21 08:43:41 -07:00
Jeremiah Senkpiel
4fe02e23af timers: give Timeouts a constructor name
Refs: https://github.com/nodejs/node/pull/5792
PR-URL: https://github.com/nodejs/node/pull/5793
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-03-21 11:21:53 -04:00
Ben Noordhuis
a76cb4d2f6 deps: remove unused openssl files
Refs: https://github.com/nodejs/node/issues/5615
PR-URL: https://github.com/nodejs/node/pull/5619
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-21 13:25:28 +01:00
Bryan English
0fd3327879 doc: grammar, clarity and links in timers doc
Added appropriate in-document links. Clarified a bit of
`setImmediate`, including a quick grammar fix (plural possessive
apostrophe).

PR-URL: https://github.com/nodejs/node/pull/5792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-21 09:48:54 +02:00
Rich Trott
f158a8662d src,tools: use template literals
Convert string concatenation to template literals. Enforce with lint
rule.

PR-URL: https://github.com/nodejs/node/pull/5778
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-03-20 14:58:45 +02:00
Florian MARGAINE
e5f8a6a2fa fs: add the fs.mkdtemp() function.
This uses libuv's mkdtemp function to provide a way to create a
temporary folder, using a prefix as the path. The prefix is appended
six random characters. The callback function will receive the name
of the folder that was created.

Usage example:

fs.mkdtemp('/tmp/foo-', function(err, folder) {
    console.log(folder);
        // Prints: /tmp/foo-Tedi42
});

The fs.mkdtempSync version is also provided. Usage example:

console.log(fs.mkdtemp('/tmp/foo-'));
    // Prints: tmp/foo-Tedi42

This pull request also includes the relevant documentation changes
and tests.

PR-URL: https://github.com/nodejs/node/pull/5333
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-20 11:49:02 +02:00
Benjamin Gruenbaum
e6bfe044ff net: remove unused var self = this from old code
Removed an unused `var self = this` that is no longer required.

PR-URL: https://github.com/nodejs/node/pull/5224
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-20 11:35:46 +02:00
Stefano Vozza
4f6ad5c1dd doc: align doc/api/tls.markdown with style guide
Brings tls.markdown into alignment with the node.js
styleguide, specifically regarding the use of
personal pronouns. Also, fixes various typos,
punctuation errors, missing definite/indefinite
articles and other minor grammatical issues.

PR-URL: https://github.com/nodejs/node/pull/5706
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-20 10:42:04 +02:00
Rich Trott
8b43d3f52d zlib: do not emit event on *Sync() methods
Asynchronous functions in `zlib` should not emit the close event.

This fixes an issue where asynchronous calls in a for loop could exhaust
memory because the pending event prevents the objects from being garbage
collected.

Fixes: https://github.com/nodejs/node/issues/1668
PR-URL: https://github.com/nodejs/node/pull/5707
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-03-19 13:38:26 -07:00
Ali Ijaz Sheikh
a53b2ac4b1 contextify: tie lifetimes of context & sandbox
When the previous set of changes (bfff07b4) it was possible to have the
context get garbage collected while sandbox was still live. We need to
tie the lifetime of the context to the lifetime of the sandbox.

Fixes: https://github.com/nodejs/node/issues/5768
PR-URL: https://github.com/nodejs/node/pull/5786
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-03-19 07:45:38 -07:00