legendecas
f536cc2e89
src: fix fatal errors when a current isolate not exist
...
napi_fatal_error and node watchdog trigger fatal error but rather
running on a thread that hold no current isolate.
PR-URL: https://github.com/nodejs/node/pull/38624
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-05-18 09:44:59 +08:00
James M Snell
16cb4f720b
lib: support setting process.env.TZ on windows
...
Fixes: https://github.com/nodejs/node/issues/4230
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38642
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-05-17 12:02:49 -07:00
Anna Henningsen
75340f3c52
src: update cares_wrap OpenBSD defines
...
Move the `#define`s back into `cares_wrap.cc`, as they are part of
the implementation, not the declarations used in `cares_wrap.h`,
and apply the suggestion from
https://github.com/nodejs/node/pull/38572#discussion_r627809407
to make the defines a bit more generic and not check for OpenBSD
specifically.
Refs: https://github.com/nodejs/node/pull/38572
PR-URL: https://github.com/nodejs/node/pull/38670
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-17 18:02:33 +02:00
Shelley Vohr
82eddca23d
src: remove extra semi after member fn
...
PR-URL: https://github.com/nodejs/node/pull/38686
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-16 14:42:27 +02:00
Daniel Bevenius
0d7644fdda
build,src,test,doc: enable FIPS for OpenSSL 3.0
...
This commit enables FIPS when Node.js is dynamically linking against
quictls/openssl-3.0.
BUILDING.md has been updated with instructions to configure and build
quictls/openssl 3.0.0-alpha-15 and includes a couple of work-arounds
which I believe are fixed in alpha-16 and can be removed when alpha-16
is available. The information might be a little too detailed/verbose
but I thought it would be helpful to at least initially include all the
steps.
PR-URL: https://github.com/nodejs/node/pull/38633
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-05-14 16:15:19 -04:00
Zach Bjornson
8886b63cf6
fs: fix error when writing buffers > INT32_MAX
...
This reverts c380ee6785 .
uv_fs_write returns an int, so it is not possible to ask
it to write more than INT32_MAX.
Instead, validate 'length' is an int32 in JS to avoid
the assertion failure.
PR-URL: https://github.com/nodejs/node/pull/38546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-05-10 15:04:37 -07:00
Stephen Belanger
f37c26b8a2
async_hooks: use new v8::Context PromiseHook API
...
PR-URL: https://github.com/nodejs/node/pull/36394
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-06 15:17:49 -07:00
Juan José Arboleda
b373a2c4ba
Revert "worker: remove ERR_CLOSED_MESSAGE_PORT"
...
This reverts commit 73370b4584 .
The unit test is preserved to make sure it does not break
https://github.com/nodejs/node/issues/26463 again.
PR-URL: https://github.com/nodejs/node/pull/38510
Fixes: https://github.com/nodejs/node/issues/38499
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-06 10:31:54 -07:00
Antoine du Hamel
26e318a321
doc: use HEAD instead of master for links
...
PR-URL: https://github.com/nodejs/node/pull/38518
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-05-05 10:45:30 +02:00
Fedor Indutny
7abc7e45b2
node-api: faster threadsafe_function
...
Invoke threadsafe_function during the same tick and avoid marshalling
costs between threads and/or churning event loop if either:
1. There's a queued call already
2. `Push()` is called while the main thread was running
threadsafe_function
PR-URL: https://github.com/nodejs/node/pull/38506
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-04 18:39:28 -07:00
Rich Trott
f71166bfa2
doc: use sentence case in headers in src/crypto/README.md
...
Use sentence case consistently in headers in src/crypto/README.md.
PR-URL: https://github.com/nodejs/node/pull/38524
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-05-04 06:33:08 -07:00
Yash Ladha
0f5a76f858
inspector: remove redundant method for connection check
...
PR-URL: https://github.com/nodejs/node/pull/37986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-30 13:29:47 -07:00
Shelley Vohr
bdaf51bae7
src: allow custom PageAllocator in NodePlatform
...
For certain embedder use cases there are more complex memory allocation
requirements that the default V8 page allocator does not handle.
For example, using MAP_JIT when running under a hardened runtime
environment on macOS. This allows embedders like Electron to provide
their own allocator that does handle these cases.
PR-URL: https://github.com/nodejs/node/pull/38362
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-30 09:13:21 +02:00
Nils Dralle
fa6d084dcb
crypto: don't crash with some selfsigned certs
...
Refs: https://github.com/nodejs/node/issues/37757
Refs: https://github.com/nodejs/node/issues/37889
PR-URL: https://github.com/nodejs/node/pull/37990
Fixes: https://github.com/nodejs/node/issues/37757
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-27 14:36:01 -07:00
Stephen Gallagher
47207e59f0
src: use %progbits instead of @progbits
...
While @progbits is preferred for most architectures, there are some
(notably 32-bit ARM) for which it does not. %progbits is effective
everywhere.
See https://bugzilla.redhat.com/show_bug.cgi?id=1950528 for more
details.
Related: https://github.com/nodejs/node/issues/17933
Related: https://github.com/nodejs/node/pull/37688
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/38312
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-27 08:50:19 +02:00
legendecas
55745a1817
src: print arbitrary javascript exception value in node report
...
PR-URL: https://github.com/nodejs/node/pull/38009
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-04-26 10:43:20 +08:00
Filip Skokan
04ec693a30
src: refactor to use THROW_* argument based snprintf
...
PR-URL: https://github.com/nodejs/node/pull/38357
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-24 16:35:34 +02:00
Tobias Nießen
81d7e80e0a
src: fix abort in pbkdf2
...
Fixes: https://github.com/nodejs/node/issues/38341
PR-URL: https://github.com/nodejs/node/pull/38354
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-24 16:34:58 +02:00
James M Snell
639fa3255b
src: fix setting Converter sub char length
...
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/38330
PR-URL: https://github.com/nodejs/node/pull/38331
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-04-24 11:40:56 +02:00
James M Snell
720fdf2f80
src: avoid deferred gc/cleanup for Buffer.from
...
Previously, the code path would allocated a tracked ArrayBuffer
that defers cleanup and deallocation of the underlying data with
a SetImmediate. Avoid the unnecessary deferral by just allocating
a `BackingStore` directly and writing into it.
Fixes: https://github.com/nodejs/node/issues/38300
Refs: https://github.com/nodejs/node/pull/38336
PR-URL: https://github.com/nodejs/node/pull/38337
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-04-24 10:22:38 +02:00
Beth Griggs
8780537564
2021-04-20, Version 16.0.0 (Current)
...
Notable changes:
Deprecations and Removals:
- **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37216 ]
- **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37302 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('http_parser') (James M Snell) [https://github.com/nodejs/node/pull/37813 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('url') (James M Snell) [https://github.com/nodejs/node/pull/37799 ]
- **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only
type checkers (Anna Henningsen) [https://github.com/nodejs/node/pull/37819 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('crypto') (James M Snell) [https://github.com/nodejs/node/pull/37790 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('signal_wrap') (James M Snell) [https://github.com/nodejs/node/pull/37800 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('v8') (James M Snell) [https://github.com/nodejs/node/pull/37789 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('async_wrap') (James M Snell) [https://github.com/nodejs/node/pull/37576 ]
- **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37201 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder
mappings (Antoine du Hamel) [https://github.com/nodejs/node/pull/37215 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and
extension lookups (Antoine du Hamel) [https://github.com/nodejs/node/pull/37206 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json
main entries (Antoine du Hamel) [https://github.com/nodejs/node/pull/37204 ]
- **(SEMVER-MAJOR)** **process**: runtime deprecate changing
process.config (James M Snell) [https://github.com/nodejs/node/pull/36902 ]
Stable Timers Promises API:
The Timers Promises API provides an alternative set of timer functions
that return Promise objects. Added in Node.js v15.0.0, in this release
they graduate from experimental status to stable.
Contributed by James Snell - [https://github.com/nodejs/node/pull/38112 ]
Toolchain and Compiler Upgrades:
Node.js v16.0.0 will be the first release where we ship prebuilt
binaries for Apple Silicon. While we’ll be providing separate tarballs
for the Intel (`darwin-x64`) and ARM (`darwin-arm64`) architectures the
macOS installer (`.pkg`) will be shipped as a ‘fat’ (multi-architecture)
binary.
- **(SEMVER-MAJOR)** **build**: remove support for Python 2 (Christian
Clauss) [https://github.com/nodejs/node/pull/36691 ]
- **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile
(Michaël Zasso) [https://github.com/nodejs/node/pull/37764 ]
- **build**: update Makefile to support fat binary (Ash Cripps)
[https://github.com/nodejs/node/pull/37861 ]
- **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy)
[https://github.com/nodejs/node/pull/35704 ]
- **build**: warn for gcc versions earlier than 8.3.0 (Richard Lau)
[https://github.com/nodejs/node/pull/37935 ]
- **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11
(Michaël Zasso) [https://github.com/nodejs/node/pull/37872 ]
- **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3
(Michaël Zasso) [https://github.com/nodejs/node/pull/37871 ]
- **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps)
[https://github.com/nodejs/node/pull/37677 ]
- **tools**: set arch in Distribution.xml (Ash Cripps)
[https://github.com/nodejs/node/pull/38261 ]
V8 9.0:
The V8 JavaScript engine is updated to V8 9.0, including performance
tweaks and improvements.
This update also brings the ECMAScript RegExp Match Indices, which
provide the start and end indices of the captured string. The indices
array is available via the `.indices` property on match objects when the
regular expression has the `/d` flag.
Contributed by Michaël Zasso - [https://github.com/nodejs/node/pull/37587 ]
Other Notable Changes:
- **(SEMVER-MINOR)** **assert**: graduate assert.match and
assert.doesNotMatch (James M Snell) [https://github.com/nodejs/node/pull/38111 ]
- **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals
(James M Snell) [https://github.com/nodejs/node/pull/37786 ]
- **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68
(Michaël Zasso) [https://github.com/nodejs/node/pull/37330 ]
- **deps**: update ICU to 69.1 (Michaël Zasso)
[https://github.com/nodejs/node/pull/38178 ]
- **deps**: update llhttp to 6.0.0 (Fedor Indutny)
[https://github.com/nodejs/node/pull/38277 ]
- **deps**: upgrade npm to 7.10.0 (Ruy Adorno)
[https://github.com/nodejs/node/pull/38254 ]
- **(SEMVER-MINOR)** **http**: add http.ClientRequest.getRawHeaderNames()
(simov) [https://github.com/nodejs/node/pull/37660 ]
- **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent
(Michael Dawson) [https://github.com/nodejs/node/pull/36478 ]
- **(SEMVER-MINOR)** **module**: add support for `node:`‑prefixed
`require(…)` calls (ExE Boss) [https://github.com/nodejs/node/pull/37246 ]
- **(SEMVER-MINOR)** **perf_hooks**: add histogram option to timerify
(James M Snell) [https://github.com/nodejs/node/pull/37475 ]
- **(SEMVER-MINOR)** **repl**: add auto‑completion for `node:`‑prefixed
`require(…)` calls (ExE Boss) [https://github.com/nodejs/node/pull/37246 ]
- **(SEMVER-MINOR)** **util**: add getSystemErrorMap() impl
(eladkeyshawn) [https://github.com/nodejs/node/pull/38101 ]
Semver-Major Commits:
- **(SEMVER-MAJOR)** **async_hooks**: add thisArg to AsyncResource.bind
(James M Snell) [https://github.com/nodejs/node/pull/36782 ]
- **(SEMVER-MAJOR)** **buffer**: expose btoa and atob as globals
(James M Snell) [https://github.com/nodejs/node/pull/37786 ]
- **(SEMVER-MAJOR)** **build**: remove support for Python 2
(Christian Clauss) [https://github.com/nodejs/node/pull/36691 ]
- **(SEMVER-MAJOR)** **build**: default PYTHON to python3 in Makefile
(Michaël Zasso) [https://github.com/nodejs/node/pull/37764 ]
- **(SEMVER-MAJOR)** **build**: update Makefile to support fat binary
(Ash Cripps) [https://github.com/nodejs/node/pull/37861 ]
- **(SEMVER-MAJOR)** **build**: include minimal V8 headers in
distribution (Michaël Zasso) [https://github.com/nodejs/node/pull/37570 ]
- **(SEMVER-MAJOR)** **build**: use C++11 ABI with libstdc++
(Anna Henningsen) [https://github.com/nodejs/node/pull/36634 ]
- **(SEMVER-MAJOR)** **build**: enable ASLR (PIE) on OS X (woodfairy)
[https://github.com/nodejs/node/pull/35704 ]
- **(SEMVER-MAJOR)** **deps**: update V8 to 9.0.257.11 (Michaël Zasso)
[https://github.com/nodejs/node/pull/37587 ]
- **(SEMVER-MAJOR)** **deps**: bump minimum ICU version to 68
(Michaël Zasso) [https://github.com/nodejs/node/pull/37330 ]
- **(SEMVER-MAJOR)** **deps**: update V8 to 8.9.255.19 (Michaël Zasso)
[https://github.com/nodejs/node/pull/37330 ]
- **(SEMVER-MAJOR)** **deps**: update V8 to 8.8.278.17 (Michaël Zasso)
[https://github.com/nodejs/node/pull/36139 ]
- **(SEMVER-MAJOR)** **deps**: update V8 to 8.7.220 (Michaël Zasso)
[https://github.com/nodejs/node/pull/35700 ]
- **(SEMVER-MAJOR)** **dns**: use url module instead of punycode for
IDNA (Antoine du Hamel) [https://github.com/nodejs/node/pull/35091 ]
- **(SEMVER-MAJOR)** **doc**: update minimum supported Xcode to 11
(Michaël Zasso) [https://github.com/nodejs/node/pull/37872 ]
- **(SEMVER-MAJOR)** **doc**: update minimum supported GCC to 8.3
(Michaël Zasso) [https://github.com/nodejs/node/pull/37871 ]
- **(SEMVER-MAJOR)** **doc**: update AIX to GCC8 for v16.x (Ash Cripps)
[https://github.com/nodejs/node/pull/37677 ]
- **(SEMVER-MAJOR)** **doc**: add http.IncomingMessage#connection
(Pranshu Srivastava) [https://github.com/nodejs/node/pull/33768 ]
- **(SEMVER-MAJOR)** **events**: change EventTarget handler exception
behavior (Nitzan Uziely) [https://github.com/nodejs/node/pull/37237 ]
- **(SEMVER-MAJOR)** **fs**: remove permissive rmdir recursive
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37216 ]
- **(SEMVER-MAJOR)** **fs**: add validation for fd and path
(Dylan Elliott) [https://github.com/nodejs/node/pull/35187 ]
- **(SEMVER-MAJOR)** **fs**: runtime deprecate rmdir recursive option
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37302 ]
- **(SEMVER-MAJOR)** **fs**: fix flag and mode validation
(James M Snell) [https://github.com/nodejs/node/pull/37480 ]
- **(SEMVER-MAJOR)** **http**: use objects with null prototype in Agent
(Michaël Zasso) [https://github.com/nodejs/node/pull/36409 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('http_parser') (James M Snell)
[https://github.com/nodejs/node/pull/37813 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('url') (James M Snell)
[https://github.com/nodejs/node/pull/37799 ]
- **(SEMVER-MAJOR)** **lib**: make process.binding('util') return only
type checkers (Anna Henningsen) [https://github.com/nodejs/node/pull/37819 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('crypto') (James M Snell) [https://github.com/nodejs/node/pull/37790 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('signal_wrap') (James M Snell) [https://github.com/nodejs/node/pull/37800 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('v8') (James M Snell) [https://github.com/nodejs/node/pull/37789 ]
- **(SEMVER-MAJOR)** **lib**: aggregate errors to avoid error swallowing
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37460 ]
- **(SEMVER-MAJOR)** **lib**: runtime deprecate access to
process.binding('async_wrap') (James M Snell) [https://github.com/nodejs/node/pull/37576 ]
- **(SEMVER-MAJOR)** **lib**: remove usage of url.parse
(raisinten) [https://github.com/nodejs/node/pull/36853 ]
- **(SEMVER-MAJOR)** **lib**: add error handling for input stream
(rexagod) [https://github.com/nodejs/node/pull/31603 ]
- **(SEMVER-MAJOR)** **lib,src**: update cluster to use Parent
(Michael Dawson) [https://github.com/nodejs/node/pull/36478 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate subpath folder
mappings (Antoine du Hamel) [https://github.com/nodejs/node/pull/37215 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate "main" index and
extension lookups (Antoine du Hamel) [https://github.com/nodejs/node/pull/37206 ]
- **(SEMVER-MAJOR)** **module**: runtime deprecate invalid package.json
main entries (Antoine du Hamel) [https://github.com/nodejs/node/pull/37204 ]
- **(SEMVER-MAJOR)** **module**: remove module.createRequireFromPath
(Antoine du Hamel) [https://github.com/nodejs/node/pull/37201 ]
- **(SEMVER-MAJOR)** **module**: only set cache when finding module
succeeds (Yongsheng Zhang) [https://github.com/nodejs/node/pull/36642 ]
- **(SEMVER-MAJOR)** **perf_hooks**: make performance a global (James M
Snell) [https://github.com/nodejs/node/pull/37970 ]
- **(SEMVER-MAJOR)** **perf_hooks**: complete overhaul of the
implementation (James M Snell) [https://github.com/nodejs/node/pull/37136 ]
- **(SEMVER-MAJOR)** **process**: disallow adding options to
process.allowedNodeEnvironmentFlags (Antoine du Hamel)
[https://github.com/nodejs/node/pull/36660 ]
- **(SEMVER-MAJOR)** **process**: runtime deprecate changing
process.config (James M Snell) [https://github.com/nodejs/node/pull/36902 ]
- **(SEMVER-MAJOR)** **readline**: cursorTo throw error on NaN
(Zijian Liu) [https://github.com/nodejs/node/pull/36379 ]
- **(SEMVER-MAJOR)** **src**: mark internally exported functions as
explicitly internal (Tyler Ang-Wanek) [https://github.com/nodejs/node/pull/37000 ]
- **(SEMVER-MAJOR)** **src**: inline AsyncCleanupHookHandle in headers
(Tyler Ang-Wanek) [https://github.com/nodejs/node/pull/37000 ]
- **(SEMVER-MAJOR)** **src**: clean up embedder API (Anna Henningsen)
[https://github.com/nodejs/node/pull/35897 ]
- **(SEMVER-MAJOR)** **worker**: send correct error status for worker
init (Yash Ladha) [https://github.com/nodejs/node/pull/36242 ]
PR-URL: https://github.com/nodejs/node/pull/37678
2021-04-20 16:48:35 +01:00
Chengzhong Wu
4afcd55274
node-api: make reference weak parameter an indirect link to references
...
As the cancellation of second pass callbacks are not reachable from the
current v8 API, and the second pass callbacks are scheduled with
NodePlatform's task runner, we have to ensure that the weak parameter
holds indirect access to the v8impl::Reference object so that the object
can be destroyed on addon env teardown before the whole node env is able
to shutdown.
PR-URL: https://github.com/nodejs/node/pull/38000
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
2021-04-20 00:11:33 +08:00
XadillaX
4e9212bb7b
src: cache some context in locals
...
Refs: https://github.com/nodejs/node/commit/66566df5773c8ef2f0e1181e8f9e47403e68c4b7
PR-URL: https://github.com/nodejs/node/pull/37473
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-19 15:57:16 +08:00
James M Snell
bc31dc0e0f
dns: refactor cares_wrap internals
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38172
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-16 18:46:08 -07:00
James M Snell
fc20e833ca
src: fix finalization crash
...
PR-URL: https://github.com/nodejs/node/pull/38250
Fixes: https://github.com/nodejs/node/issues/38040
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-04-15 13:07:58 -07:00
cjihrig
13c931a9dc
process: add range validation to debugPort
...
This commit adds validation to the process.debugPort setter.
Fixes: https://github.com/nodejs/node/issues/38037
PR-URL: https://github.com/nodejs/node/pull/38205
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-04-12 15:05:08 -07:00
James M Snell
6c9b19a7af
src: refactor SecureContext Initialization
...
Extracts out SecureContext::GetConstructorFunction, adds
SecureContext::HasInstance and SecureContext::Create in
preparation for re-adding QUIC
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38116
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-12 08:39:18 -07:00
Antoine du Hamel
548cbf0625
perf_hooks: fix loop delay resolution validation
...
Fixes: https://github.com/nodejs/node/issues/38160
PR-URL: https://github.com/nodejs/node/pull/38166
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-11 23:15:47 +02:00
Fedor Indutny
6a1986d50a
deps: update llhttp to 5.1.0
...
PR-URL: https://github.com/nodejs/node/pull/38146
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Daniele Belardi <dwon.dnl@gmail.com >
2021-04-10 14:31:34 -07:00
James M Snell
40ace47396
http: fixup perf regression
...
Only call into hrtime if there's an observer
Also, fix up some previously missed changes from the original refactor
Signed-off-by: James M Snell <jasnell@gmail.com >
Refs: https://github.com/nodejs/node/issues/37937
Refs: https://github.com/nodejs/node/pull/37136
PR-URL: https://github.com/nodejs/node/pull/38110
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-04-09 16:58:58 -07:00
Tobias Nießen
dfe3f952a3
crypto: fix crash in CCM mode without data
...
Fixes: https://github.com/nodejs/node/issues/38035
PR-URL: https://github.com/nodejs/node/pull/38102
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-08 22:18:52 +02:00
Yash Ladha
8d63aa828e
src: fix typo for initialization
...
PR-URL: https://github.com/nodejs/node/pull/37974
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-08 20:55:55 +05:30
Filip Skokan
e8cb6446ef
crypto: reconcile oneshot sign/verify sync and async implementations
...
PR-URL: https://github.com/nodejs/node/pull/37816
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-08 10:08:26 +02:00
Joyee Cheung
6cb314bbe5
bootstrap: print information for snapshot at environment exit in debug
...
Print information relevant to snapshot building at the environment
exit when NODE_DEBUG_NATIVE is set to include mksnapshot. This helps
us understand what need to be fixed to build a snapshot when a script
is run to completion.
PR-URL: https://github.com/nodejs/node/pull/37967
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-08 12:02:01 +08:00
Tobias Nießen
66c8f76c2c
src: remove KeyObjectData::CreateSecret overload
...
This function is unused and there is not much potential for using
it in the current codebase.
PR-URL: https://github.com/nodejs/node/pull/38067
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-05 18:16:55 -07:00
Tobias Nießen
17a527ec07
src: fix typo in node_mutex
...
PR-URL: https://github.com/nodejs/node/pull/38011
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-04 18:38:13 +05:30
Tobias Nießen
f562ec64e8
src: fix typos in crypto comments
...
PR-URL: https://github.com/nodejs/node/pull/38024
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2021-04-04 00:10:13 +02:00
Filip Skokan
c81d0fa9bc
crypto: use correct webcrypto RSASSA-PKCS1-v1_5 algorithm name
...
PR-URL: https://github.com/nodejs/node/pull/38029
Refs: https://www.w3.org/TR/WebCryptoAPI/#rsassa-pkcs1
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-04-04 00:08:37 +02:00
Tobias Nießen
feb60f818e
src: fix error handling for CryptoJob::ToResult
...
PR-URL: https://github.com/nodejs/node/pull/37076
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-02 21:52:25 -07:00
Darshan Sen
e9ed113052
fs: fix chown abort
...
This syncs the type assertion introduced in the referenced PR in the C++
side. Since chown, lchown, and fchown can accept -1 as a value for uid
and gid, we should also accept signed integers from the JS side.
Fixes: https://github.com/nodejs/node/issues/37995
Refs: https://github.com/nodejs/node/pull/31694
PR-URL: https://github.com/nodejs/node/pull/38004
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-02 21:43:23 -07:00
James M Snell
e79471deb7
net: allow net.BlockList to use net.SocketAddress objects
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37917
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-02 06:16:42 -07:00
James M Snell
0b90d35294
net: add SocketAddress class
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37917
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-02 06:16:40 -07:00
James M Snell
fb9257f659
net: make net.BlockList cloneable
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37917
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-02 06:16:38 -07:00
Anna Henningsen
9d07c0a20b
http2: add specific error code for custom frames
...
As suggested in
https://github.com/nodejs/node/issues/37849#issuecomment-805049586
improve the error presented when encountering a large number of
invalid frames by giving this situation a specific error code (which we
should have had from the beginning).
PR-URL: https://github.com/nodejs/node/pull/37936
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2021-04-01 12:34:55 -07:00
Darshan Sen
4197555ca9
url: forbid pipe in URL host
...
Fixes: https://github.com/nodejs/node/issues/37862
PR-URL: https://github.com/nodejs/node/pull/37877
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-03-30 04:04:22 -07:00
David Glasser
19ed27d61f
src: indent long help text properly
...
The previous code passed an ignored argument to StringPrototypeTrimLeft,
and tried to trim a string that didn't start with whitespace. The trim
makes more sense after the indentation has been added. Now wrapped lines
actually show up with the rest of the help text.
Doing this made an uncharacteristic trailing newline in the
`--icu-data-dir` help text more obvious, so I removed that.
PR-URL: https://github.com/nodejs/node/pull/37911
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-28 19:28:00 +02:00
David Glasser
ce6d756298
src: document newer values for --unhandled-rejections flag
...
These values were added in v15.0.0 by #33475 but were not included in
the `node --help` output.
Also documents which value is the default.
PR-URL: https://github.com/nodejs/node/pull/37899
Fixes: https://github.com/nodejs/node/issues/37896
Refs: https://github.com/nodejs/node/issues/33475
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-28 19:24:11 +02:00
Tobias Nießen
ed6e8f6518
src: fix typo in src code guide
...
PR-URL: https://github.com/nodejs/node/pull/37956
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-03-28 21:21:08 +05:30
Anna Henningsen
87aa3f1add
http2: treat non-EOF empty frames like other invalid frames
...
Use the existing mechanism that we have to keep track of invalid frames
for treating this specific kind of invalid frame.
The commit that originally introduced this check was 695e38be69 ,
which was supposed to proected against CVE-2019-9518, which in turn
was specifically about a *flood* of empty data frames. While these are
still invalid frames either way, it makes sense to be forgiving here
and just treat them like other invalid frames, i.e. to allow a small
(configurable) number of them.
Fixes: https://github.com/nodejs/node/issues/37849
PR-URL: https://github.com/nodejs/node/pull/37875
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-03-26 20:51:57 +01:00
Stephen Belanger
aaf98062b0
src: report idle time correctly
...
With this change, the V8 profiler will attribute any time between
prepare and check cycles, except any entrances to InternalCallbackScope,
to be "idle" time. All callbacks, microtasks, and timers will be marked
as not idle. The one exception is native modules which don't use the
MakeCallback helper, but those are already broken anyway for async
context tracking so we should just encourage broken modules to be fixed.
PR-URL: https://github.com/nodejs/node/pull/37868
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-03-25 12:15:14 -07:00