Don't reset handle before Wrappable is destroyed

It is possible that the user wants to use the V8 object in the destructor.

Fixes atom/atom-shell#1112.
This commit is contained in:
Cheng Zhao
2015-03-23 16:19:55 +08:00
parent 38aba07290
commit 40da835cbb
6 changed files with 5 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ class CallbackHolderBase {
private:
static MATE_WEAK_CALLBACK(WeakCallback, v8::External, CallbackHolderBase);
v8::Persistent<v8::External> v8_ref_;
v8::UniquePersistent<v8::External> v8_ref_;
DISALLOW_COPY_AND_ASSIGN(CallbackHolderBase);
};