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:
authorBen Noordhuis <info@bnoordhuis.nl>2013-09-06 22:59:27 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-09-06 23:19:55 +0400
commitb89b97ddedc5b659e5592917d4789a31723ceca3 (patch)
treefc69b629256d56db417a547b4f7909a12ef46bca /src/node_stat_watcher.h
parent756b6222956b5d25b2e7db81f4e79033a3a4d20e (diff)
src: fix multi-base class ObjectWrap::Unwrap<T>()
Fix pointer unwrapping when T is a class with more than one base class. Before this commit, the wrapped void* pointer was cast directly to T* without going through ObjectWrap* first, possibly leading to a class instance pointer that points to the wrong vtable. This change required some cleanup in various files; some classes used private rather than public inheritance, others didn't derive from ObjectWrap at all... Fixes #6188.
Diffstat (limited to 'src/node_stat_watcher.h')
-rw-r--r--src/node_stat_watcher.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h
index fd38c8b42ff..9d5e1fd2826 100644
--- a/src/node_stat_watcher.h
+++ b/src/node_stat_watcher.h
@@ -30,7 +30,7 @@
namespace node {
-class StatWatcher : ObjectWrap {
+class StatWatcher : public ObjectWrap {
public:
static void Initialize(v8::Handle<v8::Object> target);
inline Environment* env() const { return env_; }