| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b3149ce commit 166a9b8
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | #include "req-wrap-inl.h" | |
| 10 | 10 | #include "tree.h" | |
| 11 | 11 | #include "util.h" | |
| 12 | + #include "util-inl.h" | ||
| 12 | 13 | #include "uv.h" | |
| 13 | 14 | ||
| 14 | 15 | #include <errno.h> | |
@@ -258,6 +259,7 @@ class QueryWrap : public AsyncWrap { | |||
| 258 | 259 | ||
| 259 | 260 | ~QueryWrap() override { | |
| 260 | 261 | CHECK_EQ(false, persistent().IsEmpty()); | |
| 262 | + ClearWrap(object()); | ||
| 261 | 263 | persistent().Reset(); | |
| 262 | 264 | } | |
| 263 | 265 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,13 +90,12 @@ void HandleWrap::OnClose(uv_handle_t* handle) { | |||
| 90 | 90 | ||
| 91 | 91 | HandleScope handle_scope(env->isolate()); | |
| 92 | 92 | Context::Scope context_scope(env->context()); | |
| 93 | - Local<Object> object = wrap->object(); | ||
| 94 | 93 | ||
| 95 | 94 | if (wrap->flags_ & kCloseCallback) { | |
| 96 | 95 | wrap->MakeCallback(env->onclose_string(), 0, nullptr); | |
| 97 | 96 | } | |
| 98 | 97 | ||
| 99 | - object->SetAlignedPointerInInternalField(0, nullptr); | ||
| 98 | + ClearWrap(wrap->object()); | ||
| 100 | 99 | wrap->persistent().Reset(); | |
| 101 | 100 | delete wrap; | |
| 102 | 101 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4761,6 +4761,7 @@ class PBKDF2Request : public AsyncWrap { | |||
| 4761 | 4761 | ||
| 4762 | 4762 | ~PBKDF2Request() override { | |
| 4763 | 4763 | release(); | |
| 4764 | + ClearWrap(object()); | ||
| 4764 | 4765 | persistent().Reset(); | |
| 4765 | 4766 | } | |
| 4766 | 4767 | ||
@@ -5026,6 +5027,7 @@ class RandomBytesRequest : public AsyncWrap { | |||
| 5026 | 5027 | } | |
| 5027 | 5028 | ||
| 5028 | 5029 | ~RandomBytesRequest() override { | |
| 5030 | + ClearWrap(object()); | ||
| 5029 | 5031 | persistent().Reset(); | |
| 5030 | 5032 | } | |
| 5031 | 5033 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,6 +28,7 @@ template <typename T> | |||
| 28 | 28 | ReqWrap<T>::~ReqWrap() { | |
| 29 | 29 | CHECK_EQ(req_.data, this); // Assert that someone has called Dispatched(). | |
| 30 | 30 | CHECK_EQ(false, persistent().IsEmpty()); | |
| 31 | + ClearWrap(object()); | ||
| 31 | 32 | persistent().Reset(); | |
| 32 | 33 | } | |
| 33 | 34 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments