31408 Commits

Author SHA1 Message Date
Derek Lewis
0347574834 module: fix check for package.json at volume root
This patch converts the "read package scope" algorithm's while loop
into a do-while loop enabling items at the filesystem root dir to
be considered within the scope of a sibling package.json also at the
filesystem root dir.

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

Co-authored-by: Guy Bedford <guybedford@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34595
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2020-08-15 02:22:13 +00:00
Mary Marchini
5f78dea1a4 meta: add TSC as owner of governance-related docs
PR-URL: https://github.com/nodejs/node/pull/34737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-08-14 23:20:55 +00:00
João Reis
c2771dc07c build: move compiling for Windows ARM64 to Tier 2
PR-URL: https://github.com/nodejs/node/pull/34721
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ash Cripps <ashley.cripps@ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-14 15:33:52 -07:00
cjihrig
1e59f31555 test,doc: add missing uv_setup_args() calls
libuv 1.39.0 will begin requiring uv_setup_args() to be called
before attempting to access the process title. This commit adds
uv_setup_args() calls that were missing in order for the test
suite to pass (and updates the documentation).

PR-URL: https://github.com/nodejs/node/pull/34751
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-14 15:29:29 -07:00
Rich Trott
8640cd6066 doc: avoid _may_ in collaborator guide
Many style guides (including Microsoft's) suggest avoiding _may_ because
it can be unclear. Using _can_ or _might_ tends to increase clarity.

An example in this change:

> They may not change to a Runtime Deprecation until the next major
> release.

It's not clear if that means "They can not change until the next major
release" or "They might not change until the next major release but also
might change before then". Using _can_ or _might_ instead of _may_
clears up the ambiguity.

Refs: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/c/can-may

PR-URL: https://github.com/nodejs/node/pull/34749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-08-14 15:25:47 -07:00
Tobias Nießen
4a9e312591
crypto: avoid unitializing ECDH objects on error
The previous code changed the private key of the ECDH object, but
removed the public key if deriving it from the private key failed.
Instead, if deriving the public key fails, neither the private nor
the public key stored in the ECDH object should be updated.

PR-URL: https://github.com/nodejs/node/pull/34302
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-08-14 20:22:17 +02:00
Anna Henningsen
888eb5a987 test: use process.env.PYTHON to spawn python
Co-authored-by: Jérémy Lal <kapouer@melix.org>
Fixes: https://github.com/nodejs/node/issues/34699

PR-URL: https://github.com/nodejs/node/pull/34700
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2020-08-14 17:03:04 +08:00
Robert Nagy
a0f87aab10 fs: guard against undefined behavior
Calling close on a file description which is currently in use is
undefined behavior due to implementation details in libuv. Add
a guard against this when using FileHandle.

PR-URL: https://github.com/nodejs/node/pull/34746
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-14 10:22:43 +02:00
Anna Henningsen
5864fca7bc buffer: alias UInt ➡️ Uint in buffer methods
It’s *so* hard to remember that it’s `UintXArray` but not
`(write|read)UintX`. Let’s fix that by just providing aliases. 😊

PR-URL: https://github.com/nodejs/node/pull/34729
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-13 19:57:39 -07:00
Matthew McEachen
7b8c6b0c00 lib: add UNC support to url.pathToFileURL()
Fixes: https://github.com/nodejs/node/issues/34736

PR-URL: https://github.com/nodejs/node/pull/34743
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-13 19:43:02 -07:00
Rich Trott
9861962a5f test: remove error message checking in test-worker-init-failure
Let the check for the error code suffice and don't check for a
particular string in the message.

PR-URL: https://github.com/nodejs/node/pull/34727
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-13 19:28:46 -07:00
Mary Marchini
a84716a21b
build: implement a Commit Queue in Actions
This is a (still experimental) implementation of a Commit Queue on
GitHub Actions, using labels and the scheduler event to land Pull
Requests. It uses `node-core-utils` to validate Pull Requests and to
prepare the commit message, and then it uses a GitHub personal token to
push changes back to the repository. If the Queue fails to land a Pull
Request, that PR will be removed from the queue and the
`node-core-utils` output will be pasted in the Pull Request.

An overview of the implementation is provided in
doc/guides/commit-queue.md, as well as current limitations.

Ref: https://github.com/mmarchini-oss/automated-merge-test
Ref: https://github.com/nodejs/build/issues/2201

PR-URL: https://github.com/nodejs/node/pull/34112
Refs: https://github.com/mmarchini-oss/automated-merge-test
Refs: https://github.com/nodejs/build/issues/2201
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-08-13 18:47:27 -07:00
Bradley Farias
e155d96014 policy: support conditions for redirects
PR-URL: https://github.com/nodejs/node/pull/34414
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2020-08-13 13:17:40 -05:00
Guy Bedford
f8976a76bb module: share CJS/ESM resolver fns, refactoring
PR-URL: https://github.com/nodejs/node/pull/34744
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-13 11:04:24 -07:00
Yash Ladha
56b25e7a6f benchmark: add benchmark script for resourceUsage
Added a benchmark script for process method to benchmark the method
resourceUsage.

PR-URL: https://github.com/nodejs/node/pull/34691
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2020-08-13 22:33:07 +08:00
Anna Henningsen
7a1220a1d7 doc: fix headings in quic.md
PR-URL: https://github.com/nodejs/node/pull/34717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-12 17:13:28 -07:00
Rich Trott
f948359c05 doc: use sentence-casing for headers in collaborator guide
The collaborator guide uses both sentence case and headline case for
headings. Use sentence case to conform with our style guide.

PR-URL: https://github.com/nodejs/node/pull/34713
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-08-12 11:32:28 -07:00
Rich Trott
5f65f4778c doc: edit (general) collaborator guide
Use consistent capitalization in Consensus Seeking section, replace some
_should_ usage with imperative, etc.

PR-URL: https://github.com/nodejs/node/pull/34712
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2020-08-12 10:49:44 -07:00
Mary Marchini
b5e3fca04c
build: set --v8-enable-object-print by default
The flag improves the experience of debugging V8 with native debuggers.
It doens't incur performance penality, the only downside is an increase
in binary size by approximately 248 Kb.

Ref: https://github.com/nodejs/node/pull/32834

PR-URL: https://github.com/nodejs/node/pull/34705
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2020-08-12 08:47:04 -07:00
Priyank Singh
3b84048260 http2: add maxHeaderSize option to http2
add maxHeaderSize to http2 as an alias for maxHeaderListSize.

Fixes: https://github.com/nodejs/node/issues/33517
PR-URL: https://github.com/nodejs/node/pull/33636
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-08-12 09:58:35 +02:00
Mary Marchini
2f27f1144e
doc: reduce repetitiveness on Consensus Seeking
Rearrange Consensus Seeking section to reduce repetitiveness.

Ref: https://github.com/nodejs/node/pull/34639#discussion_r466447930
Ref: https://github.com/nodejs/node/pull/34639#discussion_r466450850

PR-URL: https://github.com/nodejs/node/pull/34702
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-08-11 20:06:46 -07:00
Anna Henningsen
cf5d7c0140
test: skip node-api/test_worker_terminate_finalization
The test fails under ASAN/valgrind. Since it has not been working
properly until today anyway, skip it.

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

PR-URL: https://github.com/nodejs/node/pull/34732
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-08-11 18:36:51 -07:00
Anna Henningsen
fd038a1f15 worker: fix --abort-on-uncaught-exception handling
The `set_abort_on_uncaught_exception(false)` line was supposed to
prevent aborting when running Workers in
`--abort-on-uncaught-exception` mode, but it was incorrectly set
and not checked properly in the should-abort callback.

PR-URL: https://github.com/nodejs/node/pull/34724
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2020-08-11 14:58:50 -07:00
Rich Trott
f86e3ea9df doc: remove typo in crypto.md
Change "its[sic] recommended to" to "be sure to". This fixes a typo and
also improves the passive and indirect phrasing to a more concise active
and direct phrasing.

PR-URL: https://github.com/nodejs/node/pull/34698
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-08-11 14:49:36 -07:00
Guy Bedford
77a515c31a module: custom --conditions flag option
PR-URL: https://github.com/nodejs/node/pull/34637
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2020-08-11 14:35:44 -07:00
Anna Henningsen
420da0ccd1 build: cover all benchmark addons with C++ linter
PR-URL: https://github.com/nodejs/node/pull/34725
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-11 13:29:15 -07:00
Anna Henningsen
9dac8cbbc3 benchmark: update function_args addon code
Make the code linter-conformant and remove usage of deprecated APIs.

PR-URL: https://github.com/nodejs/node/pull/34725
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-11 13:29:14 -07:00
Jim Schlight
bbdb0133dc doc: n-api environment life cycle APIs are stable
PR-URL: https://github.com/nodejs/node/pull/34641
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-08-11 13:26:54 -07:00
Tobias Nießen
1be7bbdc3b src: prefer C++ empty() in boolean expressions
PR-URL: https://github.com/nodejs/node/pull/34432
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2020-08-11 13:22:04 -07:00
Antoine du HAMEL
f280d2c85c doc: add padding in the sidebar column
PR-URL: https://github.com/nodejs/node/pull/34665
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2020-08-11 13:19:37 -07:00
Antoine du HAMEL
c093f6b4d1 doc: use semantically appropriate tag for lines
The HTML <hr> element represents a thematic break between
paragraph-level elements: for example, a change of scene in a story,
or a shift of topic within a section.
The HTML Content Division element (<div>) is the generic container
for flow content and does not inherently represent anything.

The <hr> tag semantically fits better the meaning of the line between
the lists.

Refs: https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element

PR-URL: https://github.com/nodejs/node/pull/34660
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-08-11 13:18:54 -07:00
James M Snell
1f9b20b637 net: introduce net.BlockList
`net.BlockList` provides an object intended to be used by net APIs to
specify rules for disallowing network activity with specific IP
addresses. This commit adds the basic mechanism but does not add the
specific uses.

PR-URL: https://github.com/nodejs/node/pull/34625
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2020-08-11 11:13:17 -07:00
Shelley Vohr
6e1f6ec573
2020-08-11, Version 14.8.0 (Current)
Notable changes:

async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) https://github.com/nodejs/node/pull/34574
doc:
  * add Ricky Zhou to collaborators (rickyes) https://github.com/nodejs/node/pull/34676
  * add release key for Ruy Adorno (Ruy Adorno) https://github.com/nodejs/node/pull/34628
  * add DerekNonGeneric to collaborators (Derek Lewis) https://github.com/nodejs/node/pull/34602
