Bug 1159401 - patch 1 - Split Blob and File in 2 classes, r=bz
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user