Bug 999884 - Make DBusReplyHandler not use mozilla::RefCounted; r=smaug
--- 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);