module:
  * (SEMVER-MINOR) unflag Top-Level Await (Myles Borins) https://github.com/nodejs/node/pull/34558
n-api:
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) https://github.com/nodejs/node/pull/28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) https://github.com/nodejs/node/pull/34572

PR-URL: https://github.com/nodejs/node/pull/34704
2020-08-11 09:40:48 -07:00
Anna Henningsen
9f47e5a7f7
test: fix test_worker_terminate_finalization
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in https://github.com/nodejs/node/pull/34625.

PR-URL: https://github.com/nodejs/node/pull/34726
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2020-08-11 18:04:58 +02:00
Nikolay Krashnikov
10ed48bef4 doc: add HPE_UNEXPECTED_CONTENT_LENGTH error description
PR-URL: https://github.com/nodejs/node/pull/34596
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2020-08-11 22:41:58 +08:00
gengjiawen
a7477704c4 quic: prefer modernize-make-unique
PR-URL: https://github.com/nodejs/node/pull/34692
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-11 13:51:44 +00:00
Rich Trott
bbfb014590 test: split test-crypto-dh-hash
test-crypto-dh-hash times out on some platforms. A single test case is
responsible for around 50% of the time to run, so split that test case
into its own file.

PR-URL: https://github.com/nodejs/node/pull/34631
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-08-11 06:17:21 -07:00
Rich Trott
49a1f7f15d test: use block-scoping in test/pummel/test-timers.js
PR-URL: https://github.com/nodejs/node/pull/34630
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-08-11 06:15:56 -07:00
Renato Mariscal
f8a0e62bbf doc: update http server response 'close' event
Two places emits `close` events:

`resOnFinish` calls `emitCloseNT`, which happens when the result is
completed:
687dbd8526/lib/_http_server.js (L695)

It gets attached once the socket is assigned:
687dbd8526/lib/_http_server.js (L226)

And detached if the response is completed:
https://github.com/nodejs/node/blob/master/lib/_http_server.js#L709
687dbd8526/lib/_http_server.js (L232)

Which means, it can only be reached in this case, for premature socket
termination.

PR-URL: https://github.com/nodejs/node/pull/34472
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-10 17:52:32 -07:00
Rich Trott
ea5eb8fc9c test: remove test-child-process-fork-args flaky designation
test-child-process-fork-args does not appear in results from `ncu-ci
walk commit` and no one has reported it failing for several months.
A stress test also passed.

Closes: https://github.com/nodejs/node/issues/32863

PR-URL: https://github.com/nodejs/node/pull/34684
Fixes: https://github.com/nodejs/node/issues/32863
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
2020-08-10 17:28:41 -07:00
Rich Trott
8a8416f841 lib: use full URL to GitHub issues in comments
Don't assume the reader of the code will know where to find the issue
tracker. Provide the full URL. This is especially important if the
issue tracker should move again.

PR-URL: https://github.com/nodejs/node/pull/34686
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-10 16:33:49 -07:00
Bradley Farias
bcfb1762a3 util: add debug and debuglog.enabled
PR-URL: https://github.com/nodejs/node/pull/33424
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-10 12:09:43 -05:00
Anna Henningsen
64acae2e06
test: add vm crash regression test
Refs: https://github.com/nodejs/node/issues/34606
PR-URL: https://github.com/nodejs/node/pull/34673
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-10 17:33:23 +02:00
Anna Henningsen
b8b5e1e5d0
deps: V8: cherry-pick e06ace6b5cdb
Original commit message:

    [api] Fix empty Maybe crash in GetRealNamedPropertyAttributes

    `Object::GetRealNamedPropertyAttributes()` can crash if an empty
    `Maybe` is returned by `JSReceiver::GetPropertyAttributes()` because
    it was not checking for that. Fix that.

    Refs: https://github.com/nodejs/node/issues/34606
    Change-Id: Ic83f904ba7134786bcd8f786eb2ce98adb4fea1e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2335057
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69258}

