Bug 965498 - Don't lose an already_AddRefed<T> and leak blobs in bluetooth. r=qdot

This commit is contained in:
Kyle Huey 2014-01-29 17:03:51 -05:00
Родитель dc061fa45e
Коммит 502ccb79bd
2 изменённых файлов: 8 добавлений и 4 удалений

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

@ -62,7 +62,8 @@ public:
SendFileBatch(const nsAString& aDeviceAddress, BlobParent* aActor)
: mDeviceAddress(aDeviceAddress)
{
mBlobs.AppendElement(aActor->GetBlob().get());
nsCOMPtr<nsIDOMBlob> blob = aActor->GetBlob();
mBlobs.AppendElement(blob);
}
nsString mDeviceAddress;
@ -374,7 +375,8 @@ BluetoothOppManager::AppendBlobToSend(const nsAString& aDeviceAddress,
SendFileBatch batch(aDeviceAddress, aActor);
mBatches.AppendElement(batch);
} else {
mBatches[indexTail].mBlobs.AppendElement(aActor->GetBlob().get());
nsCOMPtr<nsIDOMBlob> blob = aActor->GetBlob();
mBatches[indexTail].mBlobs.AppendElement(blob);
}
}

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

@ -62,7 +62,8 @@ public:
SendFileBatch(const nsAString& aDeviceAddress, BlobParent* aActor)
: mDeviceAddress(aDeviceAddress)
{
mBlobs.AppendElement(aActor->GetBlob().get());
nsCOMPtr<nsIDOMBlob> blob = aActor->GetBlob();
mBlobs.AppendElement(blob);
}
nsString mDeviceAddress;
@ -390,7 +391,8 @@ BluetoothOppManager::AppendBlobToSend(const nsAString& aDeviceAddress,
SendFileBatch batch(aDeviceAddress, aActor);
mBatches.AppendElement(batch);
} else {
mBatches[indexTail].mBlobs.AppendElement(aActor->GetBlob().get());
nsCOMPtr<nsIDOMBlob> blob = aActor->GetBlob();
mBatches[indexTail].mBlobs.AppendElement(blob);
}
}