Commit Graph
10019 Commits
Author SHA1 Message Date
Tobias Nießen 93e7e1708b src: use C++ nullptr in webstorage
Using the C-style constant `0` to represent a null pointer is less type
safe than the C++-style constant `nullptr`, so we should always be using
`nullptr` instead of `0`.

PR-URL: https://github.com/nodejs/node/pull/61407
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-02-24 08:38:58 +01:00
Vladimir Morozov 884f313f40 node-api: use Node-API in comments
PR-URL: https://github.com/nodejs/node/pull/61320
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-02-24 08:38:56 +01:00
Mert Can Altin 4908e67ba0 fs: remove duplicate fd validation in sync functions
PR-URL: https://github.com/nodejs/node/pull/61361
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-02-24 08:38:56 +01:00
jhofstee ef868447bc src: fix pointer alignment
The NgLibMemoryManager::ReallocImpl method prefixes the allocated
memory with its size, and returns a pointer to the region after it.
This pointer can however no longer be suitably aligned.

On Arm 32bits this resulted in unaligned accesses, since the NEON
vst1.64 instruction was used with a not properly aligned addresses.
A reproducer is available at [1].

Correct this by allocating the maximum of the the size of the size_t
and the max alignment.

[1] https://github.com/victronenergy/venus/issues/1559.

PR-URL: https://github.com/nodejs/node/pull/61336
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-24 08:38:56 +01:00
Ryuhei Shima df4cc62954 zlib: validate write_result array length
Fixes: https://github.com/nodejs/node/issues/61286
PR-URL: https://github.com/nodejs/node/pull/61342
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-02-24 08:38:55 +01:00
Node.js GitHub Bot cbc1e4306d deps: update zlib to 1.3.1-e00f703
PR-URL: https://github.com/nodejs/node/pull/61135
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-02-24 08:38:53 +01:00
Node.js GitHub Bot db59c35ed8 deps: update cjs-module-lexer to 2.2.0
PR-URL: https://github.com/nodejs/node/pull/61271
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-24 00:37:14 +01:00
Joyee Cheung a96256524c src: dump snapshot source with node:generate_default_snapshot_source
This helps diffing snapshots when the reproducibility gets broken.

PR-URL: https://github.com/nodejs/node/pull/61101
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-02-24 00:37:13 +01:00
Mert Can Altin ec051b9efd src: add HandleScope to edge loop in heap_utils
PR-URL: https://github.com/nodejs/node/pull/60885
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2026-02-24 00:37:10 +01:00
Tobias Nießen 41749eb5d6 src: remove redundant CHECK
The function `SetAuthTag()` returns early (before reaching this line) if
`!cipher->IsAuthenticatedMode()`, which expands to the exact same
condition that is being `CHECK()`ed here.

PR-URL: https://github.com/nodejs/node/pull/61130
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-02-24 00:37:08 +01:00
Joyee Cheung 57c81e5af3 src: fix off-thread cert loading in bundled cert mode
https://redirect.github.com/nodejs/node/pull/59856 had an typo/mistake
in the skip conditions so that it is skipping when --use-openssl-ca
or --openssl-system-ca-path (configure time) are NOT used, even
though they should be skipped only when those ARE used (which is
not the default for default builds). This change fixes that so
that the perf numbers in that PR is true for the default build.

PR-URL: https://github.com/nodejs/node/pull/60764
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-02-24 00:37:03 +01:00
Node.js GitHub Bot 37abe2a7d2 deps: update zlib to 1.3.1-63d7e16
PR-URL: https://github.com/nodejs/node/pull/60898
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-02-24 00:37:02 +01:00
Joyee Cheung 4b0616e024 src: handle DER decoding errors from system certificates
When decoding certificates from the system store, it's not actually
guaranteed to succeed. In case the system returns a certificate
that cannot be decoded (might be related to SSL implementation issues),
skip them.

PR-URL: https://github.com/nodejs/node/pull/60787
Refs: https://github.com/microsoft/vscode/issues/277064
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-02-24 00:37:02 +01:00
Michaël Zasso 93393371f9 src: use static_cast instead of C-style cast
PR-URL: https://github.com/nodejs/node/pull/60868
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-24 00:37:01 +01:00
Artur Gawlik c4440dcc60 worker: remove not implemented declarations
PR-URL: https://github.com/nodejs/node/pull/60655
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-02-24 00:36:57 +01:00
Rafael Gonzaga c2ba56d6b2 src,permission: fix permission.has on empty param
PR-URL: https://github.com/nodejs/node/pull/60674
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-02-24 00:36:57 +01:00
Rafael Gonzaga e55a2b895a src,permission: add debug log on is_tree_granted
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/60668
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-02-24 00:36:56 +01:00
Node.js GitHub Bot 5bf99f3d46 deps: update cjs-module-lexer to 2.1.1
PR-URL: https://github.com/nodejs/node/pull/60646
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-02-24 00:36:56 +01:00
Anna Henningsen 900445b655 src: move Node-API version detection to where it is used
`src/js_native_api_types.h` and other files actually depend on
the moved macros being evaluated, so before this change there
was an implicit requirement that `src/js_native_api.h` would be
included separately before any include of
`src/js_native_api_types.h`, direct or transitive.

