Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add logging to first attempt to use the WebIconDatabase class.
https://bugs.webkit.org/show_bug.cgi?id=174190

Reviewed by Andy Estes.

* Misc/WebIconDatabase.mm:
(+[WebIconDatabase sharedIconDatabase]): On first call, log a warning of the bleak future of this non-API.
* Misc/WebKitVersionChecks.h:


Canonical link: https://commits.webkit.org/191043@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
beidson committed Jul 6, 2017
1 parent 1a37f1a commit 06cc2a1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Source/WebKit/mac/ChangeLog
@@ -1,3 +1,14 @@
2017-07-06 Brady Eidson <beidson@apple.com>

Add logging to first attempt to use the WebIconDatabase class.
https://bugs.webkit.org/show_bug.cgi?id=174190

Reviewed by Andy Estes.

* Misc/WebIconDatabase.mm:
(+[WebIconDatabase sharedIconDatabase]): On first call, log a warning of the bleak future of this non-API.
* Misc/WebKitVersionChecks.h:

2017-07-06 Matt Lewis <jlewis3@apple.com>

Unreviewed, rolling out r219178.
Expand Down
11 changes: 9 additions & 2 deletions Source/WebKit/mac/Misc/WebIconDatabase.mm
Expand Up @@ -34,6 +34,7 @@
#import "WebIconDatabaseDelegate.h"
#import "WebKitLogging.h"
#import "WebKitNSStringExtras.h"
#import "WebKitVersionChecks.h"
#import "WebNSFileManagerExtras.h"
#import "WebNSURLExtras.h"
#import "WebPreferencesPrivate.h"
Expand Down Expand Up @@ -97,9 +98,15 @@ + (void)initialize

+ (WebIconDatabase *)sharedIconDatabase
{
static WebIconDatabase *database = nil;
if (!database)
static WebIconDatabase *database;
static dispatch_once_t once;
dispatch_once(&once, ^ {
if (linkedOnOrAfter(SDKVersion::FirstWithWebIconDatabaseWarning))
NSLog(@"+[WebIconDatabase sharedIconDatabase] is not API and should not be used. WebIconDatabase no longer handles icon loading and it will be removed in a future release.");

database = [[WebIconDatabase alloc] init];
});

return database;
}

Expand Down
3 changes: 2 additions & 1 deletion Source/WebKit/mac/Misc/WebKitVersionChecks.h
Expand Up @@ -84,7 +84,8 @@ enum class SDKVersion : uint32_t {
#if PLATFORM(IOS)
FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0,
#else
FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13
FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13,
FirstWithWebIconDatabaseWarning = DYLD_MACOSX_VERSION_10_13,
#endif
};

Expand Down

0 comments on commit 06cc2a1

Please sign in to comment.