Commit Graph
8729 Commits
Author SHA1 Message Date
Tobias Nießen b342a1b565 crypto: remove INT_MAX restriction in randomBytes
This restriction was due to an implementation detail in CSPRNG(). Now
that CSPRNG() properly handles lengths exceeding INT_MAX, remove this
artificial restriction.

Refs: https://github.com/nodejs/node/pull/47515
PR-URL: https://github.com/nodejs/node/pull/47559
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-04-17 17:26:02 +00:00
Tobias Nießen 4f5bb1a75a src: use v8::Boolean(b) over b ? True() : False()
Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.

PR-URL: https://github.com/nodejs/node/pull/47554
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-04-16 18:26:06 +00:00
Moritz Raho 070c9a8974 src: fix typo in process.env accessor error message
PR-URL: https://github.com/nodejs/node/pull/47014
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-16 13:49:39 +00:00
Daniel Lemire a777bbd571 src: replace static const string_view by static constexpr
PR-URL: https://github.com/nodejs/node/pull/47524
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-15 20:28:35 +00:00
Tobias Nießen 8833099ef0 src: fix CSPRNG when length exceeds INT_MAX
CSPRNG implicitly casts the size_t length argument to a signed int when
calling RAND_bytes(), which leaves it up to the caller to ensure that
the length argument actually fits into such a signed int. However, not
all call sites explicitly ensure that, which could lead to subtle bugs.

In OpenSSL 3, use RAND_bytes_ex() instead, which does not require
casting the length to a signed int.

In OpenSSL 1.1.1, RAND_bytes_ex() is not supported, thus we have to
process blocks of size INT_MAX one by one.

PR-URL: https://github.com/nodejs/node/pull/47515
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-15 20:09:12 +00:00
Yagiz Nizipli 3d17735e84 url: handle URL.canParse without base parameter
PR-URL: https://github.com/nodejs/node/pull/47547
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-04-14 11:34:20 +00:00
Rafael Gonzaga 1323992672 permission: fix chmod,chown improve fs coverage
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/47529
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-04-13 14:06:44 +00:00
Node.js GitHub Bot a67cae2602 deps: update undici to 5.21.2
PR-URL: https://github.com/nodejs/node/pull/47508
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2023-04-13 12:43:19 +00:00
4667b07cd2 esm: move hook execution to separate thread
PR-URL: https://github.com/nodejs/node/pull/44710
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
2023-04-13 09:35:17 +02:00
Michaël Zasso 25ad49bb07 src: use correct variable in node_builtins.cc
PR-URL: https://github.com/nodejs/node/pull/47343
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-04-11 10:33:49 +00:00
lilsweetcaligula 97d3912eb8 src: slim down stream_base-inl.h
PR-URL: https://github.com/nodejs/node/pull/46972
Refs: https://github.com/nodejs/node/issues/43712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-04-11 05:52:27 +00:00
Node.js GitHub Bot 17d024ba69 deps: update undici to 5.21.1
PR-URL: https://github.com/nodejs/node/pull/47488
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-04-11 02:03:42 +00:00
James M Snell 2d1934aa96 quic: add more QUIC impl
* add BindingData
* add LogStream
* add TransportParams

PR-URL: https://github.com/nodejs/node/pull/47348
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-04-09 19:37:33 -07:00
Rafael Gonzaga 4b80a7b0c4 permission: support fs.mkdtemp
PR-URL: https://github.com/nodejs/node/pull/47470
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2023-04-09 21:35:16 +00:00
Daniel Lemire 63ee335eb0 src: allow simdutf::convert_* functions to return zero
PR-URL: https://github.com/nodejs/node/pull/47471
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-04-09 20:06:33 +00:00
Joyee Cheung 491a5c968f sea: use JSON configuration and blob content for SEA
PR-URL: https://github.com/nodejs/node/pull/47125
Refs: https://github.com/nodejs/single-executable/discussions/58
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-04-09 18:31:15 +00:00
Tobias Nießen 1cda3f36d0 crypto: replace THROW with CHECK for scrypt keylen
The JS layer already uses validateInt32(keylen, 'keylen', 0) to ensure
that the keylen argument fits into a signed 32-bit integer, thus, the
THROW statement in C++ is unreachable (unless the binding is accessed
directly, of course).

PR-URL: https://github.com/nodejs/node/pull/47407
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-04-09 09:22:51 +00:00
Joyee Cheung 583dcca226 src: track ShadowRealm native objects correctly in the heap snapshot
Previously the native ShadowRealm objects were never actually tracked
in the heap snapshot - the tracking starts with the Environment,
we don't call the tracking methods unless it's reachable natively from
the Environment. This patch adds a set in the Environment for tracking
shadow realms in the heap snapshot.

