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

Commit 4a6d224

Browse files
committed
meta: merge node/master into node-chakracore/master
Merge 3f2382b as of 2018-01-04 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Taylor Woll <tawoll@ntdev.microsoft.com>
2 parents 57e9bb4 + 3f2382b commit 4a6d224

21 files changed

+677
-117
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,8 @@ functional guidelines of the Node.js project.
199199

200200
## Pull Requests
201201

202-
Pull Requests are the way in which concrete changes are made to the code,
203-
documentation, dependencies, and tools contained with the `nodejs/node`
204-
repository.
202+
Pull Requests are the way concrete changes are made to the code, documentation,
203+
dependencies, and tools contained in the `nodejs/node` repository.
205204

206205
There are two fundamental components of the Pull Request process: one concrete
207206
and technical, and one more process oriented. The concrete and technical
@@ -603,12 +602,11 @@ your name on it. Congratulations and thanks for your contribution!
603602
All Node.js contributors who choose to review and provide feedback on Pull
604603
Requests have a responsibility to both the project and the individual making the
605604
contribution. Reviews and feedback must be helpful, insightful, and geared
606-
towards improving the contribution as opposed to simply blocking it or
607-
stopping it. If there are reasons why you feel the PR should not land, explain
608-
what those are. Do not expect to be able to block a Pull Request from advancing
609-
simply because you say "No" without giving an explanation. It is also important
610-
to be open to having your mind changed, and to being open to working with the
611-
contributor to make the Pull Request better.
605+
towards improving the contribution as opposed to simply blocking it. If there
606+
are reasons why you feel the PR should not land, explain what those are. Do not
607+
expect to be able to block a Pull Request from advancing simply because you say
608+
"No" without giving an explanation. Be open to having your mind changed. Be open
609+
to working with the contributor to make the Pull Request better.
612610

613611
Reviews that are dismissive or disrespectful of the contributor or any other
614612
reviewers are strictly counter to the [Code of Conduct][].

