WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 23:32:07 +0000 (23:32 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2006 23:32:07 +0000 (23:32 +0000)
commitc03638f9e0b3efbf1d23b2dd321a04740dd4844f
treecf2d4084f18e8069691ff10dfe7d153fc0982d56
parent9d85ef7bddd0e4211546ce996ce7ee084c94d1df
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
WebCore/ChangeLog
WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm
WebCore/loader/icon/IconDatabase.cpp
WebCore/loader/icon/IconDatabase.h
WebKit/ChangeLog
WebKit/Misc/WebIconDatabase.m
WebKit/WebCoreSupport/WebIconDatabaseBridge.m