We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ff7954 commit dbf0d6bCopy full SHA for dbf0d6b
src/node_object_wrap.h
@@ -16,6 +16,7 @@ class ObjectWrap {
16
virtual ~ObjectWrap ( ) {
17
if (!handle_.IsEmpty()) {
18
assert(handle_.IsNearDeath());
19
+ handle_.ClearWeak();
20
handle_->SetInternalField(0, v8::Undefined());
21
handle_.Dispose();
22
handle_.Clear();
@@ -82,7 +83,8 @@ class ObjectWrap {
82
83
ObjectWrap *obj = static_cast<ObjectWrap*>(data);
84
assert(value == obj->handle_);
85
assert(!obj->refs_);
- if (value.IsNearDeath()) delete obj;
86
+ assert(value.IsNearDeath());
87
+ delete obj;
88
}
89
};
90
0 commit comments