| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,6 +16,7 @@ class ObjectWrap { | |||
| 16 | 16 | virtual ~ObjectWrap ( ) { | |
| 17 | 17 | if (!handle_.IsEmpty()) { | |
| 18 | 18 | assert(handle_.IsNearDeath()); | |
| 19 | + handle_.ClearWeak(); | ||
| 19 | 20 | handle_->SetInternalField(0, v8::Undefined()); | |
| 20 | 21 | handle_.Dispose(); | |
| 21 | 22 | handle_.Clear(); | |
@@ -82,7 +83,8 @@ class ObjectWrap { | |||
| 82 | 83 | ObjectWrap *obj = static_cast<ObjectWrap*>(data); | |
| 83 | 84 | assert(value == obj->handle_); | |
| 84 | 85 | assert(!obj->refs_); | |
| 85 | - if (value.IsNearDeath()) delete obj; | ||
| 86 | + assert(value.IsNearDeath()); | ||
| 87 | + delete obj; | ||
| 86 | 88 | } | |
| 87 | 89 | }; | |
| 88 | 90 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments