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

Commit 89fd183

Browse files
committed
meta: merge node/master into node-chakracore/master
Merge f2d9379 as of 2018-03-04 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Jack Horton <jahorto@microsoft.com>
2 parents 33d99e3 + f2d9379 commit 89fd183

File tree

67 files changed

+764
-536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+764
-536
lines changed

benchmark/streams/pipe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
});
99

1010
function main({ n }) {
11-
const b = new Buffer(1024);
11+
const b = Buffer.alloc(1024);
1212
const r = new Readable();
1313
const w = new Writable();
1414

benchmark/streams/readable-bigread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
});
99

1010
function main({ n }) {
11-
const b = new Buffer(32);
11+
const b = Buffer.alloc(32);
1212
const s = new Readable();
1313
function noop() {}
1414
s._read = noop;

benchmark/streams/readable-bigunevenread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
});
99

1010
function main({ n }) {
11-
const b = new Buffer(32);
11+
const b = Buffer.alloc(32);
1212
const s = new Readable();
1313
function noop() {}
1414
s._read = noop;

benchmark/streams/readable-readall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
});
99

1010
function main({ n }) {
11-
const b = new Buffer(32);
11+
const b = Buffer.alloc(32);
1212
const s = new Readable();
1313
function noop() {}
1414
s._read = noop;

benchmark/streams/readable-unevenread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
88
});
99

1010
function main({ n }) {
11-
const b = new Buffer(32);
11+
const b = Buffer.alloc(32);
1212
const s = new Readable();
1313
function noop() {}
1414
s._read = noop;

deps/openssl/openssl.gyp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@
157157
}, {
158158
'defines': ['<@(openssl_default_defines_not_win)'],
159159
'cflags': ['-Wno-missing-field-initializers'],
160+
'xcode_settings': {
161+
'WARNING_CFLAGS': ['-Wno-missing-field-initializers'],
162+
},
160163
'conditions': [
161164
['OS=="mac"', {
162165
'defines': ['<@(openssl_default_defines_mac)'],

doc/api/cli.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ added: v7.7.0
235235
A comma separated list of categories that should be traced when trace event
236236
tracing is enabled using `--trace-events-enabled`.
237237

238+
### `--trace-event-file-pattern`
239+
<!-- YAML
240+
added: REPLACEME
241+
-->
242+
243+
Template string specifying the filepath for the trace event data, it
244+
supports `${rotation}` and `${pid}`.
245+
238246
### `--zero-fill-buffers`
239247
<!-- YAML
240248
added: v6.0.0
@@ -464,6 +472,7 @@ Node options that are allowed are:
464472
- `--trace-deprecation`
465473
- `--trace-events-categories`
466474
- `--trace-events-enabled`
475+
- `--trace-event-file-pattern`
467476
- `--trace-sync-io`
468477
- `--trace-warnings`
469478
- `--track-heap-objects`

doc/api/n-api.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,9 +3269,11 @@ napi_status napi_create_async_work(napi_env env,
32693269
- `[in] async_resource_name`: Identifier for the kind of resource that is
32703270
being provided for diagnostic information exposed by the `async_hooks` API.
32713271
- `[in] execute`: The native function which should be called to excute
3272-
the logic asynchronously.
3272+
the logic asynchronously. The given function is called from a worker pool
3273+
thread and can execute in parallel with the main event loop thread.
32733274
- `[in] complete`: The native function which will be called when the
3274-
asynchronous logic is comple or is cancelled.
3275+
asynchronous logic is completed or is cancelled. The given function is called
3276+
from the main event loop thread.
32753277
- `[in] data`: User-provided data context. This will be passed back into the
32763278
execute and complete functions.
32773279
- `[out] result`: `napi_async_work*` which is the handle to the newly created
@@ -3346,9 +3348,9 @@ callback invocation, even if it has been successfully cancelled.
33463348

33473349
## Custom Asynchronous Operations
33483350
The simple asynchronous work APIs above may not be appropriate for every
3349-
scenario, because with those the async execution still happens on the main
3350-
event loop. When using any other async mechanism, the following APIs are
3351-
necessary to ensure an async operation is properly tracked by the runtime.
3351+
scenario. When using any other asynchronous mechanism, the following APIs
3352+
are necessary to ensure an asynchronous operation is properly tracked by
3353+
the runtime.
33523354

33533355
### napi_async_init
33543356
<!-- YAML

doc/api/tracing.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ Running Node.js with tracing enabled will produce log files that can be opened
3333
in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool)
3434
tab of Chrome.
3535

36+
The logging file is by default called `node_trace.${rotation}.log`, where
37+
`${rotation}` is an incrementing log-rotation id. The filepath pattern can
38+
be specified with `--trace-event-file-pattern` that accepts a template
39+
string that supports `${rotation}` and `${pid}`. For example:
40+
41+
```txt
42+
node --trace-events-enabled --trace-event-file-pattern '${pid}-${rotation}.log' server.js
43+
```
44+
3645
Starting with Node 10.0.0, the tracing system uses the same time source as the
3746
one used by `process.hrtime()` however the trace-event timestamps are expressed
3847
in microseconds, unlike `process.hrtime()` which returns nanoseconds.

doc/api/url.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,20 @@ changes:
948948
The `url.format()` method returns a formatted URL string derived from
949949
`urlObject`.
950950

951+
```js
952+
url.format({
953+
protocol: 'https',
954+
hostname: 'example.com',
955+
pathname: '/some/path',
956+
query: {
957+
page: 1,
958+
format: 'json'
959+
}
960+
});
961+
962+
// => 'https://example.com/some/path?page=1&format=json'
963+
```
964+
951965
If `urlObject` is not an object or a string, `url.format()` will throw a
952966
[`TypeError`][].
953967

0 commit comments

Comments
 (0)