From b89b97ddedc5b659e5592917d4789a31723ceca3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 6 Sep 2013 20:59:27 +0200 Subject: src: fix multi-base class ObjectWrap::Unwrap() 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. --- src/node_stat_watcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node_stat_watcher.h') 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 target); inline Environment* env() const { return env_; } -- cgit v1.2.3