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
legendecas
a7e5b413ef
src: split property helpers from node::Environment
...
PR-URL: https://github.com/nodejs/node/pull/44056
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-08-02 00:01:02 +08:00
Kohei Ueno
8d5a3e352c
perf_hooks: fix function wrapped by timerify to work correctly
...
PR-URL: https://github.com/nodejs/node/pull/43330
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-06-12 11:45:00 +02:00
XadillaX
0e561de643
src: move ToUSVString() to node_util.cc
...
Since `toUSVString()` was exposed in `util` as a public API, not only
for internal `url` any more.
PR-URL: https://github.com/nodejs/node/pull/40204
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-09-26 16:57:47 +08:00
James M Snell
f3eb224c83
perf_hooks: complete overhaul of the implementation
...
* Update the user timing implementation to conform to
User Timing Level 3.
* Reimplement user timing and timerify with pure JavaScript
implementations
* Simplify the C++ implementation for gc and http2 perf
* Runtime deprecate additional perf entry properties
in favor of the standard detail argument
* Disable the `buffered` option on PerformanceObserver,
all entries are queued and dispatched on setImmediate.
Only entries with active observers are buffered.
* This does remove the user timing and timerify
trace events. Because the trace_events are still
considered experimental, those can be removed without
a deprecation cycle. They are removed to improve
performance and reduce complexity.
Old: `perf_hooks/usertiming.js n=100000: 92,378.01249733355`
New: perf_hooks/usertiming.js n=100000: 270,393.5280638482`
PR-URL: https://github.com/nodejs/node/pull/37136
Refs: https://github.com/nodejs/diagnostics/issues/464
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-02-22 08:46:11 -08:00
James M Snell
28fe1ef635
src: reduce duplicated boilerplate with new env utility fn
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36536
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-01-03 12:58:09 -08:00
Andrey Pechkurov
1e470510ff
src: fix unused namespace member in node_util
...
PR-URL: https://github.com/nodejs/node/pull/34565
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-31 14:35:55 +02:00
unknown
fe2a7f052f
util: print External address from inspect
...
Fixes: https://github.com/nodejs/node/issues/28250
PR-URL: https://github.com/nodejs/node/pull/34398
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-07-28 14:30:52 +02:00
Joyee Cheung
7a447bcd54
src: snapshot node
...
This runs `lib/internal/bootstrap/node.js` before creating
the builtin snapshot and deserialize the loaders from the
snapshot in deserialization mode.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-18 11:23:21 +08:00
Anna Henningsen
8e12962401
src: handle empty Maybe(Local) in node_util.cc
...
PR-URL: https://github.com/nodejs/node/pull/33867
Refs: https://github.com/nodejs/node/blob/master/src/README.md#checked-conversion
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-06-24 17:54:17 -07:00
Anna Henningsen
8a7201b25f
src: introduce BaseObject base FunctionTemplate
...
PR-URL: https://github.com/nodejs/node/pull/33772
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-06-14 14:53:38 +02:00
Daniel Bevenius
4a20cc937f
src: remove unused using declarations
...
This commit removes the unused using declarations reported by lint-cpp.
PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Christian Clauss <cclauss@me.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2020-05-28 10:02:14 -04:00
James M Snell
0fac393d26
src: improve handling of internal field counting
...
Change suggested by bnoordhuis.
Improve handing of internal field counting by using enums.
Helps protect against future possible breakage if field
indexes are ever changed or added to.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/31960
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-03-02 10:58:36 -08:00
Ruben Bridgewater
fb14ed4c38
src: accept single argument in getProxyDetails
...
This makes sure this function stays backwards compatible in case
it's accessed through the binding directly.
Refs: https://github.com/nodejs/node/pull/29947#issuecomment-562987888
PR-URL: https://github.com/nodejs/node/pull/30858
Refs: https://github.com/nodejs/node/pull/30767
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-12-11 18:49:07 -05:00
cjihrig
f446929923
util: add internal sleep() function
...
PR-URL: https://github.com/nodejs/node/pull/30787
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-12-06 22:02:47 -05:00
Ruben Bridgewater
c430aebe86
util: improve performance inspecting proxies
...
This makes sure we do not retrieve the handler in case it's not
required. This improves the performance a tiny bit for these cases.
PR-URL: https://github.com/nodejs/node/pull/30767
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-12-07 00:38:28 +01:00