#ifndef INCLUDE_V8_PERSISTENT_HANDLE_H_
#define INCLUDE_V8_PERSISTENT_HANDLE_H_
#include "v8-internal.h"
#include "v8-local-handle.h"
#include "v8-weak-callback-info.h"
#include "v8config.h"
namespace v8 {
class Isolate;
template <class K, class V, class T>
class PersistentValueMapBase;
template <class T>
class Global;
template <class T>
class PersistentBase;
template <class K, class V, class T>
class PersistentValueMap;
class Value;
namespace api_internal {
V8_EXPORT internal::Address* Eternalize(v8::Isolate* isolate, Value* handle);
V8_EXPORT internal::Address* CopyGlobalReference(internal::Address* from);
V8_EXPORT void DisposeGlobal(internal::Address* global_handle);
V8_EXPORT void MakeWeak(internal::Address** location_addr);
V8_EXPORT void* ClearWeak(internal::Address* location);
V8_EXPORT void AnnotateStrongRetainer(internal::Address* location,
const char* label);
V8_EXPORT internal::Address* GlobalizeReference(internal::Isolate* isolate,
internal::Address value);
V8_EXPORT void MoveGlobalReference(internal::Address** from,
internal::Address** to);
}
template <class T>
class Eternal : public api_internal::IndirectHandleBase { … };
namespace api_internal {
V8_EXPORT void MakeWeak(internal::Address* location, void* data,
WeakCallbackInfo<void>::Callback weak_callback,
WeakCallbackType type);
}
template <class T>
class PersistentBase : public api_internal::IndirectHandleBase { … };
template <class T>
class NonCopyablePersistentTraits { … };
template <class T, class M>
class Persistent : public PersistentBase<T> { … };
template <class T>
class Global : public PersistentBase<T> { … };
UniquePersistent;
class V8_EXPORT PersistentHandleVisitor { … };
template <class T>
internal::Address* PersistentBase<T>::New(Isolate* isolate, T* that) { … }
template <class T, class M>
template <class S, class M2>
void Persistent<T, M>::Copy(const Persistent<S, M2>& that) { … }
template <class T>
bool PersistentBase<T>::IsWeak() const { … }
template <class T>
void PersistentBase<T>::Reset() { … }
template <class T>
template <class S>
void PersistentBase<T>::Reset(Isolate* isolate, const Local<S>& other) { … }
template <class T>
template <class S>
void PersistentBase<T>::Reset(Isolate* isolate,
const PersistentBase<S>& other) { … }
template <class T>
template <typename P>
V8_INLINE void PersistentBase<T>::SetWeak(
P* parameter, typename WeakCallbackInfo<P>::Callback callback,
WeakCallbackType type) { … }
template <class T>
void PersistentBase<T>::SetWeak() { … }
template <class T>
template <typename P>
P* PersistentBase<T>::ClearWeak() { … }
template <class T>
void PersistentBase<T>::AnnotateStrongRetainer(const char* label) { … }
template <class T>
void PersistentBase<T>::SetWrapperClassId(uint16_t class_id) { … }
template <class T>
uint16_t PersistentBase<T>::WrapperClassId() const { … }
template <class T>
Global<T>::Global(Global&& other) : … { … }
template <class T>
template <class S>
Global<T>& Global<T>::operator=(Global<S>&& rhs) { … }
}
#endif