Bug 801120 - Support T* WeakPtr<T>::get(). r=Ms2ger,ehsan
authorJoe Drew <joe@drew.ca>
Fri, 12 Oct 2012 18:17:58 -0400
changeset 119203 0e3e4275119519096133d0967bf703a769b93952
parent 119202 dbcb02897678243cb0f1f2b2d491246217cb1273
child 119204 b0a701fd2322d04c1c6c338b8c0c8035e672d86b
push id273
push userlsblakk@mozilla.com
push dateThu, 14 Feb 2013 23:19:38 +0000
treeherdermozilla-release@c5e807a3f8b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger, ehsan
bugs801120
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 801120 - Support T* WeakPtr<T>::get(). r=Ms2ger,ehsan
mfbt/WeakPtr.h
--- a/mfbt/WeakPtr.h
+++ b/mfbt/WeakPtr.h
@@ -121,16 +121,20 @@ class WeakPtr
     T& operator*() const {
       return *ref->get();
     }
 
     T* operator->() const {
       return ref->get();
     }
 
+    T* get() const {
+      return ref->get();
+    }
+
   private:
     friend class SupportsWeakPtr<T>;
 
     explicit WeakPtr(const RefPtr<typename SupportsWeakPtr<T>::WeakReference> &o) : ref(o) {}
 
     RefPtr<typename SupportsWeakPtr<T>::WeakReference> ref;
 };