PR-URL: https://github.com/nodejs/node/pull/60512
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-24 00:36:53 +01:00
Anna Henningsen 8353a6da2a src: avoid C strings in more C++ exception throws
Similar to 2e2f4cd095, just missed them in that commit.

PR-URL: https://github.com/nodejs/node/pull/60592
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-02-24 00:36:44 +01:00
Node.js GitHub Bot 2ebfc2ca56 deps: update amaro to 1.1.5
PR-URL: https://github.com/nodejs/node/pull/60541
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-24 00:36:29 +01:00
Anna Henningsen 27c860c51f src: move napi_addon_register_func to node_api_types.h
This means that `node.h` can include only this file, instead of
the entirety of `node_api.h`.

Split out from https://github.com/nodejs/node/pull/60496 since
it was rightfully pointed out that the breaking part of the change
should not touch Node-API headers.

PR-URL: https://github.com/nodejs/node/pull/60512
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-24 00:36:28 +01:00
Chengzhong Wu e0517752e7 src: remove unconditional NAPI_EXPERIMENTAL in node.h
PR-URL: https://github.com/nodejs/node/pull/60345
Fixes: https://github.com/nodejs/node/issues/60311
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2026-02-24 00:36:26 +01:00
Anna Henningsen 21e2a52f8e src: clean up generic counter implementation
This addresses late review comments for the recently
landed cfbfc1b050 and aligns the new code with the
pre-existing V8 fast call counters.

Refs: https://github.com/nodejs/node/pull/60434#pullrequestreview-3386035944
PR-URL: https://github.com/nodejs/node/pull/60447
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-24 00:36:26 +01:00
Burkov Egor aed23cb8ca src: add enum handle for ToStringHelper + formatting
Fixes: https://github.com/nodejs/node/issues/56666
PR-URL: https://github.com/nodejs/node/pull/56829
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-02-24 00:36:26 +01:00
Joyee Cheung ece4acc18f src: add COUNT_GENERIC_USAGE utility for tests
PR-URL: https://github.com/nodejs/node/pull/60434
Fixes: https://github.com/nodejs/node/issues/60423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-02-19 18:46:22 +01:00
Sohyeon Kim 31c8e9d9ff src: use cached primordials_string
PR-URL: https://github.com/nodejs/node/pull/60255
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2026-02-19 18:46:02 +01:00
Chengzhong Wu a86ffa9a5d inspector: add network payload buffer size limits
By default, the total buffered payloads are limited to 100MB, and 5MB
for each single request. The oldest unused requests will be evicted
first when the buffer size limit has been exceeded.

PR-URL: https://github.com/nodejs/node/pull/60236
Refs: https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-enable
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2026-02-17 19:16:43 +01:00
Rahul 508ce6ec6c build, src: fix include paths for vtune files
PR-URL: https://github.com/nodejs/node/pull/59999
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-02-17 19:12:19 +01:00
Node.js GitHub Bot d950b151a2 crypto: update root certificates to NSS 3.119
This is the `certdata.txt` from NSS 3.119.

This is the version of NSS that shipped in Firefox 147.0.1 on 2026-01-16.

Certificates removed:
- CommScope Public Trust ECC Root-01
- CommScope Public Trust ECC Root-02
- CommScope Public Trust RSA Root-01
- CommScope Public Trust RSA Root-02

Refs: https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_119_RTM/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/61419
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-02-17 15:39:31 +01:00
Chengzhong Wu 705832a1be lib,src: isInsideNodeModules should test on the first non-internal frame
PR-URL: https://github.com/nodejs/node/pull/60991
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-17 15:14:07 +01:00
Mert Can Altin 7f0ffddc14 src: implement Windows-1252 encoding support and update related tests
PR-URL: https://github.com/nodejs/node/pull/60893
Fixes: https://github.com/nodejs/node/issues/60888
Fixes: https://github.com/nodejs/node/issues/59515
Fixes: https://github.com/nodejs/node/issues/56542
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-17 15:12:40 +01:00
Yuki Okita d4a2d8aa8a test: skip failing tests when compiled without amaro
When compiled without amaro, this conflicts with
--experimental-strip-types defaulting to true. To avoid that,
we need to skip relevant failing tests.

Fixes: https://github.com/nodejs/node/issues/60640
PR-URL: https://github.com/nodejs/node/pull/60815
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-02-17 15:12:34 +01:00
Node.js GitHub Bot 4f42f8c428 crypto: update root certificates to NSS 3.117
This is the certdata.txt[0] from NSS 3.117.

This is the version of NSS that shipped in Firefox 145.0 on 2025-11-11.

Certificates added:
- OISTE Server Root ECC G1
-  OISTE Server Root RSA G1

[0] https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_117_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/60741
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-02-17 15:09:14 +01:00
Marco Ippolito 86a497cb25 Working on v22.22.1
PR-URL: https://github.com/nodejs-private/node-private/pull/801
2026-01-13 14:33:09 +01:00
Marco Ippolito 6add85e4c4 2026-01-13, Version 22.22.0 'Jod' (LTS)
This is a security release.

