Joyee Cheung
7e7ff40303
src,test: migrate GetPrototypeV2() to GetPrototype()
...
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66537
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-10-07 18:54:52 +00:00
Michaël Zasso and Joyee Cheung
45287a975f
src: migrate from deprecated xxxV2 APIs
...
- Set/GetPrototype
- Holder
Co-Authored-by: Joyee Cheung <joyeec9h3@gmail.com >
Signed-Off-By: Michaël Zasso <targos@protonmail.com >
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65161
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
2026-10-04 22:38:19 +02:00
avivkeller
a8f2bf007e
fs: implement glob natively
...
Signed-off-by: avivkeller <me@aviv.sh >
PR-URL: https://github.com/nodejs/node/pull/65392
Refs: https://openjs-foundation.slack.com/archives/C019Y2T6STH/p1787069174254509
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2026-09-11 13:15:27 -04:00
Filip Skokan
fd6682c871
lib: fix shared buffer growability validation
...
Use the intrinsic growable getter instead of buffer.growable so
shadowed properties cannot bypass validation or reject fixed buffers.
Signed-off-by: Filip Skokan <panva.ip@gmail.com >
Assisted-by: GitHub Copilot
PR-URL: https://github.com/nodejs/node/pull/65845
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-09-09 13:57:36 +00:00
James M Snell
8fb89abb8d
src,lib: add util.markPromiseAsHandled
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/65805
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2026-09-07 11:42:09 +00:00
James M Snell
cf91d181fb
quic: complete the internal implementation of QUIC
...
Signed-off-by: James M Snell <jasnell@gmail.com >
Assisted-by: Opencode:Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/62876
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2026-05-05 19:16:19 -07:00
gahaas
49c2b4b7cf
src: replace uses of deprecated v8::External APIs
...
PR-URL: https://github.com/nodejs/node/pull/61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2026-04-24 18:01:36 +02:00
Igor Sheludko
8aea917381
src: stop using v8::PropertyCallbackInfo<T>::This()
...
Refs: https://github.com/nodejs/node/issues/60616
PR-URL: https://github.com/nodejs/node/pull/61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2026-04-24 18:01:35 +02:00
Ryuhei Shima
74c3658465
build: enable -DV8_ENABLE_CHECKS flag
...
Fixes: https://github.com/nodejs/node/issues/61301
PR-URL: https://github.com/nodejs/node/pull/61327
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2026-01-28 04:17:08 +00:00
Chengzhong Wu
32ea48d749
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 >
2025-12-10 13:59:35 +00:00
Renegade334
48d0cd7fdc
src: add internal binding for constructing SharedArrayBuffers
...
PR-URL: https://github.com/nodejs/node/pull/60497
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-11-03 13:23:20 +00:00
Sohyeon Kim
4d1dece375
src: replace Environment::GetCurrent with args.GetIsolate
...
PR-URL: https://github.com/nodejs/node/pull/60256
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
2025-10-18 07:56:36 +00:00
Moonki Choi
01bc7286fb
src: remove unnecessary Environment::GetCurrent() calls
...
PR-URL: https://github.com/nodejs/node/pull/59814
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2025-09-11 06:45:38 +00:00
James M Snell
8ec29f24fc
src: use DictionaryTemplate for node_url_pattern
...
Improved API and better performance:
```
url/urlpattern-parse.js n=100000 ... *** 11.59 % ±0.96% ±1.28% ±1.66%
url/urlpattern-parse.js n=100000 ... *** 9.28 % ±0.94% ±1.25% ±1.63%
url/urlpattern-parse.js n=100000 ... *** 6.97 % ±0.97% ±1.29% ±1.70%
url/urlpattern-parse.js n=100000 ... *** 7.56 % ±0.92% ±1.22% ±1.59%
url/urlpattern-test.js n=100000 ... *** 2.84 % ±1.50% ±2.00% ±2.61%
url/urlpattern-test.js n=100000 ... *** 4.13 % ±2.14% ±2.84% ±3.70%
url/urlpattern-test.js n=100000 ... *** 4.76 % ±1.43% ±1.91% ±2.49%
url/urlpattern-test.js n=100000 ... *** 4.44 % ±1.26% ±1.68% ±2.19%
```
PR-URL: https://github.com/nodejs/node/pull/59802
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-09-10 05:34:54 +00:00
René
f64b0b3478
src: simplify adding fast APIs to ExternalReferenceRegistry
...
PR-URL: https://github.com/nodejs/node/pull/58896
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-07-04 13:32:13 +00:00
Aditi
faada65d16
src: add FromV8Value<T>() for integral and enum types
...
Add a template utility method FromV8Value<T>() to replace the
repetitive static_cast<...>(value.As<>()‑>Value()) pattern.
It also additionally adds compile‑time range checks for
integers.
Refs: https://github.com/nodejs/node/pull/57146#discussion_r1963799600
PR-URL: https://github.com/nodejs/node/pull/57931
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-06-24 04:16:09 +00:00
Wuli Zuo
367d5939e4
src: change DCHECK to CHECK
...
PR-URL: https://github.com/nodejs/node/pull/57948
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-04-22 14:45:49 +00:00
Antoine du Hamel
559d481924
src: fix typo in comment
...
PR-URL: https://github.com/nodejs/node/pull/57291
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2025-03-05 00:58:31 +10:30
James M Snell
e03af77418
src: improve error handling in buffer and dotenv
...
Replacing ToLocalChecked()
PR-URL: https://github.com/nodejs/node/pull/57189
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2025-02-25 16:41:10 -08:00
Chengzhong Wu
4e1f0ccb4d
src: fix crash when lazy getter is invoked in a vm context
...
V8 should invoke native functions in their creation context,
preventing dynamic context by the caller. However, the lazy getter has
no JavaScript function representation and has no creation context. It
is not invoked in the original creation context. Fix the null realm by
retrieving the creation context via `this` argument.
PR-URL: https://github.com/nodejs/node/pull/57168
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-02-23 14:40:33 +00:00
Antoine du Hamel
2086877e81
src: port defineLazyProperties to native code
...
This allows us to have getters not observable from JS side.
PR-URL: https://github.com/nodejs/node/pull/57081
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-02-18 21:23:01 +00:00
Chengzhong Wu
1238f0afba
util: rename CallSite.column to columnNumber
...
Align the property names `lineNumber` and `columnNumber`.
PR-URL: https://github.com/nodejs/node/pull/56584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-01-15 13:28:53 +00:00
Chengzhong Wu
af89b537ac
util: expose CallSite.scriptId
...
The `scriptId` is essential to construct chrome devtools protocol
structs like `Network.Initiator`, allowing inspectors to associate
a `CallSite` with a unique script.
PR-URL: https://github.com/nodejs/node/pull/56551
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-13 12:30:19 +00:00
Chengzhong Wu
68dc15e400
util: fix util.getCallSites plurality
...
`util.getCallSite` returns an array of call site objects. Rename the
function to reflect that it returns a given count of frames captured
as an array of call site object.
Renames the first parameter `frames` to be `frameCount` to indicate
that it specifies the count of returned call sites.
PR-URL: https://github.com/nodejs/node/pull/55626
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-11-02 15:24:56 +00:00
Joyee Cheung
14353387eb
src: implement IsInsideNodeModules() in C++
...
This previously compiles a script and run it in a new context
to avoid global pollution, which is more complex than necessary
and can be too slow for it to be reused in other cases. The
new implementation just checks the frames in C++ which is safe
from global pollution, faster and simpler.
The previous implementation also had a bug when the call site
is in a ESM, because ESM have URLs as their script names,
which don't start with '/' or '\' and will be skipped. The new
implementation removes the skipping to fix it for ESM.
PR-URL: https://github.com/nodejs/node/pull/55286
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-10-08 10:19:46 +00:00
RafaelGSS
18536d95e2
src: apply getCallSite optimization
...
PR-URL: https://github.com/nodejs/node/pull/55174
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-10-02 20:51:49 -03: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
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
Colin Ihrig
3c5764a0e2
test_runner: handle undefined test locations
...
This commit updates the built in reporters to check for the
documented case of a test's location being undefined.
As a drive by fix, the C++ code for computing the test location
now returns undefined if the script location is empty. This lets
tests run inside of eval().
PR-URL: https://github.com/nodejs/node/pull/52036
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-03-12 18:16:28 +00:00
Yagiz Nizipli
0056147a87
src: add process.loadEnvFile and util.parseEnv
...
PR-URL: https://github.com/nodejs/node/pull/51476
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-01-23 18:46:26 +00:00
Yagiz Nizipli
01dae5f877
lib,src: replace toUSVString with toWellFormed()
...
PR-URL: https://github.com/nodejs/node/pull/47342
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-11-29 16:00:57 +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
89dd09310e
src: serialize both BaseObject slots
...
We previously only return startup data for the first slot for
BaseObjects because we can already serialize all the necessary
information in one go, but slots that do not get special startup
data would be serialized verbatim which means that the pointer
addresses are going to be part of the snapshot blob, resulting
in indeterminism.
This patch updates the serialization routines and capture information
for both of the two slots - the first slot with type information
and memory management type (which we can use in the future for
cppgc-managed objects) and the second slot with data about the
object itself. This way the embeedder slots can be serialized
in a reproducible manner in the snapshot.
PR-URL: https://github.com/nodejs/node/pull/48996
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-08-15 18:32:14 +00:00
Jungku Lee
82e4ca109e
src: remove redundant code for uv_handle_type
...
PR-URL: https://github.com/nodejs/node/pull/49061
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-08-12 22:16:35 +00:00
cjihrig
4e61c22699
test_runner: expose location of tests
...
This commit adds each test's line and column number to the reporter
output. This will aid in debugging test suite failures when error
stacks are not helpful, test suites are large, or tests have the
same name. This data is also exposed on the spec reporter.
This commit also replaces the filename that was previously being
reported, with the filename where the test actually exists. These
are normally correct, but could be wrong if tests were run from
a file other than the user's entrypoint.
PR-URL: https://github.com/nodejs/node/pull/48975
Fixes: https://github.com/nodejs/node/issues/48457
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-08-11 09:12:49 -04:00
Chengzhong Wu
38dee8a1c0
src: distinguish HTML transferable and cloneable
...
The HTML structured serialize algorithm treats transferable and
serializable as two different bits. A web platform interface can be
both transferable and serializable.
Splits BaseObject::TransferMode to be able to compose the two bits
and distinguishes the transferable and cloneable.
PR-URL: https://github.com/nodejs/node/pull/47956
Refs: https://github.com/v8/v8/commit/cf13b9b46572a9824d2d632abdd48c56161ace02
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2023-07-07 17:00:00 +00:00
Yagiz Nizipli
d2dfdd654e
src: add V8 fast api to guessHandleType
...
PR-URL: https://github.com/nodejs/node/pull/48349
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-06-15 19:21:50 +00:00
Yagiz Nizipli
5613e223d5
src: return uint32 for guessHandleType
...
PR-URL: https://github.com/nodejs/node/pull/48349
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-06-15 19:21:49 +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
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
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
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
Chengzhong Wu
ca07abab53
src: per-realm binding data
...
Binding data is inherited from BaseObject and created in a specific
realm. They need to be tracked on a per-realm basis so that they can
be released properly when a realm is disposed.
PR-URL: https://github.com/nodejs/node/pull/46556
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-02-21 22:43:25 +00:00
theanarkh
d579bc16b3
diagnostics_channel: fix diagnostics channel memory leak
...
PR-URL: https://github.com/nodejs/node/pull/45633
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-11-29 10:58:43 +00:00
legendecas
71ff89f929
src: rename internal module declaration as internal bindings
...
This is a continuation of the name reification on the internal bindings.
Renames NODE_MODULE_CONTEXT_AWARE_INTERNAL and
NODE_MODULE_EXTERNAL_REFERENCE to NODE_BINDING_CONTEXT_AWARE_INTERNAL
and NODE_BINDING_EXTERNAL_REFERENCE respectively.
PR-URL: https://github.com/nodejs/node/pull/45551
Refs: https://github.com/nodejs/node/issues/44036
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-11-29 00:23:08 +08:00
Yagiz Nizipli
9a8d82b99f
src: add internal isArrayBufferDetached
...
PR-URL: https://github.com/nodejs/node/pull/45568
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2022-11-27 03:14:57 +00:00
Daeyeon Jeong
be9cd3ecb0
src,lib: group properties used as constants from util binding
...
Properties used as constants in `util` internal binding are
scattered. This suggests using an object holding all of them
for better maintenance.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45539
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2022-11-24 02:09:29 +00:00
Joyee Cheung
066e77ae8d
util: use private symbols in JS land directly
...
Instead of calling into C++ to use the private symbols, use an
ObjectTemplate to create an object that holds the symbols and
use them directly from JS land.
PR-URL: https://github.com/nodejs/node/pull/45379
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-17 18:54:01 +01:00
Daeyeon Jeong
7b1e153530
src: simplify exit code accesses
...
This simplifies getting the exit code which is set through
`process.exitCode` by removing manually reading the JS property
from the native side.
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45125
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2022-11-10 01:09:18 +00:00
Joyee Cheung
d70aab663c
src: support WeakReference in snapshot
...
Move util::WeakReference to a separate header and implement
{de}serialization for it to be snapshotable.
PR-URL: https://github.com/nodejs/node/pull/44193
Refs: https://github.com/nodejs/node/issues/44014
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-08-19 12:53:29 +08:00