Reviewed by Vicki Murley
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2005 18:05:57 +0000 (18:05 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jun 2005 18:05:57 +0000 (18:05 +0000)
        - 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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9446 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Misc.subproj/WebIconDatabase.m

index f91eb4d..5a82fce 100644 (file)
@@ -1,3 +1,13 @@
+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.
index 5d2635f..86caf8a 100644 (file)
@@ -686,14 +686,16 @@ NSSize WebIconLargeSize = {128, 128};
     // 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];