Bug 999884 - Make DBusReplyHandler not use mozilla::RefCounted; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 23 Apr 2014 17:47:22 -0400
changeset 179852 c81b25ae61c051c4045a558ab37a910acb6d3482
parent 179851 ba2e9970b80f05a995276cc9805d5a4f5305b7a1
child 179853 86119be8c527ca1385e3cbeb9644096bfdf207b6
push id6482
push usercbook@mozilla.com
push dateThu, 24 Apr 2014 11:22:42 +0000
treeherderfx-team@27a7bd55597e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs999884
milestone31.0a1
Bug 999884 - Make DBusReplyHandler not use mozilla::RefCounted; r=smaug
ipc/dbus/DBusUtils.h
--- a/ipc/dbus/DBusUtils.h
+++ b/ipc/dbus/DBusUtils.h
@@ -53,22 +53,20 @@ private:
 };
 
 /**
  * DBusReplyHandler represents a handler for DBus reply messages. Inherit
  * from this class and implement the Handle method. The method Callback
  * should be passed to the DBus send function, with the class instance as
  * user-data argument.
  */
-class DBusReplyHandler : public mozilla::RefCounted<DBusReplyHandler>
+class DBusReplyHandler
 {
 public:
-  MOZ_DECLARE_REFCOUNTED_TYPENAME(DBusReplyHandler)
-  virtual ~DBusReplyHandler() {
-  }
+  NS_INLINE_DECL_REFCOUNTING(DBusReplyHandler)
 
   /**
    * Implements a call-back function for DBus. The supplied value for
    * aData must be a pointer to an instance of DBusReplyHandler.
    */
   static void Callback(DBusMessage* aReply, void* aData);
 
   /**
@@ -84,16 +82,20 @@ protected:
   DBusReplyHandler(const DBusReplyHandler& aHandler)
   {
   }
 
   DBusReplyHandler& operator = (const DBusReplyHandler& aRhs)
   {
     return *this;
   }
+
+  virtual ~DBusReplyHandler()
+  {
+  }
 };
 
 void log_and_free_dbus_error(DBusError* err,
                              const char* function,
                              DBusMessage* msg = nullptr);
 
 int dbus_returns_int32(DBusMessage *reply);