Browse Source

Add IsNearDeath assertion to ObjectWrap destructor

v0.7.4-release
Ryan 16 years ago
parent
commit
edbae656d6
  1. 1
      src/object_wrap.h

1
src/object_wrap.h

@ -15,6 +15,7 @@ class ObjectWrap {
virtual ~ObjectWrap ( ) { virtual ~ObjectWrap ( ) {
if (!handle_.IsEmpty()) { if (!handle_.IsEmpty()) {
assert(handle_.IsNearDeath());
handle_->SetInternalField(0, v8::Undefined()); handle_->SetInternalField(0, v8::Undefined());
handle_.Dispose(); handle_.Dispose();
handle_.Clear(); handle_.Clear();

Loading…
Cancel
Save