Bug 779702: Fixing Device and UUID array assignments in BluetoothAdapter; r=echou

This commit is contained in:
Kyle Machulis 2012-08-01 18:59:03 -07:00
parent 36e9fab6d3
commit 9541d6b577

View File

@ -154,9 +154,9 @@ BluetoothAdapter::SetPropertyByValue(const BluetoothNamedValue& aValue)
if (sc) {
rv =
StringArrayToJSArray(sc->GetNativeContext(),
sc->GetNativeGlobal(), mUuids, &mJsDeviceAddresses);
sc->GetNativeGlobal(), mDeviceAddresses, &mJsDeviceAddresses);
if (NS_FAILED(rv)) {
NS_WARNING("Cannot set JS Devices Addresses object!");
NS_WARNING("Cannot set JS Device Addresses object!");
return;
}
Root();
@ -335,7 +335,7 @@ BluetoothAdapter::GetDevices(JSContext* aCx, jsval* aDevices)
aDevices->setObject(*mJsDeviceAddresses);
}
else {
NS_WARNING("UUIDs not yet set!\n");
NS_WARNING("Devices not yet set!\n");
return NS_ERROR_FAILURE;
}
return NS_OK;