+2005-06-21 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Vicki Murley
+
+ - fixed assertion failure Vicki ran into
+
+ * Misc.subproj/WebIconDatabase.m:
+ (-[WebIconDatabase _forgetIconForIconURLString:]):
+ Handle the case where there are no associated page URLs for the icon URL
+
2005-06-20 John Sullivan <sullivan@apple.com>
Reviewed by Chris Blumenberg.
// Remove negative cache item for icon, if any
[_private->iconURLsWithNoIcons removeObject:iconURLString];
- // Remove the icon's associated site URLs
+ // Remove the icon's associated site URLs, if any
[iconURLString retain];
id URLs = [_private->iconURLToPageURLs objectForKey:iconURLString];
- if ([URLs isKindOfClass:[NSMutableSet class]]) {
- [_private->pageURLToIconURL removeObjectsForKeys:[URLs allObjects]];
- } else {
- ASSERT([URLs isKindOfClass:[NSString class]]);
- [_private->pageURLToIconURL removeObjectForKey:URLs];
+ if (URLs != nil) {
+ if ([URLs isKindOfClass:[NSMutableSet class]]) {
+ [_private->pageURLToIconURL removeObjectsForKeys:[URLs allObjects]];
+ } else {
+ ASSERT([URLs isKindOfClass:[NSString class]]);
+ [_private->pageURLToIconURL removeObjectForKey:URLs];
+ }
}
[_private->iconURLToPageURLs removeObjectForKey:iconURLString];
[iconURLString release];