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:
authorTrevor Norris <trev.norris@gmail.com>2015-06-04 00:31:33 +0300
committerTrevor Norris <trev.norris@gmail.com>2015-06-17 21:58:39 +0300
commite56758a5e0ff6822e3105c0e69eb49accc42393c (patch)
tree25cc1ce181450f78f4dbce2a8d4489752c35cf7b /src/tls_wrap.h
parent5d0cee46bb90084e6dcd584deb5bc893862ce3b3 (diff)
async-wrap: add provider id and object info cb
Re-add the wrapper class id to AsyncWrap instances so they can be tracked directly in a heapdump. Previously the class id was given without setting the heap dump wrapper class info provider. Causing a segfault when a heapdump was taken. This has been added, and the label_ set to the given provider name so each instance can be identified. The id will not be set of the passed object has no internal field count. As the class pointer cannot be retrieved from the object. In order to properly report the allocated size of each class, the new pure virtual method self_size() has been introduces. PR-URL: https://github.com/nodejs/io.js/pull/1896 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/tls_wrap.h')
-rw-r--r--src/tls_wrap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tls_wrap.h b/src/tls_wrap.h
index a3044751908..b906d78de1f 100644
--- a/src/tls_wrap.h
+++ b/src/tls_wrap.h
@@ -50,6 +50,8 @@ class TLSWrap : public crypto::SSLWrap<TLSWrap>,
void NewSessionDoneCb();
+ size_t self_size() const override { return sizeof(*this); }
+
protected:
static const int kClearOutChunkSize = 1024;