Bug 999884 - Make DBusReplyHandler not use mozilla::RefCounted; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 23 Apr 2014 17:47:22 -0400
changeset 186488 c81b25ae61c051c4045a558ab37a910acb6d3482
parent 186487 ba2e9970b80f05a995276cc9805d5a4f5305b7a1
child 186489 86119be8c527ca1385e3cbeb9644096bfdf207b6
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs999884
milestone31.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 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);