GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: add proper MemoryInfoName to wrappers · nodejs/node@80b5c91

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • async_wrap.h
    • base_object.h
    • cares_wrap.cc
    • connect_wrap.h
    • fs_event_wrap.cc
    • inspector_js_api.cc
    • js_stream.h
    • module_wrap.h
    • node_contextify.cc
    • node_crypto.h
    • node_crypto_bio.h
    • node_file.h
    • node_http2.h
    • node_http_parser.cc
    • node_i18n.cc
    • node_messaging.h
    • node_serdes.cc
    • node_stat_watcher.h
    • node_trace_events.cc
    • node_worker.h
    • node_zlib.cc
    • pipe_wrap.h
    • process_wrap.cc
    • sharedarraybuffer_metadata.cc
    • signal_wrap.cc
    • stream_base.h
    • stream_pipe.h
    • tcp_wrap.h
    • tls_wrap.h
    • tty_wrap.h
    • udp_wrap.cc
    • udp_wrap.h
  • test/parallel
    • test-heapdump-dns.js
    • test-heapdump-fs-promise.js
    • test-heapdump-http2.js
    • test-heapdump-inspector.js
    • test-heapdump-tls.js
    • test-heapdump-worker.js
    • test-heapdump-zlib.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/async_wrap.h‎

Copy file name to clipboardExpand all lines: src/async_wrap.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class AsyncWrap : public BaseObject {
175175
v8::Local<v8::Value>* argv);
176176

177177
virtual std::string diagnostic_name() const;
178-
std::string MemoryInfoName() const override;
178+
virtual std::string MemoryInfoName() const;
179179

180180
static void WeakCallback(const v8::WeakCallbackInfo<DestroyParam> &info);
181181

Collapse file

‎src/base_object.h‎

