Skip to content

Commit f874855

Browse files
committed
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.
1 parent 5ab87db commit f874855

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/async-wrap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class AsyncWrap : public BaseObject {
6161
v8::Handle<v8::Object> object,
6262
ProviderType provider);
6363

64-
inline ~AsyncWrap() = default;
64+
inline virtual ~AsyncWrap() = default;
6565

6666
inline bool has_async_listener();
6767

0 commit comments

Comments
 (0)