Camino only - Bug 394772: Catch exceptions loading damaged favicons from cache. r/sr=pink
git-svn-id: svn://10.0.0.236/trunk@236306 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -118,7 +118,13 @@ static NSString* const kCacheEntryExpirationDateKey = @"exp_date";
|
||||
|
||||
if (imageUUID)
|
||||
{
|
||||
cachedImage = [NSKeyedUnarchiver unarchiveObjectWithFile:[self imageDataFileWithUUID:imageUUID]];
|
||||
// Damaged files may raise exceptions when we try to unarchive.
|
||||
@try {
|
||||
cachedImage = [NSKeyedUnarchiver unarchiveObjectWithFile:[self imageDataFileWithUUID:imageUUID]];
|
||||
}
|
||||
@catch (id exception) {
|
||||
// nothing to do here; cleanup of the damage file happens below
|
||||
}
|
||||
if (cachedImage)
|
||||
{
|
||||
// if we got the image, keep it in the memory cache
|
||||
|
||||
Reference in New Issue
Block a user