Browse Source

Allow ObjectWrap destructors before Wrap()

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
935f8437fd
  1. 3
      src/node_object_wrap.h

3
src/node_object_wrap.h

@ -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…
Cancel
Save