diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-09-09 22:29:08 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-05-10 14:15:17 +0200 |
commit | 61fd027096c0416a6e9bbe3ee7b7edb4c180725a (patch) | |
tree | e64998f427bfaa959448f7e28223b9d10f01e5eb /src/req_wrap-inl.h | |
parent | 1db0039c505c6081f1d0d84cc24133ed6659e539 (diff) | |
download | android-node-v8-61fd027096c0416a6e9bbe3ee7b7edb4c180725a.tar.gz android-node-v8-61fd027096c0416a6e9bbe3ee7b7edb4c180725a.tar.bz2 android-node-v8-61fd027096c0416a6e9bbe3ee7b7edb4c180725a.zip |
src: use cleanup hooks to tear down BaseObjects
Clean up after `BaseObject` instances when the `Environment`
is being shut down. This takes care of closing non-libuv resources
like `zlib` instances, which do not require asynchronous shutdown.
Many thanks for Stephen Belanger, Timothy Gu and Alexey Orlenko for
reviewing the original version of this commit in the Ayo.js project.
Refs: https://github.com/ayojs/ayo/pull/88
PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/req_wrap-inl.h')
-rw-r--r-- | src/req_wrap-inl.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/req_wrap-inl.h b/src/req_wrap-inl.h index e3b26c1f5c..7e9e2d9fbb 100644 --- a/src/req_wrap-inl.h +++ b/src/req_wrap-inl.h @@ -26,7 +26,6 @@ ReqWrap<T>::ReqWrap(Environment* env, template <typename T> ReqWrap<T>::~ReqWrap() { - CHECK_EQ(req_.data, this); // Assert that someone has called Dispatched(). CHECK_EQ(false, persistent().IsEmpty()); } |