diff --git a/src/base-object-inl.h b/src/base-object-inl.h index db0daa1e82f559..87159ffc6838c7 100644 --- a/src/base-object-inl.h +++ b/src/base-object-inl.h @@ -39,7 +39,7 @@ inline Environment* BaseObject::env() const { template inline void BaseObject::WeakCallback( - const v8::WeakCallbackData& data) { + const v8::WeakCallbackInfo& data) { Type* self = data.GetParameter(); self->persistent().Reset(); delete self; @@ -53,7 +53,8 @@ inline void BaseObject::MakeWeak(Type* ptr) { CHECK_GT(handle->InternalFieldCount(), 0); Wrap(handle, ptr); handle_.MarkIndependent(); - handle_.SetWeak(ptr, WeakCallback); + handle_.SetWeak(ptr, WeakCallback, + v8::WeakCallbackType::kParameter); } diff --git a/src/base-object.h b/src/base-object.h index 5a7b95827e8f11..8574a904e71b1a 100644 --- a/src/base-object.h +++ b/src/base-object.h @@ -40,7 +40,7 @@ class BaseObject { template static inline void WeakCallback( - const v8::WeakCallbackData& data); + const v8::WeakCallbackInfo& data); v8::Persistent handle_; Environment* env_;