Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-07-22 04:12:19 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2018-07-27 10:51:19 +0300
commit28a3e280eca67f906ae3b47730fe21a389b7bccb (patch)
tree18a051e45196e6d8a677dd9122470d285e3e34aa /src/node_file.h
parent48e5b350b3dd236353e3e8e1196a09f5c5bcda77 (diff)
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_file.h')
-rw-r--r--src/node_file.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/node_file.h b/src/node_file.h
index 141d1d42d74..73202d9c446 100644
--- a/src/node_file.h
+++ b/src/node_file.h
@@ -99,6 +99,8 @@ class FSReqWrap : public FSReqBase {
tracker->TrackThis(this);
}
+ ADD_MEMORY_INFO_NAME(FSReqWrap)
+
private:
DISALLOW_COPY_AND_ASSIGN(FSReqWrap);
};
@@ -162,6 +164,8 @@ class FSReqPromise : public FSReqBase {
tracker->TrackField("stats_field_array", stats_field_array_);
}
+ ADD_MEMORY_INFO_NAME(FSReqPromise)
+
private:
bool finished_ = false;
AliasedBuffer<NativeT, V8T> stats_field_array_;
@@ -201,6 +205,8 @@ class FileHandleReadWrap : public ReqWrap<uv_fs_t> {
tracker->TrackField("buffer", buffer_);
}
+ ADD_MEMORY_INFO_NAME(FileHandleReadWrap)
+
private:
FileHandle* file_handle_;
uv_buf_t buffer_;
@@ -252,6 +258,8 @@ class FileHandle : public AsyncWrap, public StreamBase {
tracker->TrackField("current_read", current_read_);
}
+ ADD_MEMORY_INFO_NAME(FileHandle)
+
private:
// Synchronous close that emits a warning
void Close();
@@ -284,6 +292,8 @@ class FileHandle : public AsyncWrap, public StreamBase {
tracker->TrackField("ref", ref_);
}
+ ADD_MEMORY_INFO_NAME(CloseReq)
+
void Resolve();
void Reject(Local<Value> reason);