Title: [188013] trunk/Source/WebCore
Revision
188013
Author
mmaxfi...@apple.com
Date
2015-08-05 18:14:02 -0700 (Wed, 05 Aug 2015)

Log Message

Migrate FontCascade.cpp to NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=147533

Reviewed by Simon Fraser.

No new tests because there is no behavior change.

* platform/graphics/FontCascade.cpp:
(WebCore::fontCascadeCache):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (188012 => 188013)


--- trunk/Source/WebCore/ChangeLog	2015-08-06 01:10:07 UTC (rev 188012)
+++ trunk/Source/WebCore/ChangeLog	2015-08-06 01:14:02 UTC (rev 188013)
@@ -1,3 +1,15 @@
+2015-08-05  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Migrate FontCascade.cpp to NeverDestroyed
+        https://bugs.webkit.org/show_bug.cgi?id=147533
+
+        Reviewed by Simon Fraser.
+
+        No new tests because there is no behavior change.
+
+        * platform/graphics/FontCascade.cpp:
+        (WebCore::fontCascadeCache):
+
 2015-08-05  Tim Horton  <timothy_hor...@apple.com>
 
         Try to fix the build

Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (188012 => 188013)


--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2015-08-06 01:10:07 UTC (rev 188012)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2015-08-06 01:14:02 UTC (rev 188013)
@@ -33,6 +33,7 @@
 #include "WidthIterator.h"
 #include <wtf/MainThread.h>
 #include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/text/AtomicStringHash.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -214,8 +215,8 @@
 
 static FontCascadeCache& fontCascadeCache()
 {
-    DEPRECATED_DEFINE_STATIC_LOCAL(FontCascadeCache, cache, ());
-    return cache;
+    static NeverDestroyed<FontCascadeCache> cache;
+    return cache.get();
 }
 
 void invalidateFontCascadeCache()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to