Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge 4503da8 as of 2017-11-29
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Taylor Woll <taylor.woll@microsoft.com>
  • Loading branch information
chakrabot committed Dec 6, 2017
2 parents 3045bb0 + 4503da8 commit ec78bf4
Show file tree
Hide file tree
Showing 85 changed files with 775 additions and 603 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*
test/fixtures
test/message/esm_display_syntax_error.mjs
tools/eslint
tools/icu
tools/remark-*
Expand Down
2 changes: 2 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ Prerequisites:
* Basic Unix tools required for some tests,
[Git for Windows](http://git-scm.com/download/win) includes Git Bash
and tools which can be included in the global `PATH`.
* **Optional** (to build the MSI): the [WiX Toolset v3.11](http://wixtoolset.org/releases/)
and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).

If the path to your build directory contains a space, the build will likely fail.

Expand Down
2 changes: 1 addition & 1 deletion COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ can be fast-tracked and may be landed after a shorter delay:
* Focused changes that affect only documentation and/or the test suite.
`code-and-learn` and `good-first-issue` pull requests typically fall
into this category.
* Changes that revert commit(s) and/or fix regressions.
* Changes that fix regressions.

When a pull request is deemed suitable to be fast-tracked, label it with
`fast-track`. The pull request can be landed once 2 or more collaborators
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ test-v8: v8
--no-presubmit \
--shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \
$(TAP_V8)
git clean -fdxq -- deps/v8
@echo Testing hash seed
$(MAKE) test-hash-seed

Expand Down
4 changes: 3 additions & 1 deletion benchmark/timers/immediate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
thousands: [2000],
thousands: [5000],
type: ['depth', 'depth1', 'breadth', 'breadth1', 'breadth4', 'clear']
});

