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_crypto.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_crypto.h')
-rw-r--r-- | src/node_crypto.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h index 7df2660c77..ee069c9cf7 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -109,6 +109,8 @@ class SecureContext : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(SecureContext) + SSLCtxPointer ctx_; X509Pointer cert_; X509Pointer issuer_; @@ -345,6 +347,8 @@ class CipherBase : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(CipherBase) + protected: enum CipherKind { kCipher, @@ -419,6 +423,8 @@ class Hmac : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(Hmac) + protected: void HmacInit(const char* hash_type, const char* key, int key_len); bool HmacUpdate(const char* data, int len); @@ -446,6 +452,8 @@ class Hash : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(Hash) + bool HashInit(const char* hash_type); bool HashUpdate(const char* data, int len); @@ -489,6 +497,8 @@ class SignBase : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(SignBase) + protected: void CheckThrow(Error error); @@ -605,6 +615,8 @@ class DiffieHellman : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(DiffieHellman) + private: static void GetField(const v8::FunctionCallbackInfo<v8::Value>& args, const BIGNUM* (*get_field)(const DH*), @@ -634,6 +646,8 @@ class ECDH : public BaseObject { tracker->TrackThis(this); } + ADD_MEMORY_INFO_NAME(ECDH) + protected: ECDH(Environment* env, v8::Local<v8::Object> wrap, ECKeyPointer&& key) : BaseObject(env, wrap), |