Clear internal field when Wrapper is destroyed

This commit is contained in:
Cheng Zhao 2016-02-02 19:50:27 +08:00
parent 26520c5cf4
commit e719eab878

View file

@ -14,6 +14,8 @@ Wrappable::Wrappable() : isolate_(NULL) {
}
Wrappable::~Wrappable() {
if (!wrapper_.IsEmpty())
GetWrapper(isolate())->SetAlignedPointerInInternalField(0, nullptr);
wrapper_.Reset();
}