Bug 1013333 - HTTP cache v2: do not allow preloading of chunks without input streams once the output stream is opened, r=honzab

This commit is contained in:
Michal Novotny 2014-05-21 23:42:09 +02:00
parent 05454905d8
commit 9d113db4a2

View File

@ -691,6 +691,12 @@ CacheFile::OpenOutputStream(CacheOutputCloseListener *aCloseListener, nsIOutputS
return NS_ERROR_NOT_AVAILABLE;
}
// Once we open output stream we no longer allow preloading of chunks without
// input stream. There is no reason to believe that some input stream will be
// opened soon. Otherwise we would cache unused chunks of all newly created
// entries until the CacheFile is destroyed.
mPreloadWithoutInputStreams = false;
mOutput = new CacheFileOutputStream(this, aCloseListener);
LOG(("CacheFile::OpenOutputStream() - Creating new output stream %p "