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 170255 babff8d1437ba51b159ed5e08333485f56d1aca8
parent 170254 fc033be15f374bb0011ef20bb7e319c6e5b3aed5
child 170256 a00bd379adb22dfef967b064805646a127c07e78
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs935778
milestone30.0a1
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()
 {