diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/handle_wrap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 8ed6b2948d..888640e949 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -72,11 +72,11 @@ void HandleWrap::Close(Local<Value> close_callback) { if (state_ != kInitialized) return; - CHECK_EQ(false, persistent().IsEmpty()); uv_close(handle_, OnClose); state_ = kClosing; - if (!close_callback.IsEmpty() && close_callback->IsFunction()) { + if (!close_callback.IsEmpty() && close_callback->IsFunction() && + !persistent().IsEmpty()) { object()->Set(env()->context(), env()->handle_onclose_symbol(), close_callback).Check(); |