Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v15.2.0 proposal #36055

Merged
merged 66 commits into from
Nov 10, 2020
Merged

v15.2.0 proposal #36055

merged 66 commits into from
Nov 10, 2020

Conversation

danielleadams
Copy link
Contributor

@danielleadams danielleadams commented Nov 9, 2020

2020-11-10, Version 15.2.0 (Current), @danielleadams

Notable changes

  • events:
    • getEventListeners static (Benjamin Gruenbaum) #35991
  • fs:
    • support abortsignal in writeFile (Benjamin Gruenbaum) #35993
    • add support for AbortSignal in readFile (Benjamin Gruenbaum) #35911
  • stream:
    • fix thrown object reference (Gil Pedersen) #36065

Commits

  • [9d9a044c1b] - benchmark: ignore build artifacts for napi addons (Richard Lau) #35970
  • [4c6de854be] - benchmark: remove modules that require intl (Richard Lau) #35968
  • [292915a6a8] - bootstrap: refactor to use more primordials (Antoine du Hamel) #35999
  • [10c9ea771d] - build: fix zlib inlining for IA-32 (raisinten) #35679
  • [6ac9c8f31b] - build, tools: look for local installation of NASM (Richard Lau) #36014
  • [9757b47c44] - console: use more primordials (Antoine du Hamel) #35734
  • [0d7422651b] - crypto: refactor to use more primordials (Antoine du Hamel) #36012
  • [dc4936ba50] - crypto: fix comment in ByteSource (Tobias Nießen) #35972
  • [7cb5c0911e] - deps: cherry-pick 9a49b22 from V8 upstream (Daniel Bevenius) #35939
  • [4b03670877] - dns: fix trace_events name for resolveCaa() (Rich Trott) #35979
  • [dcb27600da] - doc: escape asterisk in cctest gtest-filter (raisinten) #36034
  • [923276ca53] - doc: move v8.getHeapCodeStatistics() (Rich Trott) #36027
  • [71fa9c6b24] - doc: add note regarding file structure in src/README.md (Denys Otrishko) #35000
  • [99cb36238d] - doc: advise users to import the full set of trusted release keys (Reşat SABIQ) #32655
  • [06cc400160] - doc: fix crypto doc linter errors (Antoine du Hamel) #36035
  • [01129a7b39] - doc: revise v8.getHeapSnapshot() (Rich Trott) #35849
  • [77d33c9b2f] - doc: update core-validate-commit link in guide (Daijiro Wachi) #35938
  • [6d56ba03e2] - doc: update benchmark CI test indicator in README (Rich Trott) #35945
  • [8bd364a9b3] - doc: add new wordings to the API description (Pooja D.P) #35588
  • [acd3617e1a] - doc: option --prof documentation help added (krank2me) #34991
  • [6968b0fd49] - doc: fix release-schedule link in backport guide (Daijiro Wachi) #35920
  • [efbfeff62b] - doc: fix incorrect heading level (Bryan Field) #35965
  • [9c4b360d08] - doc,crypto: added sign/verify method changes about dsaEncoding (Filip Skokan) #35480
  • [85cf30541d] - doc,fs: document value of stats.isDirectory on symbolic links (coderaiser) #27413
  • [d6bd78ff82] - doc,net: document socket.timeout (Brandon Kobel) #34543
  • [36c20d939a] - doc,stream: write(chunk, encoding, cb) encoding can be null (dev-script) #35372
  • [9d26c4d496] - domain: refactor to use more primordials (Antoine du Hamel) #35885
  • [d83e253065] - errors: refactor to use more primordials (Antoine du Hamel) #35944
  • [567f8d8caf] - (SEMVER-MINOR) events: getEventListeners static (Benjamin Gruenbaum) #35991
  • [9e673723e3] - events: fire handlers in correct oder (Benjamin Gruenbaum) #35931
  • [ff59fcdf7b] - events: define abort on prototype (Benjamin Gruenbaum) #35931
  • [ab0eb4f2c9] - events: support event handlers on prototypes (Benjamin Gruenbaum) #35931
  • [33e2ee58a7] - events: define event handler as enumerable (Benjamin Gruenbaum) #35931
  • [a7d0c76f86] - events: support emit on nodeeventtarget (Benjamin Gruenbaum) #35851
  • [76332a0439] - events: port some wpt tests (Benjamin Gruenbaum) #33621
  • [ccf9f0e62e] - (SEMVER-MINOR) fs: support abortsignal in writeFile (Benjamin Gruenbaum) #35993
  • [7ef9c707e9] - fs: replace finally with PromisePrototypeFinally (Baruch Odem (Rothkoff)) #35995
  • [ccbe267515] - fs: remove unnecessary Function#bind() in fs/promises (Ben Noordhuis) #35208
  • [6011bfdec5] - fs: remove unused assignment (Rich Trott) #35882
  • [92bdfd141b] - (SEMVER-MINOR) fs: add support for AbortSignal in readFile (Benjamin Gruenbaum) #35911
  • [11f592450b] - http2: add has method to proxySocketHandler (masx200) #35197
  • [28ed7d062e] - http2: centralise socket event binding in Http2Session (Momtchil Momtchev) #35772
  • [429113ebfb] - http2: move events to the JSStreamSocket (Momtchil Momtchev) #35772
  • [1dd744a420] - http2: fix error stream write followed by destroy (David Halls) #35951
  • [af2a560c42] - lib: add %TypedArray% abstract constructor to primordials (ExE Boss) #36016
  • [b700900d02] - lib: refactor to use more primordials (Antoine du Hamel) #35875
  • [7a375902ff] - module: refactor to use more primordials (Antoine du Hamel) #36024
  • [8d76db86b5] - module: refactor to use iterable-weak-map (Benjamin Coe) #35915
  • [9b6512f7de] - n-api: unlink reference during its destructor (Gabriel Schulhof) #35933
  • [1b277d97f3] - src: remove ERR prefix in crypto status enums (Daniel Bevenius) #35867
  • [9774b4cc72] - stream: fix thrown object reference (Gil Pedersen) #36065
  • [359a6590b0] - stream: writableNeedDrain (Robert Nagy) #35348
  • [b7aa5e2296] - stream: remove isPromise utility function (Antoine du Hamel) #35925
  • [fdae9ad188] - test: fix races in test-performance-eventlooputil (Gerhard Stoebich) #36028
  • [0a4c96a7df] - test: use global.EventTarget instead of internals (Antoine du Hamel) #36002
  • [f73b8d84db] - test: improve error message for policy failures (Bradley Meck) #35633
  • [cb6f0d3d89] - test: update old comment style test_util.cc (raisinten) #35884
  • [23f0d0c45c] - test: fix error in test/internet/test-dns.js (Rich Trott) #35969
  • [77e4f19701] - timers: cleanup abort listener on awaitable timers (James M Snell) #36006
  • [a7350b3a8f] - tools: don't print gold linker warning w/o flag (Myles Borins) #35955
  • [1f27214480] - tools: add new ESLint rule: prefer-primordials (Leko) #35448
  • [da3c2ab828] - tools,doc: enable ecmaVersion 2021 in acorn parser (Antoine du Hamel) #35994
  • [f8098c3e43] - tools,lib: recommend using safe primordials (Antoine du Hamel) #36026
  • [eea7e3b0d0] - tools,lib: tighten prefer-primordials rules for Error statics (Antoine du Hamel) #36017
  • [7a2edea7ed] - win, build: fix build time on Windows (Bartosz Sosnowski) #35932

700software and others added 30 commits November 9, 2020 13:34
PR-URL: #35965
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #35920
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
This commit removes the ERR prefix of the remaining status enums in
crypto so they are consistent with Commit
923f76d ("src: remove ERR prefix in
WebCryptoKeyExportStatus").

PR-URL: #35867
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Currently, a reference is being unlinked from the list of references
tracked by the environment when `v8impl::Reference::Delete` is called.
This causes a leak when deletion must be deferred because the finalizer
hasn't yet run, but the finalizer does not run because environment
teardown is in progress, and so no more gc runs will happen, and the
`FinalizeAll` run that happens during environment teardown does not
catch the reference because it's no longer in the list. The test below
will fail when running with ASAN:

```
./node ./test/node-api/test_worker_terminate_finalization/test.js
```

OTOH if, to address the above leak, we make a special case to not
unlink a reference during environment teardown, we run into a
situation where the reference gets deleted by
`v8impl::Reference::Delete` but does not get unlinked because it's
environment teardown time. This leaves a stale pointer in the linked
list which will result in a use-after-free in `FinalizeAll` during
environment teardown. The test below will fail if we make the above
change:

```
./node -e "require('./test/node-api/test_instance_data/build/Release/test_ref_then_set.node');"
```

Thus, we unlink a reference precisely when we destroy it – in its
destructor.

Refs: #34731
Refs: #34839
Refs: #35620
Refs: #35777
Fixes: #35778
Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #35933
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
`inspector` and `trace_events` will throw errors if Node.js has been
compiled with `--without-intl`.

Refs: #35816

PR-URL: #35968
Fixes: #35962
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Harshitha K P <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
PR-URL: #34991
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
PR-URL: #35588
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Refs: #35466 (comment)

PR-URL: #35969
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
As of c7627da, benchmark tests are run
in CI, but the README was not updated to indicate this.

PR-URL: #35945
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #35972
Refs: #35821
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #35944
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35911
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #33621
Reviewed-By: James M Snell <[email protected]>
PR-URL: #35851
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
PR-URL: #35938
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
* move entry above v8.getHeapSpaceStatistics() (where it belongs
  alphabetically and is not out of place logically)
* split lengthy sentence into two sentences

PR-URL: #35849
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: #35884
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35951
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Using an iterable WeakMap (a data-structure that uses WeakRef and
WeakMap), we are able to: stop relying on Module._cache to
serialize source maps; stop requiring an error object when calling
findSourceMap().

PR-URL: #35915
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: #35994
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Add `.gitignore` to ignore the `build` directory in a similar way
to the other addons under `benchmark/napi`.

PR-URL: #35970
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35882
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
I added a new custom ESLint rule to fix these problems.

We have a lot of replaceable codes with primordials.
Accessing built-in objects is restricted by existing rule
(no-restricted-globals), but accessing property in the built-in objects
is not restricted right now. We manually review codes that can be
replaced by primordials, but there's a lot of code that actually needs
to be fixed. We have often made pull requests to replace the primordials
with.

Restrict accessing global built-in objects such as `Promise`.
Restrict calling static methods such as `Array.from` or `Symbol.for`.
Don't restrict prototype methods to prevent false-positive.

PR-URL: #35448
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
Currently warning is printed called even if the selection ordering flag
has not been passed.

Only print warning if `--limit-configure-section-file`
has been passed to configure.

Fixes: #35872

PR-URL: #35955
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Sets MSBuild experimental switches to make it build in parallel project
files generated by gyp 0.5.0.

Fixes: #35921

PR-URL: #35932
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35931
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #35931
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@aduh95 aduh95 mentioned this pull request Nov 10, 2020
3 tasks
aduh95 and others added 14 commits November 10, 2020 11:40
PR-URL: #35999
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
`EventTarget` is exposed on the global scope, there is no need to use
`--expose-internals` flag in the tests.

Refs: #35496

PR-URL: #36002
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: #36024
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Make the linter recommend replacing `globalThis.Map` by
`primordials.SafeMap`, and similar for `Set`, `WeakSet`, and `WeakMap`.

PR-URL: #36026
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Shingo Inoue <[email protected]>
PR-URL: #35679
Fixes: #35629
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #36012
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Don't write to a stream which already has a full buffer.

Fixes: #35341

PR-URL: #35348
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Search the default installation path for NASM installed by a user
without administrator privileges when not found on the Path or in
the default system-wide installation path.

PR-URL: #36014
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Move v8.getHeapCodeStatistics() to its alphabetic location in the docs.
An effort to alphabetize all the entries met some resistance on the
grounds that it put some things in an order that wasn't logical, but
this one should be uncontroversial, I think.

PR-URL: #36027
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fix two races in test-performance-eventlooputil resulting in a flaky
test.

elu1 was capture after start time t from spin look. If OS descides to
reschedule the process after capturing t but before getting elu for
>=50ms the spin loop is actually a nop. elu1 doesn't show this and as
a result elut3 = eventLoopUtilization(elu1) results in
elu3.active === 0.
Moving capturing of t after capturing t, just before the spin look
avoids this.

Similar if OS decides to shedule a different process between getting
the total elu from start and the diff elu showing the spin loop the
check to verify that total active time is long then the spin loop
fails.
Exchanging these statements avoids this race.

PR-URL: #36028
Fixes: #35309
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #36034
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #35993
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: #36065
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams added a commit that referenced this pull request Nov 10, 2020
Notable changes:

* events:
  * getEventListeners static (Benjamin Gruenbaum) (#35991)
* fs:
  * support abortsignal in writeFile (Benjamin Gruenbaum) (#35993)
  * add support for AbortSignal in readFile (Benjamin Gruenbaum) (#35911)
* stream:
  * fix thrown object reference (Gil Pedersen) (#36065)

PR URL: #36055
@nodejs-github-bot

This comment has been minimized.

Notable changes:

* events:
  * getEventListeners static (Benjamin Gruenbaum) (#35991)
* fs:
  * support abortsignal in writeFile (Benjamin Gruenbaum) (#35993)
  * add support for AbortSignal in readFile (Benjamin Gruenbaum) (#35911)
* stream:
  * fix thrown object reference (Gil Pedersen) (#36065)

PR URL: #36055
@danielleadams danielleadams merged commit 5ecd1c9 into v15.x Nov 10, 2020
danielleadams added a commit that referenced this pull request Nov 10, 2020
danielleadams added a commit that referenced this pull request Nov 10, 2020
Notable changes:

* events:
  * getEventListeners static (Benjamin Gruenbaum) (#35991)
* fs:
  * support abortsignal in writeFile (Benjamin Gruenbaum) (#35993)
  * add support for AbortSignal in readFile (Benjamin Gruenbaum) (#35911)
* stream:
  * fix thrown object reference (Gil Pedersen) (#36065)

PR URL: #36055
danielleadams pushed a commit to danielleadams/nodejs.org that referenced this pull request Nov 10, 2020
danielleadams added a commit to nodejs/nodejs.org that referenced this pull request Nov 10, 2020
@danielleadams danielleadams deleted the v15.2.0-proposal branch November 10, 2020 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.