Copy file name to clipboardExpand all lines: src/base_object.h
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ namespace node {
3333

3434
class Environment;
3535

36+
#define ADD_MEMORY_INFO_NAME(name) \
37+
std::string MemoryInfoName() const override { \
38+
return #name; \
39+
}
40+
3641
class BaseObject : public MemoryRetainer {
3742
public:
3843
// Associates this object with `object`. It uses the 0th internal field for
Collapse file

‎src/cares_wrap.cc‎

Copy file name to clipboardExpand all lines: src/cares_wrap.cc
+32-1Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ struct node_ares_task : public MemoryRetainer {
127127
uv_poll_t poll_watcher;
128128

129129
void MemoryInfo(MemoryTracker* tracker) const override;
130+
ADD_MEMORY_INFO_NAME(node_ares_task)
130131
};
131132

132133
struct TaskHash {
@@ -173,9 +174,11 @@ class ChannelWrap : public AsyncWrap {
173174
tracker->TrackThis(this);
174175
if (timer_handle_ != nullptr)
175176
tracker->TrackFieldWithSize("timer handle", sizeof(*timer_handle_));
176-
tracker->TrackField("task list", task_list_);
177+
tracker->TrackField("node_ares_task_list", task_list_);
177178
}
178179

180+
ADD_MEMORY_INFO_NAME(ChannelWrap)
181+
179182
static void AresTimeout(uv_timer_t* handle);
180183

181184
private:
@@ -225,6 +228,8 @@ class GetAddrInfoReqWrap : public ReqWrap<uv_getaddrinfo_t> {
225228
tracker->TrackThis(this);
226229
}
227230

231+
ADD_MEMORY_INFO_NAME(GetAddrInfoReqWrap)
232+
228233
bool verbatim() const { return verbatim_; }
229234

230235
private:
@@ -246,6 +251,8 @@ class GetNameInfoReqWrap : public ReqWrap<uv_getnameinfo_t> {
246251
void MemoryInfo(MemoryTracker* tracker) const override {
247252
tracker->TrackThis(this);
248253
}
254+
255+
ADD_MEMORY_INFO_NAME(GetNameInfoReqWrap)
249256
};
250257

251258
GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env,
@@ -1178,6 +1185,8 @@ class QueryAnyWrap: public QueryWrap {
11781185
tracker->TrackThis(this);
11791186
}
11801187

1188+
ADD_MEMORY_INFO_NAME(QueryAnyWrap)
1189+
11811190
protected:
11821191
void Parse(unsigned char* buf, int len) override {
11831192
HandleScope handle_scope(env()->isolate());
@@ -1357,6 +1366,8 @@ class QueryAWrap: public QueryWrap {
13571366
tracker->TrackThis(this);
13581367
}
13591368

1369+
ADD_MEMORY_INFO_NAME(QueryAWrap)
1370+
13601371
protected:
13611372
void Parse(unsigned char* buf, int len) override {
13621373
HandleScope handle_scope(env()->isolate());
@@ -1403,6 +1414,8 @@ class QueryAaaaWrap: public QueryWrap {
14031414
tracker->TrackThis(this);
14041415
}
14051416

1417+
ADD_MEMORY_INFO_NAME(QueryAaaaWrap)
1418+
14061419
protected:
14071420
void Parse(unsigned char* buf, int len) override {
14081421
HandleScope handle_scope(env()->isolate());
@@ -1449,6 +1462,8 @@ class QueryCnameWrap: public QueryWrap {
14491462
tracker->TrackThis(this);
14501463
}
14511464

1465+
ADD_MEMORY_INFO_NAME(QueryCnameWrap)
1466+
14521467
protected:
14531468
void Parse(unsigned char* buf, int len) override {
14541469
HandleScope handle_scope(env()->isolate());
@@ -1482,6 +1497,8 @@ class QueryMxWrap: public QueryWrap {
14821497
tracker->TrackThis(this);
14831498
}
14841499

1500+
ADD_MEMORY_INFO_NAME(QueryMxWrap)
1501+
14851502
protected:
14861503
void Parse(unsigned char* buf, int len) override {
14871504
HandleScope handle_scope(env()->isolate());
@@ -1515,6 +1532,8 @@ class QueryNsWrap: public QueryWrap {
15151532
tracker->TrackThis(this);
15161533
}
15171534

1535+
ADD_MEMORY_INFO_NAME(QueryNsWrap)
1536+
15181537
protected:
15191538
void Parse(unsigned char* buf, int len) override {
15201539
HandleScope handle_scope(env()->isolate());
@@ -1548,6 +1567,8 @@ class QueryTxtWrap: public QueryWrap {
15481567
tracker->TrackThis(this);
15491568
}
15501569

1570+
ADD_MEMORY_INFO_NAME(QueryTxtWrap)
1571+
15511572
protected:
15521573
void Parse(unsigned char* buf, int len) override {
15531574
HandleScope handle_scope(env()->isolate());
@@ -1580,6 +1601,8 @@ class QuerySrvWrap: public QueryWrap {
15801601
tracker->TrackThis(this);
15811602
}
15821603

1604+
ADD_MEMORY_INFO_NAME(QuerySrvWrap)
1605+
15831606
protected:
15841607
void Parse(unsigned char* buf, int len) override {
15851608
HandleScope handle_scope(env()->isolate());
@@ -1611,6 +1634,8 @@ class QueryPtrWrap: public QueryWrap {
16111634
tracker->TrackThis(this);
16121635
}
16131636

1637+
ADD_MEMORY_INFO_NAME(QueryPtrWrap)
1638+
16141639
protected:
16151640
void Parse(unsigned char* buf, int len) override {
16161641
HandleScope handle_scope(env()->isolate());
@@ -1644,6 +1669,8 @@ class QueryNaptrWrap: public QueryWrap {
16441669
tracker->TrackThis(this);
16451670
}
16461671

1672+
ADD_MEMORY_INFO_NAME(QueryNaptrWrap)
1673+
16471674
protected:
16481675
void Parse(unsigned char* buf, int len) override {
16491676
HandleScope handle_scope(env()->isolate());
@@ -1676,6 +1703,8 @@ class QuerySoaWrap: public QueryWrap {
16761703
tracker->TrackThis(this);
16771704
}
16781705

1706+
ADD_MEMORY_INFO_NAME(QuerySoaWrap)
1707+
16791708
protected:
16801709
void Parse(unsigned char* buf, int len) override {
16811710
HandleScope handle_scope(env()->isolate());
@@ -1757,6 +1786,8 @@ class GetHostByAddrWrap: public QueryWrap {
17571786
tracker->TrackThis(this);
17581787
}
17591788

1789+
ADD_MEMORY_INFO_NAME(GetHostByAddrWrap)
1790+
17601791
protected:
17611792
void Parse(struct hostent* host) override {
17621793
HandleScope handle_scope(env()->isolate());
Collapse file

‎src/connect_wrap.h‎

Copy file name to clipboardExpand all lines: src/connect_wrap.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class ConnectWrap : public ReqWrap<uv_connect_t> {
1919
void MemoryInfo(MemoryTracker* tracker) const override {
2020
tracker->TrackThis(this);
2121
}
22+
23+
ADD_MEMORY_INFO_NAME(ConnectWrap)
2224
};
2325

2426
} // namespace node
Collapse file

‎src/fs_event_wrap.cc‎

Copy file name to clipboardExpand all lines: src/fs_event_wrap.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ class FSEventWrap: public HandleWrap {
6161
tracker->TrackThis(this);
6262
}
6363

64+
ADD_MEMORY_INFO_NAME(FSEventWrap)
65+
6466
private:
6567
static const encoding kDefaultEncoding = UTF8;
6668

Collapse file

‎src/inspector_js_api.cc‎

Copy file name to clipboardExpand all lines: src/inspector_js_api.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ class JSBindingsConnection : public AsyncWrap {
109109
tracker->TrackFieldWithSize("session", sizeof(*session_));
110110
}
111111

112+
ADD_MEMORY_INFO_NAME(JSBindingsConnection)
113+
112114
private:
113115
std::unique_ptr<InspectorSession> session_;
114116
Persistent<Function> callback_;
Collapse file

‎src/js_stream.h‎

Copy file name to clipboardExpand all lines: src/js_stream.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class JSStream : public AsyncWrap, public StreamBase {
3131
tracker->TrackThis(this);
3232
}
3333

34+
ADD_MEMORY_INFO_NAME(JSStream)
35+
3436
protected:
3537
JSStream(Environment* env, v8::Local<v8::Object> obj);
3638

Collapse file

‎src/module_wrap.h‎

Copy file name to clipboardExpand all lines: src/module_wrap.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class ModuleWrap : public BaseObject {
3939
tracker->TrackField("resolve_cache", resolve_cache_);
4040
}
4141

42+
ADD_MEMORY_INFO_NAME(ModuleWrap)
43+
4244
private:
4345
ModuleWrap(Environment* env,
4446
v8::Local<v8::Object> object,
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ class ContextifyScript : public BaseObject {
591591
tracker->TrackThis(this);
592592
}
593593

594+
ADD_MEMORY_INFO_NAME(ContextifyScript)
595+
594596
public:
595597
static void Init(Environment* env, Local<Object> target) {
596598
HandleScope scope(env->isolate());
Collapse file

‎src/node_crypto.h‎

Copy file name to clipboardExpand all lines: src/node_crypto.h
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ class SecureContext : public BaseObject {
109109
tracker->TrackThis(this);
110110
}
111111

112+
ADD_MEMORY_INFO_NAME(SecureContext)
113+
112114
SSLCtxPointer ctx_;
113115
X509Pointer cert_;
114116
X509Pointer issuer_;
@@ -345,6 +347,8 @@ class CipherBase : public BaseObject {
345347
tracker->TrackThis(this);
346348
}
347349

350+
ADD_MEMORY_INFO_NAME(CipherBase)
351+
348352
protected:
349353
enum CipherKind {
350354
kCipher,
@@ -419,6 +423,8 @@ class Hmac : public BaseObject {
419423
tracker->TrackThis(this);
420424
}
421425

426+
ADD_MEMORY_INFO_NAME(Hmac)
427+
422428
protected:
423429
void HmacInit(const char* hash_type, const char* key, int key_len);
424430
bool HmacUpdate(const char* data, int len);
@@ -446,6 +452,8 @@ class Hash : public BaseObject {
446452
tracker->TrackThis(this);
447453
}
448454

455+
ADD_MEMORY_INFO_NAME(Hash)
456+
449457
bool HashInit(const char* hash_type);
450458
bool HashUpdate(const char* data, int len);
451459

@@ -489,6 +497,8 @@ class SignBase : public BaseObject {
489497
tracker->TrackThis(this);
490498
}
491499

500+
ADD_MEMORY_INFO_NAME(SignBase)
501+
492502
protected:
493503
void CheckThrow(Error error);
494504

@@ -605,6 +615,8 @@ class DiffieHellman : public BaseObject {
605615
tracker->TrackThis(this);
606616
}
607617

618+
ADD_MEMORY_INFO_NAME(DiffieHellman)
619+
608620
private:
609621
static void GetField(const v8::FunctionCallbackInfo<v8::Value>& args,
610622
const BIGNUM* (*get_field)(const DH*),
@@ -634,6 +646,8 @@ class ECDH : public BaseObject {
634646
tracker->TrackThis(this);
635647
}
636648

649+
ADD_MEMORY_INFO_NAME(ECDH)
650+
637651
protected:
638652
ECDH(Environment* env, v8::Local<v8::Object> wrap, ECKeyPointer&& key)
639653
: BaseObject(env, wrap),

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.