Commit Graph

39530 Commits

Author SHA1 Message Date
Tobias Nießen
6117cc3bd1
test: fix compiler warning in NodeCryptoEnv
This fixes a warning in line 26: "warning: value computed is not used"
when calling BIO_seek().

Refs: https://github.com/nodejs/node/pull/47160
PR-URL: https://github.com/nodejs/node/pull/49206
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-08-24 16:25:09 +00:00
Jungku Lee
a494ef68f3
doc: modify param description for end(),write() in StringDecoder
PR-URL: https://github.com/nodejs/node/pull/49285
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-08-24 16:00:28 +00:00
Juan José
5ff1ead6b2
build: add symlink to compile_commands.json file if needed
Usually lsp servers needs the `compile_commands.json` file in the root
directory.

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/49260
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-24 14:02:04 +00:00
Raz Luvaton
b0f423390f
stream: add highWaterMark for the map operator
this is done so we don't wait for the first items to
finish before starting new ones

Fixes: https://github.com/nodejs/node/issues/46132

Co-authored-by: Robert Nagy <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/49249
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2023-08-24 12:11:21 +00:00
Node.js GitHub Bot
da197d1890
deps: update zlib to 1.2.13.1-motley-f5fd0ad
PR-URL: https://github.com/nodejs/node/pull/49252
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-08-24 11:17:43 +00:00
Robert Nagy
feb5b0fef8
fs: make sure to write entire buffer
fs.write(v) is not guaranteed to write everything in a single
call. Make sure we don't assume so.

PR-URL: https://github.com/nodejs/node/pull/49211
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2023-08-24 08:15:08 +03:00
Cheng Zhao
996f3904bc doc: use NODE_API_SUPPORTED_VERSION_MAX in release doc
The code was changed in #48501 but the doc was missed.

PR-URL: https://github.com/nodejs/node/pull/49268
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-08-23 14:11:54 -04:00
Abdirahim Musse
ee1f609a9e test: handle EUNATCH
When IPv6 is disabled IBM i returns EUNATCH (errno 42)
instead of EADDRNOTAVAIL.

libuv 1.46.0 adds EUNATCH errno

We can now use error.code to refer to EUNATCH
in node versions that use libuv 1.46.0.

PR-URL: https://github.com/nodejs/node/pull/48050
Refs: https://github.com/nodejs/node/issues/48049
Refs: https://github.com/nodejs/node/pull/46546
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-08-23 14:00:25 -04:00
Antoine du Hamel
e74d1b8db9
doc: fix typo in stream.finished documentation
PR-URL: https://github.com/nodejs/node/pull/49271
Refs: https://nodejs.org/api/stream.html#streamfinishedstream-options
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2023-08-23 09:17:31 +00:00
Antoine du Hamel
bca14f8518
worker: protect against user mutating well-known prototypes
PR-URL: https://github.com/nodejs/node/pull/49270
Fixes: https://github.com/nodejs/node/issues/49259
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-23 09:06:51 +00:00
Node.js GitHub Bot
0d080a269e
meta: move one or more collaborators to emeritus
PR-URL: https://github.com/nodejs/node/pull/49264
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-23 04:21:02 +00:00
Jungku Lee
56a2a2e399
doc: update description for percent_encode sets in WHATWG API
PR-URL: https://github.com/nodejs/node/pull/49258
Refs: https://url.spec.whatwg.org/#percent-encoded-bytes
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-23 01:13:46 +00:00
Geoffrey Booth
164c57d4c5
doc: move and rename loaders section
PR-URL: https://github.com/nodejs/node/pull/49261
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-22 21:53:40 +00:00
Joyee Cheung
5c9daf4583 sea: generate code cache with deserialized isolate
V8 now requires code cache to be compiled from an isolate with the
same RO space layout as the one that's going to deserialize the
cache, so for a binary built with snapshot, we need to compile
the code cache using a deserialized isolate.

Drive-by: ignore "useCodeCache" when "useSnapshot" is true because
the compilation would've been done during build time anyway in
that case, and print a warning for it.

PR-URL: https://github.com/nodejs/node/pull/49226
Refs: https://github.com/nodejs/node-v8/issues/252
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-22 16:56:04 +00:00
Joyee Cheung
f6f1131096 src: support snapshot deserialization in RAIIIsolate
PR-URL: https://github.com/nodejs/node/pull/49226
Refs: https://github.com/nodejs/node-v8/issues/252
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-22 16:56:03 +00:00
Fedor Indutny
62b2cf30f2
doc: clarify use of Uint8Array for n-api
`napi_get_buffer_info` always supported receiving `Uint8Array` as a
`value` argument because `node::Buffer` is a subclass of `Uint8Array`
and the underlying V8 APIs don't distinguish between two. With this
change we mark both types as supported by the API so that the user code
doesn't have to unknowingly use oficially unsupported type of the
`value` argument.

