James M Snell
c4681d55ae
src: move evp stuff to ncrypto
...
PR-URL: https://github.com/nodejs/node/pull/54911
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-09-23 04:20:59 -07:00
Yagiz Nizipli
5a966714c1
src: revert filesystem::path changes
...
PR-URL: https://github.com/nodejs/node/pull/55015
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-09-21 17:22:21 +00:00
Yagiz Nizipli
12dd4c7575
src: mark node --run as stable
...
PR-URL: https://github.com/nodejs/node/pull/53763
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Ruy Adorno <ruy@vlt.sh >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-21 09:29:47 -07:00
Yagiz Nizipli
5b3f3c5a3b
zlib: throw brotli initialization error from c++
...
PR-URL: https://github.com/nodejs/node/pull/54698
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-21 09:23:59 -07:00
Jason Zhang
77ca5ca075
fs: convert to u8 string for filesystem path
...
PR-URL: https://github.com/nodejs/node/pull/54653
Fixes: https://github.com/nodejs/node/issues/54476
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-21 09:13:19 -07:00
Omer Katz
4f1fe8a015
cli: remove deprecated V8 flag
...
Remove the `--huge-max-old-generation-size` V8 flag from the
`NODE_OPTIONS` allowlist. That flag was recently deprecated (it
currently remains as nop, see crrev.com/c/5831467) and will soon be
completely removed.
PR-URL: https://github.com/nodejs/node/pull/54761
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-09-21 10:53:28 +02:00
Chengzhong Wu
8b8fc53c9a
src: cleanup per env handles directly without a list
...
Environment handles can be cleaned up directly without saving the
references in a list and iterate the list.
PR-URL: https://github.com/nodejs/node/pull/54993
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2024-09-20 19:59:05 +00:00
Joyee Cheung
62383cd113
module: implement flushCompileCache()
...
This implements an API for users to intentionally flush the
accumulated compile cache instead of waiting until process
shutdown. It may be useful for application that loads dependencies
first and then either reload itself in other instances, or spawning
other instances that load an overlapping set of its dependencies -
in this case its useful to flush the cache early instead of waiting
until the shutdown of itself.
Currently flushing is triggered by either process
shutdown or user requests. In the future we should simply start the
writes right after module loading on a separate thread, and this method
only blocks until all the pending writes (if any) on the other thread
are finished. In that case, the off-thread writes should finish long
before any attempt of flushing is made so the method would then only
incur a negligible overhead from thread synchronization.
PR-URL: https://github.com/nodejs/node/pull/54971
Fixes: https://github.com/nodejs/node/issues/54770
Fixes: https://github.com/nodejs/node/issues/54465
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-20 19:05:07 +00:00
Joyee Cheung
4dfed556ba
module: throw when invalid argument is passed to enableCompileCache()
...
PR-URL: https://github.com/nodejs/node/pull/54971
Fixes: https://github.com/nodejs/node/issues/54770
Fixes: https://github.com/nodejs/node/issues/54465
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-20 19:05:06 +00:00
Joyee Cheung
9a73aa0d15
module: write compile cache to temporary file and then rename it
...
This works better in terms of avoiding race conditions.
PR-URL: https://github.com/nodejs/node/pull/54971
Fixes: https://github.com/nodejs/node/issues/54770
Fixes: https://github.com/nodejs/node/issues/54465
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-09-20 19:05:06 +00:00
Aviv Keller and Fabian Iwand
f666a1b754
tls: fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo
...
Co-Authored-By: Fabian Iwand <mootari@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/52627
Fixes: https://github.com/nodejs/node/issues/52448
Refs: https://github.com/nodejs/node/pull/23188
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-09-20 17:59:22 +00:00
Jonas
fd8c762fab
src: add unistd.h import if node posix credentials is defined
...
usage comment
PR-URL: https://github.com/nodejs/node/pull/54528
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-09-20 14:58:02 +00:00
Michaël Zasso
17a17164d6
src: update NODE_MODULE_VERSION to 131
...
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 12.9.
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-09-19 14:25:36 +00:00
Robert Nagy
0d4387ebe2
buffer: use simdutf convert_latin1_to_utf8_safe
...
simdutf 5.5 includes convert_latin1_to_utf8_safe
PR-URL: https://github.com/nodejs/node/pull/54798
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
2024-09-18 18:39:01 +00:00
Yagiz Nizipli
0c5fa57bc7
cli: ensure --run has proper pwd
...
PR-URL: https://github.com/nodejs/node/pull/54949
Refs: https://github.com/nodejs/node/pull/53600
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-09-18 12:18:40 +00:00
He Yang
d496d44145
src: remove duplicate code setting AF_INET
...
`AF_INET` has been repeatedly set three times in the code. this should
be redundant. removed the last two times.
PR-URL: https://github.com/nodejs/node/pull/54939
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-18 12:04:51 +00:00
Aviv Keller
65768bca59
cli: fix spacing for port range error
...
PR-URL: https://github.com/nodejs/node/pull/54495
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-18 09:18:16 +00:00
Andrew Moon
29f31c6a76
crypto: add Date fields for validTo and validFrom
...
Added equivalent fields to `X509Certificate` in Date form.
PR-URL: https://github.com/nodejs/node/pull/54159
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2024-09-18 00:56:24 +00:00
Michaël Zasso
d2a4f92920
src: use Maybe<void> where bool isn't needed
...
PR-URL: https://github.com/nodejs/node/pull/54575
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-09-17 07:53:54 +00:00
Yagiz Nizipli
8191e1f575
src: improve utf8 string generation performance
...
PR-URL: https://github.com/nodejs/node/pull/54873
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-09-17 00:19:46 +00:00
Jason Zhang and Jake Yuesong Li
c1afd2c8e3
fs: translate error code properly in cpSync
...
UV error code needs to be negative integer so it can be mapped
correctly. The filesystem error are positive integer, so we need to
handle it before throwing.
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54906
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-09-16 12:41:55 +00:00
Bosco Domingo
53ede878a5
src: add --env-file-if-exists flag
...
Fixes: https://github.com/nodejs/node/issues/50993
Refs: https://github.com/nodejs/node/issues/51451
test: remove unnecessary comment
src: conform to style guidelines
src: change flag to `--env-file-optional`
test: revert automatic linter changes
doc: fix typos
src: change flag to `--env-file-if-exists`
src: refactor `env_file_data` and `GetEnvFileDataFromArgs`
test: clean up tests
src: print error when file not found
test: remove unnecessary extras
PR-URL: https://github.com/nodejs/node/pull/53060
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-09-16 00:58:16 +00:00
Yagiz Nizipli
9195210399
lib,src: use built-in array buffer detach, transfer
...
PR-URL: https://github.com/nodejs/node/pull/54837
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-09-16 00:32:04 +00:00
Hüseyin Açacak
efbba60e5b
path: fix bugs and inconsistencies
...
Fixes: https://github.com/nodejs/node/issues/54025
PR-URL: https://github.com/nodejs/node/pull/54224
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2024-09-14 14:56:31 +00:00
Node.js GitHub Bot
d4170a03e0
deps: update cjs-module-lexer to 1.4.1
...
PR-URL: https://github.com/nodejs/node/pull/54846
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-14 14:31:45 +00:00
Mert Can Altin
75e4d0df8f
node-api: add support for UTF-8 and Latin-1 property keys
...
PR-URL: https://github.com/nodejs/node/pull/52984
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com >
2024-09-13 13:01:52 -07:00
Shu-yu Guo
8fd90938f9
esm: remove --no-import-harmony-assertions
...
It is off by default now.
PR-URL: https://github.com/nodejs/node/pull/54890
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-13 17:58:10 +00:00
Gabriel Schulhof
d38dc99a95
src: add Cleanable class to Environment
...
We store a linked list of `Cleanable` objects on the
`node::Environment` and invoke their `Clean()` method during env
teardown.
This eliminates the need for adding many cleanup hooks.
PR-URL: https://github.com/nodejs/node/pull/54880
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-09-13 14:30:32 +00:00
Daniel Lemire
9f5977fdac
src: simplify string_bytes with views
...
PR-URL: https://github.com/nodejs/node/pull/54876
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2024-09-12 16:07:08 +00:00
James M Snell
08eccaf57f
src: switch crypto APIs to use Maybe<void>
...
PR-URL: https://github.com/nodejs/node/pull/54775
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-09-11 20:07:27 -07:00
Yagiz Nizipli
1d2603b53f
os: improve tmpdir performance
...
PR-URL: https://github.com/nodejs/node/pull/54709
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-09-11 14:46:30 +00:00
James M Snell
285c6a0df3
src: eliminate ManagedEVPPkey
...
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.
Previously we had:
KeyObjectHandle ->
std::shared_ptr<KeyObjectData> ->
ManagedEVPPkey ->
EVPKeyPointer
After this change we have:
KeyObjectHandle ->
KeyObjectData ->
EVPKeyPointer
The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.
This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.
This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.
PR-URL: https://github.com/nodejs/node/pull/54751
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-09-11 07:40:51 -07:00
Colin Ihrig
123bb4cb22
test_runner: improve code coverage cleanup
...
The test runner's code coverage leaves old coverage data in the
temp directory. This commit updates the cleanup logic to:
- Stop code collection. Otherwise V8 would write collection data
again when the process exits.
- Remove the temp directory containing the coverage data.
- Attempt to clean up the coverage data even if parsing the
data resulted in an error.
With this change, I no longer see any coverage data left behind
in the system temp directory.
Refs: https://github.com/nodejs/build/issues/3864
Refs: https://github.com/nodejs/build/issues/3887
PR-URL: https://github.com/nodejs/node/pull/54856
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-11 02:50:28 +00:00
Anna Henningsen
c3a7b29e56
tls: add allowPartialTrustChain flag
...
This commit exposes the `X509_V_FLAG_PARTIAL_CHAIN` OpenSSL flag to
users. This is behavior that has been requested repeatedly in the
Github issues, and allows aligning behavior with other TLS libraries
and commonly used applications (e.g. `curl`).
As a drive-by, simplify the `SecureContext` source by deduplicating
call sites at which a new custom certificate store was created for the
`secureContext` in question.
Fixes: https://github.com/nodejs/node/issues/36453
PR-URL: https://github.com/nodejs/node/pull/54790
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-09 17:24:10 +02:00
Daeyeon Jeong
eab9729d16
src: fix unhandled error in structuredClone
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54764
Fixes: https://github.com/nodejs/node/issues/54602
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-07 23:05:00 +00:00
Ivan Trubach
38974a2eb3
test: fix volatile for CauseSegfault with clang
...
PR-URL: https://github.com/nodejs/node/pull/54325
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-07 22:29:24 +00:00
Tobias Nießen
17b49bd7d3
sqlite: fix segfault in expandedSQL
...
The call to sqlite3_expanded_sql() may return NULL depending on various
factors. Handle this case instead of running into a segmentation fault.
PR-URL: https://github.com/nodejs/node/pull/54687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-09-07 09:20:45 +00:00
James M Snell
dcc2ed944f
src: move hkdf, scrypto, pbkdf2 impl to ncrypto
...
PR-URL: https://github.com/nodejs/node/pull/54651
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2024-09-06 19:44:26 -07:00
Node.js GitHub Bot
01bf4a1bee
deps: update cjs-module-lexer to 1.4.0
...
PR-URL: https://github.com/nodejs/node/pull/54713
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-06 22:41:00 +00:00
Huáng Jùnliàng
18101d83a1
crypto: reject dh,x25519,x448 in {Sign,Verify}Final
...
Fixes: https://github.com/nodejs/node/issues/53742
PR-URL: https://github.com/nodejs/node/pull/53774
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-09-06 22:07:16 +00:00
Tobias Nießen
5a3c605d8c
sqlite: remove unnecessary auto assignment
...
Assignment is not necessary here at all.
PR-URL: https://github.com/nodejs/node/pull/54686
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-09-05 20:56:47 +00:00
Michael Dawson
ce19715cbb
deps: allow amaro to be externalizable
...
- allow amaro to be externalized like other builtins
containing WASM. More context is available in
https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-dependencies.md#supporting-externalizable-dependencies-with-javascript-code
Signed-off-by: Michael Dawson <midawson@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/54646
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-05 14:27:30 -04:00
Joyee Cheung
24302c9fe9
doc: fix typo in CppgcMixin docs
...
PR-URL: https://github.com/nodejs/node/pull/54762
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-05 17:45:26 +00:00
Tim Perry
65b4fb840e
crypto: return a clearer error when loading an unsupported pkcs12
...
PR-URL: https://github.com/nodejs/node/pull/54485
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-05 14:15:01 +00:00
Jason Zhang and Jake Yuesong Li
a48852be17
fs: respect dereference when copy symlink directory
...
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54732
Fixes: https://github.com/nodejs/node/issues/54730
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-05 13:54:49 +00:00
Robert Nagy
dc74f17f6c
buffer: re-enable Fast API for Buffer.write
...
Re-enables fast Fast API for Buffer.write after fixing
UTF8 handling.
Fixes: https://github.com/nodejs/node/issues/54521
PR-URL: https://github.com/nodejs/node/pull/54526
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-09-04 22:34:29 +00:00
Rafael Gonzaga
80a989f931
lib: add util.getCallSite() API
...
PR-URL: https://github.com/nodejs/node/pull/54380
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-04 19:47:25 +00:00
Joyee Cheung
3b0617dd19
vm: migrate ContextifyScript to cppgc
...
This patch migrates ContextifyScript to cppgc-based memory
management using CppgcMixin.
PR-URL: https://github.com/nodejs/node/pull/52295
Refs: https://github.com/nodejs/node/issues/40786
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-08-30 16:58:31 +00:00
Joyee Cheung
849db10fb3
src: add helpers for creating cppgc-managed wrappers
...
This patch adds helpers for wrapper classes based on cppgc (Oilpan)
in `src/cppgc_helpers.h`, including `node::CppgcMixin` and
`ASSIGN_OR_RETURN_UNWRAP_CPPGC`, which are designed to have
similar interface to BaseObject helpers to help migration.
They are documented in the `CppgcMixin` section in `src/README.md`
To disambiguate, the global `node::Unwrap<>` has now been moved
as `node::BaseObject::Unwrap<>`, and `node::Cppgc::Unwrap<>`
implements a similar unwrapping mechanism for cppgc-managed
wrappers.
PR-URL: https://github.com/nodejs/node/pull/52295
Refs: https://github.com/nodejs/node/issues/40786
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-08-30 16:58:30 +00:00
Joyee Cheung
4568df4c6d
src: support v8::Data in heap utils
...
Use a std::set<> for saving the JSGraphJSNode, since implementing
a proper hash function for v8::Data is complicated and this
path is only used by tests anyway, where the performance difference
between std::set and std::unordered_set doesn't matter.
PR-URL: https://github.com/nodejs/node/pull/52295
Refs: https://github.com/nodejs/node/issues/40786
Refs: https://docs.google.com/document/d/1ny2Qz_EsUnXGKJRGxoA-FXIE2xpLgaMAN6jD7eAkqFQ/edit
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-08-30 16:58:30 +00:00