aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/masm/stubs/wtf/PassRefPtr.h')
-rw-r--r--src/3rdparty/masm/stubs/wtf/PassRefPtr.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/3rdparty/masm/stubs/wtf/PassRefPtr.h b/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
index f072e70dd7..cc03a5d651 100644
--- a/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
+++ b/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
@@ -83,14 +83,22 @@ public:
private:
PassRefPtr<T>& operator=(const PassRefPtr<T>& t);
- template <typename PtrType> friend PassRefPtr<PtrType> adoptRef(PtrType*);
+protected:
mutable T* m_ptr;
};
template <typename T>
-PassRefPtr<T> adoptRef(T* ptr)
+class Ref : public PassRefPtr<T>
{
- PassRefPtr<T> result;
+ using PassRefPtr<T>::PassRefPtr;
+
+ template <typename PtrType> friend Ref<PtrType> adoptRef(PtrType*);
+};
+
+template <typename T>
+Ref<T> adoptRef(T* ptr)
+{
+ Ref<T> result;
result.m_ptr = ptr;
return result;
}