зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1160279: Recreate nsIFiles in the content process for dragged files. r=smaug
--HG-- extra : rebase_source : f90e7cb31486ef8fd29769c86f25f8341b7b97e6 extra : amend_source : ec7283835b92bc45715549420163059e8f45f187
This commit is contained in:
Родитель
84ad8ab3ab
Коммит
8ee20de440
|
@ -2898,7 +2898,16 @@ ContentChild::RecvInvokeDragSession(nsTArray<IPCDataTransfer>&& aTransfers,
|
|||
} else if (item.data().type() == IPCDataTransferData::TPBlobChild) {
|
||||
BlobChild* blob = static_cast<BlobChild*>(item.data().get_PBlobChild());
|
||||
nsRefPtr<FileImpl> fileImpl = blob->GetBlobImpl();
|
||||
variant->SetAsISupports(fileImpl);
|
||||
nsString path;
|
||||
ErrorResult result;
|
||||
fileImpl->GetMozFullPathInternal(path, result);
|
||||
if (result.Failed()) {
|
||||
variant->SetAsISupports(fileImpl);
|
||||
} else {
|
||||
nsCOMPtr<nsIFile> file;
|
||||
NS_NewNativeLocalFile(NS_ConvertUTF16toUTF8(path), true, getter_AddRefs(file));
|
||||
variant->SetAsISupports(file);
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче