summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-05-09 18:32:59 +0200
committerAnna Henningsen <anna@addaleax.net>2018-05-14 18:18:16 +0200
commit00f395db45f20c4fd2b8ea48a6b97b5b72494c4c (patch)
tree15a55afd8ceb5bf6a7356d4faee1ac193b83e7b9 /src
parent7b39503b4a620f2703564fcefb82d98df78dd039 (diff)
downloadandroid-node-v8-00f395db45f20c4fd2b8ea48a6b97b5b72494c4c.tar.gz
android-node-v8-00f395db45f20c4fd2b8ea48a6b97b5b72494c4c.tar.bz2
android-node-v8-00f395db45f20c4fd2b8ea48a6b97b5b72494c4c.zip
src: make `AsyncResource` destructor virtual
`AsyncResource` is intended to be a base class, and since we don’t know what API consumers will do with it in their own code, it’s good practice to make its destructor virtual. This should not be ABI-breaking since all class methods are inline. PR-URL: https://github.com/nodejs/node/pull/20633 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h
index 23e2e9995c..5d6aa8dadf 100644
--- a/src/node.h
+++ b/src/node.h
@@ -712,7 +712,7 @@ class AsyncResource {
trigger_async_id);
}
- ~AsyncResource() {
+ virtual ~AsyncResource() {
EmitAsyncDestroy(isolate_, async_context_);
}