Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2018-02-21 17:24:18 +0300
committerBen Noordhuis <info@bnoordhuis.nl>2018-02-21 17:24:18 +0300
commitd4024815b7d55005c3ec25c74cf647f7eba1d5cc (patch)
treeb86653a53494704be52a30b175886bf9ed054cd4 /src/handle_wrap.cc
parent992703f2b50f6b3483e9b930737d177b9e01256d (diff)
src: remove unnecessary Reset() calls
The previous commit made persistent handles auto-reset on destruction. This commit removes the Reset() calls that are now no longer necessary. PR-URL: https://github.com/nodejs/node/pull/18656 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r--src/handle_wrap.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index 7dcafa2ce6e..a3b0209eb31 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -98,11 +98,6 @@ HandleWrap::HandleWrap(Environment* env,
}
-HandleWrap::~HandleWrap() {
- CHECK(persistent().IsEmpty());
-}
-
-
void HandleWrap::OnClose(uv_handle_t* handle) {
HandleWrap* wrap = static_cast<HandleWrap*>(handle->data);
Environment* env = wrap->env();
@@ -120,7 +115,6 @@ void HandleWrap::OnClose(uv_handle_t* handle) {
wrap->MakeCallback(env->onclose_string(), 0, nullptr);
ClearWrap(wrap->object());
- wrap->persistent().Reset();
delete wrap;
}