Bring back ScopedPersistent.SetWeak.
This commit is contained in:
parent
6f574c3802
commit
8e056672bc
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue