GeezerVison is showing github.com — [v19.x backport] url: use ada::url_aggregator for parsing urls by anonrig · Pull Request #47434 · nodejs/node
Conversation
anonrig
commented
Apr 5, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
bricss reacted with thumbs up emoji
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]>
…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.
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]>
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]>
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]>
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]>
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]>
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]>
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]>
Reviewers
RafaelGSS
Awaiting requested review from RafaelGSS
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
lib / src
Issues and PRs involving general changes in the lib/ or src/ directories.
needs-ci
PRs that need a full CI run.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|