doc/api/async_hooks.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,8 @@ fs.open(path, 'r', (err, fd) => {
484484
});
485485
```
486486

487-
It is important to note that the ID returned fom `executionAsyncId()` is related
488-
to execution timing, not causality (which is covered by `triggerAsyncId()`). For
489-
example:
487+
The ID returned fom `executionAsyncId()` is related to execution timing, not
488+
causality (which is covered by `triggerAsyncId()`). For example:
490489

491490
```js
492491
const server = net.createServer(function onConnection(conn) {
@@ -538,9 +537,9 @@ own resources.
538537

539538
The `init` hook will trigger when an `AsyncResource` is instantiated.
540539

541-
*Note*: It is important that `before`/`after` calls are unwound
542-
in the same order they are called. Otherwise an unrecoverable exception
543-
will occur and the process will abort.
540+
*Note*: `before` and `after` calls must be unwound in the same order that they
541+
are called. Otherwise, an unrecoverable exception will occur and the process
542+
will abort.
544543

545544
The following is an overview of the `AsyncResource` API.
546545

doc/api/errors.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,10 @@ location information will be displayed for that frame. Otherwise, the
312312
determined function name will be displayed with location information appended
313313
in parentheses.
314314

315-
It is important to note that frames are **only** generated for JavaScript
316-
functions. If, for example, execution synchronously passes through a C++ addon
317-
function called `cheetahify`, which itself calls a JavaScript function, the
318-
frame representing the `cheetahify` call will **not** be present in the stack
319-
traces:
315+
Frames are only generated for JavaScript functions. If, for example, execution
316+
synchronously passes through a C++ addon function called `cheetahify` which
317+
itself calls a JavaScript function, the frame representing the `cheetahify` call
318+
will not be present in the stack traces:
320319

321320
```js
322321
const cheetahify = require('./native-binding.node');

doc/api/http2.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,18 @@ session.setTimeout(2000);
283283
session.on('timeout', () => { /** .. **/ });
284284
```
285285

286+
#### http2session.alpnProtocol
287+
<!-- YAML
288+
added: REPLACEME
289+
-->
290+
291+
* Value: {string|undefined}
292+
293+
Value will be `undefined` if the `Http2Session` is not yet connected to a
294+
socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
295+
will return the value of the connected `TLSSocket`'s own `alpnProtocol`
296+
property.
297+
286298
#### http2session.close([callback])
287299
<!-- YAML
288300
added: REPLACEME
@@ -340,6 +352,18 @@ added: v8.4.0
340352
Will be `true` if this `Http2Session` instance has been destroyed and must no
341353
longer be used, otherwise `false`.
342354

355+
#### http2session.encrypted
356+
<!-- YAML
357+
added: REPLACEME
358+
-->
359+
360+
* Value: {boolean|undefined}
361+
362+
Value is `undefined` if the `Http2Session` session socket has not yet been
363+
connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
364+
and `false` if the `Http2Session` is connected to any other kind of socket
365+
or stream.
366+
343367
#### http2session.goaway([code, [lastStreamID, [opaqueData]]])
344368
<!-- YAML
345369
added: REPLACEME
@@ -363,6 +387,17 @@ added: v8.4.0
363387
A prototype-less object describing the current local settings of this
364388
`Http2Session`. The local settings are local to *this* `Http2Session` instance.
365389

390+
#### http2session.originSet
391+
<!-- YAML
392+
added: REPLACEME
393+
-->
394+
395+
* Value: {string[]|undefined}
396+
397+
If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
398+
will return an Array of origins for which the `Http2Session` may be
399+
considered authoritative.
400+
366401
#### http2session.pendingSettingsAck
367402
<!-- YAML
368403
added: v8.4.0
@@ -1617,6 +1652,13 @@ changes:
16171652
* `http2.constants.PADDING_STRATEGY_CALLBACK` - Specifies that the user
16181653
provided `options.selectPadding` callback is to be used to determine the
16191654
amount of padding.
1655+
* `http2.constants.PADDING_STRATEGY_ALIGNED` - Will *attempt* to apply
1656+
enough padding to ensure that the total frame length, including the
1657+
9-byte header, is a multiple of 8. For each frame, however, there is a
1658+
maxmimum allowed number of padding bytes that is determined by current
1659+
flow control state and settings. If this maximum is less than the
1660+
calculated amount needed to ensure alignment, the maximum will be used
1661+
and the total frame length will *not* necessarily be aligned at 8 bytes.
16201662
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
16211663
streams for the remote peer as if a SETTINGS frame had been received. Will
16221664
be overridden if the remote peer sets its own value for.
@@ -1688,6 +1730,13 @@ changes:
16881730
* `http2.constants.PADDING_STRATEGY_CALLBACK` - Specifies that the user
16891731
provided `options.selectPadding` callback is to be used to determine the
16901732
amount of padding.
1733+
* `http2.constants.PADDING_STRATEGY_ALIGNED` - Will *attempt* to apply
1734+
enough padding to ensure that the total frame length, including the
1735+
9-byte header, is a multiple of 8. For each frame, however, there is a
1736+
maxmimum allowed number of padding bytes that is determined by current
1737+
flow control state and settings. If this maximum is less than the
1738+
calculated amount needed to ensure alignment, the maximum will be used
1739+
and the total frame length will *not* necessarily be aligned at 8 bytes.
16911740
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
16921741
streams for the remote peer as if a SETTINGS frame had been received. Will
16931742
be overridden if the remote peer sets its own value for
@@ -1768,6 +1817,13 @@ changes:
17681817
* `http2.constants.PADDING_STRATEGY_CALLBACK` - Specifies that the user
17691818
provided `options.selectPadding` callback is to be used to determine the
17701819
amount of padding.
1820+
* `http2.constants.PADDING_STRATEGY_ALIGNED` - Will *attempt* to apply
1821+
enough padding to ensure that the total frame length, including the
1822+
9-byte header, is a multiple of 8. For each frame, however, there is a
1823+
maxmimum allowed number of padding bytes that is determined by current
1824+
flow control state and settings. If this maximum is less than the
1825+
calculated amount needed to ensure alignment, the maximum will be used
1826+
and the total frame length will *not* necessarily be aligned at 8 bytes.
17711827
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
17721828
streams for the remote peer as if a SETTINGS frame had been received. Will
17731829
be overridden if the remote peer sets its own value for

doc/api/os.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ added: v0.5.0
3131
* Returns: {string}
3232

3333
The `os.arch()` method returns a string identifying the operating system CPU
34-
architecture *for which the Node.js binary was compiled*.
34+
architecture for which the Node.js binary was compiled.
3535

3636
The current possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,
37-
`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, `'x64'`, and
38-
`'x86'`.
37+
`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
3938

4039
Equivalent to [`process.arch`][].
4140

doc/api/process.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,11 @@ process.on('SIGINT', handle);
374374
process.on('SIGTERM', handle);
375375
```
376376

377-
*Note*: An easy way to send the `SIGINT` signal is with `<Ctrl>-C` in most
378-
terminal programs.
379-
380-
It is important to take note of the following:
381-
382377
* `SIGUSR1` is reserved by Node.js to start the [debugger][]. It's possible to
383378
install a listener but doing so will _not_ stop the debugger from starting.
384379
* `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that
385-
resets the terminal mode before exiting with code `128 + signal number`. If
386-
one of these signals has a listener installed, its default behavior will be
380+
reset the terminal mode before exiting with code `128 + signal number`. If one
381+
of these signals has a listener installed, its default behavior will be
387382
removed (Node.js will no longer exit).
388383
* `SIGPIPE` is ignored by default. It can have a listener installed.
389384
* `SIGHUP` is generated on Windows when the console window is closed, and on
@@ -394,7 +389,7 @@ It is important to take note of the following:
394389
installed its default behavior will be removed.
395390
* `SIGTERM` is not supported on Windows, it can be listened on.
396391
* `SIGINT` from the terminal is supported on all platforms, and can usually be
397-
generated with `CTRL+C` (though this may be configurable). It is not generated
392+
generated with `<Ctrl>+C` (though this may be configurable). It is not generated
398393
when terminal raw mode is enabled.
399394
* `SIGBREAK` is delivered on Windows when `<Ctrl>+<Break>` is pressed, on
400395
non-Windows platforms it can be listened on, but there is no way to send or
@@ -432,9 +427,11 @@ added: v0.5.0
432427

433428
* {string}
434429

435-
The `process.arch` property returns a String identifying the processor
436-
architecture that the Node.js process is currently running on. For instance
437-
`'arm'`, `'ia32'`, or `'x64'`.
430+
The `process.arch` property returns a string identifying the operating system CPU
431+
architecture for which the Node.js binary was compiled.
432+
433+
The current possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,
434+
`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
438435

439436
```js
440437
console.log(`This processor architecture is ${process.arch}`);
@@ -987,10 +984,10 @@ process.exit(1);
987984

988985
The shell that executed Node.js should see the exit code as `1`.
989986

990-
It is important to note that calling `process.exit()` will force the process to
991-
exit as quickly as possible *even if there are still asynchronous operations
992-
pending* that have not yet completed fully, *including* I/O operations to
993-
`process.stdout` and `process.stderr`.
987+
Calling `process.exit()` will force the process to exit as quickly as possible
988+
even if there are still asynchronous operations pending that have not yet
989+
completed fully, including I/O operations to `process.stdout` and
990+
`process.stderr`.
994991

995992
In most situations, it is not actually necessary to call `process.exit()`
996993
explicitly. The Node.js process will exit on its own *if there is no additional

doc/api/repl.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ $ node repl_test.js
114114
'message'
115115
```
116116

117-
It is important to note that context properties are *not* read-only by default.
118-
To specify read-only globals, context properties must be defined using
119-
`Object.defineProperty()`:
117+
Context properties are not read-only by default. To specify read-only globals,
118+
context properties must be defined using `Object.defineProperty()`:
120119

121120
```js
122121
const repl = require('repl');

doc/api/stream.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,12 +1426,11 @@ successfully or failed with an error. The first argument passed to the
14261426
`callback` must be the `Error` object if the call failed or `null` if the
14271427
write succeeded.
14281428

1429-
It is important to note that all calls to `writable.write()` that occur between
1430-
the time `writable._write()` is called and the `callback` is called will cause
1431-
the written data to be buffered. Once the `callback` is invoked, the stream will
1432-
emit a [`'drain'`][] event. If a stream implementation is capable of processing
1433-
multiple chunks of data at once, the `writable._writev()` method should be
1434-
implemented.
1429+
All calls to `writable.write()` that occur between the time `writable._write()`
1430+
is called and the `callback` is called will cause the written data to be
1431+
buffered. Once the `callback` is invoked, the stream will emit a [`'drain'`][]
1432+
event. If a stream implementation is capable of processing multiple chunks of
1433+
data at once, the `writable._writev()` method should be implemented.
14351434

14361435
If the `decodeStrings` property is set in the constructor options, then
14371436
`chunk` may be a string rather than a Buffer, and `encoding` will

doc/api/vm.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ changes:
8787
depending on whether code cache data is produced successfully.
8888

8989
Creating a new `vm.Script` object compiles `code` but does not run it. The
90-
compiled `vm.Script` can be run later multiple times. It is important to note
91-
that the `code` is not bound to any global object; rather, it is bound before
92-
each run, just for that run.
90+
compiled `vm.Script` can be run later multiple times. The `code` is not bound to
91+
any global object; rather, it is bound before each run, just for that run.
9392

9493
### script.runInContext(contextifiedSandbox[, options])
9594
<!-- YAML

lib/_tls_wrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ TLSSocket.prototype._finishInit = function() {
621621
this.alpnProtocol = this._handle.getALPNNegotiatedProtocol();
622622
}
623623

624-
if (process.features.tls_sni && this._tlsOptions.isServer) {
624+
if (process.features.tls_sni) {
625625
this.servername = this._handle.getServername();
626626
}
627627

0 commit comments

Comments
 (0)