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
Filip Skokan
0ee2cea98d
crypto: clear errors in SignTraits::DeriveBits
...
PR-URL: https://github.com/nodejs/node/pull/37820
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-03-25 20:01:00 +01:00
Michael Dawson
42dc4d14cd
node-api: fix crash in finalization
...
Refs: https://github.com/nodejs/node-addon-api/issues/906
Refs: https://github.com/nodejs/node/pull/37616
Fix crash introduced by https://github.com/nodejs/node/pull/37616
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/37876
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-03-24 16:34:44 -07:00
Gus Caplan
26eed3e0ed
vm: add import assertion support
...
PR-URL: https://github.com/nodejs/node/pull/37176
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-03-23 11:03:18 -05:00
Darshan Sen
971e0091da
crypto: use macro map for NodeCryptoError
...
PR-URL: https://github.com/nodejs/node/pull/37758
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-03-19 12:33:44 -07:00
James M Snell
43f599b534
deps: add ngtcp2 and nghttp3
...
Reintroduces the ngtcp2 and nghttp3 dependencies, building those by
default if the vendored-in openssl (with QUIC support) is used or the
shared openssl defines `OPENSSL_INFO_QUIC`.
Upates the version metadata to reflect whether ngtcp2 and nghttp3 are
present.
ngtcp2 as of
https://github.com/ngtcp2/ngtcp2/commit/2381f7f7b633602d83ad3de997153df730b1f649
nghttp3 as of
https://github.com/ngtcp2/nghttp3/commit/66ad30f0a8f5164f87fbc83b37628f8f6d9ba608
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37682
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-03-19 08:18:37 -07:00
Yash Ladha
65e8864fa3
worker: send correct error status for worker init
...
When the worker is created, in case of failure when a separate isolate
is not able to get created, we tend to throw out of memory error for
that worker which is not the case. Correct error code as per semantic
should be thrown which is in our case is `ERR_WORKER_INIT_FAILED`.
PR-URL: https://github.com/nodejs/node/pull/36242
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-03-19 15:16:01 +01:00
Gabriel Schulhof
52f9aafeab
node-api: stop ref gc during environment teardown
...
A gc may happen during environment teardown. Thus, during finalization
initiated by environment teardown we must remove the V8 finalizer
before calling the Node-API finalizer.
Fixes: https://github.com/nodejs/node/issues/37236
PR-URL: https://github.com/nodejs/node/pull/37616
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-03-18 20:40:59 -07:00
Filip Skokan
5e6386ec3f
crypto: fix crypto.verify callback invocation with a private keyobject
...
fixes https://github.com/nodejs/node/issues/37794
PR-URL: https://github.com/nodejs/node/pull/37795
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-03-18 20:10:49 +01:00
James Addison
90008f8b35
src: add .note.GNU-stack section
...
This indicates to GNU binutils that it can unset the executable stack
flag on the binary that it is building.
PR-URL: https://github.com/nodejs/node/pull/37688
Refs: https://github.com/nodejs/node/issues/17933
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2021-03-17 19:50:35 +01:00
Daniel Bevenius
640fe94354
src,test: support dynamically linking OpenSSL 3.0
...
This commit enables node to dynamically link against OpenSSL 3.0.
The motivation for opening this PR even though OpenSSL 3.0 has not been
released yet is to allow a nightly CI job to be created. This will
allow us stay on top of changes required for OpenSSL 3.0, and also to
make sure that changes to node crypto do not cause issues when linking
to OpenSSL 3.0.
PR-URL: https://github.com/nodejs/node/pull/37669
Refs: https://github.com/nodejs/node/issues/29817
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-03-16 05:59:25 +01:00
bcoe
ac73d58de2
errors: remove experimental from --enable-source-maps
...
PR-URL: https://github.com/nodejs/node/pull/37743
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Ian Sutherland <ian@iansutherland.ca >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-03-15 21:33:09 +01:00
Michaël Zasso
8e8dea36cc
src: use non-deprecated GetCreationContext from V8
...
Fixes: https://github.com/nodejs/node-v8/issues/193
PR-URL: https://github.com/nodejs/node/pull/37587
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-03-15 15:56:25 +01:00
cjihrig
b1c1c4695c
src: remove V8_FT_ADAPTOR for V8 update
...
V8 has removed argument adapter frames. This commit removes them
from the Node.js codebase as well.
PR-URL: https://github.com/nodejs/node/pull/37587
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-03-15 15:56:22 +01:00
Michaël Zasso
8f5cce6862
src: use non-deprecated V8 module APIs
...
PR-URL: https://github.com/nodejs/node/pull/37587
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-03-15 15:56:11 +01:00
Michaël Zasso
497f6ca5b4
src: update NODE_MODULE_VERSION to 93
...
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 9.0.
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/37587
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-03-15 15:55:00 +01:00