Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,21 @@ typedef v8::String::ExternalOneByteStringResource
template<typename T>
class NonCopyablePersistentTraits :
public v8::NonCopyablePersistentTraits<T> {};
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 10 || \
(V8_MAJOR_VERSION == 10 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 5))
template<typename T> struct CopyablePersistentTraits {
typedef v8::Persistent<T, CopyablePersistentTraits<T> > CopyablePersistent;
static const bool kResetInDestructor = true;
template <typename S, typename M>
static NAN_INLINE void Copy(const v8::Persistent<S, M> &source,
CopyablePersistent *dest) {
}
};
#else
template<typename T>
class CopyablePersistentTraits :
public v8::CopyablePersistentTraits<T> {};
#endif

template<typename T>
class PersistentBase :
Expand Down