platform/upstream/nodejs.git
8 years agotest: fix default value for additional param
Sakthipriyan Vairamani [Wed, 26 Aug 2015 09:52:43 +0000 (15:22 +0530)]
test: fix default value for additional param

In Python, the default values of parameters are evaluated only once
during their declaration. So, whenever the default parameter is used
the same object will be used. Since we use a list, which is a mutable
object, this could lead to unexpected results.

PR-URL: https://github.com/nodejs/node/pull/2553
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: enable arrow functions in .eslintrc
Sakthipriyan Vairamani [Sat, 12 Sep 2015 20:42:39 +0000 (02:12 +0530)]
tools: enable arrow functions in .eslintrc

As of v8 4.5, arrow functions are rolled out. This patch allows eslint
to accept arrow functions as well.

PR-URL: #2840
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agobuild: clean up the generated tap file
Sakthipriyan Vairamani [Sat, 12 Sep 2015 19:56:33 +0000 (01:26 +0530)]
build: clean up the generated tap file

Make `make clean` cleanup the generated tap file as well.

Fixes: #2834

PR-URL: #2837
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agotools: open `test.tap` file in write-binary mode
Sakthipriyan Vairamani [Sat, 12 Sep 2015 19:54:57 +0000 (01:24 +0530)]
tools: open `test.tap` file in write-binary mode

By default the logfile is opened in append mode. This commit makes sure
that the file is opened in write-binary mode, so that the file will be
created if it doesn't exist or overwrite if it exists.

Fixes: #2834

PR-URL: #2837
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agostreams: refactor LazyTransform to internal/
Brendan Ashworth [Wed, 26 Aug 2015 21:41:28 +0000 (14:41 -0700)]
streams: refactor LazyTransform to internal/

This commit refactors LazyTransform from the crypto implementation
(lib/crypto.js) into an internal module (not publicy accessible) in
internal/streams/lazy_transform.js. This promotes a more modular core
design and removes code bloat in crypto, as LazyTransform didn't
specifically have anything to do with cryptography, but rather a fast
way to support two APIs on a stream.

PR-URL: https://github.com/nodejs/node/pull/2566
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
8 years agofs: consider NaN/Infinity in toUnixTimestamp
Yazhong Liu [Sat, 15 Aug 2015 16:30:31 +0000 (00:30 +0800)]
fs: consider NaN/Infinity in toUnixTimestamp

PR-URL: https://github.com/nodejs/node/pull/2387
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agohttp_server: fix resume after socket close
Fedor Indutny [Fri, 11 Sep 2015 21:04:26 +0000 (14:04 -0700)]
http_server: fix resume after socket close

Socket resume may happen on a next tick, and in following scenario:

1. `socket.resume()`
2. `socket._handle.close()`
3. `socket._handle = null;`

The `_resume` will be invoked with empty `._handle` property. There is
nothing bad about it, and we should just ignore the `resume`/`pause`
events in this case.

Same applies to the unconsuming of socket on adding `data` and/or
`readable` event listeners.

Fix: https://github.com/nodejs/node/issues/2821

PR-URL: https://github.com/nodejs/node/pull/2824
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodeps: upgraded to node-gyp@3.0.3 in npm
Kat Marchán [Fri, 11 Sep 2015 19:01:42 +0000 (12:01 -0700)]
deps: upgraded to node-gyp@3.0.3 in npm

No more cherry-picked io patches. hooray.

PR-URL: https://github.com/nodejs/node/pull/2822
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodeps: upgrade to npm 2.14.3
Kat Marchán [Fri, 11 Sep 2015 18:39:03 +0000 (11:39 -0700)]
deps: upgrade to npm 2.14.3

PR-URL: https://github.com/nodejs/node/pull/2822
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agofs: implemented WriteStream#writev
Ron Korving [Tue, 28 Jul 2015 05:59:35 +0000 (14:59 +0900)]
fs: implemented WriteStream#writev

Streams with writev allow many buffers to be pushed to underlying OS
APIs in one batch, in this case improving write throughput by an order
of magnitude. This is especially noticeable when writing many (small)
buffers.

PR-URL: https://github.com/nodejs/node/pull/2167
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agotools: add missing tick processor polyfill
Matt Loring [Fri, 4 Sep 2015 19:01:07 +0000 (12:01 -0700)]
tools: add missing tick processor polyfill

The polyfill is only needed if incorrect command line arguments
are passed to the script so it was missed in initial testing.

PR-URL: https://github.com/nodejs/node/pull/2694
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agotools: fix flakiness in test-tick-processor
Matt Loring [Fri, 4 Sep 2015 18:49:36 +0000 (11:49 -0700)]
tools: fix flakiness in test-tick-processor

Per the discussion on #2471, the JS symbols checked for by this test
were occasionally too deep in the stack and were being ignored by the
tick processor.

I have addressed this by increasing the stack depth inspected by the
tick processor and looking for the eval symbol which is more likely
to be present. Additional flakiness was caused by occasional misses
of the code creation event for the JS function being executed. I now
have separate code snippets to test for JS and C++ symbols and if
the code creation event is missed for the JS symbol test then I check
for a percentage of UNKNOWN symbols in processed output. This is
considered a success as the processing scripts in the node repository
are still correctly processing the ticks recieved from the v8
scripts. Further investigation is needed into the v8 profiling
scripts to determine why code creation events are being missed.

PR-URL: https://github.com/nodejs/node/pull/2694
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: fix broken link in repl.markdown
Danny Nemer [Sat, 12 Sep 2015 00:23:06 +0000 (20:23 -0400)]
doc: fix broken link in repl.markdown

PR-URL: https://github.com/nodejs/node/pull/2827
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: fix typos in README
Ionică Bizău [Mon, 14 Sep 2015 06:50:23 +0000 (09:50 +0300)]
doc: fix typos in README

 - Fixed typo: "insallation" -> "installation"
 - Added an "that" in a sentence where it was needed for clarity.