PR-URL: https://github.com/nodejs/node/pull/48742
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-08-21 18:12:09 +00:00
Jungku Lee
a16b610e86
src: remove unused function GetName() in node_perf
PR-URL: https://github.com/nodejs/node/pull/49244
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-08-21 16:42:12 +00:00
Livia Medeiros
eeddbfae6c
test,benchmark: use tmpdir.fileURL()
PR-URL: https://github.com/nodejs/node/pull/49138
Refs: https://github.com/nodejs/node/pull/49040
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:42:03 +00:00
Livia Medeiros
052434a0c1
test: use tmpdir.resolve()
PR-URL: https://github.com/nodejs/node/pull/49136
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-21 16:41:53 +00:00
Geoffrey Booth
484ad83358
doc: add signature for module.register
PR-URL: https://github.com/nodejs/node/pull/49251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-08-20 20:52:41 +00:00
Jungku Lee
982e7a65cc
src: use ARES_SUCCESS instead of 0
PR-URL: https://github.com/nodejs/node/pull/49048
Refs: https://github.com/nodejs/node/pull/48834
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-08-20 10:04:34 +00:00
Jungku Lee
45e5ec89a6
src: add a condition if the argument of DomainToUnicode is empty
PR-URL: https://github.com/nodejs/node/pull/49097
Refs: https://github.com/nodejs/node/pull/46410
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
2023-08-20 09:55:44 +00:00
Antoine du Hamel
2557932db2
esm: align sync and async load implementations
Refs: https://github.com/nodejs/node/pull/48272
PR-URL: https://github.com/nodejs/node/pull/49152
Refs: https://github.com/nodejs/node/pull/47999
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-08-20 05:08:22 +00:00
Antoine du Hamel
0daea967ea
test: reduce flakiness of test-esm-loader-hooks
PR-URL: https://github.com/nodejs/node/pull/49248
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-20 04:50:06 +00:00
Michael Dawson
502629376c
build: expand when we run internet tests
Refs: https://github.com/nodejs/node/issues/49203

Changes slipped into v18.x regressed
test/internet/test-dns-ipv6 as I assume the action did
not run because no test under test/internet was changed.
Add some of the common paths that include code that might
introduce failures in the internet tests.

Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: https://github.com/nodejs/node/pull/49218
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-19 21:44:21 +00:00
Jacob Smith
41a3a1daa2
doc: caveat unavailability of import.meta.resolve in custom loaders
PR-URL: https://github.com/nodejs/node/pull/49242
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-08-19 16:45:02 +00:00
Hyunjin Kim
cb4a6fafe6
doc: use same name in the doc as in the code
Refs: https://streams.spec.whatwg.org/#bytelengthqueuingstrategy
PR-URL: https://github.com/nodejs/node/pull/49216
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-19 16:15:22 +00:00
Tobias Nießen
78842cf213 crypto: remove getDefaultEncoding()
Refs: https://github.com/nodejs/node/pull/47182
Refs: https://github.com/nodejs/node/pull/47869
Refs: https://github.com/nodejs/node/pull/47943
Refs: https://github.com/nodejs/node/pull/47998
Refs: https://github.com/nodejs/node/pull/49140
Refs: https://github.com/nodejs/node/pull/49145
Refs: https://github.com/nodejs/node/pull/49167
Refs: https://github.com/nodejs/node/pull/49169
PR-URL: https://github.com/nodejs/node/pull/49170
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-19 12:55:30 +05:30
Joyee Cheung
64a5c01b99
test: add spawnSyncAndExit() and spawnSyncAndExitWithoutError()
Replaces expectSyncExit() and expectSyncExitWithoutError(). Since
we usually just check the child process right after its spawned,
these shorthands also takes care of the spawning. This makes the
tests more concise.

PR-URL: https://github.com/nodejs/node/pull/49200
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-08-18 16:54:19 +00:00
Joyee Cheung
ecde9d9640
test: make test-perf-hooks more robust and work with workers
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: https://github.com/nodejs/node/pull/49197
Refs: https://github.com/nodejs/reliability/issues/638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-08-18 11:49:56 +00:00
Joyee Cheung
1f2ad05600
test: use gcUntil() in test-v8-serialize-leak
Previously this can be flaky because the there could be a delay
of the deallocation after gc() is invoked. Use gcUntil() to run
the GC multiple times to make the test more robust.

PR-URL: https://github.com/nodejs/node/pull/49168
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-18 11:17:24 +00:00
Joyee Cheung
7b7a68b1fe
bootstrap: build code cache from deserialized isolate
V8 now requires the code cache to be compiled with a finalized
read-only space, so we need to serialize the snapshot to get
a finalized read-only space first, then deserialize it to compile
the code cache.

