mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Add IsNearDeath assertion to ObjectWrap destructor
This commit is contained in:
@@ -15,6 +15,7 @@ class ObjectWrap {
|
||||
|
||||
virtual ~ObjectWrap ( ) {
|
||||
if (!handle_.IsEmpty()) {
|
||||
assert(handle_.IsNearDeath());
|
||||
handle_->SetInternalField(0, v8::Undefined());
|
||||
handle_.Dispose();
|
||||
handle_.Clear();
|
||||
|
||||
Reference in New Issue
Block a user