PR-URL: https://github.com/nodejs/node/pull/2852
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agodoc: add tunniclm as a collaborator
Mike Tunnicliffe [Fri, 11 Sep 2015 22:03:30 +0000 (23:03 +0100)]
doc: add tunniclm as a collaborator

Refs: https://github.com/nodejs/node/issues/2413
PR-URL: https://github.com/nodejs/node/pull/2826
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agosrc: use ZCtxt as a source for v8::Isolates
Roman Klauke [Tue, 25 Aug 2015 19:17:36 +0000 (21:17 +0200)]
src: use ZCtxt as a source for v8::Isolates

Other methods like `After` already use ZCtxt as the source for
Enviroment/ v8::Isolate objects, this commit applies the same style
to the other missing methods (`After sync` and `Write`)

PR-URL: https://github.com/nodejs/node/pull/2547
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: remove disabled test
Rich Trott [Sat, 12 Sep 2015 21:10:41 +0000 (14:10 -0700)]
test: remove disabled test

Remove test file that has been in disabled from its very first commit
(9ccf0e52) in 2011. It is a test for
https://github.com/nodejs/node-v0.x-archive/issues/670 from 2011. There
are no assertions in the test. In that regard, it is more debugging code
than a test.

PR-URL: https://github.com/nodejs/node/pull/2841
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
8 years agodoc: fix two doc errors in stream and process
Jeremiah Senkpiel [Tue, 25 Aug 2015 21:19:18 +0000 (17:19 -0400)]
doc: fix two doc errors in stream and process

`process.stdout` always blocks as of
20176a98416353d4596900793f739d5ebf4f0ee1

`WritableState.buffer` is `getBuffer()` as of
91586661c983f45d650644451df73c8649a8d459

PR-URL: https://github.com/nodejs/node/pull/2549
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
8 years agodoc: fixed io.js references in process.markdown
Tristian Flanagan [Sun, 13 Sep 2015 15:09:32 +0000 (11:09 -0400)]
doc: fixed io.js references in process.markdown

Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2846

8 years agotest: split up internet dns tests
Rich Trott [Wed, 9 Sep 2015 22:06:31 +0000 (15:06 -0700)]
test: split up internet dns tests

For whatever reason, the CI win2012 machine was timing out on the
internet test-dns file. Split out ipv4 and ipv6 specific tests to
separate files so tests do not time out. (Each file is given a 60
second timeout on CI. Tests within a file are run in sequence.)

PR-URL: https://github.com/nodejs/node/pull/2802
Fixes: https://github.com/nodejs/node/issues/2468
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotest: increase dgram timeout for armv6
Rich Trott [Fri, 11 Sep 2015 04:04:08 +0000 (21:04 -0700)]
test: increase dgram timeout for armv6

test-dgram-broadcast-multi-process.js and
test-dgram-multicast-multi-process.js were failing on Pi 1 because the
test was timing out. Changed static 5000ms timeout to a dynamically
determined timeout based on the processor using
common.platformTimeout().

PR-URL: https://github.com/nodejs/node/pull/2808
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agotools: remove hyphen in TAP result
Sakthipriyan Vairamani [Mon, 7 Sep 2015 06:24:12 +0000 (11:54 +0530)]
tools: remove hyphen in TAP result

As it is, the TAP result shows an extra hyphen in front of test names.
Sample:
ci.nodejs.org/job/node-test-commit-osx/nodes=osx1010/454/tapResults/
This patch removes the extra hyphen.

PR-URL: https://github.com/nodejs/node/pull/2718
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agosrc: fix v8::CpuProfiler idle sampling
Oleksandr Chekhovskyi [Fri, 7 Aug 2015 13:03:04 +0000 (15:03 +0200)]
src: fix v8::CpuProfiler idle sampling

Ensure that samples are evenly distributed, which is required for
v8::CpuProfiler users to work correctly (v8-profiler / node-inspector).

PR-URL: https://github.com/nodejs/node/pull/2324
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodeps: update libuv to version 1.7.4
Saúl Ibarra Corretgé [Fri, 11 Sep 2015 15:55:29 +0000 (17:55 +0200)]
deps: update libuv to version 1.7.4

PR-URL: https://github.com/nodejs/node/pull/2817
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: use "Calls" over "Executes" for consistency
Minwoo Jung [Thu, 10 Sep 2015 15:20:57 +0000 (00:20 +0900)]
doc: use "Calls" over "Executes" for consistency

"Calls" is used frequently throughout the docs except for this line.
Use "Calls" over "Executes" to make it consistent.

PR-URL: https://github.com/nodejs/node/pull/2800
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agotest: remove valid hostname check in test-dns.js
Rich Trott [Wed, 9 Sep 2015 21:50:19 +0000 (14:50 -0700)]
test: remove valid hostname check in test-dns.js

Operating systems can and do return invalid hostnames if that's
what they have (for example) in /etc/hosts. Test passes if no
error is thrown and the hostname string is not empty.

Fixes: https://github.com/nodejs/node/issues/2468
PR-URL: https://github.com/nodejs/node/pull/2785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: use US English for consistency
Anne-Gaelle Colom [Wed, 9 Sep 2015 21:21:11 +0000 (22:21 +0100)]
doc: use US English for consistency

behaviour -> behavior

PR-URL: https://github.com/nodejs/node/pull/2784
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
8 years agodeps: cherry-pick 6da51b4 from v8's upstream
Fedor Indutny [Thu, 10 Sep 2015 19:26:50 +0000 (12:26 -0700)]
deps: cherry-pick 6da51b4 from v8's upstream

