inline void adopted(const void*) { }
-#if !COMPILER(WINSCW)
#if !PLATFORM(QT)
#define REF_DEREF_INLINE ALWAYS_INLINE
#else
// See https://bugs.webkit.org/show_bug.cgi?id=37253 for details.
#define REF_DEREF_INLINE inline
#endif
-#else
- // No inlining for WINSCW compiler to prevent the compiler agressively resolving
- // T::ref() and T::deref(), which will fail compiling when PassRefPtr<T> is used as
- // a class member or function arguments before T is defined.
- #define REF_DEREF_INLINE
-#endif
template<typename T> REF_DEREF_INLINE void refIfNotNull(T* ptr)
{
friend PassRefPtr adoptRef<T>(T*);
- // FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
-
private:
// adopting constructor
PassRefPtr(T* ptr, bool) : m_ptr(ptr) { }
NonNullPassRefPtr& operator=(const NonNullPassRefPtr&) { COMPILE_ASSERT(!sizeof(T*), NonNullPassRefPtr_should_never_be_assigned_to); return *this; }
- // FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
-
private:
mutable T* m_ptr;
};