Refs: e06ace6b5c

PR-URL: https://github.com/nodejs/node/pull/34673
Fixes: https://github.com/nodejs/node/issues/34606
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-10 17:33:14 +02:00
James M Snell
5b6cd6fa1a quic: use the SocketAddressLRU to track validation status
PR-URL: https://github.com/nodejs/node/pull/34618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-10 07:52:09 -07:00
James M Snell
f75e69a94b quic: use SocketAddressLRU to track known SocketAddress info
Using the `SocketAddressLRU` utility allows us to put an upper
bound on the amount of memory that will be used to track known
SocketAddress information (such as current number of connections,
validation status, reset and retry counts, etc. The LRU is bounded
by both max size and time, with any entry older than 10 seconds
dropped whenever another item is accessed or updated.

PR-URL: https://github.com/nodejs/node/pull/34618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-10 07:52:06 -07:00
James M Snell
6d1f0aed52 src: add SocketAddressLRU Utility
Adds a LRU cache for information associated with a SocketAddress.

PR-URL: https://github.com/nodejs/node/pull/34618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-10 07:52:03 -07:00
James M Snell
6b0b33cd4c quic: cleanup some outstanding todo items
PR-URL: https://github.com/nodejs/node/pull/34618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-08-10 07:52:01 -07:00
Gabriele Greco
b0e4970b8f tools: add debug entitlements for macOS 10.15+
To debug native modules node should be a debuggable process, that will
require the **com.apple.security.get-task-allow** entitlement to be
added to the codesign procedure.

PR-URL: https://github.com/nodejs/node/pull/34378
Fixes: https://github.com/nodejs/node/issues/34340
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-08-10 16:42:14 +02:00
Mary Marchini
dd0c5228ac
build: add flag to build V8 with OBJECT_PRINT
Add a configure flag to build V8 with `-DOBJECT_PRINT`, which will
expose auxiliar functions to inspect heap objects using native
debuggers.

Fixes: https://github.com/nodejs/node/issues/32402
Signed-off-by: Mary Marchini <mmarchini@netflix.com>

PR-URL: https://github.com/nodejs/node/pull/32834
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-08-09 22:48:30 -07:00