Backed out changeset 2577afd226ff (bug 1358113)

This commit is contained in:
Sebastian Hengst 2017-04-24 15:43:00 +02:00
Родитель 0a2239bee6
Коммит 97cb53bd66
3 изменённых файлов: 11 добавлений и 13 удалений

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

@ -3305,8 +3305,11 @@ ContentChild::RecvFileCreationResponse(const nsID& aUUID,
} else {
MOZ_ASSERT(aResult.type() == FileCreationResult::TFileCreationSuccessResult);
RefPtr<BlobImpl> impl =
IPCBlobUtils::Deserialize(aResult.get_FileCreationSuccessResult().blob());
PBlobChild* blobChild =
aResult.get_FileCreationSuccessResult().blobChild();
MOZ_ASSERT(blobChild);
RefPtr<BlobImpl> impl = static_cast<BlobChild*>(blobChild)->GetBlobImpl();
helper->ResponseReceived(impl, NS_OK);
}

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

@ -46,7 +46,6 @@
#include "mozilla/dom/File.h"
#include "mozilla/dom/FileCreatorHelper.h"
#include "mozilla/dom/FileSystemSecurity.h"
#include "mozilla/dom/IPCBlobUtils.h"
#include "mozilla/dom/ExternalHelperAppParent.h"
#include "mozilla/dom/GetFilesHelper.h"
#include "mozilla/dom/GeolocationBinding.h"
@ -5300,17 +5299,13 @@ ContentParent::RecvFileCreationRequest(const nsID& aID,
MOZ_ASSERT(blobImpl);
IPCBlob ipcBlob;
rv = IPCBlobUtils::Serialize(blobImpl, this, ipcBlob);
if (NS_WARN_IF(NS_FAILED(rv))) {
if (!SendFileCreationResponse(aID, FileCreationErrorResult(rv))) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
BlobParent* blobParent = BlobParent::GetOrCreate(this, blobImpl);
if (NS_WARN_IF(!blobParent)) {
return IPC_FAIL_NO_REASON(this);
}
if (!SendFileCreationResponse(aID, FileCreationSuccessResult(ipcBlob))) {
if (!SendFileCreationResponse(aID,
FileCreationSuccessResult(blobParent, nullptr))) {
return IPC_FAIL_NO_REASON(this);
}

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

@ -212,7 +212,7 @@ union GetFilesResponseResult
struct FileCreationSuccessResult
{
IPCBlob blob;
PBlob blob;
};
struct FileCreationErrorResult