0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

27442 Commits

Author SHA1 Message Date
Rich Trott
73d22d1434 doc: remove "make that" from onboarding.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:14 -07:00
Rich Trott
00907980f0 doc: remove "note that" from releases.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:12 -07:00
Rich Trott
6f15029b44 doc: remove "note that" from CPP_STYLE_GUIDE.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:09 -07:00
Rich Trott
dc5eb64ac8 doc: remote "note that" from BUILDING.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-23 07:07:06 -07:00
Guy Bedford
554ffa3432 bootstrap: --frozen-intrinsics override problem workaround
PR-URL: https://github.com/nodejs/node/pull/28254
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-22 23:17:44 +02:00
cjihrig
3fd54510d0
doc: fix typo in process.disconnect() docs
"that" should be "the" in this sentence. This commit also
restructures the sentence to avoid the word "process's"

PR-URL: https://github.com/nodejs/node/pull/28328
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-22 13:39:58 -04:00
cjihrig
a03f256409
doc: drop 'Note that' in addons docs
This commit removes the usage of 'Note that' in the addons
documentation. Note that this phrase was not adding anything
meaningful to the docs.

PR-URL: https://github.com/nodejs/node/pull/28327
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-06-22 13:36:06 -04:00
cjihrig
c6f959a9d0
doc: remove obsolete external link
The addons documentation links to an external node-qt repo as
a production example. That repo hasn't been updated in over
five years. This commit removes the link.

PR-URL: https://github.com/nodejs/node/pull/28326
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-06-22 13:33:09 -04:00
cjihrig
3aeb810ca6
child_process: attach child in promisification
This commit updates the custom exec() and execFile()
promisification to attach the ChildProcess instance to the
returned Promise.

PR-URL: https://github.com/nodejs/node/pull/28325
Fixes: https://github.com/nodejs/node/issues/28244
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2019-06-22 13:18:03 -04:00
cjihrig
05359dd0db
doc: make multipleResolves docs less opinionated
The 'multipleResolves' event does not necessarily indicate an
error. This commit makes the documentation less opinionated, and
includes potential caveats.

PR-URL: https://github.com/nodejs/node/pull/28314
Refs: https://github.com/nodejs/node/issues/24321
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-22 12:03:07 -04:00
cjihrig
f00d5bc050
doc: format ECMA-262 with a hyphen
PR-URL: https://github.com/nodejs/node/pull/28309
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-22 11:59:15 -04:00
Rich Trott
ad2036fc1a doc: revise assert legacy mode text
Revise the text for the `assert` module's legacy mode to make it simpler
and more scannable.

PR-URL: https://github.com/nodejs/node/pull/28315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-22 07:05:15 -06:00
Rich Trott
6e66313eb5 test: remove test-ttywrap.writestream.js
The test is never run in CI and may have never worked.

Refs: https://github.com/nodejs/node/issues/28304
PR-URL: https://github.com/nodejs/node/pull/28316
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-22 07:01:48 -06:00
Rich Trott
e4136c1ece test: permit test-graph.signal to work without test runner
test/async-hooks/test-graph.signal.js passes with the test.py test
runner but fails if run directly with the `node` executable. Modify
the test so it passes in both cases.

PR-URL: https://github.com/nodejs/node/pull/28305
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-21 20:57:32 -06:00
legendecas
5705d7bf60 n-api: make func argument of napi_create_threadsafe_function optional
PR-URL: https://github.com/nodejs/node/pull/27791
Refs: https://github.com/nodejs/node/issues/27592
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2019-06-21 20:23:22 -06:00
Gus Caplan
ab3174ca08
build: link libatomic on mac and linux
Fixes https://github.com/nodejs/node/issues/28231

PR-URL: https://github.com/nodejs/node/pull/28232
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-21 15:53:34 -05:00
Yaniv Friedensohn
e6edd66c10 src: add error codes to errors thrown in node_i18n.cc
PR-URL: https://github.com/nodejs/node/pull/28221
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-21 04:10:48 -06:00
Yuriy Vasiyarov
7334aaf2ea doc: document PerformanceNodeTiming.environment field
PR-URL: https://github.com/nodejs/node/pull/28280
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-21 04:07:54 -06:00
Rich Trott
3af27f86b6 doc: revise strict mode text in assert
Revise the text describing `strict` mode.

