Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 7c666ff356a0f88c3b5c27d26c3298618a0532ec..f70f45769bb5ca58ff6d178b7129f92448301e8c 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -516,18 +516,6 @@ template <class T> class PersistentBase { |
P* parameter, |
typename WeakCallbackData<S, P>::Callback callback); |
- // Phantom persistents work like weak persistents, except that the pointer to |
- // the object being collected is not available in the finalization callback. |
- // This enables the garbage collector to collect the object and any objects |
- // it references transitively in one GC cycle. |
- template <typename P> |
- V8_INLINE void SetPhantom(P* parameter, |
- typename WeakCallbackData<T, P>::Callback callback); |
- |
- template <typename S, typename P> |
- V8_INLINE void SetPhantom(P* parameter, |
- typename WeakCallbackData<S, P>::Callback callback); |
- |
template<typename P> |
V8_INLINE P* ClearWeak(); |
@@ -5342,15 +5330,14 @@ class V8_EXPORT V8 { |
private: |
V8(); |
- enum WeakHandleType { PhantomHandle, NonphantomHandle }; |
- |
static internal::Object** GlobalizeReference(internal::Isolate* isolate, |
internal::Object** handle); |
static internal::Object** CopyPersistent(internal::Object** handle); |
static void DisposeGlobal(internal::Object** global_handle); |
typedef WeakCallbackData<Value, void>::Callback WeakCallback; |
- static void MakeWeak(internal::Object** global_handle, void* data, |
- WeakCallback weak_callback, WeakHandleType phantom); |
+ static void MakeWeak(internal::Object** global_handle, |
+ void* data, |
+ WeakCallback weak_callback); |
static void* ClearWeak(internal::Object** global_handle); |
static void Eternalize(Isolate* isolate, |
Value* handle, |
@@ -6213,8 +6200,9 @@ void PersistentBase<T>::SetWeak( |
typename WeakCallbackData<S, P>::Callback callback) { |
TYPE_CHECK(S, T); |
typedef typename WeakCallbackData<Value, void>::Callback Callback; |
- V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), parameter, |
- reinterpret_cast<Callback>(callback), V8::NonphantomHandle); |
+ V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), |
+ parameter, |
+ reinterpret_cast<Callback>(callback)); |
} |
@@ -6228,26 +6216,7 @@ void PersistentBase<T>::SetWeak( |
template <class T> |
-template <typename S, typename P> |
-void PersistentBase<T>::SetPhantom( |
- P* parameter, typename WeakCallbackData<S, P>::Callback callback) { |
- TYPE_CHECK(S, T); |
- typedef typename WeakCallbackData<Value, void>::Callback Callback; |
- V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), parameter, |
- reinterpret_cast<Callback>(callback), V8::PhantomHandle); |
-} |
- |
- |
-template <class T> |
-template <typename P> |
-void PersistentBase<T>::SetPhantom( |
- P* parameter, typename WeakCallbackData<T, P>::Callback callback) { |
- SetPhantom<T, P>(parameter, callback); |
-} |
- |
- |
-template <class T> |
-template <typename P> |
+template<typename P> |
P* PersistentBase<T>::ClearWeak() { |
return reinterpret_cast<P*>( |
V8::ClearWeak(reinterpret_cast<internal::Object**>(this->val_))); |