From f874855d2e899fb3ef9c5b3d67dbe4cc67046117 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 23 Oct 2014 22:04:47 +0200 Subject: [PATCH] src: mark AsyncWrap destructor as virtual Make AsyncWrap::~AsyncWrap() virtual, otherwise it is unsafe to delete a derived class through a pointer to AsyncWrap. Fortunately, we don't do that anywhere right now; this commit is merely a preemptive bug fix. --- src/async-wrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/async-wrap.h b/src/async-wrap.h index a8577984ed0..d345547b34e 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -61,7 +61,7 @@ class AsyncWrap : public BaseObject { v8::Handle object, ProviderType provider); - inline ~AsyncWrap() = default; + inline virtual ~AsyncWrap() = default; inline bool has_async_listener();