Bring back ScopedPersistent.SetWeak.

This commit is contained in:
Cheng Zhao 2014-06-28 21:26:34 +08:00
parent 6f574c3802
commit 8e056672bc

View file

@ -53,6 +53,12 @@ class ScopedPersistent {
return v8::Local<T>::New(isolate, handle_); return v8::Local<T>::New(isolate, handle_);
} }
template<typename P>
void SetWeak(P* parameter,
typename v8::WeakCallbackData<T, P>::Callback callback) {
handle_.SetWeak(parameter, callback);
}
private: private:
template <typename U> template <typename U>
static v8::Isolate* GetIsolate(v8::Handle<U> object_handle) { static v8::Isolate* GetIsolate(v8::Handle<U> object_handle) {