Bug 927291 - Fix system has no response if sdcard is full during download. r=jduell

--HG--
extra : rebase_source : 7288b511e999050c1da1c2ed501aa3dc6ab1dba0
This commit is contained in:
kli@mozilla.com 2013-10-22 11:22:57 +08:00
parent ce32a2a2e2
commit b45affff52

View File

@ -763,8 +763,11 @@ nsIncrementalDownload::OnDataAvailable(nsIRequest *request,
count -= n;
mChunkLen += n;
if (mChunkLen == mChunkSize)
FlushChunk();
if (mChunkLen == mChunkSize) {
rv = FlushChunk();
if (NS_FAILED(rv))
return rv;
}
}
if (PR_Now() > mLastProgressUpdate + UPDATE_PROGRESS_INTERVAL)