diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-07-22 09:12:19 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-07-27 15:51:19 +0800 |
commit | 28a3e280eca67f906ae3b47730fe21a389b7bccb (patch) | |
tree | 18a051e45196e6d8a677dd9122470d285e3e34aa /src/node_messaging.h | |
parent | 48e5b350b3dd236353e3e8e1196a09f5c5bcda77 (diff) | |
download | android-node-v8-28a3e280eca67f906ae3b47730fe21a389b7bccb.tar.gz android-node-v8-28a3e280eca67f906ae3b47730fe21a389b7bccb.tar.bz2 android-node-v8-28a3e280eca67f906ae3b47730fe21a389b7bccb.zip |
src: add proper MemoryInfoName to wrappers
- Use camel case names for memory retainers inherited from AsyncWrap
instead of their provider names (which are all in upper case)
- Assign class names to wraps so that they appear in the heap snapshot
as nodes with class names as node names. Previously some nodes are
named with reference names, which are supposed to be edge names
instead.
PR-URL: https://github.com/nodejs/node/pull/21939
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/node_messaging.h')
-rw-r--r-- | src/node_messaging.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_messaging.h b/src/node_messaging.h index da10300aed..b7fd392ccc 100644 --- a/src/node_messaging.h +++ b/src/node_messaging.h @@ -57,6 +57,8 @@ class Message : public MemoryRetainer { void MemoryInfo(MemoryTracker* tracker) const override; + ADD_MEMORY_INFO_NAME(Message) + private: MallocedBuffer<char> main_message_buf_; std::vector<MallocedBuffer<char>> array_buffer_contents_; @@ -98,6 +100,8 @@ class MessagePortData : public MemoryRetainer { void MemoryInfo(MemoryTracker* tracker) const override; + ADD_MEMORY_INFO_NAME(MessagePortData) + private: // After disentangling this message port, the owner handle (if any) // is asynchronously triggered, so that it can close down naturally. @@ -187,6 +191,8 @@ class MessagePort : public HandleWrap { tracker->TrackField("data", data_); } + ADD_MEMORY_INFO_NAME(MessagePort) + private: void OnClose() override; void OnMessage(); |