Add IsNearDeath assertion to ObjectWrap destructor

v0.7.4-release
Ryan 2009-07-16 15:43:03 +02:00
parent 56c785ceae
commit edbae656d6
1 changed files with 1 additions and 0 deletions

View File

@ -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();