Bug 1333058 - Get rid of MultipartBlobImpl::InitializeChromeFile, r=qdot

This commit is contained in:
Andrea Marchesini 2017-01-24 12:10:45 +01:00
Родитель f7dda0c14d
Коммит c2381922c7
2 изменённых файлов: 0 добавлений и 36 удалений

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

@ -323,38 +323,6 @@ MultipartBlobImpl::SetMutable(bool aMutable)
return NS_OK; return NS_OK;
} }
void
MultipartBlobImpl::InitializeChromeFile(Blob& aBlob,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv)
{
MOZ_ASSERT(!mImmutable, "Something went wrong ...");
if (mImmutable) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return;
}
MOZ_ASSERT(nsContentUtils::ThreadsafeIsCallerChrome());
mName = aBag.mName;
mContentType = aBag.mType;
mIsFromNsIFile = true;
// XXXkhuey this is terrible
if (mContentType.IsEmpty()) {
aBlob.GetType(mContentType);
}
BlobSet blobSet;
blobSet.AppendBlobImpl(aBlob.Impl());
mBlobImpls = blobSet.GetBlobImpls();
SetLengthAndModifiedDate(aRv);
NS_WARNING_ASSERTION(!aRv.Failed(), "SetLengthAndModifiedDate failed");
}
void void
MultipartBlobImpl::InitializeChromeFile(nsPIDOMWindowInner* aWindow, MultipartBlobImpl::InitializeChromeFile(nsPIDOMWindowInner* aWindow,
nsIFile* aFile, nsIFile* aFile,

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

@ -60,10 +60,6 @@ public:
bool aNativeEOL, bool aNativeEOL,
ErrorResult& aRv); ErrorResult& aRv);
void InitializeChromeFile(Blob& aData,
const ChromeFilePropertyBag& aBag,
ErrorResult& aRv);
void InitializeChromeFile(nsPIDOMWindowInner* aWindow, void InitializeChromeFile(nsPIDOMWindowInner* aWindow,
const nsAString& aData, const nsAString& aData,
const ChromeFilePropertyBag& aBag, const ChromeFilePropertyBag& aBag,