Bug 826931 - Part 1/3: UnixSocket - allow ownership take-over in ReceiveSocketData(). r=qDot,echou

This commit is contained in:
Vicamo Yang 2013-02-01 20:28:15 +08:00
parent 447488b341
commit 20050ee452
7 changed files with 7 additions and 7 deletions

View File

@ -667,7 +667,7 @@ BluetoothHfpManager::HandleShutdown()
// Virtual function of class SocketConsumer
void
BluetoothHfpManager::ReceiveSocketData(UnixSocketRawData* aMessage)
BluetoothHfpManager::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage)
{
MOZ_ASSERT(NS_IsMainThread());

View File

@ -52,7 +52,7 @@ class BluetoothHfpManager : public mozilla::ipc::UnixSocketConsumer
{
public:
static BluetoothHfpManager* Get();
virtual void ReceiveSocketData(mozilla::ipc::UnixSocketRawData* aMessage)
virtual void ReceiveSocketData(nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage)
MOZ_OVERRIDE;
bool Connect(const nsAString& aDeviceObjectPath,

View File

@ -894,7 +894,7 @@ BluetoothOppManager::ClientDataHandler(UnixSocketRawData* aMessage)
// Virtual function of class SocketConsumer
void
BluetoothOppManager::ReceiveSocketData(UnixSocketRawData* aMessage)
BluetoothOppManager::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage)
{
if (mLastCommand) {
ClientDataHandler(aMessage);

View File

@ -33,7 +33,7 @@ public:
~BluetoothOppManager();
static BluetoothOppManager* Get();
void ReceiveSocketData(mozilla::ipc::UnixSocketRawData* aMessage)
void ReceiveSocketData(nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage)
MOZ_OVERRIDE;
void ClientDataHandler(mozilla::ipc::UnixSocketRawData* aMessage);
void ServerDataHandler(mozilla::ipc::UnixSocketRawData* aMessage);

View File

@ -171,7 +171,7 @@ BluetoothScoManager::Get()
// Virtual function of class SocketConsumer
void
BluetoothScoManager::ReceiveSocketData(mozilla::ipc::UnixSocketRawData* aMessage)
BluetoothScoManager::ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage)
{
// SCO socket do nothing here
MOZ_NOT_REACHED("This should never be called!");

View File

@ -22,7 +22,7 @@ public:
~BluetoothScoManager();
static BluetoothScoManager* Get();
void ReceiveSocketData(mozilla::ipc::UnixSocketRawData* aMessage)
void ReceiveSocketData(nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage)
MOZ_OVERRIDE;
bool Connect(const nsAString& aDeviceObjectPath);

View File

@ -130,7 +130,7 @@ public:
*
* @param aMessage Data received from the socket.
*/
virtual void ReceiveSocketData(UnixSocketRawData* aMessage) = 0;
virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage) = 0;
/**
* Queue data to be sent to the socket on the IO thread. Can only be called on