mirror of https://github.com/nodejs/node.git
Allow ObjectWrap destructors before Wrap()
parent
9e8df0e836
commit
935f8437fd
|
@ -13,9 +13,12 @@ class ObjectWrap {
|
|||
}
|
||||
|
||||
virtual ~ObjectWrap ( ) {
|
||||
handle_->SetInternalField(0, v8::Undefined());
|
||||
handle_.Dispose();
|
||||
handle_.Clear();
|
||||
if (!handle_.IsEmpty()) {
|
||||
assert(handle_.IsNearDeath());
|
||||
handle_->SetInternalField(0, v8::Undefined());
|
||||
handle_.Dispose();
|
||||
handle_.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
Loading…
Reference in New Issue