Notable changes:

lib:
  * (CVE-2025-59465) add TLSSocket default error handler
  * (CVE-2025-55132) disable futimes when permission model is enabled
lib,permission:
  * (CVE-2025-55130) require full read and write to symlink APIs
src:
  * (CVE-2025-59466) rethrow stack overflow exceptions in async_hooks
src,lib:
  * (CVE-2025-55131) refactor unsafe buffer creation to remove zero-fill toggle
tls:
  * (CVE-2026-21637) route callback exceptions through error handlers

PR-URL: https://github.com/nodejs-private/node-private/pull/801
2026-01-09 18:13:37 -03:00
d4d9f3915f src,lib: refactor unsafe buffer creation to remove zero-fill toggle
This removes the zero-fill toggle mechanism that allowed JavaScript
to control ArrayBuffer initialization via shared memory. Instead,
unsafe buffer creation now uses a dedicated C++ API.

Refs: https://hackerone.com/reports/3405778
Co-Authored-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/759
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/798
CVE-ID: CVE-2025-55131
2026-01-09 18:11:49 -03:00
Matteo Collina 37509c3ff0 deps: update undici to 6.23.0
PR-URL: https://github.com/nodejs-private/node-private/pull/791
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-01-07 16:38:28 +01:00
Matteo Collina ddadc31f09 src: rethrow stack overflow exceptions in async_hooks
When a stack overflow exception occurs during async_hooks callbacks
(which use TryCatchScope::kFatal), detect the specific "Maximum call
stack size exceeded" RangeError and re-throw it instead of immediately
calling FatalException. This allows user code to catch the exception
with try-catch blocks instead of requiring uncaughtException handlers.

The implementation adds IsStackOverflowError() helper to detect stack
overflow RangeErrors and re-throws them in TryCatchScope destructor
instead of calling FatalException.

This fixes the issue where async_hooks would cause stack overflow
exceptions to exit with code 7 (kExceptionInFatalExceptionHandler)
instead of being catchable.

Fixes: https://github.com/nodejs/node/issues/37989
Ref: https://hackerone.com/reports/3456295
PR-URL: https://github.com/nodejs-private/node-private/pull/773
Refs: https://hackerone.com/reports/3456295
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-59466
2026-01-07 16:38:11 +01:00
Antoine du Hamel c611ea6fc9 Working on v22.21.2
PR-URL: https://github.com/nodejs/node/pull/60375
2025-10-28 20:01:32 +01:00
Node.js GitHub Bot 6ac4ab19ad 2025-10-28, Version 22.21.1 'Jod' (LTS)
PR-URL: https://github.com/nodejs/node/pull/60375
2025-10-23 18:26:35 +02:00
Anna Henningsen 76b4cab8fc src: bring permissions macros in line with general C/C++ standards
Specifically, avoid the hazard of unintentionally evaluating
an argument multiple times during macro expansion, and do not
assume the available of particular namespaces in the current scope.

PR-URL: https://github.com/nodejs/node/pull/60053
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-22 23:44:07 +02:00
iknoom 21970970c7 src: remove AnalyzeTemporaryDtors option from .clang-tidy
PR-URL: https://github.com/nodejs/node/pull/60008
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-10-22 23:44:05 +02:00
Moonki Choi 609c063e81 src: remove unused variables from report
PR-URL: https://github.com/nodejs/node/pull/60047
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-10-22 23:44:01 +02:00
Anna Henningsen 987841a773 src: avoid unnecessary string allocations in SPrintF impl
If we can use a `std::string_view` instead of a `std::string`, let's
just do that instead.

PR-URL: https://github.com/nodejs/node/pull/60052
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-22 23:43:59 +02:00
Anna Henningsen 6e386c0632 src: make ToLower/ToUpper input args more flexible
In particular, this enables passing `std::string_view` instead.

PR-URL: https://github.com/nodejs/node/pull/60052
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-10-22 23:43:59 +02:00
Anna Henningsen c3be1226c7 src: allow std::string_view arguments to SPrintF() and friends
Modernize the code so there is no need to work with raw C strings
anymore.

PR-URL: https://github.com/nodejs/node/pull/60058
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-10-22 23:43:59 +02:00
Anna Henningsen 764d35647d src: remove unnecessary std::string error messages
If we can just use the classic `THROW_...()` methods directly,
without needing to allocate an `std::string` for the message/format
parameter, let's just do so.

PR-URL: https://github.com/nodejs/node/pull/60057
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-10-22 23:43:59 +02:00
Anna Henningsen 1289ef89ec src: remove unnecessary shadowed functions on Utf8Value & BufferValue
Both of these are already implemented on the superclass.

PR-URL: https://github.com/nodejs/node/pull/60056
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-10-22 23:43:58 +02:00
Anna Henningsen d1fb8a538d src: avoid unnecessary string -> char* -> string round trips
In these places we can just generate `std::string` directly, so
there's no need to convert to an intermediate C string.

PR-URL: https://github.com/nodejs/node/pull/60055
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-10-22 23:43:58 +02:00