[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:10:53 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ee7004b6e121f9d9df5b88d3317f979ce9742ffe
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 4 00:21:45 2002 +0000

    	Fixed: 3115073 - REGRESSION: plants.com is crashing in WebIconDB with bad retain count
    
    	The plants.com favicon was marked to be removed from disk and thus it had no retain count. The problem was that it was still on disk and _hasIconForIconURL would return YES. If hasIconForIconURL returns YES, its is ok to call  _setIconURL:forSiteURL:. Since there was no retain count, the assert in _setIconURL:forSiteURL: would be hit.
    
    	We now consider icons without retain counts to not exist even if they're on disk.
    
            * Misc.subproj/WebIconDatabase.m:
            (-[WebIconDatabase _updateFileDatabase]):
            (-[WebIconDatabase _setIconURL:forSiteURL:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9d6c99f..eb10360 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,17 @@
 2002-12-03  Chris Blumenberg  <cblu at apple.com>
 
+	Fixed: 3115073 - REGRESSION: plants.com is crashing in WebIconDB with bad retain count
+
+	The plants.com favicon was marked to be removed from disk and thus it had no retain count. The problem was that it was still on disk and _hasIconForIconURL would return YES. If hasIconForIconURL returns YES, its is ok to call  _setIconURL:forSiteURL:. Since there was no retain count, the assert in _setIconURL:forSiteURL: would be hit.
+
+	We now consider icons without retain counts to not exist even if they're on disk.
+
+        * Misc.subproj/WebIconDatabase.m:
+        (-[WebIconDatabase _updateFileDatabase]):
+        (-[WebIconDatabase _setIconURL:forSiteURL:]):
+
+2002-12-03  Chris Blumenberg  <cblu at apple.com>
+
 	Fixed:
 	3112477 - REGRESSION: dropping image within window loads image in current window
 	Fix: Unregister the parent webview for dragging when the drag starts, reregister after the drag ends.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 9d6c99f..eb10360 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,17 @@
 2002-12-03  Chris Blumenberg  <cblu at apple.com>
 
+	Fixed: 3115073 - REGRESSION: plants.com is crashing in WebIconDB with bad retain count
+
+	The plants.com favicon was marked to be removed from disk and thus it had no retain count. The problem was that it was still on disk and _hasIconForIconURL would return YES. If hasIconForIconURL returns YES, its is ok to call  _setIconURL:forSiteURL:. Since there was no retain count, the assert in _setIconURL:forSiteURL: would be hit.
+
+	We now consider icons without retain counts to not exist even if they're on disk.
+
+        * Misc.subproj/WebIconDatabase.m:
+        (-[WebIconDatabase _updateFileDatabase]):
+        (-[WebIconDatabase _setIconURL:forSiteURL:]):
+
+2002-12-03  Chris Blumenberg  <cblu at apple.com>
+
 	Fixed:
 	3112477 - REGRESSION: dropping image within window loads image in current window
 	Fix: Unregister the parent webview for dragging when the drag starts, reregister after the drag ends.
diff --git a/WebKit/Misc.subproj/WebIconDatabase.m b/WebKit/Misc.subproj/WebIconDatabase.m
index 3f6209d..be58c36 100644
--- a/WebKit/Misc.subproj/WebIconDatabase.m
+++ b/WebKit/Misc.subproj/WebIconDatabase.m
@@ -292,7 +292,8 @@ NSSize WebIconLargeSize = {128, 128};
 
     WebFileDatabase *fileDB = _private->fileDatabase;
 
-    // Erase icons that have been released that are on disk
+    // Erase icons that have been released that are on disk.
+    // Must remove icons before writing them to disk or else we could potentially remove the newly written ones.
     NSEnumerator *enumerator = [_private->iconsToEraseWithURLs objectEnumerator];
     NSString *iconURLString;
     
@@ -329,8 +330,9 @@ NSSize WebIconLargeSize = {128, 128};
 - (BOOL)_hasIconForIconURL:(NSURL *)iconURL;
 {
     NSString *iconURLString = [iconURL absoluteString];
-    return ([_private->iconURLToIcons objectForKey:iconURLString] ||
-            [_private->iconsOnDiskWithURLs containsObject:iconURLString]);
+    return (([_private->iconURLToIcons objectForKey:iconURLString] ||
+             [_private->iconsOnDiskWithURLs containsObject:iconURLString]) &&
+            [_private->iconURLToRetainCount objectForKey:iconURLString]);
 }
 
 - (NSMutableDictionary *)_iconsForIconURLString:(NSString *)iconURLString
@@ -415,7 +417,6 @@ NSSize WebIconLargeSize = {128, 128};
     ASSERT(iconURL);
     ASSERT(siteURL);
     ASSERT([self _hasIconForIconURL:iconURL]);
-    ASSERT([_private->iconURLToRetainCount objectForKey:[iconURL absoluteString]]);
     
     NSString *siteURLString = [siteURL absoluteString];
     NSString *iconURLString = [iconURL absoluteString];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list