Allow ObjectWrap destructors before Wrap()
This commit is contained in:
parent
9e8df0e836
commit
935f8437fd
@ -13,10 +13,13 @@ class ObjectWrap {
|
||||
}
|
||||
|
||||
virtual ~ObjectWrap ( ) {
|
||||
if (!handle_.IsEmpty()) {
|
||||
assert(handle_.IsNearDeath());
|
||||
handle_->SetInternalField(0, v8::Undefined());
|
||||
handle_.Dispose();
|
||||
handle_.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static inline T* Unwrap (v8::Handle<v8::Object> handle)
|
||||
|
Loading…
x
Reference in New Issue
Block a user