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 9b7a691 as of 2018-03-21
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
  • Loading branch information
chakrabot committed Mar 24, 2018
2 parents 3036f13 + 9b7a691 commit cdaf0d4
Show file tree
Hide file tree
Showing 40 changed files with 626 additions and 191 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.8.0">9.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.9.0">9.9.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.8.0">9.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.7.1">9.7.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.7.0">9.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.6.1">9.6.1</a><br/>
Expand Down
194 changes: 123 additions & 71 deletions COLLABORATOR_GUIDE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/chakrashim/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 5
#define V8_BUILD_NUMBER 254
#define V8_PATCH_LEVEL 40
#define V8_PATCH_LEVEL 41

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 5
#define V8_BUILD_NUMBER 254
#define V8_PATCH_LEVEL 40
#define V8_PATCH_LEVEL 41

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
4 changes: 1 addition & 3 deletions deps/v8/src/compiler/escape-analysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,7 @@ void ReduceNode(const Operator* op, EscapeAnalysisTracker::Scope* current,
break;
}
case IrOpcode::kTypeGuard: {
// The type-guard is re-introduced in the final reducer if the types
// don't match.
current->SetReplacement(current->ValueInput(0));
current->SetVirtualObject(current->ValueInput(0));
break;
}
case IrOpcode::kReferenceEqual: {
Expand Down
23 changes: 23 additions & 0 deletions deps/v8/test/mjsunit/compiler/escape-analysis-18.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --allow-natives-syntax --turbo-escape

function bar(arr) {
var x = 0;
arr.forEach(function(el) {
x = el;
});
return x;
}

function foo(array) {
return bar(array);
}

let array = [,.5,];
foo(array);
foo(array);
%OptimizeFunctionOnNextCall(foo);
foo(array);
8 changes: 4 additions & 4 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ For more information about the used equality comparisons see

## Strict mode
<!-- YAML
added: REPLACEME
added: v9.9.0
changes:
- version: REPLACEME
- version: v9.9.0
pr-url: https://github.com/nodejs/node/pull/17615
description: Added error diffs to the strict mode
- version: REPLACEME
- version: v9.9.0
pr-url: https://github.com/nodejs/node/pull/17002
description: Added strict mode to the assert module.
-->
Expand Down Expand Up @@ -924,7 +924,7 @@ instead of the `AssertionError`.
<!-- YAML
added: v0.1.21
changes:
- version: REPLACEME
- version: v9.9.0
pr-url: https://github.com/nodejs/node/pull/17584
description: The `error` parameter can now be an object as well.
- version: v4.2.0
Expand Down
12 changes: 10 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,11 @@ This property is deprecated. Please use `crypto.setFips()` and
### crypto.createCipher(algorithm, password[, options])
<!-- YAML
added: v0.1.94
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated: Use [`crypto.createCipheriv()`][] instead.
- `algorithm` {string}
- `password` {string | Buffer | TypedArray | DataView}
- `options` {Object} [`stream.transform` options][]
Expand Down Expand Up @@ -1290,7 +1294,7 @@ Adversaries][] for details.
<!-- YAML
added: v0.1.94
changes:
- version: REPLACEME
- version: v9.9.0
pr-url: https://github.com/nodejs/node/pull/18644
description: The `iv` parameter may now be `null` for ciphers which do not
need an initialization vector.
Expand Down Expand Up @@ -1334,7 +1338,11 @@ called.
### crypto.createDecipher(algorithm, password[, options])
<!-- YAML
added: v0.1.94
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated: Use [`crypto.createDecipheriv()`][] instead.
- `algorithm` {string}
- `password` {string | Buffer | TypedArray | DataView}
- `options` {Object} [`stream.transform` options][]
Expand All @@ -1358,7 +1366,7 @@ to create the `Decipher` object.
<!-- YAML
added: v0.1.94
changes:
- version: REPLACEME
- version: v9.9.0
pr-url: https://github.com/nodejs/node/pull/18644
description: The `iv` parameter may now be `null` for ciphers which do not
need an initialization vector.
Expand Down
18 changes: 18 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -959,11 +959,25 @@ Type: Runtime
[`decipher.final()`][]. In the future, this API will likely be removed, and it
is recommended to use [`decipher.final()`][] instead.
<a id="DEP0106"></a>
### DEP0106: crypto.createCipher and crypto.createDecipher
Type: Documentation-only
Using [`crypto.createCipher()`][] and [`crypto.createDecipher()`][] should be
avoided as they use a weak key derivation function (MD5 with no salt) and static
initialization vectors. It is recommended to derive a key using
[`crypto.pbkdf2()`][] and to use [`crypto.createCipheriv()`][] and
[`crypto.createDecipheriv()`][] to obtain the [`Cipher`][] and [`Decipher`][]
objects respectively.
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
[`Buffer.isBuffer()`]: buffer.html#buffer_class_method_buffer_isbuffer_obj
[`Cipher`]: crypto.html#crypto_class_cipher
[`Decipher`]: crypto.html#crypto_class_decipher
[`assert`]: assert.html
[`clearInterval()`]: timers.html#timers_clearinterval_timeout
[`clearTimeout()`]: timers.html#timers_cleartimeout_timeout
Expand All @@ -976,7 +990,11 @@ is recommended to use [`decipher.final()`][] instead.
[`child_process`]: child_process.html
[`console.error()`]: console.html#console_console_error_data_args
[`console.log()`]: console.html#console_console_log_data_args
[`crypto.createCipher()`]: crypto.html#crypto_crypto_createcipher_algorithm_password_options
[`crypto.createCipheriv()`]: crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
[`crypto.createCredentials()`]: crypto.html#crypto_crypto_createcredentials_details
[`crypto.createDecipher()`]: crypto.html#crypto_crypto_createdecipher_algorithm_password_options
[`crypto.createDecipheriv()`]: crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options
[`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding
[`crypto.fips`]: crypto.html#crypto_crypto_fips
[`crypto.pbkdf2()`]: crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback
Expand Down
20 changes: 16 additions & 4 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ be emitted either by client-side code or server-side code.

### Server-side example

The following illustrates a simple, plain-text HTTP/2 server using the
Core API:
The following illustrates a simple HTTP/2 server using the Core API.
Since there are no browsers known that support
[unencrypted HTTP/2][HTTP/2 Unencrypted], the use of
[`http2.createSecureServer()`][] is necessary when communicating
with browser clients.

```js
const http2 = require('http2');
Expand Down Expand Up @@ -252,7 +255,7 @@ and would instead register a handler for the `'stream'` event emitted by the
```js
const http2 = require('http2');

// Create a plain-text HTTP/2 server
// Create an unencrypted HTTP/2 server
const server = http2.createServer();

server.on('stream', (stream, headers) => {
Expand Down Expand Up @@ -1727,10 +1730,18 @@ changes:
Returns a `net.Server` instance that creates and manages `Http2Session`
instances.

Since there are no browsers known that support
[unencrypted HTTP/2][HTTP/2 Unencrypted], the use of
[`http2.createSecureServer()`][] is necessary when communicating
with browser clients.

```js
const http2 = require('http2');

// Create a plain-text HTTP/2 server
// Create an unencrypted HTTP/2 server.
// Since there are no browsers known that support
// unencrypted HTTP/2, the use of `http2.createSecureServer()`
// is necessary when communicating with browser clients.
const server = http2.createServer();

server.on('stream', (stream, headers) => {
Expand Down Expand Up @@ -3085,6 +3096,7 @@ following additional properties:
[Compatibility API]: #http2_compatibility_api
[HTTP/1]: http.html
[HTTP/2]: https://tools.ietf.org/html/rfc7540
[HTTP/2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption
[HTTP2 Headers Object]: #http2_headers_object
[HTTP2 Settings Object]: #http2_settings_object
[HTTPS]: https.html
Expand Down
7 changes: 5 additions & 2 deletions doc/api/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protocol. Here's a simple example showing how to use the [CPU profiler][]:

```js
const inspector = require('inspector');

const fs = require('fs');
const session = new inspector.Session();
session.connect();

Expand All @@ -154,8 +154,11 @@ session.post('Profiler.enable', () => {
// invoke business logic under measurement here...

// some time later...
session.post('Profiler.stop', ({ profile }) => {
session.post('Profiler.stop', (err, { profile }) => {
// write profile to disk, upload, etc.
if (!err) {
fs.writeFileSync('./profile.cpuprofile', JSON.stringify(profile));
}
});
});
});
Expand Down
14 changes: 14 additions & 0 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,20 @@ This API returns true if an exception is pending.

This API can be called even if there is a pending JavaScript exception.

#### napi_fatal_exception
<!-- YAML
added: REPLACEME
-->
```C
napi_status napi_fatal_exception(napi_env env, napi_value err);
```

- `[in] env`: The environment that the API is invoked under.
- `[in] err`: The error you want to pass to `uncaughtException`.

Trigger an `uncaughtException` in JavaScript. Useful if an async
callback throws an exception with no way to recover.

### Fatal Errors

In the event of an unrecoverable error in a native module, a fatal error can be
Expand Down
74 changes: 37 additions & 37 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,19 @@ buffered writes in a more optimized manner.

See also: [`writable.uncork()`][].

##### writable.destroy([error])
<!-- YAML
added: v8.0.0
-->

* Returns: {this}

Destroy the stream, and emit the passed `error` and a `close` event.
After this call, the writable stream has ended and subsequent calls
to `write` / `end` will give an `ERR_STREAM_DESTROYED` error.
Implementors should not override this method,
but instead implement [`writable._destroy`][writable-_destroy].

##### writable.end([chunk][, encoding][, callback])
<!-- YAML
added: v0.9.4
Expand Down Expand Up @@ -536,19 +549,6 @@ write('hello', () => {

A Writable stream in object mode will always ignore the `encoding` argument.

##### writable.destroy([error])
<!-- YAML
added: v8.0.0
-->

* Returns: {this}

Destroy the stream, and emit the passed `error` and a `close` event.
After this call, the writable stream has ended and subsequent calls
to `write` / `end` will give an `ERR_STREAM_DESTROYED` error.
Implementors should not override this method,
but instead implement [`writable._destroy`][writable-_destroy].

### Readable Streams

Readable streams are an abstraction for a *source* from which data is
Expand Down Expand Up @@ -806,6 +806,20 @@ In general, the `readable.pipe()` and `'data'` event mechanisms are easier to
understand than the `'readable'` event. However, handling `'readable'` might
result in increased throughput.

##### readable.destroy([error])
<!-- YAML
added: v8.0.0
-->

* `error` {Error} Error which will be passed as payload in `'error'` event
* Returns: {this}

Destroy the stream, and emit `'error'` and `close`. After this call, the
readable stream will release any internal resources and subsequent calls
to `push` will be ignored.
Implementors should not override this method, but instead implement
[`readable._destroy`][readable-_destroy].

##### readable.isPaused()
<!-- YAML
added: v0.11.14
Expand Down Expand Up @@ -913,16 +927,6 @@ to prevent memory leaks.
The [`process.stderr`][] and [`process.stdout`][] Writable streams are never
closed until the Node.js process exits, regardless of the specified options.

##### readable.readableHighWaterMark
<!-- YAML
added: v9.3.0
-->

* Returns: {number}

Returns the value of `highWaterMark` passed when constructing this
`Readable`.

##### readable.read([size])
<!-- YAML
added: v0.9.4
Expand Down Expand Up @@ -969,6 +973,16 @@ also be emitted.
Calling [`stream.read([size])`][stream-read] after the [`'end'`][] event has
been emitted will return `null`. No runtime error will be raised.

##### readable.readableHighWaterMark
<!-- YAML
added: v9.3.0
-->

* Returns: {number}

Returns the value of `highWaterMark` passed when constructing this
`Readable`.

##### readable.readableLength
<!-- YAML
added: v9.4.0
Expand Down Expand Up @@ -1168,20 +1182,6 @@ myReader.on('readable', () => {
});
```

##### readable.destroy([error])
<!-- YAML
added: v8.0.0
-->

* `error` {Error} Error which will be passed as payload in `'error'` event
* Returns: {this}

Destroy the stream, and emit `'error'` and `close`. After this call, the
readable stream will release any internal resources and subsequent calls
to `push` will be ignored.
Implementors should not override this method, but instead implement
[`readable._destroy`][readable-_destroy].

##### readable[@@asyncIterator]
<!-- YAML
added: REPLACEME
Expand Down
4 changes: 2 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ For Example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`

### tlsSocket.getFinished()
<!-- YAML
added: REPLACEME
added: v9.9.0
-->

* Returns: {Buffer|undefined} The latest `Finished` message that has been
Expand Down Expand Up @@ -647,7 +647,7 @@ If the peer does not provide a certificate, an empty object will be returned.

### tlsSocket.getPeerFinished()
<!-- YAML
added: REPLACEME
added: v9.9.0
-->

* Returns: {Buffer|undefined} The latest `Finished` message that is expected
Expand Down
Loading

0 comments on commit cdaf0d4

Please sign in to comment.