We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e8df0e commit 935f843Copy full SHA for 935f843
1 file changed
src/node_object_wrap.h
@@ -13,9 +13,12 @@ class ObjectWrap {
13
}
14
15
virtual ~ObjectWrap ( ) {
16
- handle_->SetInternalField(0, v8::Undefined());
17
- handle_.Dispose();
18
- handle_.Clear();
+ if (!handle_.IsEmpty()) {
+ assert(handle_.IsNearDeath());
+ handle_->SetInternalField(0, v8::Undefined());
19
+ handle_.Dispose();
20
+ handle_.Clear();
21
+ }
22
23
24
template <class T>
0 commit comments