diff --git a/native_mate/scoped_persistent.h b/native_mate/scoped_persistent.h index d2a8bd7fca60..c653a1040a9d 100644 --- a/native_mate/scoped_persistent.h +++ b/native_mate/scoped_persistent.h @@ -53,6 +53,12 @@ class ScopedPersistent { return v8::Local::New(isolate, handle_); } + template + void SetWeak(P* parameter, + typename v8::WeakCallbackData::Callback callback) { + handle_.SetWeak(parameter, callback); + } + private: template static v8::Isolate* GetIsolate(v8::Handle object_handle) {