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
v13.9.0 proposal #31837
v13.9.0 proposal #31837
Commits on Feb 17, 2020
-
src: ignore GCC -Wcast-function-type for v8.h
This commit suggests that cast-function-type warnings be ignored from v8.h. Currently, GCC reports a number of warnings like this: In file included from ../src/util.h:27, from ../src/aliased_buffer.h:7, from ../src/memory_tracker.h:5, from ../src/base_object.h:27, from ../src/async_wrap.h:27, from ../src/req_wrap.h:6, from ../src/req_wrap-inl.h:6, from ../src/connect_wrap.h:6, from ../src/connect_wrap.cc:1: ../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:123:42: required from here ../deps/v8/include/v8.h:10374: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] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The motivation for doing this that it makes it difficult to spot other warnings that might be important. Since it is v8 that performs this cast I was not able to find a way around it. PR-URL: #31475 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: fix ignore GCC -Wcast-function-type for older compilers
-
build: do not use setup-node in build workflows
The setup-node GitHub Action installs problem matchers that happen to match the warning message format of Visual Studio's C/C++ compiler. This is resulting in all of our pull requests being annotated with `Unchanged files with check annotations` which are confusing to new contributors as they are not due to the changes in the pull request. The action is used to run `npx envinfo` to dump some information into the logs before the actual build. All GitHub hosted runners already have a version of Node.js installed (12.x at the time of this commit) which we can use to run `envinfo`. Remove the action to avoid using the problematic problem matcher. PR-URL: #31349 Fixes: #31347 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
-
The exact context of invocation of _writev API is not well known. Also, the choice between _write and _writev is not well known. Add a description to make it explicit. Fixes: #28408 Refs: #28690 Co-authored-by: Parker Bjur <bjur.parker45@gmail.com> PR-URL: #31356 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: add promises metadata to postmortem test
type_JSPromise__JS_PROMISE_TYPE and type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE will be used on llnode to identify Promises in memory and core dumps: nodejs/llnode#272. Add these to our postmortem test so we're aware of any changes to this metadata. PR-URL: #31357 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
deps,test: update to uvwasi 0.0.4
This commit updates the uvwasi dependency to version 0.0.4. The most notable change is a refactor of the way paths are resolved. All paths, including symlinks, are now resolved in terms of sandboxed paths instead of leaking host system paths. PR-URL: #31363 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-
deps: port uvwasi@676ba9a to gyp
This commit ports nodejs/uvwasi@676ba9a from CMake to gyp. PR-URL: #31363 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-
deps: uvwasi: cherry-pick 941bedf
Original commit message: nodejs/uvwasi@20fd9e2 was accidentally reverted in nodejs/uvwasi#73. This commit relands it. PR-URL: #31363 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-
doc: correct added version for --abort-on-uncaught-exception
PR-URL: #31360 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: fix a broken link in fs.md
PR-URL: #31373 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: export public symbols in addons tests
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on macOS. Ensure that public symbols that are dlsym'd have default visibility. Refs: #28647 Refs: nodejs/node-gyp#1828 PR-URL: #28717 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
fs: unset FileHandle fd after close
- Do not set the fd as a property on the native object. - Use the already-existent `GetFD()` method to pass the fd from C++ to JS. - Cache the fd in JS to avoid repeated accesses to the C++ getter. - Set the fd to `-1` after close, thus reliably making subsequent calls using the `FileHandle` return `EBADF`. Fixes: #31361 PR-URL: #31389 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: update postmortem test with v12 constants
Ref: nodejs/llnode#330 PR-URL: #31391 Refs: nodejs/llnode#330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: reduce large pages code duplication
Declaring and initializing a `struct text_region` is common to all three implementations of the large pages mapping code. Let's make it unconditional. PR-URL: #31385 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: JungMinu - Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host>
-
doc: fix several child_process doc typos
PR-URL: #31393 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
-
-
test: add wasi test for symlink() and readlink()
This test provides missing coverage for __wasi_path_symlink() and __wasi_path_readlink(). PR-URL: #31403 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
Fixes: #28386 Refs: #31292 Refs: nodejs/help#2136 PR-URL: #31395 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
The new key type 'dh' corresponds to EVP_PKEY_DH. PR-URL: #31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
PR-URL: #31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
crypto: add DH support to generateKeyPair
This allows using the generateKeyPair API for DH instead of the old stateful DH APIs. PR-URL: #31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
crypto: add crypto.diffieHellman
Currently, Node.js has separate (stateful) APIs for DH/ECDH, and no support for ECDH-ES. This commit adds a single stateless function to compute the DH/ECDH/ECDH-ES secret based on two KeyObjects. PR-URL: #31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
test: skip keygen tests on arm systems
test-crypto-keygen and test-crypto-dh-stateless are currently flaky on ARM CI systems due to their slow CPUs. PR-URL: #31178 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
This commit improved the stat test a bit by verifying that S_ISDIR() works properly. It also adds missing coverage for __wasi_path_remove_directory(). PR-URL: #31413 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
lib,src: switch Buffer::kMaxLength to size_t
Change the type of `Buffer::kMaxLength` to size_t because upcoming changes in V8 will allow typed arrays > 2 GB on 64 bits platforms. Not all platforms handle file reads and writes > 2 GB though so keep enforcing the 2 GB typed array limit for I/O operations. Fixes: #31399 Refs: libuv/libuv#1501 PR-URL: #31406 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
-
src: better encapsulate native immediate list
Refactor for clarity and reusability. Make it more obvious that the list is a FIFO queue. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: exclude C++ SetImmediate() from count
There is no real reason to manage a count manually, given that checking whether there are C++ callbacks is a single pointer comparison. This makes it easier to add other kinds of native C++ callbacks that are managed in a similar way. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: add a threadsafe variant of SetImmediate()
Add a variant of `SetImmediate()` that can be called from any thread. This allows removing the `AsyncRequest` abstraction and replaces it with a more generic mechanism. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
Remove `AsyncRequest` from the source code, and replace its usage with threadsafe `SetImmediate()` calls. This has the advantage of being able to pass in any function, rather than one that is defined when the `AsyncRequest` is “installed”. This necessitates two changes: - The stopping flag (which was only used in one case and ignored in the other) is now a direct member of the `Environment` class. - Workers no longer have their own libuv handles, requiring manual management of their libuv ref count. As a drive-by fix, the `can_call_into_js` variable was turned into an atomic variable. While there have been no bug reports, the flag is set from `Stop(env)` calls, which are supposed to be possible from any thread. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: add interrupts to Environments/Workers
Allow doing what V8’s `v8::Isolate::RequestInterrupt()` does for V8. This also works when there is no JS code currently executing. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: move MemoryInfo() for worker code to .cc files
This is a) the right thing to do anyway because these functions can not be inlined by the compiler and b) avoids compilation warnings in the following commit. PR-URL: #31386 Refs: openjs-foundation/summit#240 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
report: add support for Workers
Include a report for each sub-Worker of the current Node.js instance. This adds a feature that is necessary for eventually making the report feature stable, as was discussed during the last collaborator summit. Refs: openjs-foundation/summit#240 PR-URL: #31386 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
The array grouping function relies on the width of the characters. It was not calculated correct so far, since it used the string length instead. This improves the unicode output by calculating the mono-spaced font width (other fonts might differ). PR-URL: #31319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
worker: move JoinThread() back into exit callback
de2c68c moved this call to the destructor, under the assumption that that would essentially be equivalent to running it as part of the callback since the worker would be destroyed along with the callback. However, the actual code in `Environment::RunAndClearNativeImmediates()` comes with the subtlety that testing whether a JS exception has been thrown happens between the invocation of the callback and its destruction, leaving a possible exception from `JoinThread()` potentially unhandled (and unintentionally silenced through the `TryCatch`). This affected exceptions thrown from the `'exit'` event of the Worker, and made the `parallel/test-worker-message-type-unknown` test flaky, as the invalid message was sometimes only received during the Worker thread’s exit handler. Fix this by moving the `JoinThread()` call back to where it was before. Refs: #31386 PR-URL: #31468 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
-
-
-
doc: fix syntax in N-API documentation
PR-URL: #31466 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
-
errors: make use of "cannot" consistent
PR-URL: #31420 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
-
test: remove bluebird remnants from test fixture
The test fixture in test/fixtures/bluebird was largely copied from bluebird, where a regression in Node.js was discovered. Simplify the test by removing a lot of things that aren't necessary to replicate the problem. Change name from bluebird to something less likely to cause someone to believe that we are actually loading bluebird (as we are not). PR-URL: #31435 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com>
-
module: correct docs about when extensionless files are supported
PR-URL: #31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
module: drop support for extensionless main entry points in esm
PR-URL: #31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
This version improves file descriptor renumbering, and as a result fixes uvwasi_fd_renumber(). PR-URL: #31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
-
deps: uvwasi: cherry-pick ea73af5
Original commit message: unlock all fd mutexes in reverse order Some functions acquire mutexes for multiple file descriptors. This commit ensures that the mutexes are released in the reverse order that they are aquired. PR-URL: #31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
-
deps: uvwasi: cherry-pick c3bef8e
Original commit message: prevent locking fd table while holding a mutex uvwasi_path_rename(), uvwasi_path_link(), uvwasi_path_open(), and uvwasi_fd_renumber() operate on multiple file descriptors. uvwasi_fd_renumber() has been updated prior to this commit, and is not relevant here. The other three functions would perform the following locking operations: - lock the file table - acquire a file descriptor mutex - unlock the file table - unlock the file table again - acquire another file descriptor mutex - unlock the file table - unlock the two mutexes Attempting to acquire the second mutex introduced the possibility of deadlock because another thread could attempt to acquire the first mutex while holding the file table lock. This commit ensures that multiple mutexes are either: - acquired in a single lock of the file table - or, only acquired after releasing previously held mutexes Fixes: nodejs/uvwasi#89 PR-URL: #31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
-
deps: uvwasi: cherry-pick eea4508
Original commit message: prevent race conditions with uvwasi_fd_close() uvwasi_fd_close() performed the following operations: - lock the file descriptor mutex - close the file - release the file descriptor mutex - call the file table's remove() function Once the fd's mutex is released, another thread could acquire it before the fd is removed from the file table. If this happens, remove() could destroy a held mutex. This commit updates uvwasi_fd_close() to perform the entire sequence while holding the file table's lock, preventing new acquisitions of the fd's mutex. Fixes: nodejs/uvwasi#88 PR-URL: #31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
-
test: add wasi test for freopen()
This test provides missing coverage for __wasi_fd_renumber(). PR-URL: #31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
-
tls: simplify errors using ThrowCryptoError
PR-URL: #31436 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
-
crypto: assign and use ERR_CRYPTO_UNKNOWN_CIPHER
PR-URL: #31437 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
crypto: improve errors in DiffieHellmanGroup
1. The DiffieHellmanGroup class is only instantiated from within Node.js, which always passes exactly one argument. 2. Use the existing ERR_CRYPTO_UNKNOWN_DH_GROUP error code for the existing "Unknown group" error. The message has not been changed to prevent breaking existing applications. PR-URL: #31445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
src: add C++-style sprintf utility
Add an utility that handles C++-style strings and objects well. PR-URL: #31446 Fixes: #28761 Fixes: #31218 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: use custom fprintf alike to write errors to stderr
This allows printing errors that contain nul characters, for example. Fixes: #28761 Fixes: #31218 PR-URL: #31446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
-
test: add tests for main() argument handling
This test provides missing coverage for __wasi_args_get() and __wasi_args_sizes_get(), which translate to argc and argv in WASI applications. PR-URL: #31426 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
doc: add ronag to collaborators
PR-URL: #31498 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
-
util: fix inspection of typed arrays with unusual length
This makes sure `util.inspect()` does not throw in case the typed array's length property was set to something invalid. Instead, always use the original information. PR-URL: #31458 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
-
src: reduce code duplication in BootstrapNode
PR-URL: #31465 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: define noreturn attribute for windows
PR-URL: #31467 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
Notable changes: - SetApplicationDaemon() is no longer called on macOS. - uv_interface_addresses() is implemented on IBMi. - The return value of uv__open_cloexec() is now handled properly. - A race condition in fsevents has been fixed. Fixes: #31328 Fixes: nodejs/help#2099 PR-URL: #31477 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: clean up and streamline vm.md examples
PR-URL: #31474 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: cover property n-api null cases
Add test coverage for passing `NULL` to each parameter of `napi.*(propert|element)` and `napi_set_prototype`. In the case of `napi_define_properties` also test setting various initializer fields to `NULL`. PR-URL: #31488 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: enable visual code indication in headers
This enables the grey background for inline code in headers. Refs: #31460 (comment) PR-URL: #31493 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
stream: add async iterator support for v1 streams
PR-URL: #31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
stream: normalize async iterator stream destroy
PR-URL: #31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
stream: implement throw for async iterator
PR-URL: #31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
deps: uvwasi: cherry-pick 7b5b6f9
Original commit message: allow windows to detect tty types uv_fs_fstat() fails on TTYs on Windows. This commit updates uvwasi__get_filetype_by_fd() to detect this case and map the fd to the WASI character device type. Refs: #31461 Fixes: #31461 PR-URL: #31495 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
deps: switch to chromium's zlib implementation
This implementation provides optimizations not included upstream. PR-URL: #31201 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
-
buffer: improve fill(number) performance
PR-URL: #31489 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
process: fix two overflow cases in SourceMap VLQ decoding
These both have to do with extremely large numbers, so it's unlikely to cause a problem in practice. Still, correctness. First, encoding `-2147483648` in VLQ returns the value `"B"`. When decoding, we get the value `1` after reading the base64. We then check if the first bit is set (it is) to see if we should negate it, then we shift all bits right once. Now, `value` will be `0` and `negate` will be `true`. So, we'd return `-0`. Which is a bug! `-0` isn't `-2147483648`, and we've broken a round trip. Second, encoding any number with the 31st bit set, we'd return the opposite sign. Let's use `1073741824`. Encoding, we get `"ggggggC"`. When decoding, we get the value `-2147483648` after reading the base64. Notice, it's already negative (the 32nd bit is set, because the 31st was set and we shifted everything left once). We'd then check the first bit (it's not) and shift right. But we used `>>`, which does not shift the sign bit. We actually wanted `>>>`, which will. Because of that bug, we get back `-1073741824` instead of the positive `1073741824`. It's even worse if the 32nd and 31st bits are set, `-1610612736` becomes `536870912` after a round trip. I recently fixed the same two bugs in Closure Compiler: google/closure-compiler@584418eb PR-URL: #31490 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
-
build: build docs in GitHub Actions CI workflow
PR-URL: #31504 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
fs: bail on permission error in recursive directory creation
-
test: make test-http2-buffersize more correct
Previously, this code could have closed the server before the connection was actually received by the server, as the `'close'` event on the client side can be emitted before the connection is established. The following commit exacerbates this problem, so fix the test first. PR-URL: #31502 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
src: simplify native immediate queue running
Make `SetImmediate()` behave more like `process.nextTick()` (which matches how we use it) by also running tasks that have been added during previous `SetImmediate()` calls. PR-URL: #31502 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
-
src,lib: make ^C print a JS stack trace
If terminating the process with ctrl-c / SIGINT, prints a JS stacktrace leading up to the currently executing code. The feature would be enabled under option `--trace-sigint`. Conditions of no stacktrace on sigint: - has (an) active sigint listener(s); - main thread is idle (i.e. uv polling), a message instead of stacktrace would be printed. PR-URL: #29207 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Christopher Hiller <boneskull@boneskull.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
crypto: improve randomBytes() performance
PR-URL: #31519 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
lib: delete dead code in SourceMap
This seems to be a leftover from the chromium project. Nothing uses `#reverseMappingsBySourceURL`, so constructing it isn't necessary. PR-URL: #31512 Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
Updated to conform to style guide. PR-URL: #31503 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
doc: remove redundant properties from headers
PR-URL: #31492 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
stream: fix finished writable/readable state
writable/readable does not indicate whether as stream is a Writable/Readable. This implements a better check for whether a object is a Writable/Readable. PR-URL: #31527 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: fix debug crash handling null strings
When internal debug is enabled, output null strings as "(null)" rather than crashing, matching glibc's behavior. PR-URL: #31523 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
buffer: improve concat() performance
PR-URL: #31522 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
benchmark: use let and const instead of var
Use let and const in domain, es, events, fixtures, fs, http, http2 and misc. PR-URL: #31518 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
tools: replace deprecated iteritems() for items()
This is a Built-In change in Python 3 used by compile_commands_json.py to generate compile_commands_json.json. Node.js dropped Python 2 support in this script, `items()` works as expected replacement. PR-URL: #31528 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
-
Revert "stream: fix async iterator destroyed error propagation"
-
stream: add regression test for async iteration completion
A test was missing for an async iterator created after the stream had emitted 'close'. This was regressed by #31314. See: #31314 PR-URL: #31508 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
-
doc: change error message testing policy
Dynamic error messages often contain important information that depends on the context, e.g., which argument caused an ERR_INVALID_ARG_TYPE, which type was expected, and which type was received. I don't think that internal breakage when changing a dynamic error message should prevent us from testing such properties properly. PR-URL: #31421 Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test,benchmark: fix test-benchmark-zlib
PR-URL: #31538 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
src: fix minor typo in base_object.h
PR-URL: #31535 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: update collaborator guide citgm instructions
PR-URL: #31549 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
doc: simultaneous blog and email of sec announce
PR-URL: #31483 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
-
doc: update job reference in COLLABORATOR_GUIDE.md
https://ci.nodejs.org/job/node-test-commit-custom-suites/ is disabled in Jenkins with a note to instead use https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/. Update the guide to remove the layer of indirection. PR-URL: #31557 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
worker: remove redundant closing of child port
PR-URL: #31555 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
process: report ArrayBuffer memory in
memoryUsage()
Report memory allocations performed by the `ArrayBuffer::Allocator`. PR-URL: #31550 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
-
doc: clarify that
v8.serialize()
is not deterministicFixes: nodejs/help#2448 PR-URL: #31548 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
n-api: rename 'promise' parameter to 'value'
This change makes it clear that the value doesn't need to be a Promise, and makes the signature consistent with other napi_is_* functions. PR-URL: #31544 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
build: enable loading internal modules from disk
PR-URL: #31321 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
-
test: remove --experimental-worker flag comment
worker is stable in the master branch. The flag is no longer required. PR-URL: #31563 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: add protocol option in http2.connect()
This option is used here: https://github.com/nodejs/node/blob/70c32a6d190e2b5d7b9ff9d5b6a459d14e8b7d59/lib/internal/http2/core.js#L3010 PR-URL: #31560 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
PR-URL: #31558 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: clarify require() OS independence
PR-URL: #31571 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: remove preview for heap dump utilities
At least `createHeapSnapshotStream()` and `triggerHeapSnapshot()` do have side effects, and more importantly, they should not be run transparently. Without this, typing e.g. `v8.getHeapSnapshot()` into the REPL will result in a crash or infinite loop while the REPL evaluates the expression for a preview. PR-URL: #31570 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
build: ignore all the "Debug","Release" folders
Since there're still many "Debug" and "Release" folders in "deps" and "tools", to make it more strict and totally ignore the generated obj files, ignore all the files/folders under them. Refs: #27210 PR-URL: #31565 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: verify threadId in reports
PR-URL: #31556 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
-
benchmark: add MessagePort benchmark
Add a raw `MessagePort` benchmark that does not ping back and forth between different threads, unlike the `echo.js` benchmark, as there are some performance differences between single-threaded and multi- threaded operation, and a single-threaded Environment can be somewhat easier to work with when profiling. PR-URL: #31568 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: list largepage values in --help
This commit adds the supported --use-largepages values to the --help menu. PR-URL: #31537 Fixes: #31533 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: clarify socket.setNoDelay() explanation
Change the description of socket.setNoDelay() to make it clear that sockets have Nagle's algorithm enabled by default. Better document the tradeoff of having the algorithm enabled. Explain the behavior of the function based on the passed arguments. PR-URL: #31541 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
PR-URL: #31575 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
src: use __executable_start for linux hugepages
`__executable_start` is provided by GNU's and LLVM's default linker scripts, obviating the need to plug in a custom linker script. The problem with our bespoke linker script is that it works with ld.bfd but not ld.gold and cannot easily be ported because the latter linker doesn't understand the `INSERT BEFORE` directive. The /proc/self/maps scanner is updated to account for the fact that there are a number of sections between `&__executable_start` and the start of the .text section. Fortunately, those sections are all mapped into the same memory segment so we only need to look at the next line to find the start of our text segment. Fixes: #31520 PR-URL: #31547 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
-
test: fix flaky test-memory-usage
abe6a2e introduced a test that verifies that ArrayBuffer allocations are tracked. However, V8 supports concurrent freeing of such allocations on background threads, meaning that the results may be subject to race conditions sometimes. Disabling concurrent freeing makes the test pass consistently. Refs: #31550 PR-URL: #31602 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
-
test: show child stderr output in largepages test
The test starts child processes. A recent change is suspected of causing flaky crashes on one of the alpine buildbots but we can't know for sure because the test hides the child's stderr. Refs: #31547 (comment) PR-URL: #31612 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
src: fix console debug output on Windows
The FWrite function on Windows assumed that MultiByteToWideChar automatically null-terminates the resulting string, but it will only do so if the size of the source was passed as -1 or null character was explicitly counted in the size. The FWrite uses std::string and its `.size()` method which doesn't count the null character even though the `.data()` method adds it to the resulting string. https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#remarks > MultiByteToWideChar does not null-terminate an output string if the input string length is explicitly specified without a terminating null character. To null-terminate an output string for this function, the application should pass in -1 or explicitly count the terminating null character for the input string. PR-URL: #31580 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: remove duplicate field env in CryptoJob class
Removed field env from cryptojob class, replaced with function env() inherited from ThreadPoolWork PR-URL: #31554 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
-
test: simplify test-https-simple.js
It had an unused `Agent` option (no such option exists), and some code that common.must(Not)Call makes redundant. PR-URL: #31584 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
benchmark: clean up config resolution in multiple benchmarks
This removes 'to Number' casting in multiple benchmarks (which is handled by the benchmark runner) and cleans up some var usage in changed benchmarks. PR-URL: #31581 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
worker: add ability to take heap snapshot from parent thread
PR-URL: #31569 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
esm: import.meta.resolve with nodejs: builtins
PR-URL: #31032 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
-
src: change Fill() to use ParseArrayIndex()
Changed Fill() to use ParseArrayIndex() when getting start and end of buffers instead of Uint32Value, supporting buffers of greater than 2**32 Fixes: #31514 Co-Authored-By: Rich Trott <rtrott@gmail.com> PR-URL: #31591 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
test: unset NODE_OPTIONS for cctest
The test may fail otherwise because of behaviour changes caused by setting the environment variable. Fixes: #31585 PR-URL: #31594 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
-
net: track state of setNoDelay() and prevent unnecessary system calls
The state of .setNoDelay() is now tracked and code will prevent repeated system calls to setsockopt() when the value has already been set to the desired value for the socket. Change and expand the appropriate test. PR-URL: #31543 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
src: remove unused
Worker::child_port_
memberThis fixes a compiler warning introduced in 9225939. PR-URL: #31599 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
perf_hooks: add property flags to GCPerformanceEntry
PR-URL: #29547 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
-
test: refactor test-readline-interface.js
This reduces the code lines required to run the tests by abstracting the constructor call. It also moves tests out of a for loop that where miss placed. PR-URL: #31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: abstract common assertions in readline-interface test
PR-URL: #31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: add AsyncResource + Worker pool example
Use Worker thread pools as an example of how `AsyncResource` can be used to track async state across callbacks. PR-URL: #31601 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
-
stream: fix finished w/ 'close' before 'finish'
Emitting 'close' before 'finish' on a Writable should result in a premature close error. PR-URL: #31534 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
src: fix inspecting
MessagePort
frominit
async hookDuring the `init()` async hook, the C++ object is not finished creating yet (i.e. it is an `AsyncWrap`, but not yet a `HandleWrap` or `MessagePort`). Accessing the `handle_` field is not valid in that case. However, the custom inspect function for `MessagePort`s calls `HasRef()` on the object, which would crash when the object is not fully constructed. Fix that by guarding the access of the libuv handle on that condition. PR-URL: #31600 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
doc: add example to fs.promises.readdir
PR-URL: #31552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: ask more questions in the bug report template
Inspired by the defect report template of the V8 issue tracker PR-URL: #31611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
-
meta: fix collaborator list errors in README.md
Add missing `-` characters in the list. PR-URL: #31655 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
test: fix flaky test-http2-stream-destroy-event-order
Alternative to #31590. It appears that the issue here is that the test falsely assumed that closing the client (which also currently destroys the socket rather than gracefully shutting down the connection) would still leave enough time for the server side to receive the stream error. Address that by explicitly waiting for the server side to receive the stream error before closing the client and the connection with it. Refs: #31590 Refs: #20750 PR-URL: #31610 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc,assert: rename "mode" to "assertion mode"
Rename "strict mode" in the assert module to "strict assertion mode". This is to avoid confusion with the more typical meaning of "strict mode" in ECMAScript. This necessitates a corresponding change of "legacy mode" to "legacy assertion mode". PR-URL: #31635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
n-api: free instance data as reference
Instance data associated with a `napi_env` is no longer stored on the env itself but is instead rendered as a reference. Since `v8impl::Reference` is tied to a JS object, this modification factors out the `v8impl::Reference` refcounting and the deletion process into a base class for `v8impl::Reference`, called `v8impl::RefBase`. The instance data is then stored as a `v8impl::RefBase`, along with other references, preventing a segfault that arises from the fact that, up until now, upon `napi_env` destruction, the instance data was freed after all references had already been forcefully freed. If the addon freed a reference during the `napi_set_instance_data` finalizer callback, such a reference had already been freed during environment teardown, causing a double free. Re: nodejs/node-addon-api#663 PR-URL: #31638 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>
-
tools: unify make-v8.sh for ppc64le and s390x
Refactor `tools/make-v8.sh` to minimise differences between the `ppc64le` and `s390x` paths to allow us to enable `ccache` on the `ppc64le` machines in the CI. PR-URL: #31628 Refs: nodejs/build#1927 Refs: nodejs/build#1940 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
-
test: add test-dns-promises-lookupService
This adds covereage for the onlookupservice() callback in lib/internal/dns/promises.js. Because of stubbing in other tests, it is not currently covered. This test works on my local development machine with the network turned off, so I'm putting it in parallel. If CI proves more challenging, it can be moved to the internet directory instead. PR-URL: #31640 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-
doc: correct getting an ArrayBuffer's length
`ArrayBuffer` instances do not have `.length` property. Instead they have `.byteLength` property. Fixed that in the description of `new Buffer(arrayBuffer[, byteOffset[, length]])` and `Buffer.from(arrayBuffer[, byteOffset[, length]])`. PR-URL: #31632 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
readline: make tab size configurable
This adds the `tabSize` option to readline to allow different tab sizes. PR-URL: #31318 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
-
doc: remove .github/ISSUE_TEMPLATE.md in favor of the template folder
This removes the obsolete issue template file since we already have the issue template folder which is the one currently in effect. PR-URL: #31656 Refs: #31611 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
worker: improve MessagePort performance
Use a JS function as the single entry point for emitting `.onmessage()` calls, avoiding the overhead of manually constructing each message event object in C++. confidence improvement accuracy (*) (**) (***) worker/echo.js n=100000 sendsPerBroadcast=1 payload='object' workers=1 *** 16.34 % ±1.16% ±1.54% ±1.99% worker/echo.js n=100000 sendsPerBroadcast=1 payload='string' workers=1 *** 24.41 % ±1.50% ±1.99% ±2.58% worker/echo.js n=100000 sendsPerBroadcast=10 payload='object' workers=1 *** 26.66 % ±1.54% ±2.05% ±2.65% worker/echo.js n=100000 sendsPerBroadcast=10 payload='string' workers=1 *** 32.72 % ±1.60% ±2.11% ±2.73% worker/messageport.js n=1000000 payload='object' *** 40.28 % ±1.48% ±1.95% ±2.52% worker/messageport.js n=1000000 payload='string' *** 76.95 % ±2.19% ±2.90% ±3.75% Also fix handling exceptions returned from `MessagePort::New`. PR-URL: #31605 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: update TSC name in "Release Process"
PR-URL: #31652 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
src: various minor improvements to node_url
Went hunting for possible performance improvements. Didn't find anything significant but did manage to make a number of style improvements that bring more in line with style guidelines and good pratice. PR-URL: #31651 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
-
src: fix OOB reads in process.title getter
The getter passed a stack-allocated, fixed-size buffer to uv_get_process_title() but neglected to check the return value. When the total length of the command line arguments exceeds the size of the buffer, libuv returns UV_ENOBUFS and doesn't modify the contents of the buffer. The getter then proceeded to return whatever garbage was on the stack at the time of the call, quite possibly reading beyond the end of the buffer. Add a GetProcessTitle() helper that reads the process title into a dynamically allocated buffer that is resized when necessary. Fixes: #31631 PR-URL: #31633 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: remove fixed-size GetHumanReadableProcessName
Remove the version of GetHumanReadableProcessName() that operates on a fixed-size buffer. The only remaining caller is Assert() which might get called in contexts where dynamically allocating memory isn't possible but as Assert() calls printf(), which also allocates memory when necessary, this commit is unlikely to make matters much worse. PR-URL: #31633 Fixes: #31631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: fix flaky test-inspector-connect-main-thread
Previously, the test waited for a (any) message from the workers, and then attached another event listener to a specific kind of message. However, it was possible that the second listener was attached after the Worker had already exited, thus never receiving the message it was supposed to receive. (This is the race condition here – usually, the Worker thread would exit *after* the second listener was attached.) Solve this by keeping a single `'message'` event listener attached to the worker instance during its entire lifetime. Fixes: #31226 PR-URL: #31637 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
worker: reset
Isolate
stack limit after enteringLocker
It turns out that using `v8::Locker` undoes the effects of passing an explicit stack limit as part of the `Isolate`’s resource constraints. Therefore, reset the stack limit manually after entering a Locker. Refs: #26049 (comment) PR-URL: #31593 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: remove dead code in InternalMakeCallback
Remove unneeded condition as the first line in function already ensures that recv can't be empty. PR-URL: #31622 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: simplify async_hooks overview
Explain the purpose of async_hooks simply in the overview. PR-URL: #31660 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
-
build: add configure option to debug only Node.js part of the binary
Building Node.js with `--debug` takes a long time and generates binaries that can be hard to work with due to their size, in particular because debug builds of V8 are large. Sometimes, it’s sufficient to build the Node.js parts with native debugging options enabled. Add an option for that. PR-URL: #31644 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: modernized unique_ptr construction
PR-URL: #31654 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
doc: consolidate introductory text
PR-URL: #31667 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
benchmark: check for and fix multiple end()
PR-URL: #31624 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
buffer: improve from() performance
PR-URL: #31615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
benchmark: refactor helper into a class
This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: #31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
benchmark: add
test
andall
options and improve errorsThis adds a new `test` option. Using it automatically uses a single minimal option matrix to verify the benchmark works as expected. Using the new `all` option makes sure all test suites are run. On top of that the benchmarks will from now on report properly what category might have a typo, if any. The http duration was also refactored to use a option instead of relying on a configuration setting. The fixture folder is ignored as test suite from now on. PR-URL: #31396 Fixes: #31083 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
test: refactor all benchmark tests to use the new test option
PR-URL: #31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
benchmark: remove special test entries
It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: #31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
To indicate which lines are test lines and which from Node.js core, it's good to rely on `util.inspect()` while inspecting errors. The stack was accessed directly instead in multiple cases and logging that does not provide as much information as using `util.inspect()`. PR-URL: #31425 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com>
-
assert: align character indicators properly
This makes sure color codes are not taken into account in case util.inspect's default value was changed. PR-URL: #31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
test: stricter assert color test
Make sure the assertion is actually triggered by using `assert.throws()` instead of `try/catch`. PR-URL: #31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
tty: do not end in an infinite warning recursion
It was possible that this warning ends up in an infinite recursion. The reason is that printing the warning triggered a color check and that triggered another warning. Limiting it to a single warning prevents this. PR-URL: #31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
readline: remove intermediate variable
This commit removes an extrea intermediate variable. This makes the call consistent with other uses of validateUint32() in the codebase. PR-URL: #31676 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
test,dns: add coverage for dns exception
Add test coverage for dns.promises.resolve() handling an exception from c-ares. Refs: https://coverage.nodejs.org/coverage-d213f21c72f77da6/lib/internal/dns/promises.js.html#L198 PR-URL: #31678 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
test: fix flaky test-trace-sigint-on-idle
Previously, the test could fail on slow machines because the child process was still in the process of starting up after one second, and not yet idle. To resolve this: - Wait for a message from the child process indicating that it had started. - Wait some time after that, but make it platform-dependent to account for timing differences. - Remove the timer in the child process. PR-URL: #31645 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc,net: reword Unix domain path paragraph in net.md
Reword the paragraph on Unix domain paths. Hopefully, it is a little bit more clear and easier to read now. PR-URL: #31684 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc,util: revise util.md introductory paragraph
Minor edits to improve introductory test for util module documentation. PR-URL: #31685 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
src: fix compile warnings in node_url.cc
Since for all affected conversions there is a preceding type check, it’s safe to use `.FromJust()` instead. This fixes the following compile warnings: ../src/node_url.cc: In function ‘void node::url::{anonymous}::ToUSVString(const v8::FunctionCallbackInfo<v8::Value>&)’: ../src/node_url.cc:2242:43: warning: ignoring return value of ‘bool v8::Maybe<T>::To(T*) const [with T = long int]’, declared with attribute warn_unused_result [-Wunused-result] 2242 | args[1]->IntegerValue(env->context()).To(&start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ ../src/node_url.cc: In function ‘node::url::url_data node::url::{anonymous}::HarvestBase(node::Environment*, v8::Local<v8::Object>)’: ../src/node_url.cc:1206:34: warning: ignoring return value of ‘bool v8::Maybe<T>::To(T*) const [with T = int]’, declared with attribute warn_unused_result [-Wunused-result] 1206 | flags->Int32Value(context).To(&base.flags); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ ../src/node_url.cc:1211:33: warning: ignoring return value of ‘bool v8::Maybe<T>::To(T*) const [with T = int]’, declared with attribute warn_unused_result [-Wunused-result] 1211 | port->Int32Value(context).To(&base.port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ ../src/node_url.cc: In function ‘void node::url::{anonymous}::ToUSVString(const v8::FunctionCallbackInfo<v8::Value>&)’: ../src/node_url.cc:2245:15: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized] 2245 | for (size_t i = start; i < value.length(); i++) { | ^ PR-URL: #31689 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
src: do not unnecessarily re-assign uv handle data
a555be2 re-assigned `async_.data` to indicate success or failure of the constructor. As the `HandleWrap` implementation uses that field to access the `HandleWrap` instance from the libuv handle, this introduced two issues: - It implicitly assumed that casting `MessagePort*` → `void*` → `HandleWrap*` would be valid. - It made the `HandleWrap::OnClose()` function fail with a `nullptr` dereference if the constructor did fail. In particular, the second issue made test/parallel/test-worker-cleanexit-with-moduleload.js` crash at least once in CI. Since re-assigning `async_.data` isn’t actually necessary here (only a leftover from earlier versions of that commit), fix this by using a local variable instead, and add a `CHECK` that provides better error messages for this type of issue in the future. Refs: #31605 PR-URL: #31696 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
test: improve assertion message in test-dns-any
Improve error message from "The expression evaluated to a falsy value" to a message formatted dynamically that lists the record types found so that someone investigating can look at the code and determine which values are missing. This came up because the test failed in nightly master branch CI but generally passes. It may prove helpful to know what record types were missing. (All of them? Just one? Something else?) PR-URL: #31697 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
-
test: add debugging output to test-net-listen-after-destroy-stdin
The test failed in CI once with a timeout but there is insufficient information to further debug. Add additional debugging information. Refactored callbacks to be arrow functions, since that seems to be the direction we're moving. PR-URL: #31698 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
-
Revert "test: refactor all benchmark tests to use the new test option"
-
Revert "benchmark: add
test
andall
options and improve errors" -
-
-
test: remove flaky designation for test-fs-stat-bigint
PR-URL: #30437 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
doc: improve strict assertion mode color text
Minor improvements to the text about colors in strict assertion mode: * Consolidate the two paragraphs into one * Pluralize "variables" * Remove unnecessary article "the" * Change "doc" to "documentation" PR-URL: #31703 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
doc: revise deepEqual() legacy assertion mode text
* Remove "potentially". It's arguably misplaced and certainly unnecessary. * Use italics for words-as-words usage of _Deep equality_ rather than using quotation marks. PR-URL: #31704 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
async_hooks: add executionAsyncResource
Remove the need for the destroy hook in the basic APM case. Co-authored-by: Stephen Belanger <admin@stephenbelanger.com> PR-URL: #30959 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
util: throw if unreachable code is reached
If a comparison code path that is supposed to be unreachable is reached, throw. Add a c8 comment to ignore coverage for the line, as it should be unreachable. PR-URL: #31712 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-
doc: reword section title in addons.md
Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: #31713 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: reword possessive form of Node.js in repl.md
Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: #31713 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: reword possessive form of Node.js in modules.md
Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: #31713 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: reword possessive form of Node.js in zlib.md
Throughout the docs, we sometimes write the possessive of _Node.js_ as _Node.js'_ and other times as _Node.js's_. The former conforms with some generally accepted style guides (e.g., Associated Press Stylebook) while the latter complies with others (e.g., Chicago Manual of Style). Since there is no clear authoritative answer as to which form is correct, and since (at least to me) both are visually jarring and sometimes cause a pause to understand, I'd like to reword things to eliminate the possessive form where possible. This is one of those examples. PR-URL: #31713 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
tools: update Markdown linter to be cross-platform
Prior to this commit, the dependencies were not matching the build procedure. This has been corrected and it has the added benefit of being able to be built on Windows as well. * continue using `rollup` rather than `ncc` * do not require `fs-event`s for non-macOS * use `npx` and `shx` for cross-platform building * ensure `lint-md-rollup` runs before `lint-md` PR-URL: #31239 Reviewed-By: Rich Trott <rtrott@gmail.com>
-
src: allow to reuse env options handling
PR-URL: #31711 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
-
-
src: add ExclusiveAccess class
Similar to Rust's `std::sync::Mutex` in that it requires one to unwrap the object before accessing it, acquiring the mutex in the process. PR-URL: #31717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: David Carlier <devnexen@gmail.com>
-
src: wrap HostPort in ExclusiveAccess
I found it exceedingly hard to figure out if there is a race condition where one thread reads the inspector agent's HostPort's properties while another modifies them concurrently. I think the answer is "no, there isn't" but with this commit use sites are forced to unwrap the object (and acquire the mutex in the process), making it a great deal easier to reason about correctness. PR-URL: #31717 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: David Carlier <devnexen@gmail.com>
-
util: add coverage for util.inspect.colors alias setter
Add test to confirm that the setter for aliases in `util.inspect.colors` keeps the alias reference-equal to the target value. Refs: https://coverage.nodejs.org/coverage-5b0308cd823a5110/lib/internal/util/inspect.js.html#L357 Refs: https://codecov.io/gh/nodejs/node/src/5b0308cd823a511098dadf9ddd5a35e3a9dbb424/lib/internal/util/inspect.js#L357 PR-URL: #31743 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
util: throw if unreachable TypedArray checking code is reached
If a comparison code path that is supposed to be unreachable is reached, throw. Add a c8 comment to ignore coverage for the line, as it should be unreachable. PR-URL: #31737 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
meta: move calvinmetcalf to emeritus
calvinmetcalf confirmed in email that moving to emeritus seemed like the right move for them right now. Move a separate entry that wasn't in the correct place in the list. PR-URL: #31736 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
-
meta: move vkurchatkin to emeritus
vkurchatkin confirmed in email that it's time to move to emeritus. PR-URL: #31729 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
-
meta: move princejwesley to emeritus
princejwesley confirmed in email that moving to emeritus at this time was appropriate. PR-URL: #31730 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
-
doc: update foundation name in onboarding
PR-URL: #31719 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: expand C++ README with information about exception handling
Add more information about why it is advisable not to use `.FromJust()` etc. on Maybe(Local)s, and general information about termination exceptions. PR-URL: #31720 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-
doc: add directions to mark a release line as lts
Moves directions for LTS release from the Release repo to Node docs. Fixes: nodejs/Release#530 PR-URL: #31724 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
test: improve test-fs-stat-bigint
Remove magic number and measure amount of difference should be allowable between consecutive stat() calls. PR-URL: #31726 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
test: fix flaky parallel/test-repl-history-navigation test
Two scenarios should be tested: 1. The completion is triggered and the result is printed before the next invocation. 2. The completion is triggered multiple times right after each other without waiting for the result. In that case only the last result should be printed. The first scenario did not need a timeout while the latter did not need a timeout for the second invocation. PR-URL: #31708 Fixes: #31094 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
doc: fix default server timeout description for https
PR-URL: #31692 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-
doc: update contact email for @ryzokuken
Update my personal email address from usharma1998@gmail.com (tired) to ryzokuken@disroot.org (wired). PR-URL: #31670 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
-
PR-URL: #31620 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
-
worker: add support for .cjs extension
PR-URL: #31662 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
-
doc: add prerequisites information for Arch
Add prerequisites for Arch Linux and derivatives in BUILDING.md. PR-URL: #31669 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
benchmark: swap var for let in benchmarks
In benchmark directory this changes for loops using var to let when it applies for consistency PR-URL: #28958 Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
benchmark: use let instead of var
Use `let` in module, napi, net, os, path, process, querystring, streams and string_decoder. PR-URL: #31592 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
-
crypto: fix performance regression
e559842 made writable/readable computed with a legacy mode if the properties are written to. LazyTransform still unecessarily wrote to these properties causing a performance regression. Fixes: #31739 PR-URL: #31742 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
PR-URL: #27517 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
-
-
async_hooks: ensure event after been emitted on runInAsyncScope
The exception handler user-defined will not automatically emit after for the async resource. Also removes a duplicated case `test-emit-after-uncaught-exception-runInAsyncScope.js` which is identical to test-emit-after-uncaught-exception.js. Refs: #30965 PR-URL: #31784 Fixes: #31783 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-
src: keep main-thread Isolate attached to platform during Dispose
This works around a situation in which the V8 WASM code calls into the platform while the Isolate is being disposed. This goes against the V8 API constract for `v8::Platform`. In lieu of a proper fix, it should be okay to keep the Isolate registered; the race condition fixed by 25447d8 cannot occur for the `NodeMainInstance`’s Isolate, as it is the last one to exit in any given Node.js process. This partially reverts 25447d8. Refs: #30909 Refs: #31752 PR-URL: #31795 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
-
src: use hex not decimal in IsArrayIndex
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Commits on Feb 18, 2020
-
2020-02-18, Version 13.9.0 (Current)
Notable changes: * async_hooks * add executionAsyncResource (Matteo Collina) #30959 * crypto * add crypto.diffieHellman (Tobias Nießen) #31178 * add DH support to generateKeyPair (Tobias Nießen) #31178 * simplify DH groups (Tobias Nießen) #31178 * add key type 'dh' (Tobias Nießen) #31178 * test * skip keygen tests on arm systems (Tobias Nießen) #31178 * perf_hooks * add property flags to GCPerformanceEntry (Kirill Fomichev) #29547 * process * report ArrayBuffer memory in `memoryUsage()` (Anna Henningsen) #31550 * readline * make tab size configurable (Ruben Bridgewater) #31318 * report * add support for Workers (Anna Henningsen) #31386 * worker * add ability to take heap snapshot from parent thread (Anna Henningsen) #31569 * added new collaborators * add ronag to collaborators (Robert Nagy) #31498 PR-URL: #31837