Matteo Collina
91eec00ca2
tty: make _read throw ERR_TTY_WRITABLE_NOT_READABLE
...
This change avoid an 'read ENOTCONN' error introduced by libuv 1.20.0
when trying to read from a TTY WriteStream. Instead, we are throwing
a more actionable ERR_TTY_WRITABLE_NOT_READABLE.
Fixes: https://github.com/nodejs/node/issues/21203
PR-URL: https://github.com/nodejs/node/pull/21654
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-22 16:41:54 +02:00
Bryan English
6acb55041b
test: remove redundant cli tests
...
test/parallel/test-cli-eval.js covers them, and many more things.
PR-URL: https://github.com/nodejs/node/pull/22355
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-22 01:18:53 -07:00
Anto Aravinth
413a7e1dea
http: adding doc and debug for calling empty string on write function
...
PR-URL: https://github.com/nodejs/node/pull/22118
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-22 09:48:09 +02:00
Matteo Collina
98cf84f2c9
stream: restore flow if there are 'data' handlers after once('readable')
...
Fixes: https://github.com/nodejs/node/issues/21398
See: https://github.com/nodejs/node/pull/21696
PR-URL: https://github.com/nodejs/node/pull/22209
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com >
2018-08-21 22:36:13 -07:00
James M Snell
588fb05e78
perf_hooks: move strings to env
...
Move repeatedly created strings to env
PR-URL: https://github.com/nodejs/node/pull/22401
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-21 22:29:08 -07:00
Daniel Bevenius
4e2fa8b0dc
build: extract common code from NODE_EXE/_G_EXE
...
This commit extracts common parts of the NODE_EXE, and NODE_G_EXE
recipes into a canned reciepe to reduce some code duplication.
PR-URL: https://github.com/nodejs/node/pull/22310
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-08-22 06:32:47 +02:00
Ruben Bridgewater
36468ca928
lib: require a callback for end-of-stream
...
Make the callback mandatory as mostly done in all other Node.js
callback APIs so users explicitly have to decide what to do in error
cases.
This also documents the options for `Stream.finished()`.
When originally implemented it was missed that Stream.finished() has
an optional options object.
PR-URL: https://github.com/nodejs/node/pull/21058
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com >
2018-08-22 01:00:27 +02:00
Gabriel Schulhof
9dae0ae22b
doc: update wrapping-related documentation
...
Update the N-API documentation to reflect that wrapping no longer
affects the object's prototype chain.
PR-URL: https://github.com/nodejs/node/pull/22363
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-21 13:56:56 -04:00
Michaël Zasso
0f85e20d3e
deps: patch V8 to 6.8.275.30
...
Refs: https://github.com/v8/v8/compare/6.8.275.24...6.8.275.30
PR-URL: https://github.com/nodejs/node/pull/22125
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-21 13:22:04 +02:00
MaleDong
6e9e150b6a
util: Fix number format for pad
...
`pad` is now using `toString(10)`, actually we don't need to do this. As for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString , `toString(N)` is a radix converter, which isn't proper here for time conversion.
PR-URL: https://github.com/nodejs/node/pull/21906
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
2018-08-21 00:28:47 -04:00
Rich Trott
36696cfe84
test: improve assert message in http timeout test
...
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-20 18:59:12 -07:00
Rich Trott
4b71b01339
test: move http timeout test to parallel
...
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-20 18:59:08 -07:00
Rich Trott
fd76a3d482
test: fix flaky http timeout test
...
There is no guarantee that a timeout won't be delayed considerably due
to unrelated activity on the host. Instead of checking that the timeout
happens within a certain tolerance, simply check that it did not happen
too soon.
Fixes: https://github.com/nodejs/node/issues/22041
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-20 18:59:00 -07:00
Alexey Kozyatinskiy
b1e26128f3
src: implement v8::Platform::CallDelayedOnWorkerThread
...
This method is crucial for Runtime.evaluate protocol command with
timeout flag. At least Chrome DevTools frontend uses this method for
every execution in console.
PR-URL: https://github.com/nodejs/node/pull/22383
Fixes: https://github.com/nodejs/node/issues/22157
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-20 18:10:00 -07:00
Dzmitry_Prudnikau
f1d3f97c3b
test: remove third argument from assert.strictEqual()
...
`test/parallel/test-util-inspect.js` has a call to
`assert.strictEqual()` that receives three arguments.
The third argument is a string literal. Unfortunately,
calling assert.strictEqual() this way means that if
there is an AssertionError, the value of the variables
pos and npos are not reported.
This PR removes this argument.
PR-URL: https://github.com/nodejs/node/pull/22371
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-20 19:53:54 +01:00
Daniel Bevenius
28675b66d2
build: move available-node variable to top
...
Currently node_use_openssl uses the available-node variable before it is
defined causing the conditions that use it before that point to
evaluate incorrectly. As an example running the target
test/addons/.docbuildstamp will currently be skipped:
$ make test/addons/.docbuildstamp
Skipping .docbuildstamp (no crypto)
With this commit the target will only be skipped if configured --without-ssl.
PR-URL: https://github.com/nodejs/node/pull/22356
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-20 18:51:47 +02:00
cjihrig
8d05a1590a
test: cover error case in os getCheckedFunction()
...
getCheckedFunction() is used internally by the os module to
handle errors from the binding layer in several methods. This
commit adds a test for the case where the binding layer returns
an error.
PR-URL: https://github.com/nodejs/node/pull/22394
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-08-20 11:33:02 -04:00
cjihrig
5e420f95b1
os: destructure ERR_SYSTEM_ERROR properly
...
PR-URL: https://github.com/nodejs/node/pull/22394
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-08-20 11:33:02 -04:00
Ruben Bridgewater
9bcb744ee5
os: improve networkInterfaces performance
...
This algorithm uses less data transformations and is therefore
significantly faster than the one before.
PR-URL: https://github.com/nodejs/node/pull/22359
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-20 16:10:20 +02:00
Daniel Bevenius
104492bd83
build: touch tools/doc/node_modules after run
...
Currently, tools/doc/node_modules is not touched after running npm
install resulting in npm install being run every time. I missed this
while testing commit 88bff82624 ("build:
make tools/doc/node_modules non-phony").
PR-URL: https://github.com/nodejs/node/pull/22350
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-20 16:08:12 +02:00
cjihrig
4e7d82945d
deps: upgrade to libuv 1.23.0
...
Notable changes:
- Restores compatibility with the old IPC protocol.
- Adds uv_open_osfhandle().
- Adds uv_os_{get,set}priority().
PR-URL: https://github.com/nodejs/node/pull/22365
Fixes: https://github.com/nodejs/node/issues/21671
Fixes: https://github.com/nodejs/node/issues/15433
Refs: https://github.com/nodejs/node/pull/21675
Refs: https://github.com/nodejs/node-addon-api/issues/304
Refs: https://github.com/nodejs/abi-stable-node/issues/318
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-20 08:39:30 -04:00
Daniel Bevenius
95b0e2c133
build: add test-doc to test target
...
This commit adds the test-doc target to the test recipe so that docs are
built and linters run. This used to happen but was removed at some
point.
PR-URL: https://github.com/nodejs/node/pull/22294
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-08-20 13:20:24 +02:00
Caleb Sander
439b75b9c0
assert, util: *DeepEqual() handles ArrayBuffers
...
Previously, all ArrayBuffers were considered equal in assert.deepEqual()
and assert.deepStrictEqual().
Now, ArrayBuffers and SharedArrayBuffers must have the same byte lengths
and contents to be considered equal.
In loose mode, an ArrayBuffer is considered equal to a SharedArrayBuffer
if they have the same contents, whereas in strict mode, the buffers must
be both ArrayBuffers or both SharedArrayBuffers.
PR-URL: https://github.com/nodejs/node/pull/22266
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-20 12:03:08 +02:00
Daniel Bevenius
6bc43aeea7
build: use echo command instead of shell comments
...
Currently, there are a few recipes where comments are indented
and being passed to the shell.
This commit updates these comments to use the echo command instead,
which is the more common approach used in other recipes in the
makefile.
PR-URL: https://github.com/nodejs/node/pull/22293
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-20 11:05:45 +02:00
Ruben Bridgewater
79642ae071
test: harden test-gc-http-client
...
This reduces the total number of requests from 500 to 300 and triggers
more requests in parallel. It also moves some function creation out
and waits with the first request until the server is listening.
PR-URL: https://github.com/nodejs/node/pull/22373
Fixes: https://github.com/nodejs/node/issues/22336
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-20 09:20:36 +08:00
Ruben Bridgewater
3479b1ca82
util,assert: improve performance
...
This significantly improves regular and typed array performance by
not checking the indices keys anymore. This can be done with a V8
API that allows to only retrieve the non indices property keys.
PR-URL: https://github.com/nodejs/node/pull/22197
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-20 02:11:46 +02:00
James M Snell
0bdb95f4cf
src: move process.binding('signal_wrap') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22290
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-19 14:18:29 -07:00
James M Snell
884b23daf7
stream: move process.binding('stream_wrap') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22345
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-19 12:46:10 -07:00
Vse Mozhet Byt
7108893ec8
doc: clarify fs.write[Sync]() descriptions
...
1. All default values for optional `encoding` parameters
were documented except for the one in `fs.write(fd, string...)`
method. This PR makes up this deficiency.
2. We have two variants of `fs.write()` / `fs.writeSync()` methods:
for buffers and strings. Currently, the sync methods have only one
common reference to the full description of async methods.
However, the link may seem to belong to the last sync variant only
(for strings) and, as it refers to the first async variant
(for buffers), this may be confusing. This PR makes two different
sync variants refer to two different async variants.
3. In passing, both returned values of sync methods were also made
more concise and unambiguous.
PR-URL: https://github.com/nodejs/node/pull/22402
Refs: https://github.com/nodejs/node/blob/a04f2f7df630427bf869b1e04040975b752973b6/lib/fs.js#L549
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-19 21:52:14 +03:00
Vse Mozhet Byt
14e6274bed
doc: unify optional arguments format in headings
...
Make space and comma distribution in some headings
consistent with the majority of headings.
PR-URL: https://github.com/nodejs/node/pull/22397
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-19 21:45:39 +03:00
Ruben Bridgewater
bd090f9220
util: mark special entries as such
...
This adds the color code to special entries if colors are active.
PR-URL: https://github.com/nodejs/node/pull/22287
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-19 19:00:31 +02:00
Ruben Bridgewater
a04f2f7df6
util: escape symbol and non-enumerable keys
...
These keys require escaping as they might also contain line breaks
and other special characters.
PR-URL: https://github.com/nodejs/node/pull/22300
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-19 14:22:17 +02:00
Rich Trott
c535bde5da
tools: simplify ESLint invocation in Makefile
...
Makefile currently enforces .eslintrc.js linting on the command line but
it is already enforced in the .estlintignore file.
This also simplifies an arguably-related comment in .estlinrc.js.
PR-URL: https://github.com/nodejs/node/pull/22348
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-18 18:48:55 -07:00
James M Snell
892932f9bd
v8: move process.binding('v8') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22288
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-18 16:27:11 -07:00
James M Snell
1744205ff5
http: move process.binding('http_parser') to internalBinding
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22329
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-18 13:01:21 -07:00
James M Snell
4fa5448e5d
http2: move process.binding('http2') to internalBinding
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22328
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-18 12:39:59 -07:00
Timothy Gu
c7788fba28
src: encode 0x27 (') for special URLs
...
Refs: https://github.com/whatwg/url/commit/6ef17ebe1220a7e7c0cfff0785017502ee18808b
PR-URL: https://github.com/nodejs/node/pull/22022
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-18 15:18:05 -04:00
Joyee Cheung
2d72a9543c
src: implement the new EmbedderGraph::AddEdge()
...
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.
PR-URL: https://github.com/nodejs/node/pull/22106
Refs: https://github.com/v8/v8/commit/6ee834532d6f924f6057584085fa79b4777c396a
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-19 00:52:42 +08:00
Joyee Cheung
54c87f37f4
deps: cherry-pick 6ee8345 from upstream V8
...
Original commit message:
[heap-profiler] Allow embedder to specify edge names
This patch adds a variant of EmbedderGraph::AddEdge() which
allows the embedder to specify the name of an edge. The edges
added without name are element edges with auto-incremented indexes
while the edges added with names will be internal edges with
the specified names for more meaningful output in the heap
snapshot.
Refs: https://github.com/nodejs/node/pull/21741
Bug: v8:7938
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I8feefa2cf6911743e24b3b2024e0e849b0c65cd3
Reviewed-on: https://chromium-review.googlesource.com/1133299
Commit-Queue: Ulan Degenbaev <ulan@chromium.org >
Reviewed-by: Ulan Degenbaev <ulan@chromium.org >
Cr-Commit-Position: refs/heads/master@{#54412}
Refs: https://github.com/v8/v8/commit/6ee834532d6f924f6057584085fa79b4777c396a
PR-URL: https://github.com/nodejs/node/pull/22106
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-19 00:52:41 +08:00
Andreas Girgensohn
44d04a8c01
doc: clarify documentation of pipes and zlib objects
...
Document how pipes can be chained in readable.pipe().
Document that zlib.Zlib inherits from stream.Transform.
PR-URL: https://github.com/nodejs/node/pull/22354
Fixes: https://github.com/nodejs/node/issues/22341
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-18 11:21:51 +03:00
Sarat Addepalli
9d6619efea
doc: add doc for --loader option
...
PR-URL: https://github.com/nodejs/node/pull/22104
Fixes: https://github.com/nodejs/node/issues/21230
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-08-18 11:15:37 +03:00
Joyee Cheung
7cbbb27c07
src: perform integrity checks on built-in code cache
...
Currently V8 only checks that the length of the source code is the
same as the code used to generate the hash, so we add an additional
check here:
1. During compile time, when generating node_javascript.cc and
node_code_cache.cc, we compute and include the hash of the
(unwrapped) JavaScript source in both.
2. At runtime, we check that the hash of the code being compiled
and the hash of the code used to generate the cache
(inside the wrapper) is the same.
This is based on the assumptions:
1. `internalBinding('code_cache_hash')` must be in sync with
`internalBinding('code_cache')` (same C++ file)
2. `internalBinding('natives_hash')` must be in sync with
`process.binding('natives')` (same C++ file)
3. If `internalBinding('natives_hash')` is in sync with
`internalBinding('natives_hash')`, then the (unwrapped)
code used to generate `internalBinding('code_cache')`
should be in sync with the (unwrapped) code in
`process.binding('natives')`
There will be, however, false positives if the wrapper used
to generate the cache is different from the one used at run time,
and the length of the wrapper somehow stays the same.
But that should be rare and can be eased once we make the
two bootstrappers cached and checked as well.
PR-URL: https://github.com/nodejs/node/pull/22152
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-08-18 05:21:52 +08:00
Joyee Cheung
478a78ba76
deps: fix CRLF in text file not present in upstream
...
`deps/v8/third_party/jinja2/LICENSE` is not in upstream v8,
and contains CRLF, which is in conflict with `deps/v8/.gitattributes`
which sets all text files to use LF.
This has caused failures in CI workers with older versions of Git.
This patch manually fixes up the file to use LF to resolve
the conflict.
The file has already been fixed in upstream jinja2,
which is pull into our repo when we update V8 so it should
be fixed the next time we update V8.
PR-URL: https://github.com/nodejs/node/pull/22340
Refs: https://github.com/nodejs/build/issues/1443
Refs: https://github.com/nodejs/reliability/issues/12
Refs: https://github.com/nodejs/build/issues/1453
Refs: https://chromium-review.googlesource.com/c/993812/
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: João Reis <reis@janeasystems.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-18 02:48:16 +08:00
James M Snell
4b7cd4bd60
trace_events: add trace category enabled tracking
...
Track state of async_hooks trace event category enablement.
Enable/disable the async_hooks trace event dynamically.
PR-URL: https://github.com/nodejs/node/pull/22128
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2018-08-17 09:08:05 -07:00
Matteo Collina
2ce03804a6
doc: clarify that new URL().port could be an empty string
...
PR-URL: https://github.com/nodejs/node/pull/22232
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-17 13:00:31 +02:00
Ryan Petrich
38145344f1
src: fix race on modpending
...
Fixes a rare race condition on modpending when two native modules are
loaded simultaneously on different threads by storing it thread-
locally.
PR-URL: https://github.com/nodejs/node/pull/21611
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-08-16 19:57:09 -04:00
Refael Ackermann
73b8ddee04
doc: Windows building supported on x64
...
Since we are CI testing on x64 hosts, we can only commit to x64 hosts.
PR-URL: https://github.com/nodejs/node/pull/21443
Refs: https://github.com/nodejs/node/issues/21402
Refs: https://github.com/nodejs/node/pull/21437
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: João Reis <reis@janeasystems.com >
2018-08-16 19:07:52 -04:00
James M Snell
26814cf8e6
test: fix cctest URLTest.ToFilePath on Win32 without Intl
...
Skip one specific test that requires ICU
Fixes: https://github.com/nodejs/node/issues/19051
PR-URL: https://github.com/nodejs/node/pull/22265
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 15:16:22 -07:00
Gus Caplan
be9f7860e1
cli: fix flags on help output
...
PR-URL: https://github.com/nodejs/node/pull/22271
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-08-16 11:11:13 -05:00
Rod Vagg
88105c998e
buffer: avoid overrun on UCS-2 string write
...
CVE-2018-12115
Discovered by ChALkeR - Сковорода Никита Андреевич
Fix by Anna Henningsen
Writing to the second-to-last byte with UCS-2 encoding will cause a -1
length to be send to String::Write(), writing all of the provided Buffer
from that point and beyond.
Fixes: https://github.com/nodejs-private/security/issues/203
PR-URL: https://github.com/nodejs-private/node-private/pull/138
2018-08-16 19:14:15 +10:00