зеркало из https://github.com/mozilla/gecko-dev.git
Bug 656640: DOM File objects should DEFER_OPEN their streams. r=sicking
This commit is contained in:
Родитель
1396284624
Коммит
cbd257817b
|
@ -324,17 +324,18 @@ nsDOMFile::MozSlice(PRInt64 aStart, PRInt64 aEnd,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PRUint32 sFileStreamFlags =
|
||||||
|
nsIFileInputStream::CLOSE_ON_EOF |
|
||||||
|
nsIFileInputStream::REOPEN_ON_REWIND |
|
||||||
|
nsIFileInputStream::DEFER_OPEN;
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMFile::GetInternalStream(nsIInputStream **aStream)
|
nsDOMFile::GetInternalStream(nsIInputStream **aStream)
|
||||||
{
|
{
|
||||||
return mIsFullFile ?
|
return mIsFullFile ?
|
||||||
NS_NewLocalFileInputStream(aStream, mFile, -1, -1,
|
NS_NewLocalFileInputStream(aStream, mFile, -1, -1, sFileStreamFlags) :
|
||||||
nsIFileInputStream::CLOSE_ON_EOF |
|
|
||||||
nsIFileInputStream::REOPEN_ON_REWIND) :
|
|
||||||
NS_NewPartialLocalFileInputStream(aStream, mFile, mStart, mLength,
|
NS_NewPartialLocalFileInputStream(aStream, mFile, mStart, mLength,
|
||||||
-1, -1,
|
-1, -1, sFileStreamFlags);
|
||||||
nsIFileInputStream::CLOSE_ON_EOF |
|
|
||||||
nsIFileInputStream::REOPEN_ON_REWIND);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
Загрузка…
Ссылка в новой задаче