WebCore:
Reviewed by John
<rdar://problem/
4707718> - Instead of faking the user out with an in-memory icon database if their
~/Library/Safari/Icons is unwritable, we'll actually fail to open the icon database and the app will
run as if it was disabled via a preference.
Also took the opportunity to change some ASSERTS() to reasonable behavior
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(-[WebCoreIconDatabaseBridge openSharedDatabaseWithPath:]): NSLog on failure so the user has a chance to figure
out there's a problem.
(-[WebCoreIconDatabaseBridge closeSharedDatabase]):
(-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]): From here on, just replaced ASSERTS() with reasonable behavior
(-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
(-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
(-[WebCoreIconDatabaseBridge retainIconForURL:]):
(-[WebCoreIconDatabaseBridge releaseIconForURL:]):
(-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
(-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
(-[WebCoreIconDatabaseBridge _setIconURL:forPageURL:]):
(-[WebCoreIconDatabaseBridge _hasEntryForIconURL:]):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::open): If we fail to open, return false
(WebCore::IconDatabase::~IconDatabase): cleanup better
* loader/icon/IconDatabase.h:
WebKit:
Reviewed by John
<rdar://problem/
4707718> Change behavior so if the WebCore::IconDatabase can't open, WebKit releases the bridge and
continues on as if the IconDatabase is disabled.
* Misc/WebIconDatabase.m:
(-[WebIconDatabase init]): Release the bridge on failure to open
* WebCoreSupport/WebIconDatabaseBridge.m:
(+[WebIconDatabaseBridge sharedBridgeInstance]): Moved static shared instance out as a global
(-[WebIconDatabaseBridge dealloc]): Clear pointer to the shared instance
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16132
268f45cc-cd09-0410-ab3c-
d52691b4dbfc