Original commit message:

    TypedArray accessor detection: consider entire prototype chain

    When looking up a special accessor for known TypedArray fields
    ("length", "byteLength", "byteOffset"), consider the entire
    prototype chain, not only the direct prototype.
    This allows subclasses of TypedArrays to benefit from fast
    specialized accesses.

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

    Cr-Commit-Position: refs/heads/master@{#30678}

Benchmark results:

   buffers/buffer-iterate.js size=16386 type=slow method=for n=1000:
   ./node: 71607 node: 8702.3 ............ 722.85%

Improvement depends on the code, but generally brings us back to the
performance that we had before the v8 update (if not making it
faster).

Fixes: https://github.com/nodejs/node/issues/2463
PR-URL: https://github.com/nodejs/node/pull/2801
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agobindings: close after reading module struct
Fedor Indutny [Thu, 10 Sep 2015 11:01:20 +0000 (04:01 -0700)]
bindings: close after reading module struct

Do not let the module struct to be deallocated by `uv_dlclose`
before reading data from it.

PR-URL: https://github.com/nodejs/node/pull/2792
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
8 years agodoc: use 3rd person singular for consistency
Anne-Gaelle Colom [Wed, 9 Sep 2015 10:40:46 +0000 (11:40 +0100)]
doc: use 3rd person singular for consistency

PR-URL: https://github.com/nodejs/node/pull/2765
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
8 years agowin,msi: fix documentation shortcut url
Brian White [Thu, 10 Sep 2015 03:45:28 +0000 (23:45 -0400)]
win,msi: fix documentation shortcut url

Fixes: https://github.com/nodejs/node/issues/2779
PR-URL: https://github.com/nodejs/node/pull/2781
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodoc: describe process API for IPC
Sam Roberts [Mon, 15 Jun 2015 02:06:22 +0000 (19:06 -0700)]
doc: describe process API for IPC

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/1978

8 years agotest: expect error for test_lookup_ipv6_hint on FreeBSD
Rich Trott [Mon, 7 Sep 2015 03:47:41 +0000 (20:47 -0700)]
test: expect error for test_lookup_ipv6_hint on FreeBSD

FreeBSD does not support the V4MAPPED flag so expect an error.

This is a partial fix for https://github.com/nodejs/node/issues/2468.
It only fixes it on FreeBSD. Failures on other platforms are due to
other reasons and need to be fixed separately.

PR-URL: https://github.com/nodejs/node/pull/2724
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Fixes: https://github.com/nodejs/node/issues/2468

8 years agodoc: fix comma splice in Assertion Testing doc
Rich Trott [Mon, 7 Sep 2015 18:13:07 +0000 (11:13 -0700)]
doc: fix comma splice in Assertion Testing doc

This fixes a minor typographical error in the Assertion Testing doc.

PR-URL: https://github.com/nodejs/node/pull/2728
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agoWorking on 4.0.1
Rod Vagg [Tue, 8 Sep 2015 23:04:53 +0000 (09:04 +1000)]
Working on 4.0.1

8 years ago2015-09-08, Version 4.0.0 (Stable) Release v4.0.0
Rod Vagg [Mon, 7 Sep 2015 03:54:43 +0000 (13:54 +1000)]
2015-09-08, Version 4.0.0 (Stable) Release

This list of changes is relative to the last io.js v3.x branch
release, v3.3.0. Please see the list of notable changes in the v3.x,
v2.x and v1.x releases for a more complete list of changes from
0.12.x. Note, that some changes in the v3.x series as well as major
breaking changes in this release constitute changes required for full
convergence of the Node.js and io.js projects.

* child_process: ChildProcess.prototype.send() and process.send()
  operate asynchronously across all platforms so an optional callback
  parameter has been introduced that will be invoked once the message
  has been sent, i.e. .send(message[, sendHandle][, callback])
  (Ben Noordhuis) #2620.
* node: Rename "io.js" code to "Node.js" (cjihrig) #2367.
* node-gyp: This release bundles an updated version of node-gyp that
  works with all versions of Node.js and io.js including nightly and
  release candidate builds. From io.js v3 and Node.js v4 onward, it
  will only download a headers tarball when building addons rather
  than the entire source. (Rod Vagg) #2700.
* npm: Upgrade to version 2.14.2 from 2.13.3, includes a security
  update, see https://github.com/npm/npm/releases/tag/v2.14.2 for more
  details, (Kat Marchán) #2696.
* timers: Improved timer performance from porting the 0.12
  implementation, plus minor fixes (Jeremiah Senkpiel) #2540,
  (Julien Gilli) nodejs/node-v0.x-archive#8751 nodejs/node-v0.x-archive#8905
* util: The util.is*() functions have been deprecated, beginning with
  deprecation warnings in the documentation for this release, users
  are encouraged to seek more robust alternatives in the npm registry,
  (Sakthipriyan Vairamani) #2447.
* v8: Upgrade to version 4.5.103.30 from 4.4.63.30 (Ali Ijaz Sheikh) #2632.
  - Implement new TypedArray prototype methods: copyWithin(), every(),
    fill(), filter(), find(), findIndex(), forEach(), indexOf(),
    join(), lastIndexOf(), map(), reduce(), reduceRight(), reverse(),
    slice(), some(), sort(). See
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    for further information.
  - Implement new TypedArray.from() and TypedArray.of() functions. See
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    for further information.
  - Implement arrow functions. See
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
    for further information.
  - Full ChangeLog available at
    https://github.com/v8/v8-git-mirror/blob/4.5.103/ChangeLog

8 years agobuild: fix v8_enable_handle_zapping override
Karl Skomski [Mon, 7 Sep 2015 21:57:18 +0000 (23:57 +0200)]
build: fix v8_enable_handle_zapping override

It was previously ignored by features.gypi and therefore
enabled by default for release builds.

See https://code.google.com/p/chromium/issues/detail?id=318206

PR-URL: https://github.com/nodejs/node/pull/2731
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agonode-gyp: float 3.0.1, minor fix for download url
Rod Vagg [Tue, 8 Sep 2015 09:51:35 +0000 (19:51 +1000)]
node-gyp: float 3.0.1, minor fix for download url

PR-URL: https://github.com/nodejs/node/pull/2737
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodeps: improve ArrayBuffer performance in v8
Fedor Indutny [Tue, 8 Sep 2015 00:40:43 +0000 (17:40 -0700)]
deps: improve ArrayBuffer performance in v8

This a backport of the following commits from the v8's upstream:

1a8c38c50513f9af07ada479629a653e1cf36ff3
206f12abee3f1e7eda8fc6521d48f3c319460ee1
9e3676da9ab1aaf7de3e8582cb3fdefcc3dbaf33

Original commit message:

    heap: make array buffer maps disjoint

    Remove intersection from the `std::map`s representing current live
    ArrayBuffers. While being simpler to understand, it poses
    significant performance issue for the active ArrayBuffer users (like
    node.js).

    Store buffers separately, and process them together during
    mark-sweep phase.

    The results of benchmarks are:

    $ ./node-slow bench && ./node-fast bench
    4997.4 ns/op
    4685.7 ns/op

    NOTE: `fast` - was a patched node.js, `slow` - unpatched node.js
    with vanilla v8.

PR-URL: https://github.com/nodejs/node/pull/2732
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
8 years agocluster: allow shared reused dgram sockets
Fedor Indutny [Tue, 25 Aug 2015 19:24:41 +0000 (12:24 -0700)]
cluster: allow shared reused dgram sockets

Allow listening on reused dgram ports in cluster workers.

Fix: https://github.com/joyent/node/issues/9261
PR-URL: https://github.com/nodejs/node/pull/2548
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agobuild: remote commands on staging in single session
Rod Vagg [Mon, 7 Sep 2015 05:00:28 +0000 (15:00 +1000)]
build: remote commands on staging in single session

PR-URL: https://github.com/nodejs/node/pull/2717
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
8 years agodeps: float node-gyp v3.0.0
Rod Vagg [Sat, 5 Sep 2015 05:37:48 +0000 (15:37 +1000)]
deps: float node-gyp v3.0.0

* support process.release
* support all io.js versions
* support node v4+ including new download locations
* enable delay-load hook by default by default
* download header-only tarballs instead of full source

See https://github.com/nodejs/node-gyp/pull/711 for full details

PR-URL: https://github.com/nodejs/node/pull/2700
Reviewed-By: Forrest L Norvell <forrest@npmjs.com>
8 years agosrc: s/ia32/x86 for process.release.libUrl for win
Rod Vagg [Sat, 5 Sep 2015 04:41:34 +0000 (14:41 +1000)]
src: s/ia32/x86 for process.release.libUrl for win

PR-URL: https://github.com/nodejs/node/pull/2699
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
8 years agochild_process: use stdio.fd even if it is 0
Evan Lucas [Mon, 7 Sep 2015 17:25:25 +0000 (12:25 -0500)]
child_process: use stdio.fd even if it is 0

Previously, in _validateStdio we were using stdio.fd || stdio. If
stdio.fd was falsy (or 0 in the case of stdin), then the entire stdio
object would be passed which could cause a crash.

Fixes: https://github.com/nodejs/node/issues/2721
PR-URL: https://github.com/nodejs/node/pull/2727
Reviewed-By: silverwind - Roman Reiss <me@silverwind.io>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
8 years agocrypto: replace rwlocks with simple mutexes
Ben Noordhuis [Mon, 7 Sep 2015 12:32:00 +0000 (14:32 +0200)]
crypto: replace rwlocks with simple mutexes

It was pointed out by Zhou Ran that the Windows XP implementation of
uv_rwlock_rdlock() and friends may unlock the inner write mutex on a
different thread than the one that locked it, resulting in undefined
behavior.

The only place that uses rwlocks is the crypto module.  Make that use
normal (simple) mutexes instead.

OpenSSL's critical sections are generally very short, with exclusive
access outnumbering shared access by a factor of three or more, so
it's not as if using rwlocks gives a decisive performance advantage.

PR-URL: https://github.com/nodejs/node/pull/2723
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agodoc: update AUTHORS list
Rod Vagg [Mon, 31 Aug 2015 11:07:52 +0000 (21:07 +1000)]
doc: update AUTHORS list

Update AUTHORS list using tools/update-authors.sh

8 years agobuild: make .msi install to "nodejs", not "node"
Rod Vagg [Sat, 5 Sep 2015 06:18:22 +0000 (16:18 +1000)]
build: make .msi install to "nodejs", not "node"

PR-URL: https://github.com/nodejs/node/pull/2701
Reviewed-By: Joao Reis <reis@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agocpplint: make it possible to run outside git repo
Ben Noordhuis [Sat, 5 Sep 2015 13:44:21 +0000 (15:44 +0200)]
cpplint: make it possible to run outside git repo

cpplint uses the top-level .git directory to determine what the root is
for #include guards.  If it doesn't find a .git directory, it walks up
all the way to the system root and subsequently complains that guards
must be written as HOME_USER_SRC_NODE_SRC_FILENAME_H_.

This commit replaces the .git-based path munging with a fixed root path
relative to the location of the cpplint script, making it possible to
successfully run `make test` from an extracted tarball.

Fixes: https://github.com/nodejs/node/issues/2693
PR-URL: https://github.com/nodejs/node/pull/2710
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodeps: create .npmrc during npm tests
Kat Marchán [Fri, 4 Sep 2015 21:48:13 +0000 (14:48 -0700)]
deps: create .npmrc during npm tests

This patch should make the tests pass on the downstreamed npm.

PR-URL: https://github.com/nodejs/node/pull/2696
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodeps: upgrade to npm 2.14.2
Kat Marchán [Fri, 4 Sep 2015 21:47:14 +0000 (14:47 -0700)]
deps: upgrade to npm 2.14.2

PR-URL: https://github.com/nodejs/node/pull/2696
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agodeps: backport 75e43a6 from v8 upstream (again)
saper [Tue, 11 Aug 2015 07:48:49 +0000 (00:48 -0700)]
deps: backport 75e43a6 from v8 upstream (again)

Note: When this was cherry-picked for v8 v4.4 (landed in nodejs#2636),
test-heap.cc:1989 chunk did not exist. It now exists in
v8 v4.5.103.30. This PR completes the cherry pick of the whole commit
from v8.

PR-URL: https://github.com/nodejs/node/pull/2692
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
Original commit message:
  Use static_cast<> for NULL (clang 3.7)

  The following errors come up when compiling v8
   with clang 3.7 on FreeBSD/amd64:

  src/runtime/runtime-i18n.cc:629:37: error: reinterpret_cast from
  'nullptr_t' to 'v8::internal::Smi *' is not allowed
    local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

  test/cctest/test-heap.cc:131:20: error: reinterpret_cast from
        'nullptr_t' to 'v8::internal::Object *' is not allowed
    Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  test/cctest/test-heap.cc:1989:18: error: reinterpret_cast from
        'nullptr_t' to 'Address' (aka 'unsigned char *') is not
        allowed
    Address base = reinterpret_cast<Address>(NULL);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  +add myself to the AUTHORS file.

  BUG=

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

  Cr-Commit-Position: refs/heads/master@{#30103}

8 years agobuild: fix .pkg creation tooling
Rod Vagg [Fri, 4 Sep 2015 05:41:21 +0000 (15:41 +1000)]
build: fix .pkg creation tooling

PR-URL: https://github.com/nodejs/node/pull/2687
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
8 years agodoc: add TSC meeting minutes 2015-09-02
Rod Vagg [Thu, 3 Sep 2015 06:22:57 +0000 (16:22 +1000)]
doc: add TSC meeting minutes 2015-09-02

PR-URL: https://github.com/nodejs/node/pull/2674
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: update environment vars in manpage and --help
Roman Reiss [Fri, 4 Sep 2015 10:48:20 +0000 (12:48 +0200)]
doc: update environment vars in manpage and --help

- Added NODE_REPL_HISTORY to the environment variables in the --help
  and made all descriptions start with lower case for consistency.

- Added NODE_REPL_HISTORY and NODE_ICU_DATA to the man page.

PR-URL: https://github.com/nodejs/node/pull/2690
Reviewed-By: fishrock123 - Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com>
8 years agosrc: use standard conform snprintf on windows
Karl Skomski [Thu, 3 Sep 2015 08:10:30 +0000 (10:10 +0200)]
src: use standard conform snprintf on windows

The version used before returned -1 on truncation which does not conform
to the standard.

PR-URL: https://github.com/nodejs/node/pull/2404
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agosrc: fix buffer overflow for long exception lines
Karl Skomski [Thu, 3 Sep 2015 08:10:29 +0000 (10:10 +0200)]
src: fix buffer overflow for long exception lines

Long exception lines resulted in a stack buffer overflow or assertion
because it was assumed snprintf not counts discarded chars
or the assertion itself was incorrect: `(off) >= sizeof(arrow)`

PR-URL: https://github.com/nodejs/node/pull/2404
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
8 years agodoc,test: enable recursive file watching in Windows
Sakthipriyan Vairamani [Wed, 2 Sep 2015 09:24:24 +0000 (14:54 +0530)]
doc,test: enable recursive file watching in Windows

Recursive file watching is supported by libuv since 1.7.0. Refer
https://github.com/nodejs/node/blob/master/deps/uv/ChangeLog#L126. This
patch notes that in the docs and enables testing this feature. It also
adds proper TAP plugin parsable message for other platforms.

PR-URL: https://github.com/nodejs/node/pull/2649
Fixes: https://github.com/nodejs/node/issues/375
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: silverwind - Roman Reiss <me@silverwind.io>
8 years agobuffer: SlowBuffer only accept valid numeric values
Michaël Zasso [Tue, 1 Sep 2015 08:51:17 +0000 (10:51 +0200)]
buffer: SlowBuffer only accept valid numeric values

Fixes a regression that appeared with the new Buffer implementation in v3.
Without this change, calling the SlowBuffer constructor with something else
than a number would abort on the C++ side. This makes sure that the length
argument is coerced to number or is 0.

Fixes: https://github.com/nodejs/node/issues/2634
PR-URL: https://github.com/nodejs/node/pull/2635
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
8 years agotest: fix use of `common` before required
Rod Vagg [Fri, 4 Sep 2015 02:25:31 +0000 (12:25 +1000)]
test: fix use of `common` before required

PR-URL: https://github.com/nodejs/node/pull/2685
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodeps: upgrade V8 to 4.5.103.30
Ali Ijaz Sheikh [Tue, 1 Sep 2015 00:10:53 +0000 (17:10 -0700)]
deps: upgrade V8 to 4.5.103.30

Pick up https://github.com/v8/v8-git-mirror/commit/f9a0a1636a4623a5522c33674e110b346d085340
Commit log at https://chromium.googlesource.com/v8/v8.git/+log/branch-heads/4.5

PR-URL: https://github.com/nodejs/node/pull/2632
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
8 years agosrc: re-enable fast math on arm
Michaël Zasso [Fri, 28 Aug 2015 07:02:32 +0000 (09:02 +0200)]
src: re-enable fast math on arm

Ref: https://github.com/nodejs/node/issues/1376
Ref: https://github.com/nodejs/node/pull/1398
Issue fixed in V8: https://chromium.googlesource.com/v8/v8/+/81703350bbb9923d211fe5b79e90bd458b0916e2
V8-Bug: https://code.google.com/p/v8/issues/detail?id=4019

PR-URL: https://github.com/nodejs/node/pull/2592
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
8 years agosrc: enable vector ics on arm again
Ali Ijaz Sheikh [Sun, 23 Aug 2015 19:53:05 +0000 (12:53 -0700)]
src: enable vector ics on arm again

The flag is no longer supported by V8 4.5, and the original issue [1] on ARMv6
no longer manifests with (at least) 4.5.103.20.

[1] See https://code.google.com/p/v8/issues/detail?id=4338

PR-URL: https://github.com/nodejs/node/pull/2509
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agosrc: replace usage of v8::Handle with v8::Local
Michaël Zasso [Sat, 18 Jul 2015 09:34:16 +0000 (11:34 +0200)]
src: replace usage of v8::Handle with v8::Local
v8::Handle is deprecated: https://codereview.chromium.org/1224623004

PR-URL: https://github.com/nodejs/io.js/pull/2202
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agosrc: enable v8 deprecation warnings and fix them
Ben Noordhuis [Wed, 1 Jul 2015 21:47:37 +0000 (23:47 +0200)]
src: enable v8 deprecation warnings and fix them

Turn on V8 API deprecation warnings.  Fix up the no-arg Isolate::New()
calls in src/node.cc and src/debug-agent.cc.

PR-URL: https://github.com/nodejs/io.js/pull/2091
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agotest: fix test-repl-tab-complete.js for V8 4.5
Ali Ijaz Sheikh [Sun, 23 Aug 2015 14:24:54 +0000 (07:24 -0700)]
test: fix test-repl-tab-complete.js for V8 4.5

The list of Array properties needed to be updated to match the new ones added
in V8 4.5.

PR-URL: https://github.com/nodejs/node/pull/2509
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agocontextify: ignore getters during initialization
Fedor Indutny [Tue, 7 Jul 2015 22:27:14 +0000 (15:27 -0700)]
contextify: ignore getters during initialization

The `context_` is not initialized until the `CreateV8Context` will
return. Make sure that it will be empty (by moving away initialization
from constructor) at start, and ignore getter callbacks until it will
have some value.

PR-URL: https://github.com/nodejs/io.js/pull/2091
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
8 years agosrc: apply debug force load fixups from 41e63fb
Ali Ijaz Sheikh [Sun, 23 Aug 2015 13:28:57 +0000 (06:28 -0700)]
src: apply debug force load fixups from 41e63fb

Apply the src/node_contextify.cc and lib/module.js fixups from @bnoordhuis
https://github.com/nodejs/node/commit/41e63fb088a29fa05e16fb0d997255678134c043

PR-URL: https://github.com/nodejs/node/pull/2509
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agodeps: upgrade V8 to 4.5.103.24
Ali Ijaz Sheikh [Sun, 23 Aug 2015 13:09:40 +0000 (06:09 -0700)]
deps: upgrade V8 to 4.5.103.24

Upgrade to the latest branch-head for V8 4.5. For the full commit log see
https://github.com/v8/v8-git-mirror/commits/4.5.103.24

PR-URL: https://github.com/nodejs/node/pull/2509
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agoevents,lib: don't require EE#listenerCount()
Jeremiah Senkpiel [Wed, 2 Sep 2015 16:23:49 +0000 (12:23 -0400)]
events,lib: don't require EE#listenerCount()

Now parts of our public and public-ish APIs fall back to old-style
listenerCount() if the emitter does not have a listenerCount function.

Fixes: https://github.com/nodejs/node/issues/2655
Refs: 8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e

PR-URL: https://github.com/nodejs/node/pull/2661
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
8 years agobuild: add --enable-asan with builtin leakcheck
Karl Skomski [Fri, 14 Aug 2015 08:07:18 +0000 (10:07 +0200)]
build: add --enable-asan with builtin leakcheck

PR-URL: https://github.com/nodejs/node/pull/2376
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
8 years agochild_process: check execFile and fork args
James M Snell [Wed, 2 Sep 2015 21:16:24 +0000 (14:16 -0700)]
child_process: check execFile and fork args

Port of joyent/node commits:

 * https://github.com/nodejs/node-v0.x-archive/commit/e17c5a72b23f920f291d61f2780068c18768cb92
 * https://github.com/nodejs/node-v0.x-archive/commit/70dafa7b624abd43432e03304d65cc527fbecc11

Pull over test-child-process-spawn-typeerror.js from v0.12, replacing
the existing test in master. The new test includes a broader set of
tests on the various arg choices and throws.

Reviewed-By: trevnorris - Trevor Norris <trevnorris@nodejs.org>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani
PR-URL: https://github.com/nodejs/node/pull/2667
Fixes: https://github.com/nodejs/node/issues/2515

8 years agotest: refactor to eliminate flaky test
Rich Trott [Sat, 29 Aug 2015 02:56:22 +0000 (19:56 -0700)]
test: refactor to eliminate flaky test

This retains the key elements of test-child-process-fork-getconnections
(forks a child process, sends a bunch of sockets, uses getConnections()
to enumerate them) but contains some code to work around an apparent
intermittent bug that occurs on OS X where a socket seems to close
itself unexpectedly.

https://github.com/nodejs/node/issues/2610 was opened for the bug that
was causing the problem in the first place.

PR-URL: https://github.com/nodejs/node/pull/2609
Fixes: https://github.com/nodejs/node/issues/1100
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
8 years agodoc: update url doc to account for escaping
Jeremiah Senkpiel [Fri, 28 Aug 2015 20:58:18 +0000 (16:58 -0400)]
doc: update url doc to account for escaping

Fixes: https://github.com/nodejs/node/issues/2113
Ref: 17a379ec39a34408477ac6a43751c1b9b2e952a4
PR-URL: https://github.com/nodejs/node/pull/2605
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
8 years agodoc: reorder collaborators by their usernames
Johan Bergström [Sat, 25 Jul 2015 06:09:59 +0000 (16:09 +1000)]
doc: reorder collaborators by their usernames

Fixes: https://github.com/nodejs/node/issues/1972
PR-URL: https://github.com/nodejs/node/pull/2322
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agotest: mark eval_messages as flaky
Alexis Campailla [Wed, 2 Sep 2015 09:30:00 +0000 (11:30 +0200)]
test: mark eval_messages as flaky

This test has failed recently during a PR test in Jenkins, for
reasons seemingly not related to the change in the PR.

PR-URL: https://github.com/nodejs/node/pull/2648
Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com>
8 years agochild_process: add callback parameter to .send()
Ben Noordhuis [Sun, 30 Aug 2015 22:49:34 +0000 (00:49 +0200)]
child_process: add callback parameter to .send()

Add an optional callback parameter to `ChildProcess.prototype.send()`
that is invoked when the message has been sent.

Juggle the control channel's reference count so that in-flight messages
keep the event loop (and therefore the process) alive until they have
been sent.

`ChildProcess.prototype.send()` and `process.send()` used to operate
synchronously but became asynchronous in commit libuv/libuv@393c1c5
("unix: set non-block mode in uv_{pipe,tcp,udp}_open"), which landed
in io.js in commit 07bd05b ("deps: update libuv to 1.2.1").

Fixes: https://github.com/nodejs/node/issues/760
PR-URL: https://github.com/nodejs/node/pull/2620
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
8 years agosrc: fix memory leak in ExternString
Karl Skomski [Sun, 16 Aug 2015 14:09:02 +0000 (16:09 +0200)]
src: fix memory leak in ExternString

v8 will silently return an empty handle
which doesn't delete our data if string length is
above String::kMaxLength

Fixes: https://github.com/nodejs/node/issues/1374
PR-URL: https://github.com/nodejs/node/pull/2402
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Amended by @rvagg to change author date from
  "1970-08-16 16:09:02 +0200"
to
  "2015-08-16 16:09:02 +0200"
as per discussion @ https://github.com/nodejs/node/issues/2713

8 years agotest: mark test-vm-syntax-error-stderr as flaky
João Reis [Wed, 2 Sep 2015 16:36:29 +0000 (17:36 +0100)]
test: mark test-vm-syntax-error-stderr as flaky

Ref: https://github.com/nodejs/node/issues/2660

PR-URL: https://github.com/nodejs/node/pull/2662
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
8 years agotest: mark test-repl-persistent-history as flaky
João Reis [Wed, 2 Sep 2015 16:03:02 +0000 (17:03 +0100)]
test: mark test-repl-persistent-history as flaky

This test is already being investigated, but until a solution is found
it should be marked flaky.

Ref: https://github.com/nodejs/node/issues/2319
Ref: https://github.com/nodejs/node/pull/2356

PR-URL: https://github.com/nodejs/node/pull/2659
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
8 years agodeps: backport 75e43a6 from v8 upstream
saper [Tue, 11 Aug 2015 07:48:49 +0000 (00:48 -0700)]
deps: backport 75e43a6 from v8 upstream

Note: chunk in test-heap.cc:1989 discarded as related code missing
from current version in node.

Original commit message:

  Use static_cast<> for NULL (clang 3.7)

  The following errors come up when compiling v8
   with clang 3.7 on FreeBSD/amd64:

  src/runtime/runtime-i18n.cc:629:37: error: reinterpret_cast from
  'nullptr_t' to 'v8::internal::Smi *' is not allowed
    local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

  test/cctest/test-heap.cc:131:20: error: reinterpret_cast from
        'nullptr_t' to 'v8::internal::Object *' is not allowed
    Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  test/cctest/test-heap.cc:1989:18: error: reinterpret_cast from
        'nullptr_t' to 'Address' (aka 'unsigned char *') is not
        allowed
    Address base = reinterpret_cast<Address>(NULL);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  +add myself to the AUTHORS file.

  BUG=

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

  Cr-Commit-Position: refs/heads/master@{#30103}

PR-URL: https://github.com/nodejs/node/pull/2636
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
8 years agodoc: update changelog for io.js v3.3.0
Rod Vagg [Wed, 2 Sep 2015 05:39:16 +0000 (15:39 +1000)]
doc: update changelog for io.js v3.3.0

Notable changes:

* build: Add a --link-module option to configure that can be used to
  bundle additional JavaScript modules into a built binary
  (Bradley Meck) #2497
* docs: Merge outstanding doc updates from joyent/node
  (James M Snell) #2378
* http_parser: Significant performance improvement by having
  http.Server consume all initial data from its net.Socket and parsing
  directly without having to enter JavaScript. Any 'data' listeners on
  the net.Socket will result in the data being "unconsumed" into
  JavaScript, thereby undoing any performance gains.
  (Fedor Indutny) #2355
* libuv: Upgrade to 1.7.3 (from 1.6.1), see
  https://github.com/libuv/libuv/blob/v1.x/ChangeLog for details
  (Saúl Ibarra Corretgé) #2310
* V8: Upgrade to 4.4.63.30 (from 4.4.63.26) (Michaël Zasso) #2482

cherry-picked from v3.x @ 1a6e52db30

PR-URL: https://github.com/nodejs/node/pull/2653
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
8 years agotimers: minor _unrefActive fixes and improvements
Jeremiah Senkpiel [Thu, 27 Aug 2015 19:56:46 +0000 (15:56 -0400)]
timers: minor _unrefActive fixes and improvements

This commit addresses most of the review comments in
https://github.com/nodejs/node/pull/2540, which are kept in this
separate commit so as to better preserve the prior two patches as they
landed in 0.12.

This commit:
- Fixes a bug with unrefActive timers and disposed domains.
- Fixes a bug with unrolling an unrefActive timer from another.
- Adds a test for both above bugs.
- Improves check logic, making it stricter, simpler, or both.
- Optimizes nicer with a smaller, separate function for the try/catch.

Fixes: https://github.com/nodejs/node-convergence-archive/issues/23
Ref: https://github.com/nodejs/node/issues/268
PR-URL: https://github.com/nodejs/node/pull/2540
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
8 years agotimers: don't mutate unref list while iterating it
Julien Gilli [Thu, 18 Dec 2014 23:36:21 +0000 (15:36 -0800)]
timers: don't mutate unref list while iterating it

Commit 934bfe23a16556d05bfb1844ef4d53e8c9887c3d 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: https://github.com/joyent/node/issues/8897

Conflicts:
lib/timers.js

Fixes: https://github.com/nodejs/node-convergence-archive/issues/23
Ref: https://github.com/nodejs/node/issues/268
PR-URL: https://github.com/nodejs/node/pull/2540
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
8 years agotimers: Avoid linear scan in _unrefActive.
Julien Gilli [Wed, 20 Aug 2014 07:08:32 +0000 (00:08 -0700)]
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: https://github.com/joyent/node/issues/8160

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Conflicts:
lib/timers.js

Fixes: https://github.com/nodejs/node-convergence-archive/issues/23
Ref: https://github.com/nodejs/node/issues/268
PR-URL: https://github.com/nodejs/node/pull/2540
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
8 years agosrc: only set v8 flags if argc > 1
Evan Lucas [Wed, 2 Sep 2015 07:59:21 +0000 (02:59 -0500)]
src: only set v8 flags if argc > 1

ParseArgs sets the first element of v8_args to argv[0], so v8_argc will
always be at least 1. This change only calls
V8::SetFlagsFromCommandLine if v8_argc > 1, leading to an additional
startup improvement of ~5%.

PR-URL: https://github.com/nodejs/node/pull/2646
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
8 years agobuild: fix borked chmod call for release uploads
Rod Vagg [Wed, 2 Sep 2015 07:31:48 +0000 (17:31 +1000)]
build: fix borked chmod call for release uploads

PR-URL: https://github.com/nodejs/node/pull/2645
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodeps: upgrade libuv to 1.7.3
Saúl Ibarra Corretgé [Wed, 5 Aug 2015 19:17:46 +0000 (21:17 +0200)]
deps: upgrade libuv to 1.7.3

PR-URL: https://github.com/nodejs/node/pull/2310
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
8 years agosrc: only memcmp if length > 0 in Buffer::Compare
Karl Skomski [Fri, 21 Aug 2015 11:31:24 +0000 (13:31 +0200)]
src: only memcmp if length > 0 in Buffer::Compare

Both pointer arguments to memcmp are defined as non-null
and compiler optimizes upon that.

PR-URL: https://github.com/nodejs/node/pull/2544
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agotest: improve performance of stringbytes test
Trevor Norris [Mon, 17 Aug 2015 20:32:51 +0000 (14:32 -0600)]
test: improve performance of stringbytes test

String concatenation in the assert messages has drastic impact on test
runtime. Removal of these messages is unlikely to affect debugging if
any breaking changes are made.

Previous time to run:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m2.321s
    user    0m2.256s
    sys     0m0.092s

With fix:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m0.518s
    user    0m0.508s
    sys     0m0.008s

PR-URL: https://github.com/nodejs/node/pull/2544
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agobuild: set file permissions before uploading
Rod Vagg [Mon, 31 Aug 2015 07:33:22 +0000 (17:33 +1000)]
build: set file permissions before uploading

PR-URL: https://github.com/nodejs/node/pull/2623
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
8 years agobuild: change staging directory on new server
Rod Vagg [Mon, 31 Aug 2015 07:03:26 +0000 (17:03 +1000)]
build: change staging directory on new server

new server has "nodejs" and "iojs" directories, upload to the
appropriate one

PR-URL: https://github.com/nodejs/node/pull/2623
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
8 years agobuild: rename 'doc' directory to 'docs' for upload
Rod Vagg [Mon, 31 Aug 2015 06:05:02 +0000 (16:05 +1000)]
build: rename 'doc' directory to 'docs' for upload

to match nodejs.org directory name

PR-URL: https://github.com/nodejs/node/pull/2623
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
8 years agotools: update release.sh to work with new website
Rod Vagg [Mon, 31 Aug 2015 06:01:01 +0000 (16:01 +1000)]
tools: update release.sh to work with new website

now need to specify "nodejs" or "iojs", also remove .gpg file

PR-URL: https://github.com/nodejs/node/pull/2623
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
8 years agobuild: fix bad cherry-pick for vcbuild.bat build-release
Rod Vagg [Mon, 31 Aug 2015 10:24:38 +0000 (20:24 +1000)]
build: fix bad cherry-pick for vcbuild.bat build-release

PR-URL: https://github.com/nodejs/node/pull/2625
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
8 years agodoc: add TSC meeting minutes 2015-08-12
Rod Vagg [Wed, 19 Aug 2015 10:49:12 +0000 (20:49 +1000)]
doc: add TSC meeting minutes 2015-08-12

PR-URL: https://github.com/nodejs/node/pull/2438
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
8 years agotest: unmark test-process-argv-0.js as flaky
Rich Trott [Sat, 29 Aug 2015 20:19:53 +0000 (13:19 -0700)]
test: unmark test-process-argv-0.js as flaky

https://github.com/nodejs/node/pull/2541 fixed flakiness
in test-process-argv-0.js. However, it was not removed
from the list of flaky tests. This removes it from the
list of flaky tests.

PR-URL: https://github.com/nodejs/node/pull/2613
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
8 years agodoc: add TSC meeting minutes 2015-08-26
Rod Vagg [Fri, 28 Aug 2015 06:24:29 +0000 (16:24 +1000)]
doc: add TSC meeting minutes 2015-08-26

PR-URL: https://github.com/nodejs/node/pull/2591
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
8 years agodoc: merge CHANGELOG.md with joyent/node ChangeLog
P.S.V.R [Tue, 25 Aug 2015 09:37:03 +0000 (17:37 +0800)]
doc: merge CHANGELOG.md with joyent/node ChangeLog

PR-URL: https://github.com/nodejs/node/pull/2536
Reviewed-By: Rod Vagg <rod@vagg.org>
8 years agotest: lint and refactor to avoid autocrlf issue
Roman Reiss [Sat, 29 Aug 2015 07:41:27 +0000 (09:41 +0200)]
test: lint and refactor to avoid autocrlf issue

The test was failing after adding 'use strict' because the windows CI
uses the autocrlf option of git which converts \r into \r\n on checkout.

Refactored the test to not read itself anymore and create a temp file on
the fly instead to avoid this line-ending issue.

PR-URL: https://github.com/nodejs/node/pull/2494
Reviewed-By: Joao Reis <reis@janeasystems.com>
8 years agodoc: clarify cluster behaviour with no workers
Jeremiah Senkpiel [Fri, 28 Aug 2015 21:26:07 +0000 (17:26 -0400)]
doc: clarify cluster behaviour with no workers

Fixes: https://github.com/nodejs/node/issues/1239
Ref: 41b75ca9263f368db790fbdcc3963bb1a8c5cb7e
PR-URL: https://github.com/nodejs/node/pull/2606
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>