diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-10-02 13:03:27 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-10-05 06:11:22 +0300 |
commit | 10436603dc61ffc96340281899366d6afdae7745 (patch) | |
tree | 2806b582ce131fb2c83002e5ca0f3cd24b5c38c0 /src/inspector | |
parent | a8c145807ef5c67e923f1317a91d7111e14aed9f (diff) |
inspector: add virtual destructor to WorkerDelegate
Currently the WorkerDelegate class has a virtual function
but no virtual destructor which means that if delete is called on a
WorkerDelegate pointer to a derived instance, the derived destructor
will not get called.
The following warning is currently being printed when
compiling:
warning: delete called on 'node::inspector::WorkerDelegate' that is
abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
delete __ptr;
^
This commit adds a virtual destructor.
PR-URL: https://github.com/nodejs/node/pull/23215
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/inspector')
-rw-r--r-- | src/inspector/worker_inspector.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/inspector/worker_inspector.h b/src/inspector/worker_inspector.h index e3c96cf62f0..c1d3b8a5711 100644 --- a/src/inspector/worker_inspector.h +++ b/src/inspector/worker_inspector.h @@ -21,6 +21,7 @@ class WorkerDelegate { const std::string& url, bool waiting, std::shared_ptr<MainThreadHandle> worker) = 0; + virtual ~WorkerDelegate() {} }; class WorkerManagerEventHandle { |