30258 Commits
Author SHA1 Message Date
Beth Griggs 73aa21658d 2020-04-21, Version 14.0.0 (Current)
Deprecations:

- (SEMVER-MAJOR) crypto: move pbkdf2 without digest to EOL
  (James M Snell) [#31166](https://github.com/nodejs/node/pull/31166)
- (SEMVER-MAJOR) fs: deprecate closing FileHandle on garbage collection
  (James M Snell) [#28396](https://github.com/nodejs/node/pull/28396)
- (SEMVER-MAJOR) http: move OutboundMessage.prototype.flush to EOL
  (James M Snell) [#31164](https://github.com/nodejs/node/pull/31164)
- (SEMVER-MAJOR) lib: move GLOBAL and root aliases to EOL
  (James M Snell) [#31167](https://github.com/nodejs/node/pull/31167)
- (SEMVER-MAJOR) os: move tmpDir() to EOL
  (James M Snell)[#31169](https://github.com/nodejs/node/pull/31169)
- (SEMVER-MAJOR) src: remove deprecated wasm type check
  (Clemens Backes) [#32116](https://github.com/nodejs/node/pull/32116)
- (SEMVER-MAJOR) stream: move \_writableState.buffer to EOL
  (James M Snell) [#31165](https://github.com/nodejs/node/pull/31165)
- (SEMVER-MINOR) doc: deprecate process.mainModule
  (Antoine du HAMEL) [#32232](https://github.com/nodejs/node/pull/32232)
- (SEMVER-MINOR) doc: deprecate process.umask() with no arguments
  (Colin Ihrig) [#32499](https://github.com/nodejs/node/pull/32499)

ECMAScript Modules - Experimental Warning Removal:

- module: remove experimental modules warning
  (Guy Bedford) [#31974](https://github.com/nodejs/node/pull/31974)

In Node.js 13 we removed the need to include the --experimental-modules
flag, but when running EcmaScript Modules in Node.js, this would still
result in a warning ExperimentalWarning: The ESM module loader is
experimental.

As of Node.js 14 there is no longer this warning when using ESM in
Node.js. However, the ESM implementation in Node.js remains
experimental. As per our stability index: “The feature is not subject
to Semantic Versioning rules. Non-backward compatible changes or
removal may occur in any future release.” Users should be cautious when
using the feature in production environments.

Please keep in mind that the implementation of ESM in Node.js differs
from the developer experience you might be familiar with. Most
transpilation workflows support features such as optional file
extensions or JSON modules that the Node.js ESM implementation does not
support. It is highly likely that modules from transpiled environments
will require a certain degree of refactoring to work in Node.js. It is
worth mentioning that many of our design decisions were made with two
primary goals. Spec compliance and Web Compatibility. It is our belief
that the current implementation offers a future proof model to
authoring ESM modules that paves the path to Universal JavaScript.
Please read more in our documentation.

The ESM implementation in Node.js is still experimental but we do believe
that we are getting very close to being able to call ESM in Node.js
“stable”. Removing the warning is a huge step in that direction.

New V8 ArrayBuffer API:

* **src**: migrate to new V8 ArrayBuffer API
  (Thang Tran) [#30782](https://github.com/nodejs/node/pull/30782)

Multiple ArrayBuffers pointing to the same base address are no longer
allowed by V8. This may impact native addons.

Toolchain and Compiler Upgrades:

- (SEMVER-MAJOR) build: update macos deployment target to 10.13 for 14.x
  (AshCripps)[#32454](https://github.com/nodejs/node/pull/32454)
- (SEMVER-MAJOR) doc: update cross compiler machine for Linux armv7
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) doc: update Centos/RHEL releases use devtoolset-8
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) doc: remove SmartOS from official binaries
  (Richard Lau) [#32812](https://github.com/nodejs/node/pull/32812)
- (SEMVER-MAJOR) win: block running on EOL Windows versions
  (João Reis) [#31954](https://github.com/nodejs/node/pull/31954)

It is expected that there will be an ABI mismatch on ARM between the
Node.js binary and native addons. Native addons are only broken if they
interact with `std::shared_ptr`. This is expected to be fixed in a
later version of Node.js 14.
- [#30786](https://github.com/nodejs/node/issues/30786)

Update to V8 8.1:

- (SEMVER-MAJOR) deps: update V8 to 8.1.307.20
  (Matheus Marchini) [#32116](https://github.com/nodejs/node/pull/32116)

Other Notable Changes:

- cli, report: move --report-on-fatalerror to stable
  (Colin Ihrig) [#32496](https://github.com/nodejs/node/pull/32496)
- deps: upgrade to libuv 1.37.0
  (Colin Ihrig) [#32866](https://github.com/nodejs/node/pull/32866)
- fs: add fs/promises alias module
  (Gus Caplan) [#31553](https://github.com/nodejs/node/pull/31553)

PR-URL: https://github.com/nodejs/node/pull/32181
v14.0.0
2020-04-21 11:58:34 +01:00
Richard Lau 1a1ce93317 doc: update cross compiler machine for Linux armv7
Update cross compiler machine for Linux armv7 to Ubuntu 18.04.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32812
Refs: https://github.com/nodejs/build/issues/2168
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-20 19:11:44 +01:00
Richard Lau dad96e4fc1 doc: update Centos/RHEL releases use devtoolset-8
Releases built on Centos/RHEL have been updated to use devtoolset-8.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32812
Refs: https://github.com/nodejs/build/issues/2168
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-20 19:11:44 +01:00
Richard Lau 5317202aa1 doc: remove SmartOS from official binaries
Based on feedback from Joyent, the SmartOS builds are largely unusable
without bundling all of the libraries used to build the binary so are
being dropped starting from Node.js 14. We will still test SmartOS in
the CI.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32812
Refs: https://github.com/nodejs/build/issues/2168
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-20 19:11:44 +01:00
Michaël Zasso bf86f55e22 deps: patch V8 to 8.1.307.30
PR-URL: https://github.com/nodejs/node/pull/32693
Refs: https://github.com/v8/v8/compare/8.1.307.26...8.1.307.28
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 18:56:27 +01:00
cjihrig b5bbde8cf1 deps: upgrade to libuv 1.37.0
Notable changes:

- The UV_UDP_RECVMMSG flag has been added. This flag is now
  required in order to utilize recvmmsg(). This was added in
  response to a regression introduced in 1.35.0 and 1.36.0.

PR-URL: https://github.com/nodejs/node/pull/32866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-20 18:56:12 +01:00
cjihrig 7afe24dba6 deps: upgrade to libuv 1.36.0
Notable changes:

- gyp support has been removed.
- recvmmsg messages are returned in the correct order.
- IBMi cmake support has been added.
- uv_fs_lutime() has been added.
- uv_fs_statfs() on Windows properly handles file paths.

PR-URL: https://github.com/nodejs/node/pull/32866
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2020-04-20 18:56:12 +01:00
Michaël Zasso 68e1288e00 test: mark addons/zlib-bindings/test flaky on arm
Refs: https://github.com/nodejs/node/issues/30786

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:48 +01:00
Anna Henningsen 0f14123186 deps: V8: stub backport fast API call changes
This brings ABI compatibility for several changes related to
the fast API calls implementation in V8.

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:40 +01:00
Anna Henningsen bf412ed77b deps: V8: stub backport d5b444bc5a84
Refs: https://github.com/v8/v8/commit/d5b444bc5a842fbbb1cccfaf0733dba9a551f7bd

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:35 +01:00
Anna Henningsen fdaa365b0b deps: V8: stub backport 65238018ca4b and 8d08318e1a85
Refs: https://github.com/v8/v8/commit/65238018ca4be983c804bf74115f415e0184b354
Refs: https://github.com/v8/v8/commit/8d08318e1a852efc17f3c6a0ee6935f596734aaa

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:29 +01:00
Anna Henningsen 8198e7882c deps: V8: stub backport 9e52d5c5d717
Refs: https://github.com/v8/v8/commit/9e52d5c5d7178ae522c71562b01af79a89f88fad

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:24 +01:00
Anna Henningsen a27852ae7c deps: V8: cherry-pick 98b1ef80c722
Original commit message:

    Expose the %ObjProto_valueOf% intrinsic object to embedders

    https://html.spec.whatwg.org/multipage/history.html#the-location-interface
    HTML Location platform objects need to be initialized with using
    the %ObjProto_valueOf% intrinsic object.

    This patch exposes the %ObjProto_valueOf% intrinsic object to
    embedders.

    Example usage is: https://crrev.com/c/2102306

    Change-Id: Iec58135773e01aed5de330c0c5dea89a49835a52
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102408
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66747}

Refs: https://github.com/v8/v8/commit/98b1ef80c722b1a9e6584a0b49b63eda188cbc41

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:18 +01:00
Anna Henningsen e8c7b7a2df deps: V8: cherry-pick b5c917ee80cb
Original commit message:

    [api] New function for reallocating ArrayBuffer backing store

    This patch adds a new BackingStore::Reallocate function that internally
    uses a new ArrayBuffer::Allocator::Reallocate provided by the embedder.

    The default implementation of the function simply copies the backing
    store. The embedder can override the function and provide a more
    efficient implementation e.g. using realloc.

    Bug: v8:9908, v8:9380

    Change-Id: I2179c80ba199c045b6900c620a813916150e7098
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007274
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66044}

Refs: https://github.com/v8/v8/commit/b5c917ee80cbf33b18a96bfcf67a4c598ea85722

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:13 +01:00
Anna Henningsen 552cee0cc0 deps: V8: cherry-pick 700b1b97e9ab
Original commit message:

    [api] Remove deprecated wasm module type check

    The method was deprecated in favor of {IsWasmModuleObject}.

    R=adamk@chromium.org

    Bug: v8:10155
    Change-Id: Id21a1b74dde5576c2c82cc209555c22209a9e5d4
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033170
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66469}

Refs: https://github.com/v8/v8/commit/700b1b97e9ab1c3ae7b0a99ef4003de32e2d1590

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:07 +01:00
Anna Henningsen 9b7a1b048a deps: V8: cherry-pick e8ba5699c648
Original commit message:

    [tools] Add a VMState for Atomics.wait

    We will use this state in devtools via the inspector to indicate
    whether a thread is currently stuck polling in atomics.wait.

    VMState already distinguishes the important states we care about which
    are idle vs. running JS. We also want to know the state for
    atomics.wait(), which is commonly used in WebWorkers to poll the main
    page for work to do.

    This CL just adds and maintains the state and adds assertions in
    atomics tests. Another CL will emit inspector notifications when the
    VMState changes in a way that the inspector cares about.

    Re-flow comments as a drive-by cleanup.

    Bug: chromium:1025490
    Change-Id: I961051bfb846aa20454a56214310370ea8e47d1c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033168
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66071}

Refs: https://github.com/v8/v8/commit/e8ba5699c648fb5d9878b582342482360f74f80b

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:45:00 +01:00
Anna Henningsen 1f02617b05 deps: V8: cherry-pick 55a01ec7519a
Original commit message:

    Reland "[weakrefs] Schedule FinalizationGroup cleanup tasks from within V8"

    Deprecate the following explicit FinalizationGroup APIs in favor of
    automatic handling of FinalizationGroup cleanup callbacks:
      - v8::Isolate::SetHostCleanupFinalizationGroupCallback
      - v8::FinaliationGroup::Cleanup

    If no HostCleanupFinalizationGroupCallback is set, then
    FinalizationGroup cleanup callbacks are automatically scheduled by V8
    itself as non-nestable foreground tasks.

    When a Context being disposed, all FinalizationGroups that are
    associated with it are removed from the dirty list, cancelling
    scheduled cleanup.

    This is a reland of 31d8ff7ac5f4a91099f2f06f01e43e9e7aa79bc4

    Bug: v8:8179, v8:10190
    Change-Id: I704ecf48aeebac1dc2c05ea1c052f6a2560ae332
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2045723
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66208}

Refs: https://github.com/v8/v8/commit/55a01ec7519a80c64b51465efa19511ce34b1e79

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:54 +01:00
Anna Henningsen da728c482c deps: V8: cherry-pick 9f0f2cb7f08d
Original commit message:

    [weakrefs] Call Isolate::ClearKeptObjects() as part of microtask checkpoint

    In the spec, WeakRefs that are dereferenced are kept alive until there's
    no JS on the stack, and then the host is expected to call
    ClearKeptObjects to clear those strong references [1]. HTML calls
    ClearKeptObjects at the end of a PerformMicrotaskCheckpoint [2].

    In V8, leaving this up to the embedder is error prone in the same way
    the deprecated FinalizationGroup callback APIs were error prone: it
    depends on the embedder doing the right thing. This CL moves the call to
    ClearKeptObjects to be after running of microtasks within V8.

    However, the Isolate::ClearKeptObjects API should not be removed or
    deprecated in case an embedder uses an entirely custom MicrotaskQueue
    implementation and invokes MicrotaskQueue::PerformCheckpoint manually.

    [1] https://tc39.es/proposal-weakrefs/#sec-clear-kept-objects
    [2] https://github.com/whatwg/html/pull/4571

    Bug: v8:8179
    Change-Id: Ie243804157b56241ca69ed8fad300e839a0c9f75
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2055967
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66327}

Refs: https://github.com/v8/v8/commit/9f0f2cb7f08d0aecf22c684779b8ecd696bf9675

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:48 +01:00
Anna Henningsen 2ee8b4a512 deps: V8: cherry-pick e395d1698453
Original commit message:

    [api] Remove deprecated DeserializeOrCompile method

    This method was used to implement deserialization via the value
    serializer. It was deprecated since this functionality is not used any
    more, and hence untested.
    This CL cleans up by removing the deprecated method and two private
    helper methods.

    R=adamk@chromium.org

    Bug: v8:10155
    Change-Id: I4dda1949fd4f1b499cb6f8d6e6a76b642179303a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033171
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66096}

Refs: https://github.com/v8/v8/commit/e395d16984537c0767dc8152c7f273dbf2a555f5

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:40 +01:00
Anna Henningsen dfc66a6af4 deps: V8: cherry-pick d1253ae95b09
Original commit message:

    [unwinder] Advance deprecation of the old unwinder API

    Chrome uses the new version now.

    Bug: v8:8116
    Change-Id: I59af8d2c6a897a852acd6de3a7938a4b8d3943e4
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110015
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66796}

Refs: https://github.com/v8/v8/commit/d1253ae95b099d8ede3aacbdc5e5834ebd5d8865

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:34 +01:00
Anna Henningsen c3ecbc758b deps: V8: cherry-pick fa3e37e511ee
Original commit message:

    [api] remove deprecated snapshot APIs

    R=verwaest@chromium.org

    Fixed: v8:7463
    Change-Id: I3d0127865ad0430d38124c3ad8ed3bc63ba4e6d3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149421
    Auto-Submit: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67169}

Refs: https://github.com/v8/v8/commit/fa3e37e511ee242e8fa0ca09f5425dea4d7cecff

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:29 +01:00
Anna Henningsen 9568fbc7cd deps: V8: cherry-pick f0057afc2fb6
Original commit message:

    [api] Remove deprecated and non-functional method

    The functionality was not used since a long time, and was hence removed
    for the 8.1 branch, and the method was deprecated.
    This CL removed the deprecated method completely.

    R=adamk@chromium.org

    Bug: v8:10155
    Change-Id: Iae299d64decb7230d38c2fda8d269a7b0387bb0d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033169
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66167}

Refs: https://github.com/v8/v8/commit/f0057afc2fb629e9625bb43df9fcdff06cbf6bf9

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:24 +01:00
Anna Henningsen 07d4372d5a deps: V8: cherry-pick 94723c197199
Original commit message:

    api: Remove deprecated TracedReference::SetFinalizationCallback method

    TracedReference is supposed to be as light-weight as possible without
    destructor or other callbacks, essentially just representing a plain managed
    reference.

    Change-Id: Iae52cf7460e3623f1fb7d183757ecd39b2431369
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033173
    Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66106}

Refs: https://github.com/v8/v8/commit/94723c19719961a15b1f5546ec02fd3e916e1c0d

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:18 +01:00
Anna Henningsen 4a11a54f9a deps: V8: backport 844fe8f7d965
Original commit message:

    Make StringBuffer::string return a StringView instead of a reference.

    A StringView is pretty light, so this should be similar to
    how absl::string_view is typically used, e.g. see the guidance here:
    https://github.com/abseil/abseil-cpp/blob/master/absl/strings/string_view.h
    I suspect this reasoning holds even though StringView (defined
    just above StringBuffer in v8-inspector.h) carries an additional bool.
    This yields a small simplification of the StringBuffer implementations.

    Change-Id: I03f850049afe2327913070838f39649fcdfa6fa8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2045110
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66858}

(Neighbouring-line conflicts were resolved while backporting.)

Refs: https://github.com/v8/v8/commit/844fe8f7d965fcb305bd1b71fe6b34628fc4d1fd

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:11 +01:00
Anna Henningsen 1b7878558a deps: V8: cherry-pick 2db93c023379
Original commit message:

    [api] Add embedder-vs-V8 build configuration compatibility check

    v8::V8::Initialize() will fail with meaningful error upon build
    configuration mismatch.

    Bug: v8:10041
    Change-Id: Ic69ba68ef1764b356beef0f204fe58b45bae3c49
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144953
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67116}

Refs: https://github.com/v8/v8/commit/2db93c0233790b2cfb9e80fa1fa89dee18c7109f

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:44:05 +01:00
Anna Henningsen 122937fc67 deps: V8: cherry-pick 4b1447e4bb0e
Original commit message:

    Improve V8 GC logic for external memory

    The logic for V8 GC normally only takes the external memory growth
    since last mark-compact into account. Unfortunately, the amount of
    external memory recorded at the end of MC is often too high. The
    reason is that it might take a while for the external memory
    associated with the GCed objects to be released (e.g. V8 itself post a
    task to release external memory for ArrayBuffer backing stores). In a
    worst case scenario GC is driven only by external memory and none of
    the external memory is released by the end of the MC. Then each MC
    will record the external memory at its highest point and the GC logic
    will allow the external memory to grow a bit higher each time which
    can lead to excessive memory use.

    This patch improves the situation a bit by calculating the growth from
    the lowest external memory seen since the last MC. That way the growth
    calculation will be offset from a level presumably closer to the
    intended one (to what it would have been if the external memory
    associated with the GCed objects was released during the MC). Now,
    this fix is not perfect because it can be thrown off by external
    memory growth occurring before the lingering memory is
    released. However, it seems to work rather well in practice (e.g. when
    playing MSE video on YT).

    Bug: v8:10185
    Change-Id: Ifcdd87eb45f3ae4a99d2aeec667c3ae4ca9a52b6
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2042711
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66193}

Refs: https://github.com/v8/v8/commit/4b1447e4bb0e306c40214026342858664a13b551

PR-URL: https://github.com/nodejs/node/pull/32885
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2020-04-20 17:43:59 +01:00
Guy Bedford f98668ade3 module: remove experimental modules warning
PR-URL: https://github.com/nodejs/node/pull/31974
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-04-17 13:43:42 -04:00
William Bonawentura 9add24ecd3 doc: missing brackets
PR-URL: https://github.com/nodejs/node/pull/32657
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-17 13:43:41 -04:00
Qinhui Chen fe1bda9aeb module: fix memory leak when require error occurs
Delete useless module in parent module: parent.children array
when error occurs, so that it can be garbage collected.

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

PR-URL: https://github.com/nodejs/node/pull/32837
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
2020-04-17 13:43:41 -04:00
Daniel Bevenius 6681a685a9 src: remove unused using in node_worker.cc
This commit removes unused using declarations in
src/node_worker.cc.

PR-URL: https://github.com/nodejs/node/pull/32840
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-17 13:43:41 -04:00
Michael Dawson 1796cc0df5 doc: improve consistency in usage of NULL
- add backticks around use of NULL
- convert from null to NULL where we mean
  NULL

Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32726
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Christopher Hiller <boneskull@boneskull.com>
2020-04-17 13:43:41 -04:00
Richard Lau f2c22db580 build: remove .git folders when testing V8
When running `make test-v8` V8's `gclient sync` converts folders
under `deps/v8/third_party` into git repositories. Unfortunately
the files that were checked in under `deps/v8/third_party/zlib`
have been modified from the upstream Chromium repository (some
files have been deleted and there are whitespace differences in
some of the files that were kept) so whenever the Node.js source
tree is hard reset/checked out `gclient sync` notices there are
unstaged changes as the files in the Node.js source tree do not
match those of the upstream Chromium third party zlib commit.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32877
Refs: https://github.com/nodejs/build/issues/2256
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-17 13:43:41 -04:00
Gabriel Schulhof 076ba3150d Revert "n-api: detect deadlocks in thread-safe function"
This reverts commit aeb7084fe6.

The solution creates incorrect behaviour on Windows.

Re: https://github.com/nodejs/node-addon-api/pull/697#issuecomment-612993476
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: https://github.com/nodejs/node/pull/32880
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-04-17 13:43:40 -04:00
daemon1024 a09bf3ad5f test: replace console.log/error() with debuglog
PR-URL: https://github.com/nodejs/node/pull/32692
Fixes: https://github.com/nodejs/node/issues/32678
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-04-17 13:43:40 -04:00
Robert Nagy ad4c10e824 stream: improve comments regarding end() errors
Cleans up comments and TODOs and tries to provide a
more detail description in regards to error behavior
of end().

PR-URL: https://github.com/nodejs/node/pull/32839
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-17 13:43:40 -04:00
Robert Nagy 6e5c23b6c8 stream: update comment to indicate unused API
destroy w/ callback was previously used by node
core. This is no longer the case and the
comments should reflect this to avoid confusion.

PR-URL: https://github.com/nodejs/node/pull/32808
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-17 13:43:40 -04:00
Xu Meng d1b41bbd86 test: only detect uname on supported os
To skip some tests on IBMi PASE, we use
uname to detect the true os name, but
on Windows machines there is no uname
available.

PR-URL: https://github.com/nodejs/node/pull/32833
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-04-17 13:43:40 -04:00
Anna Henningsen 7fe61222ef worker: mention argument name in type check message
Refs: https://github.com/nodejs/node/pull/32745#discussion_r406564208

PR-URL: https://github.com/nodejs/node/pull/32815
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2020-04-17 13:43:39 -04:00
Robert Nagy 2662b0c9e3 doc: improve net docs
Refer back to streams docs for further and more accurate
description of behavior details.

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

PR-URL: https://github.com/nodejs/node/pull/32811
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-04-17 13:43:39 -04:00
Robert Nagy ed4fbefb71 fs: use finished over destroy w/ cb
destroy w/ is undocumented API which also will cause
a race if the stream is already destroying and potentially
invoking the callback too early and withou error.

PR-URL: https://github.com/nodejs/node/pull/32809
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-04-17 13:43:39 -04:00
Sam Roberts 4bb29ed044 test: mark cpu-prof-dir-worker flaky on all
Refs: https://github.com/nodejs/node/issues/27611#issuecomment-613100468

PR-URL: https://github.com/nodejs/node/pull/32828
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-17 13:43:39 -04:00
Robert Nagy 1a3e358a1d http: refactor agent 'free' handler
Remove nesting in favor of early returns.

PR-URL: https://github.com/nodejs/node/pull/32801
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-17 13:43:38 -04:00
Anna Henningsen b9d9f91a80 src: use basename(argv0) for --trace-uncaught suggestion
Refs: https://github.com/nodejs/node/pull/32797#discussion_r407222290

PR-URL: https://github.com/nodejs/node/pull/32798
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-04-17 13:43:38 -04:00
Anna Henningsen 1092bb94f4 process: suggest --trace-warnings when printing warning
Suggest using `--trace-warnings` or `--trace-deprecation` the first
time a warning is emitted without a stack trace, similar to how
we suggest `--trace-uncaught` when printing uncaught exceptions
without a stack trace.

PR-URL: https://github.com/nodejs/node/pull/32797
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-04-17 13:43:38 -04:00
Jesus Hernandez e18a40e42d test: replace equal with strictEqual
PR-URL: https://github.com/nodejs/node/pull/32727
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-17 13:43:38 -04:00
Sam Roberts 320f297a35 test: mark test-worker-prof flaky on arm
Refs: https://github.com/nodejs/node/issues/26401#issuecomment-613095719

PR-URL: https://github.com/nodejs/node/pull/32826
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-17 12:37:07 -04:00
Sam Roberts 4b5658b536 test: mark test-http2-reset-flood flaky on all
Refs: https://github.com/nodejs/node/issues/29802
Refs: https://github.com/nodejs/node/pull/32595

PR-URL: https://github.com/nodejs/node/pull/32825
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-17 12:36:58 -04:00
Reşat SABIQ 5d940de17b doc: note that signatures of binary may be from subkeys
PR-URL: https://github.com/nodejs/node/pull/32591
Fixes: https://github.com/nodejs/node/issues/32559
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-04-17 12:36:50 -04:00
Julian Duque ead51be541 test: cover node entry type in perf_hooks
PR-URL: https://github.com/nodejs/node/pull/32751
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-17 12:36:40 -04:00
Daniel Bevenius 24e1e28b38 src: ignore GCC -Wcast-function-type for v8.h
Currently, the following warnings are emitted during compilation:
In file included from ../src/string_bytes.h:29,
                 from ../src/string_bytes.cc:22:
../deps/v8/include/v8.h:
In instantiation of ‘void v8::PersistentBase<T>::SetWeak(
    P*,typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType)
[with P = node::BaseObject;
T = v8::Object;
typename v8::WeakCallbackInfo<P>::Callback =
    void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’:
../src/base_object-inl.h:135:42:   required from here
../deps/v8/include/v8.h:10732:16: warning:
cast between incompatible function types from
‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka
‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to
‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’}
[-Wcast-function-type]
10732 |                reinterpret_cast<Callback>(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And the same from test/cctest/test_aliased_buffer.cc

We have an open pull request against v8 for this:
https://chromium-review.googlesource.com/c/v8/v8/+/2080361

PR-URL: https://github.com/nodejs/node/pull/32679
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-14 11:04:56 +01:00