зеркало из https://github.com/mozilla/pjs.git
Bug 644431 - Adobe PDF Files Larger than 5 MB Won't Load in Browser. r=bz
This commit is contained in:
Родитель
8abd514bee
Коммит
82e5ced42f
|
@ -1827,6 +1827,7 @@ nsCacheService::EnsureEntryHasDevice(nsCacheEntry * entry)
|
|||
if (mDiskDevice) {
|
||||
// Bypass the cache if Content-Length says the entry will be too big
|
||||
if (predictedDataSize != -1 &&
|
||||
entry->StoragePolicy() != nsICache::STORE_ON_DISK_AS_FILE &&
|
||||
mDiskDevice->EntryIsTooBig(predictedDataSize)) {
|
||||
nsresult rv = nsCacheService::DoomEntry(entry);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"DoomEntry() failed.");
|
||||
|
|
|
@ -785,8 +785,10 @@ nsDiskCacheDevice::OnDataSizeChange(nsCacheEntry * entry, PRInt32 deltaSize)
|
|||
PRUint32 newSizeK = ((newSize + 0x3FF) >> 10);
|
||||
|
||||
// If the new size is larger than max. file size or larger than
|
||||
// 1/8 the cache capacity (which is in KiB's), doom the entry and abort
|
||||
if (EntryIsTooBig(newSize)) {
|
||||
// 1/8 the cache capacity (which is in KiB's), and the entry has
|
||||
// not been marked for file storage, doom the entry and abort.
|
||||
if (EntryIsTooBig(newSize) &&
|
||||
entry->StoragePolicy() != nsICache::STORE_ON_DISK_AS_FILE) {
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче