mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 788254 - [b2g-bluetooth] nsTArray should not be passed back as return value, r=qdot
This commit is contained in:
parent
a44420eb13
commit
b6c0097ba3
@ -230,9 +230,10 @@ public:
|
||||
const nsAString& aDeviceAddress,
|
||||
nsAString& aDevicePath) = 0;
|
||||
|
||||
virtual nsTArray<uint32_t>
|
||||
virtual bool
|
||||
AddReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
const nsTArray<uint32_t>& aServices) = 0;
|
||||
const nsTArray<uint32_t>& aServices,
|
||||
nsTArray<uint32_t>& aServiceHandlesContainer) = 0;
|
||||
|
||||
virtual bool
|
||||
RemoveReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
|
@ -1474,16 +1474,15 @@ ExtractHandles(DBusMessage *aReply, nsTArray<uint32_t>& aOutHandles)
|
||||
}
|
||||
}
|
||||
|
||||
nsTArray<uint32_t>
|
||||
bool
|
||||
BluetoothDBusService::AddReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
const nsTArray<uint32_t>& aServices)
|
||||
const nsTArray<uint32_t>& aServices,
|
||||
nsTArray<uint32_t>& aServiceHandlesContainer)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
nsTArray<uint32_t> ret;
|
||||
|
||||
int length = aServices.Length();
|
||||
if (length == 0) return ret;
|
||||
if (length == 0) return false;
|
||||
|
||||
const uint32_t* services = aServices.Elements();
|
||||
DBusMessage* reply =
|
||||
@ -1495,11 +1494,11 @@ BluetoothDBusService::AddReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
|
||||
if (!reply) {
|
||||
LOG("Null DBus message. Couldn't extract handles.");
|
||||
return ret;
|
||||
return false;
|
||||
}
|
||||
|
||||
ExtractHandles(reply, ret);
|
||||
return ret;
|
||||
ExtractHandles(reply, aServiceHandlesContainer);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -47,9 +47,10 @@ public:
|
||||
const nsAString& aDeviceAddress,
|
||||
nsAString& aDevicePath);
|
||||
|
||||
virtual nsTArray<uint32_t>
|
||||
virtual bool
|
||||
AddReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
const nsTArray<uint32_t>& aServices);
|
||||
const nsTArray<uint32_t>& aServices,
|
||||
nsTArray<uint32_t>& aServiceHandlesContainer);
|
||||
|
||||
virtual bool
|
||||
RemoveReservedServicesInternal(const nsAString& aAdapterPath,
|
||||
|
Loading…
Reference in New Issue
Block a user