PR-URL: https://github.com/nodejs/node/pull/28285
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-21 03:30:07 -06:00
cjihrig
bfe4c9c2c0
report: add report versioning
This commit adds a version to the diagnostic report feature.

PR-URL: https://github.com/nodejs/node/pull/28121
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-06-20 16:16:11 -04:00
Ruben Bridgewater
7b802685c4 benchmark: refactor buffer benchmarks
Currently the buffer benchmarks take significantly too long to
complete. This drastically reduces the overall runtime by removing
obsolete checked variations and reducing the iteration count.

It also improves the benchmarks by removing the deprecated
`new Buffer(size)` usage and some other small improvements.

PR-URL: https://github.com/nodejs/node/pull/26418
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Peter Marshall <petermarshall@chromium.org>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-20 12:55:50 -06:00
Samantha Sample
5ccce52113 test: normalize location test-worker-process-cwd.js runs tests
This change sets the process' directory to __dirname in order to
normalize where the test is ran.  This addresses the situation that
occurs when node is located in the root, and moving up a directory
results in the same directory.  In that case, an error was thrown
because the test interpreted this as a failed directory change.

Fixes: https://github.com/nodejs/node/issues/28193
PR-URL: https://github.com/nodejs/node/pull/28271
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-20 12:54:26 -06:00
Anna Henningsen
d5cf51dad5 worker: only unref port for stdin if we ref’ed it before
We set the `kStartedReading` flag from `_read()` for Worker stdio,
and then `ref()` the port.

However, the `.on('end')` handler is also attached when `._read()`
is not called, e.g. when `process.stdin` inside a Worker is prematurely
ended because stdin was not enabled by the parent thread.

In that case, we should not call `.unref()` for stdin if we did not
also call `.ref()` for it before.

Fixes: https://github.com/nodejs/node/issues/28144
PR-URL: https://github.com/nodejs/node/pull/28153
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-20 11:27:27 -06:00
=
e57bf47351 test: use .code for error in setgid
When the 'nobody' user is missing use .code to detect this, its more
robust than than the .message string.

Refs: https://github.com/nodejs/node/issues/19594

PR-URL: https://github.com/nodejs/node/pull/28219
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-06-20 11:02:16 -06:00
gengjiawen
b0f75818f3 doc: add gengjiawen to collaborators
PR-URL: https://github.com/nodejs/node/pull/28322
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-20 20:33:31 +08:00
Anna Henningsen
2dec0f9831 test: fix flaky test-worker-debug
Address a race condition in the test; the Worker’s exit events
may have been not recorded because the Worker exited before
the listeners were attached.

Fix the by attaching the event listeners before telling the Worker
to exit.

PR-URL: https://github.com/nodejs/node/pull/28307
Fixes: https://github.com/nodejs/node/issues/28299
Fixes: https://github.com/nodejs/node/issues/28106
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-20 11:55:46 +02:00
ZYSzys
d698983f45 tools: update babel-eslint to 10.0.2
PR-URL: https://github.com/nodejs/node/pull/28266
Refs: https://github.com/babel/babel-eslint/releases/tag/v10.0.2
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-20 13:02:40 +08:00
Rich Trott
f28b1ed18f test: add logging to statwatcher test
Refs: https://github.com/nodejs/node/issues/21425#issuecomment-502667718

PR-URL: https://github.com/nodejs/node/pull/28270
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-06-19 22:12:01 -06:00
Robert Nagy
1a4f27ae21
doc: clarify when http emits aborted event
PR-URL: https://github.com/nodejs/node/pull/28262
Refs: https://github.com/nodejs/node/issues/28172
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-19 15:31:53 -07:00
Daniel Bevenius
264cb79bc2
src: silence compiler warning node_process_methods
Currently, the following compiler warning is generated by clang:
../src/node_process_methods.cc:71:3:
warning: indirection of non-volatile null pointer will be deleted,
not trap [-Wnull-dereference]
  *static_cast<volatile void**>(nullptr) = nullptr;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/node_process_methods.cc:71:3: note:
consider using __builtin_trap() or qualifying pointer with 'volatile'
1 warning generated.

This commit adds the volatile qualifier to avoid this warning.

PR-URL: https://github.com/nodejs/node/pull/28261
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-19 15:23:00 -07:00
Michaël Zasso
05b8526a59 deps: V8: extend workaround for MSVC optimizer bug
Builds are starting to fail in CI with V8 7.5 and 7.6.

Refs: https://developercommunity.visualstudio.com/content/problem/512352/compiler-doesnt-finish-142027508.html

PR-URL: https://github.com/nodejs/node/pull/28286
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-19 16:46:14 -04:00
Anna Henningsen
7146ddd8a0
test: add Worker + uncaughtException + process.exit() test
PR-URL: https://github.com/nodejs/node/pull/28259
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-19 10:05:45 -07:00
Joyee Cheung
a33c3c6d33
src: refactor uncaught exception handling
The C++ land `node::FatalException()` is not in fact fatal anymore.
It gives the user a chance to handle the uncaught exception
globally by listening to the `uncaughtException` event. This patch
renames it to `TriggerUncaughtException` in C++ to avoid the confusion.

In addition rename the JS land handler to `onGlobalUncaughtException`
to reflect its purpose - we have to keep the alias
`process._fatalException` and use that for now since it has been
monkey-patchable in the user land.

This patch also

- Adds more comments to the global uncaught exception handling routine
- Puts a few other C++ error handling functions into the `errors`
  namespace
- Moves error-handling-related bindings to the `errors` binding.

Refs: 2b252acea4

PR-URL: https://github.com/nodejs/node/pull/28257
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-19 16:16:37 +08:00
Joyee Cheung
1c23b6f2be
lib: refactor unhandled rejection deprecation warning emission
Emit the deprecation warning in the `kDefaultUnhandledRejections`
case to reduce the number of branches on unhandled rejection mode -
there is now only one switch case on it.

Also rename `emitWarning()` to `emitUnhandledRejectionWarning()`
to avoid ambiguity with `process.emitWarning()`

PR-URL: https://github.com/nodejs/node/pull/28258
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-19 15:44:09 +08:00
João Reis
82fe33f18a test: do not spawn rmdir in test-statwatcher
PR-URL: https://github.com/nodejs/node/pull/28276
Refs: https://github.com/nodejs/node/issues/21425
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-18 21:21:31 -07:00
Rich Trott
e585846398 meta: update LICENSE
A few dependencies have been updated or added without running
license_builder.sh. This updates based on current master branch.

PR-URL: https://github.com/nodejs/node/pull/28260
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-18 21:16:44 -07:00
Joyee Cheung
ac1239eaf8 src: fall back to env->exec_path() for default profile directory
When the current working directory is deleted, fall back to
exec_path as the default profile directory.

PR-URL: https://github.com/nodejs/node/pull/28252
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-19 05:25:34 +02:00
Joyee Cheung
26bd0dfc1b src: save exec path when initializing Environment
PR-URL: https://github.com/nodejs/node/pull/28252
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-19 05:25:24 +02:00
Rich Trott
17a5eba6c2 doc: tidy AssertionError text
Several minor improvements to text. Remove some repetition.

PR-URL: https://github.com/nodejs/node/pull/28255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-18 16:18:25 -07:00
Rich Trott
e3d5257ec3 test: check custom inspection truncation in assert
The assert module has some truncation logic in a custom inspect
function. This was not covered in tests. Add tests to cover it.

PR-URL: https://github.com/nodejs/node/pull/28234
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-06-18 11:16:26 -07:00
Tobias Nießen
fc50e6bcc8 crypto: fix crash when calling digest after piping
When piping data into an SHA3 hash, EVP_DigestFinal_ex is called in
hash._flush, bypassing safeguards in the JavaScript layer. Calling
hash.digest causes EVP_DigestFinal_ex to be called again, resulting
in a segmentation fault in the SHA3 implementation of OpenSSL.

A relatively easy solution is to cache the result of calling
EVP_DigestFinal_ex until the Hash object is garbage collected.

PR-URL: https://github.com/nodejs/node/pull/28251
Fixes: https://github.com/nodejs/node/issues/28245
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-06-18 18:42:48 +02:00
Rich Trott
8030ca5b9e doc: remove instructions to post CI links
Remove instructions (in the Collaborator Guide) to post CI links. The
bot does that now.

PR-URL: https://github.com/nodejs/node/pull/28248
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-18 09:35:11 -07:00
mutao
779a243f86
build: enable openssl support for mips64el
V8 now resume supporting for mipsel/mips64el.
This commit add linux64-mips64 platform dependent
files in 'deps/openssl/config/archs/linux64-mips64',
and update the corresponding gypi files and header
files.

Refs: https://groups.google.com/forum/#!topic/v8-dev/oXkv5OVCXyc

PR-URL: https://github.com/nodejs/node/pull/27992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-06-18 14:28:29 +10:00
mutao
eaddb22d92
Revert "build: remove mips support"
This reverts commit 9334e45aa0.

PR-URL: https://github.com/nodejs/node/pull/27992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-06-18 14:28:13 +10:00
Anna Henningsen
2a9f1ad4b0 http2: refactor ping + settings object lifetime management
Have clearer ownership relations between the `Http2Ping`,
`Http2Settings` and `Http2Session` objects.

Ping and Settings objects are now owned by the `Http2Session`
instance, and deleted along with it, so neither type of object
refers to the session after it is gone.
In the case of `Http2Ping`s, that deletion is slightly delayed,
so we explicitly reset its `session_` property.

Fixes: https://github.com/nodejs/node/issues/28088

PR-URL: https://github.com/nodejs/node/pull/28150
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-17 15:29:19 -07:00
Ruben Bridgewater
14be3aa6e6 process: hide NodeEnvironmentFlagsSet's add function
This makes sure that the `add` function is not visible by default
when inspecting `process.allowedNodeEnvironmentFlags`.

PR-URL: https://github.com/nodejs/node/pull/28206
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-17 15:25:56 -07:00
Anna Henningsen
380494f022 test: make sure test function resolves in test-worker-debug
Use the common `.then(common.mustCall())` check to verify that.
Also, we should not use `process.abort()` in `test/parallel`; if
the test fails, that leaves core dumps lying around on POSIX systems.

PR-URL: https://github.com/nodejs/node/pull/28155
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-17 14:10:29 -07:00
Rich Trott
db459e9f72 doc: revise intro sentence for assert
Simplify language, remove redundancy ("tests that can be used to
test") and remove wordy passive voice ("that can be used to" replaced
with "for").

PR-URL: https://github.com/nodejs/node/pull/28226
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-17 06:59:17 -07:00
Daniel Bevenius
c925d1dcaa tls: remove unnecessary set of DEFAULT_MAX_VERSION
This commit removes what looks like an unnecessary setting of
exports.DEFAULT_MAX_VALUE.

PR-URL: https://github.com/nodejs/node/pull/28147
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-17 14:39:41 +02:00
Anna Henningsen
ed24c19002
worker: refactor worker.terminate()
At the collaborator summit in Berlin, the behaviour of
`worker.terminate()` was discussed.

In particular, switching from a callback-based to a Promise-based API
was suggested. While investigating that possibility later, it was
discovered that `.terminate()` was unintentionally synchronous up
until now (including calling its callback synchronously).

Also, the topic of its stability has been brought up. I have performed
two manual reviews of the native codebase for compatibility with
`.terminate()`, and performed some manual fuzz testing with the test
suite. At this point, bugs with `.terminate()` should, in my opinion,
be treated like bugs in other Node.js features.
(It is possible to make Node.js crash with `.terminate()` by messing
with internals and/or built-in prototype objects, but that is already
the case without `.terminate()` as well.)

This commit:

- Makes `.terminate()` an asynchronous operation.
- Makes `.terminate()` return a `Promise`.
- Runtime-deprecates passing a callback.
- Removes a warning about its stability from the documentation.
- Eliminates an unnecessary extra function from the C++ code.

A possible alternative to returning a `Promise` would be to keep the
method synchronous and just drop the callback. Generally, providing
an asynchronous API does provide us with a bit more flexibility.

Refs: https://github.com/nodejs/summit/issues/141

PR-URL: https://github.com/nodejs/node/pull/28021
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-17 08:27:17 -04:00