Title: [219200] trunk/Source/WebKit/mac
Revision
219200
Author
beid...@apple.com
Date
2017-07-06 09:31:34 -0700 (Thu, 06 Jul 2017)

Log Message

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:

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (219199 => 219200)


--- trunk/Source/WebKit/mac/ChangeLog	2017-07-06 16:22:41 UTC (rev 219199)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-07-06 16:31:34 UTC (rev 219200)
@@ -1,3 +1,14 @@
+2017-07-06  Brady Eidson  <beid...@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  <jlew...@apple.com>
 
         Unreviewed, rolling out r219178.

Modified: trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm (219199 => 219200)


--- trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm	2017-07-06 16:22:41 UTC (rev 219199)
+++ trunk/Source/WebKit/mac/Misc/WebIconDatabase.mm	2017-07-06 16:31:34 UTC (rev 219200)
@@ -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"
@@ -97,9 +98,15 @@
 
 + (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;
 }
 

Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (219199 => 219200)


--- trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h	2017-07-06 16:22:41 UTC (rev 219199)
+++ trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h	2017-07-06 16:31:34 UTC (rev 219200)
@@ -84,7 +84,8 @@
 #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
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to