PR-URL: https://github.com/nodejs/node/pull/49099
Refs: https://github.com/nodejs/node/issues/47636
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13789
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-18 11:17:13 +00:00
Rafael Gonzaga
c021b27221
meta: mention nodejs/tsc when changing GH templates
PR-URL: https://github.com/nodejs/node/pull/49189
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-08-17 21:19:23 +00:00
Rafael Gonzaga
7d5d640396
doc: add notable-change label mention to PR template
PR-URL: https://github.com/nodejs/node/pull/49188
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-08-17 21:09:36 +00:00
Rafael Gonzaga
3af65855c5
doc: add h1 summary to security release process
PR-URL: https://github.com/nodejs/node/pull/49112
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-08-17 19:40:20 +00:00
Rafael Gonzaga
478ca18fd7
doc: update to semver-minor releases by default
PR-URL: https://github.com/nodejs/node/pull/49175
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-17 19:23:25 +00:00
Tobias Nießen
c4bbf0a094
doc: fix wording in napi_async_init
Refs: https://github.com/nodejs/node/pull/32930
PR-URL: https://github.com/nodejs/node/pull/49180
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-17 19:05:44 +00:00
Carlos Espa
413c16e490
src,permission: add multiple allow-fs-* flags
Support for a single comma separates list for allow-fs-* flags is
removed. Instead now multiple flags can be passed to allow multiple
paths.

Fixes: https://github.com/nodejs/security-wg/issues/1039
PR-URL: https://github.com/nodejs/node/pull/49047
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-08-17 18:39:04 +00:00
Chemi Atlow
3c6a1c6af4
meta: add test/reporters to codeowners
PR-URL: https://github.com/nodejs/node/pull/49186
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-08-17 18:21:22 +00:00
Chemi Atlow
a5567c2279
test_runner: expose spec reporter as newable function
Fixes: https://github.com/nodejs/node/issues/48112
Ref: https://github.com/nodejs/node/pull/48208
PR-URL: https://github.com/nodejs/node/pull/49184
Refs: https://github.com/nodejs/node/pull/48208
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-08-17 18:21:14 +00:00
Joyee Cheung
fe219e0438
bootstrap: do not generate code cache in an unfinalized isolate
V8 now no longer supports serializing code cache in an isolate
with unfinalized read-only space. So guard the code cache regeneration
with the `is_building_snapshot()` flag. When the isolate is created
for snapshot generation, the code cache is going to be serialized
separately anyway, so there is no need to do it in the builtin loader.

PR-URL: https://github.com/nodejs/node/pull/49108
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-08-17 17:24:46 +00:00
Raz Luvaton
4c3db74a39 doc: add rluvaton to collaborators
PR-URL: https://github.com/nodejs/node/pull/49215
Fixes: https://github.com/nodejs/node/issues/49049
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-08-17 17:41:11 +03:00
Yagiz Nizipli
769823e57c
src: add built-in .env file support
PR-URL: https://github.com/nodejs/node/pull/48890
Refs: https://github.com/orgs/nodejs/discussions/44975
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-08-17 14:08:05 +00:00
翠 / green
6bb400f8ec
lib: add api to detect whether source-maps are enabled
Add `process.sourceMapsEnabled` to detect
whether source-maps are enabled.

Fixes: https://github.com/nodejs/node/issues/46304
PR-URL: https://github.com/nodejs/node/pull/46391
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-08-17 08:42:12 +00:00
Joyee Cheung
b4a2be457c
vm: store MicrotaskQueue in ContextifyContext directly
Previously the ContextifyContext holds a MicrotaskQueueWrap which in
turns holds a MicrotaskQueue in a shared pointer. The indirection is
actually unnecessary, we can directly hold the MicrotaskQueue via
a unique pointer in ContextifyContext, the lifetime would still
remain the same but the graph would be simpler, and this removes
the additional JS -> C++ to create the wrapper object.

PR-URL: https://github.com/nodejs/node/pull/48982
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-08-16 20:18:46 +00:00
Node.js GitHub Bot
c9b1d6c84b deps: update simdutf to 3.2.17
PR-URL: https://github.com/nodejs/node/pull/49019
Fixes: https://github.com/nodejs/node/issues/48995
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-08-16 20:42:47 +02:00
Moshe Atlow
e2d666d269
tools: fix github reporter appended multiple times
PR-URL: https://github.com/nodejs/node/pull/49199
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-16 18:22:45 +00:00
Joyee Cheung
a49bc4bcda src: remove C++ WeakReference implementation
PR-URL: https://github.com/nodejs/node/pull/49053
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-16 18:45:08 +02:00
Joyee Cheung
8dcce52c33 lib: implement WeakReference on top of JS WeakRef
The C++ implementation can now be done entirely in JS using WeakRef.
Re-implement it in JS instead to simplify the code.

PR-URL: https://github.com/nodejs/node/pull/49053
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-16 18:45:07 +02:00
Joyee Cheung
c64c9149ad test: make WeakReference tests robust
Previously we assume that the objects are GC'ed after one
global.gc() returns, which is not necessarily always the case. Use
gcUntil() to run GC multiple times if they are not GC'ed in the
first time around.

PR-URL: https://github.com/nodejs/node/pull/49053
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-16 18:45:07 +02:00