зеркало из https://github.com/mozilla/gecko-dev.git
Bug 965498 - Don't lose an already_AddRefed<T> and leak blobs in bluetooth. r=qdot
This commit is contained in:
Родитель
dc061fa45e
Коммит
502ccb79bd
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче