зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1261340: Don't refer to |ScopedFreePtrTraits| in |RawDBusConnection|, r=shuang
The class template |ScopedFreePtrTrais| has been removed. This patch updates |RawDBusConnection| to not refer to it any longer. Instead, the provided helper method |empty| is implemented directly.
This commit is contained in:
Родитель
24f0f28af4
Коммит
4bc7ae6624
|
@ -4,7 +4,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include <dbus/dbus.h>
|
|
||||||
#include "base/message_loop.h"
|
#include "base/message_loop.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "RawDBusConnection.h"
|
#include "RawDBusConnection.h"
|
||||||
|
@ -274,6 +273,11 @@ bool RawDBusConnection::Watch()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBusConnection* RawDBusConnection::ScopedDBusConnectionPtrTraits::empty()
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void RawDBusConnection::ScopedDBusConnectionPtrTraits::release(DBusConnection* ptr)
|
void RawDBusConnection::ScopedDBusConnectionPtrTraits::release(DBusConnection* ptr)
|
||||||
{
|
{
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
|
|
|
@ -7,11 +7,9 @@
|
||||||
#ifndef mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
#ifndef mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
||||||
#define mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
#define mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
||||||
|
|
||||||
|
#include <dbus/dbus.h>
|
||||||
#include "mozilla/Scoped.h"
|
#include "mozilla/Scoped.h"
|
||||||
|
|
||||||
struct DBusConnection;
|
|
||||||
struct DBusMessage;
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
|
|
||||||
|
@ -19,8 +17,11 @@ typedef void (*DBusReplyCallback)(DBusMessage*, void*);
|
||||||
|
|
||||||
class RawDBusConnection
|
class RawDBusConnection
|
||||||
{
|
{
|
||||||
struct ScopedDBusConnectionPtrTraits : ScopedFreePtrTraits<DBusConnection>
|
struct ScopedDBusConnectionPtrTraits
|
||||||
{
|
{
|
||||||
|
typedef DBusConnection* type;
|
||||||
|
|
||||||
|
static DBusConnection* empty();
|
||||||
static void release(DBusConnection* ptr);
|
static void release(DBusConnection* ptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче