зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3e0859b436d6 (bug 1264887)
--HG-- extra : rebase_source : 3b4cc4d10a117ed948e47fc54f338b15e9191076
This commit is contained in:
Родитель
074d1a0340
Коммит
c778c28981
|
@ -12,8 +12,7 @@ nsWifiScannerDBus::nsWifiScannerDBus(nsCOMArray<nsWifiAccessPoint> *aAccessPoint
|
|||
{
|
||||
MOZ_ASSERT(mAccessPoints);
|
||||
|
||||
mConnection =
|
||||
already_AddRefed<DBusConnection>(dbus_bus_get(DBUS_BUS_SYSTEM, nullptr));
|
||||
mConnection = dbus_bus_get(DBUS_BUS_SYSTEM, nullptr);
|
||||
MOZ_ASSERT(mConnection);
|
||||
dbus_connection_set_exit_on_disconnect(mConnection, false);
|
||||
|
||||
|
@ -22,6 +21,9 @@ nsWifiScannerDBus::nsWifiScannerDBus(nsCOMArray<nsWifiAccessPoint> *aAccessPoint
|
|||
|
||||
nsWifiScannerDBus::~nsWifiScannerDBus()
|
||||
{
|
||||
if (!mConnection) {
|
||||
dbus_connection_unref(mConnection);
|
||||
}
|
||||
MOZ_COUNT_DTOR(nsWifiScannerDBus);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#define DBUS_API_SUBJECT_TO_CHANGE
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
#include "mozilla/ipc/DBusConnectionRefPtr.h"
|
||||
|
||||
class nsWifiAccessPoint;
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -36,7 +34,7 @@ private:
|
|||
nsresult SetMac(DBusMessageIter* aVariant, nsWifiAccessPoint* aAp);
|
||||
nsresult GetDBusIterator(DBusMessage* aMsg, DBusMessageIter* aIterArray);
|
||||
|
||||
RefPtr<DBusConnection> mConnection;
|
||||
DBusConnection* mConnection;
|
||||
nsCOMArray<nsWifiAccessPoint>* mAccessPoints;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче