Bug 935778 - Part 0.5: Add two more MOZ_DECLARE_REFCOUNTED_TYPENAME to TestWeakPtr.cpp
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 21 Feb 2014 09:45:05 -0500
changeset 187084 babff8d1437ba51b159ed5e08333485f56d1aca8
parent 187083 fc033be15f374bb0011ef20bb7e319c6e5b3aed5
child 187085 a00bd379adb22dfef967b064805646a127c07e78
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs935778
milestone30.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 935778 - Part 0.5: Add two more MOZ_DECLARE_REFCOUNTED_TYPENAME to TestWeakPtr.cpp
mfbt/tests/TestWeakPtr.cpp
--- a/mfbt/tests/TestWeakPtr.cpp
+++ b/mfbt/tests/TestWeakPtr.cpp
@@ -6,16 +6,17 @@
 
 using mozilla::SupportsWeakPtr;
 using mozilla::WeakPtr;
 
 // To have a class C support weak pointers, inherit from SupportsWeakPtr<C>.
 class C : public SupportsWeakPtr<C>
 {
   public:
+    MOZ_DECLARE_REFCOUNTED_TYPENAME(C)
     int num;
     void act() {}
 };
 
 static void
 Example()
 {
 
@@ -38,16 +39,17 @@ Example()
   delete ptr;
 
   MOZ_ASSERT(!weak, "Deleting |ptr| clears weak pointers to it.");
   MOZ_ASSERT(!other, "Deleting |ptr| clears all weak pointers to it.");
 }
 
 struct A : public SupportsWeakPtr<A>
 {
+    MOZ_DECLARE_REFCOUNTED_TYPENAME(A)
     int data;
 };
 
 
 int
 main()
 {