Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz

This commit is contained in:
Andrea Marchesini
2015-05-11 15:20:06 +01:00
parent 0b886470ba
commit 2ffeefc77a
96 changed files with 932 additions and 747 deletions

View File

@@ -154,7 +154,7 @@ FileSystemTaskBase::Recv__delete__(const FileSystemResponseValue& aValue)
}
BlobParent*
FileSystemTaskBase::GetBlobParent(nsIDOMFile* aFile) const
FileSystemTaskBase::GetBlobParent(FileImpl* aFile) const
{
MOZ_ASSERT(FileSystemUtils::IsParentProcess(),
"Only call from parent process!");
@@ -164,13 +164,23 @@ FileSystemTaskBase::GetBlobParent(nsIDOMFile* aFile) const
// Load the lazy dom file data from the parent before sending to the child.
nsString mimeType;
aFile->GetType(mimeType);
uint64_t fileSize;
aFile->GetSize(&fileSize);
int64_t lastModifiedDate;
aFile->GetMozLastModifiedDate(&lastModifiedDate);
// We call GetSize and GetLastModified to prepopulate the value in the
// FileImpl.
{
ErrorResult rv;
aFile->GetSize(rv);
rv.SuppressException();
}
{
ErrorResult rv;
aFile->GetLastModified(rv);
rv.SuppressException();
}
ContentParent* cp = static_cast<ContentParent*>(mRequestParent->Manager());
return cp->GetOrCreateActorForBlob(static_cast<File*>(aFile));
return cp->GetOrCreateActorForFileImpl(aFile);
}
void