aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-17tools: update remark-preset-lint-node to 1.10.0Rich Trott
A new version of remark-preset-lint-node adds linting for unordered list style. PR-URL: https://github.com/nodejs/node/pull/29594 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-17doc: update list style in misc README docsRich Trott
To confirm with upcoming markdown lint rule, use `*` for unordered lists. PR-URL: https://github.com/nodejs/node/pull/29594 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-17doc: add missing complete property to http2 docsJavier Ledezma
PR-URL: https://github.com/nodejs/node/pull/29571 Fixes: https://github.com/nodejs/node/issues/28622 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-18repl: fix bug in fs module autocompletionzhangyongsheng
PR-URL: https://github.com/nodejs/node/pull/29555 Fixes: https://github.com/nodejs/node/issues/29424 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-17module: reintroduce package exports dot mainGuy Bedford
This reintroduces the dot main in exports as discussed in the previous Node.js modules meeting. The implementation includes both CommonJS and ES module resolution with the associated documentation and resolver specification changes. In addition to the dot main, "exports" as a string or direct fallback array is supported as well. Co-Authored-By: Geoffrey Booth <GeoffreyBooth@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/29494 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
2019-09-17deps: update npm to 6.11.3claudiahdz
PR-URL: https://github.com/nodejs/node/pull/29430 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-17lib: remove the use of util.isFunctionhimself65
PR-URL: https://github.com/nodejs/node/pull/29566 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> 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: Luigi Pinca <luigipinca@gmail.com>
2019-09-17doc: add leap second behavior notes for napi methodsLevhita
napi_create_date and napi_get_date_value ignore leap seconds as per ECMAScript spec that follows POSIX spec for time, comments added to the documentation where added fo clarify it. PR-URL: https://github.com/nodejs/node/pull/29569 Fixes: https://github.com/nodejs/node/issues/29439 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-17doc: explain esm options for package authorsGeoffrey Booth
* organize sections more hierarchically * recommend always including "type" field, per 2019-06-19 meeting Refs: https://github.com/nodejs/modules/issues/342#issuecomment-503733187 * expand discussion of publishing cjs/esm packages PR-URL: https://github.com/nodejs/node/pull/29497 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-17test: fix flaky test-inspector-connect-main-threadAnna Henningsen
Using `console.log()` likely interferes with the functionality of the test, which also checks the interaction between inspector and `console.log()` as part of the test. Using `process._rawDebug()` solves that issue. Refs: https://github.com/nodejs/node/pull/28870 Refs: https://github.com/nodejs/node/pull/29582 PR-URL: https://github.com/nodejs/node/pull/29588 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-09-17doc: update experimental loader hooks example codeDenis Zavershinskiy
It fix 2 issues in provided Loader hooks examples: 1. Original ``new URL(`${process.cwd()}/`, 'file://');`` is not cross-platform, it gives wrong URL on windows 2. Based on `CHECK` in ModuleWrap::Resolve (node 12.9.1, https://github.com/nodejs/node/blob/v12.9.1/src/module_wrap.cc#L1132) the 2nd parameter should be a `string`, not an `URL` object PR-URL: https://github.com/nodejs/node/pull/29373 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-16doc: use consistent unordered list styleNick Schonning
Convert to asterisks when there are mixed styles in document. Addresses Markdownlint MD004 rule PR-URL: https://github.com/nodejs/node/pull/29516 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-16inspector: new API - Session.connectToMainThreadEugene Ostroukhov
This API is designed to enable worker threads use Inspector protocol on main thread (and other workers through NodeWorker domain). Note that worker can cause dead lock by suspending itself. I will work on a new API that will allow workers to be hidden from the inspector. Fixes: https://github.com/nodejs/node/issues/28828 PR-URL: https://github.com/nodejs/node/pull/28870 Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-09-15tty: add color support for moshAditya
PR-URL: https://github.com/nodejs/node/pull/27843 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-15http: refactor responseKeepAlive()Robert Nagy
This tries to simplify the code and make it easier to understand. Took me a while to get my head around the previous implementation. Also minor perf improvement. PR-URL: https://github.com/nodejs/node/pull/28700 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-15repl: add autocomplete support for fs.promisesantsmartian
PR-URL: https://github.com/nodejs/node/pull/29400 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-09-15tools: update ESLint to 6.4.0zhangyongsheng
PR-URL: https://github.com/nodejs/node/pull/29553 Refs: https://github.com/eslint/eslint/releases/tag/v6.4.0 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-09-16src: print exceptions from PromiseRejectCallbackAnna Henningsen
Previously, leaving the exception lying around would leave the JS engine in an invalid state, as it was not expecting exceptions to be thrown from the C++ `PromiseRejectCallback`, and lead to hard crashes under some conditions (e.g. with coverage enabled). PR-URL: https://github.com/nodejs/node/pull/29513 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-14build: allow clang 10+ in configure.pyKamil Rytarowski
Detected on NetBSD/amd64. Fixes: https://github.com/nodejs/node/issues/29536 PR-URL: https://github.com/nodejs/node/pull/29541 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-09-14repl: add missing variable declarationLucas Holmquist
* Adds `let` to a variable declaration in a for loop that wasn't using anything. * Declare the for initial expression in the for loop. * Remove hoisted variables for loops. PR-URL: https://github.com/nodejs/node/pull/29535 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-14process: use public readableFlowing propertyChetan Karande
PR-URL: https://github.com/nodejs/node/pull/29502 Refs: https://github.com/nodejs/node/issues/445 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-09-13perf_hooks: remove non-existent entries from inspectKirill Fomichev
Some of the milestones was removed in PR #21247 but entries not removed from function for inspect PerformanceNodeTiming. PR-URL: https://github.com/nodejs/node/pull/29528 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-13util: add encodeInto to TextEncoderAnna Henningsen
Add function encodeInto to TextEncoder, and add MessageChannel to the encodeInto.any.js test. Fixes: https://github.com/nodejs/node/issues/28851 Fixes: https://github.com/nodejs/node/issues/26904 Refs: https://github.com/nodejs/node/pull/28862 Co-authored-by: AtticusYang <yyongtai@163.com> PR-URL: https://github.com/nodejs/node/pull/29524 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-13crypto: fix OpenSSL return code handlingTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/29489 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-13crypto: add oaepLabel optionTobias Nießen
The label acts as the "L" input to the RSA-OAEP algorithm. PR-URL: https://github.com/nodejs/node/pull/29489 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-13doc: add Bethany to TSCMichael Dawson
Refs: https://github.com/nodejs/TSC/issues/718 PR-URL: https://github.com/nodejs/node/pull/29546 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-09-13doc: add Tobias to the TSCMichael Dawson
refs: https://github.com/nodejs/TSC/issues/746 PR-URL: https://github.com/nodejs/node/pull/29545 Refs: https://github.com/nodejs/TSC/issues/746 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-09-12tools: fix iculslocs to support ICU 65.1Steven R. Loomis
The ICU alias table format changed in https://unicode-org.atlassian.net/browse/ICU-20627 Because of this, iculslocs.cc needs to handle URES_TABLE format contents in the res_index.txt file. PR-URL: https://github.com/nodejs/node/pull/29523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-09-12doc: mention unit for process.hrtime.bigint()Anna Henningsen
The example states this already, but I would have expected this to be part of the description, too. PR-URL: https://github.com/nodejs/node/pull/29482 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-12src: modified RealEnvStore methods to use libuv functionsDevendra Satram
Modified RealEnvStore::Get, Set, Query and Delete methods to use libuv methods environment variables operations instead of using os specific logic and switches. Fixes: https://github.com/nodejs/node/issues/27211 Refs: http://docs.libuv.org/en/v1.x/misc.html PR-URL: https://github.com/nodejs/node/pull/27310 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-12build: re-run configure on node_version.h changeAnna Henningsen
Fixes: https://github.com/nodejs/node/issues/29509 PR-URL: https://github.com/nodejs/node/pull/29510 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-12tools: python3 compat for inspector code generatorBen Noordhuis
The code generator takes a dict and turns it into a namedtuple. The dict contains the key "async", which is a keyword in python 3.7, and rejected by the namedtuple constructor. Rename it to "async_" to avoid the clash. Fixes: https://github.com/nodejs/node/issues/29326 PR-URL: https://github.com/nodejs/node/pull/29340 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-12stream: simplify isUint8Array helperAnna Henningsen
The fallback code is no longer used when exporting to readable-stream. Refs: https://github.com/nodejs/node/pull/29475 PR-URL: https://github.com/nodejs/node/pull/29514 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-09-12doc: add documentation for stream readableFlowingChetan Karande
PR-URL: https://github.com/nodejs/node/pull/29506 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-12deps: upgrade to libuv 1.32.0cjihrig
Notable changes: - `uv_tcp_close_reset()` has been added. - `uv_udp_set_source_membership()` has been added. - A double free in `uv_free_cpu_info()` on OpenBSD has been fixed. - Defined, but empty environment variables can now be read on Windows. - Several improvements to the cmake build process. - The `EILSEQ` error code is now mapped by libuv. PR-URL: https://github.com/nodejs/node/pull/29508 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-12test: unmark test-worker-prof as flakyAnna Henningsen
This has no longer been flaky since V8 7.5. Refs: https://bugs.chromium.org/p/v8/issues/detail?id=9333 Fixes: https://github.com/nodejs/node/issues/26401 PR-URL: https://github.com/nodejs/node/pull/29511 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@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-09-11src,lib: expose memory file mapping flagJoão Reis
Support for UV_FS_O_FILEMAP was added in libuv in version 1.31.0. This exposes the flag in fs.constants. Refs: https://github.com/libuv/libuv/pull/2295 PR-URL: https://github.com/nodejs/node/pull/29260 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-11worker: mark as stableAnna Henningsen
This feature is not expected to receive breaking changes to its API and is used in real-world applications. As discussed at the last collaborator summit (Berlin May 2019), the `worker_threads` module can be considered stable once our Web Messaging implementation is compatible with Web Platform Tests. As of b34f05ecf2014a6a51c455e1bee06586ec81ff83, that is the case. Fixes: https://github.com/nodejs/node/issues/22940 PR-URL: https://github.com/nodejs/node/pull/29512 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-11build: find Python 3 or Python 2 in configurecclauss
PR-URL: https://github.com/nodejs/node/pull/25878 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-09-10build: improve `make coverage`Anna Henningsen
Run cleanup for all relevant subdirectories, and exclude generated source files (e.g. `out/Release/...`) from coverage reporting. Also enable running `make cctest` again (It’s unclear to me why this was disabled, as it does reduce coverage unnecessarily). PR-URL: https://github.com/nodejs/node/pull/29487 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-09-10doc: indent child list items for remark-lintNick Schonning
Child items not aligned to parent are flagged by list-item-bullet-indent PR-URL: https://github.com/nodejs/node/pull/29488 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-09doc: space around listsNick Schonning
Address markdownlint rule MD032. Flagged a few mixed list styles. PR-URL: https://github.com/nodejs/node/pull/29467 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-09build: add comment to .travis.yml on how to test Py3cclauss
PR-URL: https://github.com/nodejs/node/pull/29473 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-09worker: make terminate() resolve for unref’ed WorkersAnna Henningsen
Once `worker.terminate()` is called, the Worker instance will be destroyed as soon as possible anyway, so in order to make the Promise returned by `worker.terminate()` resolve always, it should be okay to just call `.ref()` on it and keep the main event loop alive temporarily. PR-URL: https://github.com/nodejs/node/pull/29484 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-09-09test: improve test-worker-message-port-message-before-closeAnna Henningsen
Replace a wrong comment with a correct assertion and await all async operations inside the async function. PR-URL: https://github.com/nodejs/node/pull/29483 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-09worker: prevent event loop starvation through MessagePortsAnna Henningsen
Limit the number of messages processed without interruption on a given `MessagePort` to prevent event loop starvation, but still make sure that all messages are emitted that were already in the queue when emitting began. This aligns the behaviour better with the web. Refs: https://github.com/nodejs/node/pull/28030 PR-URL: https://github.com/nodejs/node/pull/29315 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-09-08test: disable core dumps before running crash testBen Noordhuis
The test spawns a subprocess with the `--abort-on-uncaught-exception` flag and expects it to terminate with a SIGABRT signal. On systems where core dumps are enabled, that actually generates an unnecessary core dump. Set `ulimit -c 0` before spawning the subprocess. Fixes: https://github.com/nodejs/node/issues/29286 PR-URL: https://github.com/nodejs/node/pull/29478 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-09-09doc: exitedAfterDisconnect value can be falseNimit Aggarwal
Fixed the documentation to reflect the changes in the default value of worker.exitedAfterDisconnect PR-URL: https://github.com/nodejs/node/pull/29404 Fixes: https://github.com/nodejs/node/issues/28837 Refs: https://github.com/nodejs/node/pull/3743 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-09-08n-api: delete callback bundle via referenceGabriel Schulhof
We should strive to use weak persistent references consistently throughout the code, since using `v8::Persistent` directly results in having to change many sites in the code when the way we use it changes. N-API uses `v8impl::Reference` internally when maintaining a weak persistent reference is necessary. So far, `v8impl::CallbackBundle` was using `v8::Persistent` directly in order to weakly reference the JS function backed by a N-API callback. The change introduced here reduces `v8impl::CallbackBundle` to a simple structure and uses a `v8impl::Reference` to weakly reference the N-API callback with which it is associated. The structure is freed by the `napi_finalize` callback of the `v8impl::Reference`. This brings N-API use of `v8::Persistent` completely under the `v8impl::Reference` umbrella, rendering our use of weak references consistent. PR-URL: https://github.com/nodejs/node/pull/29479 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-08doc: remove wrong escapesXhmikosR
PR-URL: https://github.com/nodejs/node/pull/29452 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>