Bug 1019377 - Fix build break due to RIL and nsTArrayToJSArray changes (bug 1016849 and bug 1017419), r=shuang

This commit is contained in:
Ben Tian 2014-06-03 14:18:00 +08:00
Родитель 25f0cafb86
Коммит 2c108a410e
3 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -103,7 +103,7 @@ public:
}
AutoPushJSContext cx(sc->GetNativeContext());
JSObject* JsDevices = nullptr;
JS::Rooted<JSObject*> JsDevices(cx);
rv = nsTArrayToJSArray(cx, devices, &JsDevices);
if (!JsDevices) {
BT_WARNING("Cannot create JS array!");
@ -260,7 +260,7 @@ BluetoothAdapter::SetPropertyByValue(const BluetoothNamedValue& aValue)
AutoPushJSContext cx(sc->GetNativeContext());
JS::Rooted<JSObject*> uuids(cx);
if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, uuids.address()))) {
if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, &uuids))) {
BT_WARNING("Cannot set JS UUIDs object!");
return;
}
@ -276,8 +276,7 @@ BluetoothAdapter::SetPropertyByValue(const BluetoothNamedValue& aValue)
AutoPushJSContext cx(sc->GetNativeContext());
JS::Rooted<JSObject*> deviceAddresses(cx);
if (NS_FAILED(nsTArrayToJSArray(cx, mDeviceAddresses,
deviceAddresses.address()))) {
if (NS_FAILED(nsTArrayToJSArray(cx, mDeviceAddresses, &deviceAddresses))) {
BT_WARNING("Cannot set JS Devices object!");
return;
}

Просмотреть файл

@ -137,7 +137,7 @@ BluetoothDevice::SetPropertyByValue(const BluetoothNamedValue& aValue)
AutoPushJSContext cx(sc->GetNativeContext());
JS::Rooted<JSObject*> uuids(cx);
if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, uuids.address()))) {
if (NS_FAILED(nsTArrayToJSArray(cx, mUuids, &uuids))) {
BT_WARNING("Cannot set JS UUIDs object!");
return;
}
@ -153,7 +153,7 @@ BluetoothDevice::SetPropertyByValue(const BluetoothNamedValue& aValue)
AutoPushJSContext cx(sc->GetNativeContext());
JS::Rooted<JSObject*> services(cx);
if (NS_FAILED(nsTArrayToJSArray(cx, mServices, services.address()))) {
if (NS_FAILED(nsTArrayToJSArray(cx, mServices, &services))) {
BT_WARNING("Cannot set JS Services object!");
return;
}

Просмотреть файл

@ -181,7 +181,6 @@ TelephonyListener::CallStateChanged(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString& aNumber,
bool aIsActive,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
@ -201,7 +200,6 @@ TelephonyListener::EnumerateCallState(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString_internal& aNumber,
bool aIsActive,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,