[v19.x backport] url: use ada::url_aggregator for parsing urls#47434
Closed
anonrig wants to merge 131 commits intonodejs:v19.x-stagingfrom
Closed
[v19.x backport] url: use ada::url_aggregator for parsing urls#47434anonrig wants to merge 131 commits intonodejs:v19.x-stagingfrom
anonrig wants to merge 131 commits intonodejs:v19.x-stagingfrom
Conversation
PR-URL: nodejs#46809 Refs: nodejs#42528 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This is the initial work to bootstrap Web interfaces that are defined with extended attributes `[Exposed=*]`. The ShadowRealm instances are garbage-collected once it is unreachable. However, V8 can not infer the reference cycles between the per-realm strong persistent function handles and the realm's context handle. To allow the context to be gc-ed once it is not reachable, the per-realm persistent handles are attached to the context's global object and the persistent handles are set as weak. PR-URL: nodejs#46809 Refs: nodejs#42528 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
PR-URL: nodejs#47020 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs#47020 Refs: nodejs/build#3046 PR-URL: nodejs#47235 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]>
Original commit message:
Fix compilation error in platform.h for ASAN
The last two operands of the conditional expression needs to be
of the same type to compile.
Change-Id: Ib6cba4acb1238394910c650c776a7fd1ee93721e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4306802
Commit-Queue: Joyee Cheung <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Cr-Commit-Position: refs/heads/main@{#86235}
Refs: v8/v8@cb30b8e
Refs: nodejs#43370
Signed-off-by: Darshan Sen <[email protected]>
PR-URL: nodejs#47307
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
…odejs#47111) The initiative has been more focused on startup snapshot integration which is more of a feature on its own, so rename it to "startup snapshot". Background: we are also considering adding a more generic performance initiative in nodejs/TSC#1343.
Refs: nodejs/reliability#508 Refs: nodejs#46333 PR-URL: nodejs#46855 Reviewed-By: Matteo Collina <[email protected]>
Makes clear what a native error is by linking the spec. Explains that `instanceof Error` and util.types.isNativeError() are not equivalent. Give examples for objects that are `instance of Error` but not native errors and vice versa. Recommends checking for both if one wants to find out if something is an error. PR-URL: nodejs#46840 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Refs: nodejs#36431 PR-URL: nodejs#47122 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#46989 Fixes: nodejs#46981 Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#47131 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Refs: ngtcp2/nghttp3#112 Refs: ngtcp2/ngtcp2#692 Refs: HdrHistogram/HdrHistogram_c#114 PR-URL: nodejs#47011 Refs: ngtcp2/nghttp3#112 Refs: ngtcp2/ngtcp2#692 Refs: HdrHistogram/HdrHistogram_c#114 Reviewed-By: Jiawen Geng <[email protected]>
PR-URL: nodejs#47039 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#47135 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This test had two problems: * The first argument was a number in both cases, which is what caused the (expected) ERR_INVALID_ARG_TYPE error -- the validity of the 'checks' option was not actually verified at all. Thus, the first argument should be valid for this particular test. * The function returned by common.mustNotCall() was passed to assert.throws() as a third argument instead of being passed to checkPrime() as a third argument. (Isn't JavaScript great?) This again led to the (expected) ERR_INVALID_ARG_TYPE error, but again, the validity of the 'checks' option was not verified. Fix both issues by ensuring that all arguments except the 'checks' option are valid. Refs: nodejs#36997 PR-URL: nodejs#47139 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Refer to TSC voting members where necessary. Ref: nodejs/TSC#1350 PR-URL: nodejs#47126 Refs: nodejs/TSC#1350 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Ref: nodejs/TSC#1350 PR-URL: nodejs#47126 Refs: nodejs/TSC#1350 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Ref: nodejs/TSC#1350 PR-URL: nodejs#47126 Refs: nodejs/TSC#1350 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
As status quo, the cleanup hooks are invoked before the `napi_finalize` callbacks at the exit of Node.js environments. This gives addons a chance to release their resource in a proper order manually. Document this behavior explicitly to advocate the usage on cleanup hooks instead of relying on the implied invocation of `napi_finalize` callbacks at shutdown. PR-URL: nodejs#45903 Fixes: nodejs#45088 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#46985 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
PR-URL: nodejs#47154 Refs: nodejs#46904 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#47155 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Deokjin Kim <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
PR-URL: nodejs#47094 Fixes: nodejs#46762 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#47175 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
PR-URL: nodejs#47132 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Erick Wendel <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]>
Since externals behave as JavaScript objects on the JavaScript side, allow them to be type-tagged. Signed-off-by: Gabriel Schulhof <[email protected]> PR-URL: nodejs#47141 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Logs the raw messages from the inspector when NODE_DEBUG_NATIVE is set to inspector_server to facilitate debugging. PR-URL: nodejs#46941 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Previously, the JS layer would validate that the value of the 'checks' option was an unsigned 32-bit integer, otherwise throwing an appropriate error but with a slightly misleading error message. Then the C++ layer would validate that the value was an unsigned 31-bit integer, otherwise throwing an appropriate error, but with a different (and even less helpful) error message. Instead, make the JS layer aware of the 31-bit restriction so that no validation in C++ is necessary and so that the error message always matches the exact requirement. PR-URL: nodejs#47165 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
The JS layer already verifies that divisor_bits is either a non-negative 32-bit signed integer or null/undefined, in which case it passes -1 to the C++ layer. In either case, the C++ layer receives a 32-bit signed integer greater than or equal to -1. PR-URL: nodejs#47168 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#47138 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
There is actually a leak. The test doesn't exercise the right path to create a substantial enough object graph (e.g. accessing something that results in the loading of a binding). This does something more complicated in the test and moves it to known_issues until we find a fix. PR-URL: nodejs#47355 Refs: nodejs#47353 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#47088 Fixes: nodejs#47075 Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#47370 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#47394 Fixes: nodejs#47393 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#47331 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#47273 Refs: nodejs#47146 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.6 to 2.2.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@16964e9...04df126) PR-URL: nodejs#47366 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Feng Yu <[email protected]>
It is not obvious that in some cases cpus() returns an empty list and this has caused a bug before: isaacs/promise-call-limit#11 PR-URL: nodejs#47363 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]>
To avoid failures when there is another running process occupying the port 9229 which may happen if there is a stale process, use the --port argument of node-inspect to use a random port in tests that don't have to work on port 9229. The following tests are not touched: - test-debugger-custom-port: tests a specific port - test-debugger-debug-brk: tests a specific port - test-debugger-invalid-args: tests other inspect combinations - test-debugger-pid: node-inspect does not support -p and --port together - test-debugger-launch: tests that default port is 9229 PR-URL: nodejs#47274 Refs: nodejs#47146 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
Before ``` ❯ tools/test.py "sequential/test-debugger*" [00:25|% 100|+ 32|- 0]: Done All tests passed. ❯ tools/test.py -J "parallel/test-debugger*" [00:05|% 100|+ 6|- 0]: Done All tests passed. ``` After ``` ❯ tools/test.py "sequential/test-debugger*" [00:06|% 100|+ 5|- 0]: Done All tests passed. ❯ tools/test.py -J "parallel/test-debugger*" [00:05|% 100|+ 33|- 0]: Done All tests passed. ``` PR-URL: nodejs#47274 Refs: nodejs#47146 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
SnapshotSerializerDeserializer::GetName() appears to confuse static analysis such as Coverity. This changes the function structure to a sequence of if-else blocks and marks all branch conditions as constexpr. (Unfortunately, this results in a dangling 'else' keyword in the V macro.) As per a request in the PR discussion, this change does _not_ ensure that GetName<T>() can only be called for known types T and instead still returns an empty string in that case. Also use std::is_unsigned_v instead of !std::is_signed_v. PR-URL: nodejs#46509 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#47403 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#47369 Fixes: nodejs#47296 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
This patch: - Builds the set of modules that can be required by users with/without the `node:` prefix at snapshot building time. We only modify it when `--expose-internals` but the default set is now in the snapshot. At run time the CJS module loader only creates a frozen array out of it. - `BuiltinModule.canBeRequiredWithoutScheme()` is now enough to determine if an id can be required without `node:` without an additional call to `BuiltinModule.canBeRequiredByUsers()` - Replace the pending-to-deprecate methods on `Module` with an internal implementation that only queries the CLI flags when being invoked. So we can install these methods in the snapshot. PR-URL: nodejs#47194 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
`std::shared_ptr<T>::unique()` has been removed in C++20, so this change uses `std::shared_ptr<T>::use_count()` instead which is available in C++20. Fixes: nodejs#47311 Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs#47315 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#47384 Refs: nodejs#46957 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
anonrig
pushed a commit
to anonrig/node
that referenced
this pull request
Apr 6, 2023
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Apr 6, 2023
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
anonrig
added a commit
to anonrig/node
that referenced
this pull request
Apr 6, 2023
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#47339 Backport-PR-URL: nodejs#47434 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
9ffffca to
8e1e9ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backporting Ada v2.0 to Node.js 19 release branch
Original PR: #47339
CI: https://ci.nodejs.org/job/node-test-pull-request/50986/