Expand Down Expand Up @@ -88,6 +88,7 @@ function breadth1(N) {

// concurrent setImmediate, 4 arguments
function breadth4(N) {
N /= 2;
var n = 0;
bench.start();
function cb(a1, a2, a3, a4) {
Expand All @@ -101,6 +102,7 @@ function breadth4(N) {
}

function clear(N) {
N *= 4;
bench.start();
function cb(a1) {
if (a1 === 2)
Expand Down
4 changes: 2 additions & 2 deletions benchmark/timers/set-immediate-breadth-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ function main(conf) {
bench.start();
for (let i = 0; i < N; i++) {
if (i % 3 === 0)
setImmediate(cb3, 512, true, null);
setImmediate(cb3, 512, true, null, 512, true, null);
else if (i % 2 === 0)
setImmediate(cb2, false, 5.1);
setImmediate(cb2, false, 5.1, 512);
else
setImmediate(cb1, 0);
}
Expand Down
14 changes: 7 additions & 7 deletions benchmark/timers/set-immediate-depth-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const common = require('../common.js');
const bench = common.createBenchmark(main, {
millions: [10]
millions: [5]
});

function main(conf) {
Expand All @@ -15,29 +15,29 @@ function main(conf) {
function cb3(n, arg2, arg3) {
if (--n) {
if (n % 3 === 0)
setImmediate(cb3, n, true, null);
setImmediate(cb3, n, true, null, 5.1, null, true);
else if (n % 2 === 0)
setImmediate(cb2, n, 5.1);
setImmediate(cb2, n, 5.1, true);
else
setImmediate(cb1, n);
}
}
function cb2(n, arg2) {
if (--n) {
if (n % 3 === 0)
setImmediate(cb3, n, true, null);
setImmediate(cb3, n, true, null, 5.1, null, true);
else if (n % 2 === 0)
setImmediate(cb2, n, 5.1);
setImmediate(cb2, n, 5.1, true);
else
setImmediate(cb1, n);
}
}
function cb1(n) {
if (--n) {
if (n % 3 === 0)
setImmediate(cb3, n, true, null);
setImmediate(cb3, n, true, null, 5.1, null, true);
else if (n % 2 === 0)
setImmediate(cb2, n, 5.1);
setImmediate(cb2, n, 5.1, true);
else
setImmediate(cb1, n);
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/timers/timers-breadth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
thousands: [500],
thousands: [5000],
});

function main(conf) {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/timers/timers-cancel-pooled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
thousands: [500],
millions: [5],
});

function main(conf) {
const iterations = +conf.thousands * 1e3;
const iterations = +conf.millions * 1e6;

var timer = setTimeout(() => {}, 1);
for (var i = 0; i < iterations; i++) {
Expand All @@ -24,7 +24,7 @@ function main(conf) {
clearTimeout(timer);
}

bench.end(iterations / 1e3);
bench.end(iterations / 1e6);
}

function cb() {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/timers/timers-cancel-unpooled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
thousands: [100],
millions: [1],
});

function main(conf) {
const iterations = +conf.thousands * 1e3;
const iterations = +conf.millions * 1e6;

const timersList = [];
for (var i = 0; i < iterations; i++) {
Expand All @@ -18,7 +18,7 @@ function main(conf) {
for (var j = 0; j < iterations + 1; j++) {
clearTimeout(timersList[j]);
}
bench.end(iterations / 1e3);
bench.end(iterations / 1e6);
}

function cb() {
Expand Down
6 changes: 3 additions & 3 deletions benchmark/timers/timers-insert-pooled.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
thousands: [500],
millions: [5],
});

function main(conf) {
const iterations = +conf.thousands * 1e3;
const iterations = +conf.millions * 1e6;

bench.start();

for (var i = 0; i < iterations; i++) {
setTimeout(() => {}, 1);
}

bench.end(iterations / 1e3);
bench.end(iterations / 1e6);
}
6 changes: 3 additions & 3 deletions benchmark/timers/timers-insert-unpooled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ const common = require('../common.js');
const assert = require('assert');

const bench = common.createBenchmark(main, {
thousands: [100],
millions: [1],
});

function main(conf) {
const iterations = +conf.thousands * 1e3;
const iterations = +conf.millions * 1e6;

const timersList = [];

bench.start();
for (var i = 0; i < iterations; i++) {
timersList.push(setTimeout(cb, i + 1));
}
bench.end(iterations / 1e3);
bench.end(iterations / 1e6);

for (var j = 0; j < iterations + 1; j++) {
clearTimeout(timersList[j]);
Expand Down
30 changes: 21 additions & 9 deletions benchmark/timers/timers-timeout-pooled.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
'use strict';
const common = require('../common.js');

// The following benchmark measures setting up n * 1e6 timeouts,
// which then get executed on the next uv tick

const bench = common.createBenchmark(main, {
thousands: [500],
millions: [10],
});

function main(conf) {
const iterations = +conf.thousands * 1e3;
var count = 0;
const iterations = +conf.millions * 1e6;
let count = 0;

for (var i = 0; i < iterations; i++) {
setTimeout(cb, 1);
}

bench.start();
// Function tracking on the hidden class in V8 can cause misleading
// results in this benchmark if only a single function is used —
// alternate between two functions for a fairer benchmark

function cb() {
count++;
if (count === iterations)
bench.end(iterations / 1e3);
bench.end(iterations / 1e6);
}
function cb2() {
count++;
if (count === iterations)
bench.end(iterations / 1e6);
}

for (var i = 0; i < iterations; i++) {
setTimeout(i % 2 ? cb : cb2, 1);
}

bench.start();
}
5 changes: 5 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ added: v0.10
Aborting instead of exiting causes a core file to be generated for post-mortem
analysis using a debugger (such as `lldb`, `gdb`, and `mdb`).

*Note*: If this flag is passed, the behavior can still be set to not abort
through [`process.setUncaughtExceptionCaptureCallback()`][] (and through usage
of the `domain` module that uses it).

### `--trace-warnings`
<!-- YAML
added: v6.0.0
Expand Down Expand Up @@ -598,3 +602,4 @@ greater than `4` (its current default value). For more information, see the
[debugger]: debugger.html
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
27 changes: 27 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,23 @@ A signing `key` was not provided to the [`sign.sign()`][] method.

`c-ares` failed to set the DNS server.

<a id="ERR_DOMAIN_CALLBACK_NOT_AVAILABLE"></a>
### ERR_DOMAIN_CALLBACK_NOT_AVAILABLE

The `domain` module was not usable since it could not establish the required
error handling hooks, because
[`process.setUncaughtExceptionCaptureCallback()`][] had been called at an
earlier point in time.

<a id="ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE"></a>
### ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE

[`process.setUncaughtExceptionCaptureCallback()`][] could not be called
because the `domain` module has been loaded at an earlier point in time.

The stack trace is extended to include the point in time at which the
`domain` module had been loaded.

<a id="ERR_ENCODING_INVALID_ENCODED_DATA"></a>
### ERR_ENCODING_INVALID_ENCODED_DATA

Expand Down Expand Up @@ -1459,6 +1476,15 @@ A Transform stream finished while it was still transforming.

A Transform stream finished with data still in the write buffer.

<a id="ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET"></a>
### ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET

[`process.setUncaughtExceptionCaptureCallback()`][] was called twice,
without first resetting the callback to `null`.

This error is designed to prevent accidentally overwriting a callback registered
from another module.

<a id="ERR_UNESCAPED_CHARACTERS"></a>
### ERR_UNESCAPED_CHARACTERS

Expand Down Expand Up @@ -1565,6 +1591,7 @@ Creation of a [`zlib`][] object failed due to incorrect configuration.
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
[`process.on('uncaughtException')`]: process.html#process_event_uncaughtexception
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
[`require('crypto').setEngine()`]: crypto.html#crypto_crypto_setengine_engine_flags
[`server.listen()`]: net.html#net_server_listen
[ES6 module]: esm.html
Expand Down
26 changes: 13 additions & 13 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ All [`Http2Stream`][] instances are destroyed either when:
When an `Http2Stream` instance is destroyed, an attempt will be made to send an
`RST_STREAM` frame will be sent to the connected peer.

Once the `Http2Stream` instance is destroyed, the `'streamClosed'` event will
When the `Http2Stream` instance is destroyed, the `'close'` event will
be emitted. Because `Http2Stream` is an instance of `stream.Duplex`, the
`'end'` event will also be emitted if the stream data is currently flowing.
The `'error'` event may also be emitted if `http2stream.destroy()` was called
Expand All @@ -655,6 +655,18 @@ abnormally aborted in mid-communication.
*Note*: The `'aborted'` event will only be emitted if the `Http2Stream`
writable side has not been ended.

#### Event: 'close'
<!-- YAML
added: v8.4.0
-->

The `'close'` event is emitted when the `Http2Stream` is destroyed. Once
this event is emitted, the `Http2Stream` instance is no longer usable.

The listener callback is passed a single argument specifying the HTTP/2 error
code specified when closing the stream. If the code is any value other than
`NGHTTP2_NO_ERROR` (`0`), an `'error'` event will also be emitted.

#### Event: 'error'
<!-- YAML
added: v8.4.0
Expand All @@ -674,18 +686,6 @@ argument identifying the frame type, and an integer argument identifying the
error code. The `Http2Stream` instance will be destroyed immediately after the
`'frameError'` event is emitted.

#### Event: 'streamClosed'
<!-- YAML
added: v8.4.0
-->

The `'streamClosed'` event is emitted when the `Http2Stream` is destroyed. Once
this event is emitted, the `Http2Stream` instance is no longer usable.

The listener callback is passed a single argument specifying the HTTP/2 error
code specified when closing the stream. If the code is any value other than
`NGHTTP2_NO_ERROR` (`0`), an `'error'` event will also be emitted.

#### Event: 'timeout'
<!-- YAML
added: v8.4.0
Expand Down
Loading

0 comments on commit ec78bf4

Please sign in to comment.