Drive-by: remove redundant MemoryInfo() overrides from the derived
classes of Realm and remove the tracking of `env` from
`Realm::MemoryInfo()` because the realms don't hold the Environment
alive (even for the principal realm, it's the other way around).

PR-URL: https://github.com/nodejs/node/pull/47389
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-04-06 00:25:09 +00:00
Joyee Cheung 5c86f223ae src: use the internal field to determine if an object is a BaseObject
Instead of storing the function template of BaseObject for checking
if an object is BaseObject by calling HasInstance, simply checks
the first internal field of the object, which is always set in the
BaseObject constructor. This is simpler and faster
(there is now no need to iterate over the inheritance for the check).

PR-URL: https://github.com/nodejs/node/pull/47217
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-04-06 00:24:48 +00:00
Yagiz Nizipli 3867641c14 url: use ada::url_aggregator for parsing urls
PR-URL: https://github.com/nodejs/node/pull/47339
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-04-05 09:05:27 -07:00
Paolo InsognaandAntoine du Hamel 8b51c1a869 net: enable autoSelectFamily by default
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/46790
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-04-05 08:31:56 -07:00
Darshan Sen 1ff9824094 src: remove usage of std::shared_ptr<T>::unique()
`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: https://github.com/nodejs/node/issues/47311
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/47315
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-05 17:45:56 +05:30
Tobias Nießen aa3dbe30c9 src: use stricter compile-time guidance
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: https://github.com/nodejs/node/pull/46509
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-04-04 23:29:04 +00:00
Rafael Gonzaga 6fd147c4b0 permission: drop process.permission.deny
PR-URL: https://github.com/nodejs/node/pull/47335
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-04-04 17:14:04 +00:00
Chengzhong Wu 3a014dc38a src: bootstrap prepare stack trace callback in shadow realm
Bootstrap per-realm callbacks like `prepare_stack_trace_callback` in
the ShadowRealm. This enables stack trace decoration in the ShadowRealm.

PR-URL: https://github.com/nodejs/node/pull/47107
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-04 01:13:37 +00:00
Michaël Zasso 9a31ac19f4 src: remove unused variable in crypto_x509.cc
PR-URL: https://github.com/nodejs/node/pull/47344
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-04-03 08:00:40 +00:00
Darshan Sen 5db08cf693 sea: fix memory leak detected by asan
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/47309
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-03 07:07:49 +00:00
Yagiz Nizipli 4c9ec9866e Revert "util: reduce javascript call for ToUSVString"
This reverts commit f51c152f60.

PR-URL: https://github.com/nodejs/node/pull/47340
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-04-01 10:29:16 +00:00
Dmitry Vyukov 37af5f53e8 src: don't reset embeder signal handlers
The only bad handler value we can inhert from before exec is SIG_IGN
(any actual function pointer is reset to SIG_DFL during exec).
If that's the case, we want to reset it back to SIG_DFL.
However, it's also possible that an embeder (or an LD_PRELOAD-ed
library) has set up own signal handler for own purposes
(e.g. profiling). If that's the case, keep it intact.

Fix #47013

PR-URL: https://github.com/nodejs/node/pull/47188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-03-31 20:47:16 +00:00
Stephen Belanger fe751df537 lib: add tracing channel to diagnostics_channel
PR-URL: https://github.com/nodejs/node/pull/44943
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2023-03-31 17:40:30 +00:00
James M Snell d65ae9f678 quic: add additional quic implementation utilities
* add TokenSecret, StatelessResetToken, RetryToken, and RegularToken
* add SessionTicket implementation

PR-URL: https://github.com/nodejs/node/pull/47289
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2023-03-31 09:58:37 -07:00
Michaël Zasso 295b2f3ff4 src: update NODE_MODULE_VERSION to 115
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 11.3.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2023-03-31 14:15:27 +00:00
Michael Dawson 978b57d750 wasi: no longer require flag to enable wasi
- no longer require flag to enable experimental wasi feature
- wasi is still documented as experimental

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/47286
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-03-30 15:54:12 -04:00
ywave620 18e1f3c3a3 src,http2: ensure cleanup if a frame is not sent
Call to JS and close the session if a frame is not sent
even there is no frameError listener registered by user.

PR-URL: https://github.com/nodejs/node/pull/47244
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-03-30 12:40:45 +00:00
Tobias Nießen 9b104be502 quic: do not dereference shared_ptr after move
The stored pointer is assumed to be nullptr after std::move.

PR-URL: https://github.com/nodejs/node/pull/47294
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-03-29 10:04:47 -07:00
Joyee Cheung c81e1143e4 bootstrap: store internal loaders in C++ via a binding
Instead of returning the internal loaders from the bootstrap script,
we can simply call a binding to store them in C++. This eliminates
the need for specializing the handling of this script.

PR-URL: https://github.com/nodejs/node/pull/47215
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-03-29 23:46:02 +08:00
James M Snell 09a4bb152f quic: add multiple internal utilities
* add the CID implementation
* add the PreferredAddress implementation
* add Path and PathStorage implementations
* add Store implementation
* add QuicError implementation

PR-URL: https://github.com/nodejs/node/pull/47263
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-03-28 17:15:59 -07:00
Michael Dawson fe449a20af src: fix some recently introduced coverity issues
Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/47240
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-03-28 09:07:55 -04:00
Vladimir Morozov 5e4f5e122c node-api: deprecate napi_module_register
PR-URL: https://github.com/nodejs/node/pull/46319
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-03-24 14:00:40 -04:00
Yagiz Nizipli f51c152f60 util: reduce javascript call for ToUSVString
PR-URL: https://github.com/nodejs/node/pull/47192
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2023-03-23 15:01:31 +00:00
Khafra f2651a0812 url: implement URL.canParse
PR-URL: https://github.com/nodejs/node/pull/47179
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-03-22 19:44:44 +00:00
Tobias Nießen 1a18b44028 src: replace impossible THROW with CHECK
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: https://github.com/nodejs/node/pull/47168
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-03-22 11:41:15 +00:00
Tobias Nießen 7d84d67364 crypto: unify validation of checkPrime checks
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: https://github.com/nodejs/node/pull/47165
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2023-03-22 11:41:06 +00:00
Joyee Cheung 434bdde974 inspector: log response and requests in the inspector for debugging
Logs the raw messages from the inspector when NODE_DEBUG_NATIVE
is set to inspector_server to facilitate debugging.

PR-URL: https://github.com/nodejs/node/pull/46941
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-03-22 09:28:02 +00:00
Tobias Nießen 1640aeb680 crypto: remove obsolete SSL_OP_* constants
None of these constants have any effect in recent OpenSSL versions, not
even in Node.js release lines that still use OpenSSL 1.1.1.

It is likely rare that these options are still used (intentionally), and
removing them is unlikely to break any existing applications. These
constants can only be passed to the secureOptions option of
tls.createSecureContext() and related APIs, and a value of undefined
will be ignored. Similarly, if a bitwise combination of multiple options
is used, undefined constants will not change the behavior because
(a | undefined | b) === (a | b) for (small) integers a and b.

Refs: https://github.com/nodejs/node/pull/46954
Refs: https://github.com/nodejs/node/pull/47066
PR-URL: https://github.com/nodejs/node/pull/47073
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-03-21 10:47:49 +00:00
Tobias Nießen aa30e16716 permission: fix some vulnerabilities in fs
Without this patch, any restrictions imposed by the permission model can
be easily bypassed, granting full read and write access to any file. On
Windows, this could even be used to delete files that are supposed to be
write-protected.

Fixes: https://github.com/nodejs/node/issues/47090
PR-URL: https://github.com/nodejs/node/pull/47091
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-03-19 12:58:28 +00:00
Cheng Zhao 0d575fe61a gyp: put filenames in variables
PR-URL: https://github.com/nodejs/node/pull/46965
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-03-18 10:24:38 +01:00
Nicolas DUBIEN aa6e9c80cf vm: properly handle defining props on any value
While it was supposed to fix most of the remaining issues,
https://github.com/nodejs/node/pull/46458 missed some in strict mode.

This PR adds some additional checks. It also clarifies what we are
really checking to execute or not the `GetReturnValue`.

PR-URL: https://github.com/nodejs/node/pull/46615
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2023-03-18 09:19:19 +00:00
Keyhan Vakil c3537ae8cc src: fix duplication of externalized builtin code
The `else` here was missing, causing us to append the file to its
existing `source` already in the map.

Refs: https://github.com/nodejs/node/pull/45942
PR-URL: https://github.com/nodejs/node/pull/47079
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-03-17 00:20:22 +00:00
Keyhan Vakil 8713c83462 src: remove dead comments about return_code_cache
This behavior of sometimes returning the function & other times
returning the code cache was removed a long time ago in the referenced
PR, as evinced by the return type `MaybeLocal<Function>`. Remove these
incorrect comments.

Refs: https://github.com/nodejs/node/pull/24950
PR-URL: https://github.com/nodejs/node/pull/47083
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-03-16 06:55:19 +00:00