From 28a3e280eca67f906ae3b47730fe21a389b7bccb Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sun, 22 Jul 2018 09:12:19 +0800 Subject: src: add proper MemoryInfoName to wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- src/stream_base.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/stream_base.h') diff --git a/src/stream_base.h b/src/stream_base.h index bbb20e52e1..05c2a96236 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -350,6 +350,8 @@ class SimpleShutdownWrap : public ShutdownWrap, public OtherBase { void MemoryInfo(MemoryTracker* tracker) const override { tracker->TrackThis(this); } + + ADD_MEMORY_INFO_NAME(SimpleShutdownWrap) }; template @@ -364,6 +366,9 @@ class SimpleWriteWrap : public WriteWrap, public OtherBase { tracker->TrackThis(this); tracker->TrackFieldWithSize("storage", StorageSize()); } + + + ADD_MEMORY_INFO_NAME(SimpleWriteWrap) }; } // namespace node -- cgit v1.2.3